/* ==========================================================================
   REFORMAMINI - landing page
   Self-contained stylesheet. Fonts are bundled in assets/fonts (no external
   requests). Light and dark themes; light is the default.
   The in-page app previews follow the structure of the approved mockups.
   ========================================================================== */

/* --- Fonts ---------------------------------------------------------------- */

@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/cinzel-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/cinzel-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/literata-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 400; font-display: swap; src: url("assets/fonts/literata-latin-400-italic.woff2") format("woff2"); }

/* --- Design tokens -------------------------------------------------------- */

:root {
  --bg: #ffffff;
  --bg-soft: #f4f8f7;
  --bg-panel: #fafafa;
  --text: #14181a;
  --muted: #55605f;
  --border: #e3e8e7;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-contrast: #ffffff;
  --accent-soft: rgba(15, 118, 110, 0.09);
  --gold: #a9741a;
  --tt-bg: #ffffff;
  --tt-text: #18181b;
  --teal-1: #17c1ad;
  --teal-2: #0a6a62;
  --teal-3: #063c36;
  --hero-ink: #f4fbfa;
  --hero-muted: rgba(244, 251, 250, 0.82);
  --shadow-sm: 0 1px 2px rgba(16, 24, 24, 0.06);
  --shadow: 0 1px 2px rgba(16, 24, 24, 0.06), 0 14px 34px -14px rgba(16, 24, 24, 0.22);
  --shadow-lg: 0 30px 70px -30px rgba(6, 60, 54, 0.55);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1150px;
  --font-brand: "Cinzel", "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Literata", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0b0f; --bg-soft: #101319; --bg-panel: #14171e; --text: #f5f8fa; --muted: #9aa6b6;
    --border: #222a37; --accent: #2dd4bf; --accent-strong: #5eead4; --accent-contrast: #06231f;
    --accent-soft: rgba(45, 212, 191, 0.13); --gold: #e6b24f;
    --tt-bg: #334155; --tt-text: #f8fafc;
    --hero-ink: #f4fbfa; --hero-muted: rgba(244, 251, 250, 0.82);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 20px 44px -20px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 40px 80px -34px rgba(0, 0, 0, 0.9);
  }
}

[data-theme="light"] {
  --bg: #ffffff; --bg-soft: #f4f8f7; --bg-panel: #fafafa; --text: #14181a; --muted: #55605f;
  --border: #e3e8e7; --accent: #0f766e; --accent-strong: #115e59; --accent-contrast: #ffffff;
  --accent-soft: rgba(15, 118, 110, 0.09); --gold: #a9741a;
  --tt-bg: #ffffff; --tt-text: #18181b;
  --hero-ink: #f4fbfa; --hero-muted: rgba(244, 251, 250, 0.82);
  --shadow: 0 1px 2px rgba(16, 24, 24, 0.06), 0 14px 34px -14px rgba(16, 24, 24, 0.22);
  --shadow-lg: 0 30px 70px -30px rgba(6, 60, 54, 0.55);
}

[data-theme="dark"] {
  --bg: #0a0b0f; --bg-soft: #101319; --bg-panel: #14171e; --text: #f5f8fa; --muted: #9aa6b6;
  --border: #222a37; --accent: #2dd4bf; --accent-strong: #5eead4; --accent-contrast: #06231f;
  --accent-soft: rgba(45, 212, 191, 0.13); --gold: #e6b24f;
  --tt-bg: #334155; --tt-text: #f8fafc;
  --hero-ink: #f4fbfa; --hero-muted: rgba(244, 251, 250, 0.82);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 20px 44px -20px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 40px 80px -34px rgba(0, 0, 0, 0.9);
}

/* --- Base ----------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }

body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden; overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0 0 0.5em; line-height: 1.15; }
h2 { font-family: var(--font-brand); font-weight: 700; font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: 0.01em; }
h3 { font-weight: 600; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.gold { color: var(--gold); }

/* --- Icons ---------------------------------------------------------------- */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.1em; height: 1.1em; display: inline-block; vertical-align: middle; }
.icon-moon { display: none; }
[data-theme="light"] .icon-moon, [data-theme="dark"] .icon-sun { display: inline-block; }
[data-theme="light"] .icon-sun, [data-theme="dark"] .icon-moon { display: none; }

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-sans); font-size: 0.95rem; font-weight: 600;
  padding: 12px 20px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--accent); color: var(--accent-contrast); box-shadow: 0 10px 24px -12px var(--accent); }
.btn--primary:hover { background: var(--accent-strong); }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn--ghost:hover { background: var(--bg-soft); border-color: var(--accent); }
.btn--gold { background: linear-gradient(135deg, #e6b24a, #b57e12); color: #171100; border: 1px solid rgba(0, 0, 0, 0.22); box-shadow: 0 10px 24px -12px #a9741a; }
.btn--gold:hover { background: linear-gradient(135deg, #f0bd58, #c68a17); filter: none; }
.btn--on-hero { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.34); color: var(--hero-ink); }
.btn--on-hero:hover { background: rgba(255, 255, 255, 0.22); }
.btn--sm { padding: 9px 15px; font-size: 0.88rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; pointer-events: none; transform: none; }

/* --- Header / navigation -------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav { display: flex; align-items: center; height: 66px; gap: 8px; }

.brand {
  display: inline-flex; align-items: center; gap: 11px;
  color: var(--text); font-family: var(--font-brand); font-weight: 700;
  font-size: 1.2rem; letter-spacing: 0.05em; text-decoration: none; flex: none;
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }

.nav__links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0 0 0 18px; padding: 0; }
.nav__links a { display: inline-flex; align-items: center; height: 38px; color: var(--muted); font-size: 0.92rem; font-weight: 500; padding: 0 13px; border-radius: 999px; }
.nav__links a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.nav__donate { display: none; }

.nav__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.lang { display: inline-flex; align-items: center; height: 38px; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.lang a { display: inline-flex; align-items: center; height: 100%; font-size: 0.78rem; font-weight: 600; padding: 0 12px; color: var(--muted); line-height: 1; }
.lang a:hover { text-decoration: none; color: var(--text); }
.lang a[aria-current="page"] { background: var(--accent); color: var(--accent-contrast); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 1px solid var(--border);
  background: transparent; color: var(--text); border-radius: var(--radius-sm); cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { background: var(--bg-soft); border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.nav__toggle { display: none; }

.burger { position: relative; display: block; width: 18px; height: 14px; }
.burger span { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.3s ease, opacity 0.2s ease, top 0.3s ease; }
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 6px; }
.burger span:nth-child(3) { top: 12px; }
.nav__toggle[aria-expanded="true"] .burger span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] .burger span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .burger span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* --- Hero ----------------------------------------------------------------- */

.hero { position: relative; overflow: hidden; color: var(--hero-ink); background: radial-gradient(130% 120% at 82% -10%, var(--teal-1) 0%, var(--teal-2) 45%, var(--teal-3) 100%); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px); background-size: 24px 24px; opacity: 0.5; }
.hero::after { content: ""; position: absolute; width: 640px; height: 640px; right: -160px; top: -220px; background: radial-gradient(circle, rgba(244, 213, 138, 0.35), transparent 62%); filter: blur(10px); }
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: 54px; padding: clamp(48px, 8vw, 74px) 0 clamp(56px, 10vw, 90px); }
.hero__logo { width: 74px; height: 74px; border-radius: 18px; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.6); margin-bottom: 20px; }
.hero__title { font-family: var(--font-brand); font-weight: 700; font-size: clamp(2.6rem, 6vw, 4.2rem); letter-spacing: 0.05em; margin: 0 0 8px; }
.hero__tagline { font-size: clamp(1.08rem, 2.4vw, 1.35rem); max-width: 34ch; margin: 0 0 16px; color: var(--hero-ink); }
.hero__verse { font-family: var(--font-serif); font-style: italic; font-size: 1rem; color: var(--hero-muted); border-left: 3px solid rgba(255, 255, 255, 0.4); padding-left: 15px; max-width: 44ch; margin: 0 0 28px; }
.hero__verse cite { display: block; font-style: normal; font-size: 0.8rem; letter-spacing: 0.07em; text-transform: uppercase; margin-top: 8px; opacity: 0.9; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 0.86rem; color: var(--hero-muted); }
.hero__meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero__meta svg { width: 15px; height: 15px; opacity: 0.9; }

/* --- Simulated app window (hero) ------------------------------------------ */

.app-window { border-radius: 14px; overflow: hidden; background: var(--bg); border: 1px solid var(--border); box-shadow: var(--shadow-lg); color: var(--text); font-size: 0.8rem; }
.app-window svg { width: 15px; height: 15px; flex: none; }
.hero .app-window { animation: floaty 8s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.app-topbar { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; background: var(--bg-panel); border-bottom: 1px solid var(--border); }
.atb-left { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1 1 auto; overflow: hidden; }
.atb-icon { width: 22px; height: 22px; border-radius: 6px; overflow: hidden; flex: none; }
.atb-icon img { width: 100%; height: 100%; }
.atb-name { font-family: var(--font-brand); font-weight: 700; letter-spacing: 0.04em; font-size: 0.9rem; white-space: nowrap; flex: none; }
.atb-div { width: 1px; height: 20px; background: var(--border); flex: none; }
.app-topbar__pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; background: var(--accent-soft); color: var(--accent); border-radius: 8px; font-weight: 600; font-size: 0.75rem; white-space: nowrap; min-width: 0; overflow: hidden; }
.app-topbar__pill .pill-chev { width: 12px; height: 12px; opacity: 0.7; flex: none; }
.atb-center { flex: 0 0 auto; display: flex; align-items: center; }
.chapter-nav { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.chapter-nav svg { width: 15px; height: 15px; }
.passage-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px; font-weight: 600; color: var(--text); font-size: 0.78rem; white-space: nowrap; }
.passage-btn svg { width: 12px; height: 12px; opacity: 0.7; }
.atb-right { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.atb-right svg { width: 15px; height: 15px; }

.app-body { position: relative; height: 360px; background: var(--bg); }
.app-view { position: absolute; inset: 0; opacity: 0; transform: translateY(10px); transition: opacity 0.4s ease, transform 0.4s ease; pointer-events: none; }
.app-view.is-active { opacity: 1; transform: none; pointer-events: auto; }

.app-bottombar { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 32px; padding: 0 14px; background: var(--bg-panel); border-top: 1px solid var(--border); color: var(--muted); font-size: 0.7rem; }
.app-bottombar b { color: var(--text); }
.app-bottombar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* reader */
.view-reader { display: grid; grid-template-columns: 118px 1fr 198px; height: 100%; }
.view-reader .rail { display: flex; flex-direction: column; border-right: 1px solid var(--border); background: var(--bg-panel); padding: 0; overflow: hidden; }
.rail-tabs { display: flex; align-items: center; gap: 3px; padding: 7px 7px 0; border-bottom: 1px solid var(--border); flex: none; }
.rail-tab { font-size: 0.6rem; font-weight: 600; color: var(--muted); padding: 5px 7px; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.rail-tab.on { color: var(--accent); background: var(--bg); border-color: var(--border); box-shadow: inset 0 -2px 0 var(--accent); }
.rail-tab--add { font-weight: 700; }
.rail-tab--ico { margin-left: auto; }
.rail-tab--ico svg { width: 11px; height: 11px; }
.rail-src { display: flex; align-items: center; gap: 5px; margin: 8px 8px 0; padding: 5px 7px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); font-size: 0.6rem; flex: none; }
.rail-src svg { width: 11px; height: 11px; color: var(--accent); flex: none; }
.rail-src__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-src__chev { margin-left: auto; color: var(--muted) !important; }
.rail-sec { margin: 9px 9px 3px; font-size: 0.54rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.rail-sec--book { color: var(--accent); }
.rail-books { list-style: none; margin: 0; padding: 0 4px; flex: 1; overflow: hidden; }
.rail-books li { font-size: 0.63rem; color: var(--muted); padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.rail-books li.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.rail-chapters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 4px 8px; flex: none; border-top: 1px solid var(--border); }
.rail-chapters span { font-size: 0.56rem; text-align: center; padding: 2px 0; border-radius: 4px; color: var(--muted); border: 1px solid transparent; }
.rail-chapters span.on { background: var(--accent); color: var(--accent-contrast); }
.view-reader .main { padding: 16px 20px; overflow: hidden; }
.chapter-title { font-family: var(--font-brand); font-size: 1.05rem; margin: 0 0 4px; }
.section-heading { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; margin: 0 0 10px; }
.view-reader .verse { font-family: var(--font-serif); margin: 0 0 9px; line-height: 1.6; font-size: 0.88rem; }
.vn { color: var(--accent); font-family: var(--font-sans); font-size: 0.64rem; font-weight: 700; vertical-align: super; margin-right: 4px; }
.woj { color: #b23b3b; }
[data-theme="dark"] .woj { color: #ff9b93; }
.hl { background: #fbe7a8; color: #2a2200; border-radius: 3px; padding: 0 2px; }
[data-theme="dark"] .hl { background: rgba(244, 213, 138, 0.95); color: #241a05; }
.view-reader .aux { display: flex; flex-direction: column; border-left: 1px solid var(--border); background: var(--bg-panel); padding: 0; overflow: hidden; }
.aux-tabs { display: flex; align-items: flex-end; gap: 2px; padding: 7px 7px 0; border-bottom: 1px solid var(--border); min-height: 36px; overflow: hidden; flex: none; }
.aux-tab { font-size: 0.64rem; font-weight: 600; color: var(--muted); padding: 6px 9px; border: 1px solid transparent; border-bottom: 0; border-radius: 7px 7px 0 0; white-space: nowrap; }
.aux-tab.on { color: var(--accent); background: var(--bg); border-color: var(--border); box-shadow: inset 0 -2px 0 var(--accent); }
.aux-tab--add { color: var(--muted); }
.aux-src { display: flex; align-items: center; gap: 6px; margin: 9px 10px 0; padding: 6px 8px; border: 1px solid var(--border); border-radius: 7px; font-size: 0.66rem; color: var(--text); background: var(--bg); flex: none; }
.aux-src__dot { width: 7px; height: 7px; border-radius: 50%; background: #e2574c; flex: none; }
.aux-src__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aux-src__chev { width: 11px; height: 11px; margin-left: auto; color: var(--muted); flex: none; }
.aux-body { padding: 11px 12px; overflow: hidden; }
.aux-body p { color: var(--muted); font-size: 0.72rem; line-height: 1.5; margin: 0 0 7px; }
.aux-body .aux-mod { font-size: 0.58rem; font-weight: 700; letter-spacing: 0.05em; color: var(--accent); text-transform: uppercase; margin-bottom: 6px; }
.aux-body .aux-back { color: var(--accent); font-weight: 600; }
.aux-body .aux-ref { color: var(--text); font-weight: 600; }

/* Interlinear word ribbon (feature mock), faithful to the app: each word stacks
   original, Strong's, transliteration, morphology and gloss; hovering the word
   opens the same globo as the app (see .tip-layer below). */
.view-inter { padding: 16px 20px; }
.il-row { display: flex; gap: 4px; flex-wrap: wrap; align-items: flex-start; justify-content: center; }
.il-word { position: relative; display: inline-flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 8px 8px; border-radius: 9px; cursor: default; transition: background 0.12s ease; }
.il-word:hover { background: var(--accent-soft); }
.il-word:focus-visible { background: var(--accent-soft); }
.il-orig { font-family: var(--font-serif); font-size: 1.34rem; line-height: 1.25; color: var(--text); white-space: nowrap; }
.il-strong { font-family: var(--font-sans); font-size: 0.72rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 5px; padding: 1px 7px; white-space: nowrap; }
.il-translit { font-family: var(--font-serif); font-style: italic; font-size: 0.92rem; color: var(--muted); white-space: nowrap; }
.il-morph { font-family: var(--font-sans); font-size: 0.66rem; font-weight: 600; color: var(--muted); max-width: 110px; line-height: 1.3; }
.il-gloss { font-family: var(--font-serif); font-size: 0.96rem; color: var(--text); }

/* --- Sections ------------------------------------------------------------- */

.section { padding: clamp(50px, 7vw, 84px) 0; }
.section--soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head { max-width: 740px; margin: 0 auto 48px; text-align: center; }
.section__head p { color: var(--muted); font-size: 1.06rem; }
.eyebrow { display: inline-block; font-size: 0.76rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; color: var(--accent); margin-bottom: 12px; }

/* --- Legal pages (privacy) ----------------------------------------------- */

.legal { max-width: 760px; }
.legal h1 { font-family: var(--font-brand); font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 6px 0 14px; }
.legal h2 { font-family: var(--font-brand); font-size: 1.15rem; margin: 28px 0 8px; }
.legal p { color: var(--muted); }

/* --- Stats ---------------------------------------------------------------- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { text-align: center; padding: 8px; }
.stat__icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; margin-bottom: 12px; color: var(--accent); background: var(--accent-soft); }
.stat__icon svg { width: 22px; height: 22px; }
.stat b { display: block; font-size: 1.02rem; }
.stat span { color: var(--muted); font-size: 0.88rem; }

/* --- Mission (why REFORMAMINI exists) ------------------------------------------- */

.mission { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.mission__text h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.mission__text p { color: var(--muted); font-size: 1.05rem; }
.mission__quote { margin: 0; padding: 30px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); box-shadow: var(--shadow); }
.mission__quote blockquote { margin: 0; font-family: var(--font-serif); font-style: italic; font-size: 1.18rem; line-height: 1.6; }
.mission__quote figcaption { margin-top: 16px; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 600; }

/* --- Feature rows (alternating) ------------------------------------------ */

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 34px 0; }
.row--flip .row__text { order: 2; }
.row__text h3 { font-family: var(--font-brand); font-weight: 700; font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin-bottom: 0.5em; }
.row__text p { color: var(--muted); font-size: 1.02rem; }
.row__list { list-style: none; margin: 18px 0 0; padding: 0; }
.row__list li { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 11px; font-size: 0.95rem; }
.row__list svg { width: 19px; height: 19px; color: var(--accent); flex: none; margin-top: 3px; }

.row__visual { position: relative; border-radius: var(--radius); padding: 26px; background: linear-gradient(150deg, var(--accent-soft), transparent 70%); border: 1px solid var(--border); }

/* module chips */
.mod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mod { display: flex; align-items: center; gap: 10px; padding: 12px 13px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-sm); }
.mod svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.mod b { display: block; font-size: 0.86rem; }
.mod span { font-size: 0.72rem; color: var(--muted); }
.mod--off { opacity: 0.5; }

/* docked panels (faithful to the app: rail + reader + docked panel with tabs) */
.dock-mock { display: flex; height: 250px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg); }
.dock-mock__rail { width: 36px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 11px; padding: 13px 0; background: var(--bg-panel); border-right: 1px solid var(--border); }
.dock-mock__rail svg { width: 16px; height: 16px; color: var(--muted); }
.dock-mock__rail svg:first-child { color: var(--accent); }
.dock-mock__reader { flex: 1; min-width: 0; padding: 16px; overflow: hidden; }
.dock-mock__reader .dt { font-family: var(--font-brand); font-size: 0.95rem; margin-bottom: 8px; }
.dock-mock__reader p { font-family: var(--font-serif); font-size: 0.82rem; line-height: 1.55; margin: 0 0 8px; }
.dock-mock__reader .vn { color: var(--accent); font-family: var(--font-sans); font-size: 0.62rem; font-weight: 700; vertical-align: super; margin-right: 3px; }
.dock-mock__panel { width: 50%; flex: none; display: flex; flex-direction: column; background: var(--bg-panel); border-left: 1px solid var(--border); min-width: 0; }
.dock-mock__head { display: flex; align-items: flex-end; gap: 3px; padding: 8px 6px 0; min-height: 40px; border-bottom: 1px solid var(--border); overflow: hidden; }
.dock-mock__tab { font-size: 0.72rem; font-weight: 600; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--border); border-bottom: 0; border-radius: 8px 8px 0 0; padding: 7px 13px; white-space: nowrap; }
.dock-mock__tab.on { background: var(--bg-panel); color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.dock-mock__body { padding: 13px 14px; overflow: hidden; }
.dock-mock__body h6 { margin: 0 0 8px; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--accent); }
.dock-mock__body p { font-family: var(--font-serif); font-size: 0.8rem; line-height: 1.55; margin: 0 0 8px; }
.dock-mock__body p.muted { color: var(--muted); }

/* Citation chip (same look as the app) and the shared tooltip layer. */
.cite-demo { font-family: var(--font-serif); font-size: 0.98rem; line-height: 2.1; color: var(--text); }
.scr-cite { color: var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 0 4px; font-weight: 600; cursor: pointer; white-space: nowrap; font-family: var(--font-sans); font-size: 0.82rem; transition: background 0.13s ease, color 0.13s ease; }
.scr-cite:hover { background: var(--accent); color: var(--accent-contrast); }

/* Strong's number chip (reader), as in the app. */
.strong-link { color: var(--accent); font-family: var(--font-sans); font-size: 0.62rem; font-weight: 600; vertical-align: super; line-height: 1; margin: 0 1px; cursor: help; white-space: nowrap; transition: color 0.13s ease; }
.strong-link:hover { text-decoration: underline; }

/* Tooltip layer: one fixed element positioned by script.js, so the globo is
   never clipped by the app preview or a transformed ancestor (same approach as
   the app). Content comes from the trigger's hidden `.tt__content`. */
.tip-layer { position: fixed; inset: 0; z-index: 300; pointer-events: none; }
.tip-box {
  position: absolute; left: 0; top: 0; transform: translate(-50%, calc(-100% - 8px));
  width: max-content; max-width: min(300px, 86vw);
  background: var(--tt-bg); color: var(--tt-text);
  border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px;
  box-shadow: var(--shadow-lg); text-align: left; direction: ltr;
  font-family: var(--font-sans); font-size: 0.75rem; font-weight: 400; line-height: 1.45;
  opacity: 0; transition: opacity 0.12s ease;
}
.tip-box.below { transform: translate(-50%, 8px); }
.tip-box.show { opacity: 1; }
.tip-box .cp-ref { display: block; font-size: 0.72rem; font-weight: 700; color: var(--accent); margin-bottom: 4px; letter-spacing: 0.02em; }
.tip-box .cp-text { display: block; font-family: var(--font-serif); font-size: 0.82rem; line-height: 1.5; }
.tip-box .cp-src { display: block; margin-top: 6px; font-size: 0.66rem; font-weight: 600; opacity: 0.82; text-transform: uppercase; letter-spacing: 0.04em; }
.tip-box .cp-hint { margin-top: 7px; font-size: 0.67rem; opacity: 0.88; display: flex; align-items: center; gap: 5px; }
.tip-box .cp-hint svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2; }
.tip-box .st-ref { display: block; font-weight: 700; color: var(--accent); margin-bottom: 2px; }
.tip-box .st-orig { font-family: var(--font-serif); font-style: italic; }
.tip-box .il-tt-head { display: block; font-family: var(--font-serif); font-size: 1.05rem; margin-bottom: 6px; unicode-bidi: isolate; }
.tip-box .il-tt-row { display: block; }
.tip-box .il-tt-strong { font-weight: 700; }
.tip-box .il-tt-translit { font-family: var(--font-serif); font-style: italic; opacity: 0.9; margin-left: 6px; }
.tip-box .il-tt-gloss { font-family: var(--font-serif); }
.tip-box .il-tt-morph { display: block; margin-top: 2px; font-size: 0.72rem; opacity: 0.82; }

/* book reader (Tolle lege): two-page paper spread like the app */
.book-spread-mock { display: flex; background: #e9e1cf; border-radius: 7px; box-shadow: var(--shadow); overflow: hidden; }
.book-page-mock { flex: 1 1 0; min-width: 0; background: #fdfbf4; color: #2b2620; padding: 20px 22px 30px; min-height: 210px; position: relative; }
.book-spine-mock { width: 2px; flex: none; background: linear-gradient(to right, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.04) 45%, rgba(255, 255, 255, 0.5) 50%, rgba(0, 0, 0, 0.04) 55%, rgba(0, 0, 0, 0.16)); }
.book-page-mock .book-doc-tag { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: #2b2620; opacity: 0.55; margin-bottom: 10px; }
.book-page-mock h4 { font-family: var(--font-brand); font-size: 0.95rem; font-weight: 700; color: #1f1b15; margin: 0 0 10px; text-align: center; }
.book-page-mock p { font-family: var(--font-serif); font-size: 0.78rem; line-height: 1.72; text-align: justify; color: #2b2620; margin: 0 0 8px; }
.book-page-mock p.drop::first-letter { font-size: 2.6rem; line-height: 0.8; font-weight: 600; float: left; margin: 5px 8px 0 0; color: var(--accent); }
.book-folio-mock { position: absolute; bottom: 9px; font-family: var(--font-sans); font-size: 0.62rem; color: #2b2620; opacity: 0.5; }
/* Citations inside the paper mock stay legible on cream paper in every theme. */
.book-page-mock .scr-cite { color: #0f766e; background: rgba(15, 118, 110, 0.1); }
.book-page-mock .scr-cite:hover { background: #0f766e; color: #ffffff; }

/* sermon / notes */
.sermon { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg); box-shadow: var(--shadow); }
.sermon__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; background: var(--bg-panel); border-bottom: 1px solid var(--border); font-size: 0.7rem; }
.sermon__bar b { color: var(--accent); }
.sermon__bar span { color: var(--muted); }
.sermon__body { padding: 16px 18px; font-family: var(--font-serif); font-size: 0.86rem; line-height: 1.6; }
.sermon__title { font-family: var(--font-brand); font-size: 1.02rem; margin: 0 0 8px; }
.sermon__body p { margin: 0 0 10px; }
.sermon__actions { display: flex; gap: 8px; padding-top: 4px; }
.sermon__btn { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-sans); font-size: 0.78rem; font-weight: 600; color: var(--accent-contrast); background: var(--accent); border-radius: 8px; padding: 7px 12px; }
.sermon__btn svg { width: 15px; height: 15px; }
.tag { display: inline-block; font-size: 0.64rem; font-family: var(--font-sans); background: var(--accent-soft); color: var(--accent); border-radius: 5px; padding: 2px 8px; margin-right: 5px; }

/* "and also" chips */
.also { margin-top: 40px; text-align: center; }
.also h3 { font-family: var(--font-brand); font-weight: 500; font-size: 1.05rem; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 16px; }
.also__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.also__chips span { display: inline-flex; align-items: center; gap: 7px; font-size: 0.85rem; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--text); }
.also__chips svg { width: 16px; height: 16px; color: var(--accent); }

/* --- Carousel (screenshots) ---------------------------------------------- */

.carousel { position: relative; }
.carousel__viewport { overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -ms-overflow-style: none; padding: 30px 0 10px; touch-action: pan-x; -webkit-overflow-scrolling: touch; }
.carousel__viewport::-webkit-scrollbar { display: none; }
.carousel__track { display: flex; gap: 20px; }
/* Half-a-gap spacers at both ends so the first and the last screenshot can be
   centred (a plain padding on the track is not part of the scrollable line). */
.carousel__track::before, .carousel__track::after { content: ""; flex: 0 0 calc((100% - 80%) / 2); }
.carousel__item { flex: 0 0 80%; scroll-snap-align: center; margin: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-panel); box-shadow: var(--shadow); filter: blur(3px); opacity: 0.5; transform: scale(0.94); transition: filter 0.45s ease, opacity 0.45s ease, transform 0.45s ease; }
.carousel__item.is-active { filter: none; opacity: 1; transform: none; box-shadow: var(--shadow-lg); }
.carousel__item img { display: block; width: 100%; height: auto; background: var(--bg-panel); cursor: zoom-in; }

/* Lightbox: click a screenshot to see it full size. */
.lightbox { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; padding: 26px; background: rgba(6, 10, 12, 0.88); }
.lightbox.open { display: flex; }
.lightbox img { max-width: 96vw; max-height: 90vh; width: auto; height: auto; border-radius: 10px; box-shadow: var(--shadow-lg); }
.lightbox__close { position: absolute; top: 16px; right: 18px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.32); background: rgba(0, 0, 0, 0.4); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox__close:hover { background: rgba(0, 0, 0, 0.7); }
.lightbox__count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: #fff; font-family: var(--font-sans); font-size: 0.85rem; opacity: 0.85; }
.carousel__item figcaption { padding: 14px 18px; font-size: 0.9rem; color: var(--muted); border-top: 1px solid var(--border); text-align: center; }
.carousel__btn { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg); color: var(--accent); box-shadow: var(--shadow); cursor: pointer; transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease; }
.carousel__btn:hover { background: var(--accent); color: var(--accent-contrast); }
.carousel__btn svg { width: 20px; height: 20px; }
.carousel__btn.prev { left: -8px; }
.carousel__btn.next { right: -8px; }

.ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; aspect-ratio: 16 / 10; padding: 26px; text-align: center; color: var(--muted); background: repeating-linear-gradient(45deg, var(--bg-soft) 0 14px, var(--bg-panel) 14px 28px); }
.ph svg { width: 32px; height: 32px; opacity: 0.6; }
.ph strong { font-size: 0.95rem; font-weight: 600; }
.ph span { font-size: 0.82rem; opacity: 0.85; }

/* --- Lightweight band ----------------------------------------------------- */

.band { position: relative; overflow: hidden; color: var(--hero-ink); background: radial-gradient(120% 130% at 12% -20%, var(--teal-1), var(--teal-2) 52%, var(--teal-3)); }
.band .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; padding-top: 76px; padding-bottom: 76px; }
.band h2 { color: #ffffff; }
.band .eyebrow { color: #bff3ea; }
.band p { color: var(--hero-ink); }
.band__facts { display: grid; gap: 14px; }
.fact { display: flex; gap: 14px; align-items: flex-start; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 12px; padding: 15px 17px; }
.fact svg { width: 22px; height: 22px; color: #ffe6a8; flex: none; margin-top: 2px; }
.fact b { display: block; color: #ffffff; }
.fact span { color: rgba(255, 255, 255, 0.9); font-size: 0.9rem; }

/* --- Download ------------------------------------------------------------- */

.download { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; align-items: stretch; }
.panel { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.dl-option { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--border); }
.dl-option:first-of-type { border-top: 0; padding-top: 0; }
.dl-option__icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.dl-option__icon svg { width: 22px; height: 22px; }
.dl-option__body { flex: 1; min-width: 0; }
.dl-option__body strong { display: block; font-size: 1rem; }
.dl-option__body span { font-size: 0.86rem; color: var(--muted); }
.dl-option .btn { flex: none; }
.dl-option .btn:hover { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.dl-checksums { margin: 14px 0 0; font-size: 0.82rem; color: var(--muted); }
.dl-checksums a { color: var(--accent); }

.notice { display: flex; height: 100%; gap: 14px; align-items: flex-start; border: 1px solid var(--border); background: var(--bg-panel); border-radius: var(--radius-sm); padding: 22px 24px; }
.notice__icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.notice__icon svg { width: 20px; height: 20px; }
.notice h3 { font-size: 1rem; margin-bottom: 0.7em; }
.notice p { color: var(--muted); font-size: 0.92rem; line-height: 1.65; margin-bottom: 0; }
.notice p + p { margin-top: 11px; }
.pending { display: inline-block; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border: 1px dashed var(--border); border-radius: 999px; padding: 2px 9px; margin-left: 6px; vertical-align: middle; }

/* --- Support / donate ----------------------------------------------------- */

.support { text-align: center; max-width: 700px; margin: 0 auto; }
.support .heart { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.support .heart svg { width: 23px; height: 23px; }
.support h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.support p { color: var(--muted); font-size: 1.04rem; }
.support__note { font-size: 0.95rem; }
.support__verse { display: inline-block; margin-top: 8px; font-family: var(--font-serif); font-style: italic; color: var(--text); font-size: 1rem; }

/* --- Footer --------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--border); padding: 54px 0 30px; background: var(--bg-soft); }
.site-footer .wrap { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 34px; }
.site-footer__brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-brand); font-weight: 700; letter-spacing: 0.05em; font-size: 1.15rem; }
.site-footer__brand img { width: 30px; height: 30px; border-radius: 8px; }
.site-footer p { color: var(--muted); font-size: 0.9rem; }
.site-footer__legal { font-size: 0.8rem; opacity: 0.86; }
.site-footer h4 { font-size: 0.76rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); margin: 0 0 13px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer li a { color: var(--text); font-size: 0.92rem; }
.site-footer__bottom { max-width: var(--maxw); margin: 38px auto 0; padding: 20px 22px 0; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; align-items: center; color: var(--muted); font-size: 0.84rem; }
.site-footer__dev { display: inline-flex; align-items: center; gap: 12px; }
.site-footer__devlabel { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.site-footer__devbrand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.site-footer__devbrand:hover { text-decoration: none; }
.site-footer__devbrand svg { transition: transform 0.5s ease; }
.site-footer__devbrand:hover svg { transform: rotate(90deg); }
.site-footer__devname { display: flex; flex-direction: column; text-align: left; line-height: 1; }
.site-footer__devname b { font-family: var(--font-sans); font-weight: 700; font-size: 16px; line-height: 1; }
.site-footer__devname small { font-size: 8px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.soli { font-family: var(--font-brand); letter-spacing: 0.16em; font-size: 0.8rem; }

/* --- Reveal animation ----------------------------------------------------- */

[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
[data-reveal].in { opacity: 1; transform: none; }

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; padding: 56px 0 68px; }
  .hero__tagline { max-width: none; }
  .band .wrap { grid-template-columns: 1fr; gap: 34px; }
  .mission { grid-template-columns: 1fr; gap: 30px; }
  .row { grid-template-columns: 1fr; gap: 32px; padding: 32px 0; }
  .row--flip .row__text { order: 0; }
  .download { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 780px) {
  .nav { height: 72px; }
  .nav__links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    padding: 6px 16px 16px; background: var(--bg);
    border-bottom: 1px solid var(--border);
    border-radius: 0 0 18px 18px;
    box-shadow: 0 26px 44px -26px rgba(0, 0, 0, 0.45);
    display: flex;
    opacity: 0; visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
  }
  .nav__links[data-open="true"] { opacity: 1; visibility: visible; }
  .nav__links li { border-bottom: 1px solid var(--border); }
  .nav__links li:last-child { border-bottom: 0; }
  .nav__links a { height: auto; padding: 15px 6px; font-size: 1.02rem; border-radius: 0; font-weight: 500; }
  .nav__links a:hover { background: transparent; color: var(--accent); }
  .nav__toggle { display: inline-flex; }
  .nav__actions .btn--gold { display: none; }
  .nav__donate { display: block; }
  .nav__donate a { display: block; margin: 14px 0 2px; padding: 13px 6px; text-align: center; background: linear-gradient(135deg, #e6b24a, #b57e12); color: #171100; border: 1px solid rgba(0, 0, 0, 0.22); border-radius: 10px; font-weight: 700; }
  .nav__donate a:hover { background: linear-gradient(135deg, #f0bd58, #c68a17); color: #171100; }

  .brand { font-size: 1.12rem; }
  .brand img { width: 34px; height: 34px; }
  .icon-btn { width: 42px; height: 42px; }
  .lang { height: 40px; }

  /* En pantallas tactiles se apagan las animaciones de aparicion: el contenido
     se ve de una vez y nada se mueve mientras se lee. */
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero .app-window { animation: none; }

  .wrap { padding: 0 24px; }
  .hero__inner { gap: 38px; padding: 58px 0 70px; }
  .hero__logo { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 22px; }
  .hero__title { font-size: 2.4rem; margin-bottom: 12px; }
  .hero__tagline { font-size: 1.05rem; margin-bottom: 26px; }
  .hero__verse { font-size: 0.95rem; margin-bottom: 30px; }
  .hero__cta { margin-bottom: 26px; }
  .hero__meta { gap: 10px 20px; }

  .section { padding: clamp(44px, 8vw, 64px) 0; }
  .section__head { margin-bottom: 44px; }
  .section__head p { font-size: 1rem; }

  .app-body { height: 330px; }
  .view-reader { grid-template-columns: 1fr; }
  .view-reader .rail, .view-reader .aux { display: none; }
  /* En movil el preview del lector comprime todo y no aporta: fuera. */
  .hero .app-window { display: none; }
  .dock-mock { flex-direction: column; height: auto; }
  .dock-mock__rail { flex-direction: row; width: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 10px 12px; }
  .dock-mock__panel { width: 100%; border-left: 0; border-top: 1px solid var(--border); }
  .book-page-mock--b { display: none; }

  .stats { grid-template-columns: 1fr 1fr; gap: 22px; }
  .stat__icon { width: 42px; height: 42px; }
  .stat span { font-size: 0.84rem; }
  .carousel__track::before, .carousel__track::after { flex-basis: calc((100% - 92%) / 2); }
  .carousel__item { flex-basis: 92%; }
  .carousel__btn { width: 40px; height: 40px; }
  .carousel__btn.prev { left: 0; }
  .carousel__btn.next { right: 0; }
  .site-footer .wrap { grid-template-columns: 1fr; gap: 26px; }
  .dl-option { flex-wrap: wrap; }
  .dl-option .btn { width: 100%; }
  .band .wrap { padding-top: 58px; padding-bottom: 58px; }
}

@media (max-width: 620px) {
  .atb-center, .atb-name, .atb-div { display: none; }
  .atb-right svg:nth-child(3), .atb-right svg:nth-child(4) { display: none; }

  /* Hero a pantalla completa: logo grande arriba, titulo debajo y todo
     centrado, con un triangulo que invita a bajar. */
  .hero { min-height: calc(100vh - 72px); min-height: calc(100dvh - 72px); display: flex; align-items: center; background: radial-gradient(140% 92% at 50% -18%, var(--teal-1) 0%, var(--teal-2) 72%, #0a6a62 100%); }
  .hero__inner { grid-template-columns: 1fr; width: 100%; padding: clamp(28px, 7vh, 56px) 0 clamp(76px, 15vh, 108px); }
  .hero__copy { display: flex; flex-direction: column; align-items: center; text-align: center; }
  /* En movil el texto de presentacion se quita: el titulo y la cita bastan. */
  .hero__tagline { display: none; }
  .hero__logo { width: 112px; height: 112px; border-radius: 28px; margin: 0 0 26px; }
  .hero__title { font-size: 2.7rem; margin: 0 0 16px; }
  .hero__tagline { font-size: 1.15rem; max-width: 28ch; margin: 0 0 24px; }
  .hero__verse { border-left: 0; padding-left: 0; margin: 0 0 32px; max-width: 30ch; font-size: 1.25rem; }
  .hero__cta { justify-content: center; width: 100%; max-width: 360px; padding: 0 12px; margin: 0 0 20px; }
  .hero__meta { justify-content: center; }

  .scroll-hint {
    display: block; position: absolute; left: 50%; bottom: 36px;
    color: rgba(255, 255, 255, 0.95); transform: translateX(-50%);
    animation: bob 1.8s ease-in-out infinite; transition: opacity 0.3s ease; z-index: 2;
  }
  .scroll-hint svg { width: 54px; height: 54px; }
  .scroll-hint.hidden { opacity: 0; }
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 9px); }
}

@media (min-width: 621px) {
  .scroll-hint { display: none; }
}

/* --- Movil estrecho (telefonos) ------------------------------------------ */

@media (max-width: 520px) {
  /* La marca y los controles de la cabecera no caben todos: se oculta el
     enlace a GitHub (sigue en el pie) y se aprietan los botones. */
  .nav { height: 72px; gap: 6px; }
  .brand { font-size: 1.02rem; gap: 7px; }
  .brand img { width: 32px; height: 32px; }
  .nav__actions { gap: 4px; }
  .nav__actions a[href^="https://github.com"] { display: none; }
  .lang { height: 40px; }
  .lang a { padding: 0 7px; }
  .icon-btn { width: 42px; height: 42px; }

  .hero__inner { padding: 28px 0 92px; }
  .hero__logo { width: 100px; height: 100px; border-radius: 26px; margin: 0 0 22px; }
  .hero__title { font-size: 2.35rem; }
  .hero__tagline { font-size: 1rem; }
  .hero__verse { font-size: 1.2rem; }
  .hero__cta { gap: 10px; }
  .hero__cta .btn { flex: 1 1 auto; }
  .hero__meta { gap: 8px 16px; font-size: 0.82rem; }

  .app-body { height: 300px; }

  .section { padding: 48px 0; }
  .section__head { margin-bottom: 30px; }
  .section__head h2 { font-size: 1.5rem; }
  .section__head p { font-size: 0.96rem; }

  .stats { grid-template-columns: 1fr 1fr; gap: 16px; }
  .stat b { font-size: 0.98rem; }
  .stat span { font-size: 0.82rem; }

  .mission { gap: 24px; }
  .mission__quote { padding: 22px; }
  .mission__quote blockquote { font-size: 1.05rem; }

  .row { gap: 22px; padding: 24px 0; }
  .row__text h3 { font-size: 1.25rem; }
  .row__visual { padding: 16px; }

  .also { margin-top: 28px; }
  .also__chips { gap: 7px; }
  .also__chips span { font-size: 0.8rem; padding: 7px 12px; }

  .carousel__item { flex-basis: 96%; }
  .carousel__track::before, .carousel__track::after { flex-basis: calc((100% - 96%) / 2); }
  .carousel__btn { width: 38px; height: 38px; }

  .panel { padding: 20px; }
  .notice { padding: 18px; }
  .dl-option { gap: 12px; }
  .dl-option__icon { width: 38px; height: 38px; }

  .band .wrap { padding-top: 52px; padding-bottom: 52px; }

  .support h2 { font-size: 1.7rem; }

  .site-footer { padding: 40px 0 26px; }
  .site-footer__bottom { justify-content: center; text-align: center; }
  .site-footer__dev { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 380px) {
  .hero__title { font-size: 1.85rem; }
  .stats { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .app-window { animation: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .app-view, .nav__links, .burger span, .carousel__item, .tip-box, .scroll-hint { transition: none; }
  .scroll-hint { animation: none; }
  .btn:hover, .il-word:hover { transform: none; }
}
