/* Chronarca · página de apresentação
   Conceito: o "mundo-maquete". Folhas de papel creme (a UI do jogo) flutuam sobre um céu
   que passa de amanhecer a noite conforme a página rola, como o relógio real do jogo.
   Tokens de cor e fontes copiados de game/src/ui/style.css e docs/03-direcao-de-arte.md. */

@font-face { font-family: 'Fredoka'; font-weight: 500; font-display: swap; src: url('assets/fonts/fredoka-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 600; font-display: swap; src: url('assets/fonts/fredoka-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 700; font-display: swap; src: url('assets/fonts/fredoka-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 400; font-display: swap; src: url('assets/fonts/nunito-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap; src: url('assets/fonts/nunito-latin-700-normal.woff2') format('woff2'); }

:root {
  color-scheme: light;
  /* papel, madeira, musgo e tinta (UI do jogo) */
  --paper: #f8f1e2; --paper-2: #efe4cc; --paper-3: #e4d5b6; --line: #d6c39f;
  --wood: #8a5a33; --wood-d: #5e3b20; --wood-l: #b98352;
  --moss: #5f9a3c; --moss-d: #3f7a2a; --moss-l: #a7d24a;
  --ink: #3b2a1c; --ink-2: #6b5643; --ink-3: #8a7560;
  --teal: #23a597; --amber: #e8a02a;
  --night: #0f1a30; --night-2: #24324c; --night-ink: #f3ead6;
  /* céu (fx.ts › daylight); o main.js interpola conforme a rolagem */
  --sky-a: #e8b9a6; --sky-b: #f4dcc4;
  --shadow: 0 1px 0 rgba(59, 42, 28, .06), 0 10px 30px -12px rgba(59, 42, 28, .35);
  --shadow-lg: 0 2px 0 rgba(59, 42, 28, .08), 0 24px 60px -24px rgba(40, 28, 18, .55);
  --font-display: 'Fredoka', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --r: 22px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--sky-b); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--moss-d); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0; text-wrap: balance; color: var(--wood-d); }
p { margin: 0; }
code { font-size: .9em; background: var(--paper-2); padding: 1px 6px; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 8px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--paper); color: var(--ink); padding: 10px 16px; border-radius: 12px; font-weight: 700; box-shadow: var(--shadow); }
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

.sky { position: fixed; inset: 0; z-index: -1; background: linear-gradient(var(--sky-a), var(--sky-b)); }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }

/* ---------- topo fixo ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--paper); }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; padding: 10px var(--gutter-r) 0 var(--gutter-l); }
.topbar-in { max-width: var(--maxw); margin-inline: auto; display: flex; align-items: center; gap: 14px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 18px; padding: 8px 8px 8px 14px; box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--wood-d); font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.nav { display: flex; gap: 2px; margin-left: 8px; }
.nav a { font-family: var(--font-display); font-weight: 500; font-size: 15px; color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: 10px; }
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.clock { margin-left: auto; font-family: var(--font-display); font-size: 13px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.clock b { font-weight: 700; font-size: 18px; color: var(--ink); margin-right: 2px; }
.btn-ghost { font-family: var(--font-display); font-weight: 500; font-size: 14px; color: var(--ink-2); background: var(--paper-2); border: 0; border-radius: 12px; padding: 8px 12px; cursor: pointer; box-shadow: 0 3px 0 var(--line); white-space: nowrap; }
.btn-ghost:hover { background: var(--paper-3); color: var(--ink); }
.btn-ghost:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-display); font-weight: 600; font-size: 16px; color: #fff; text-decoration: none; background: linear-gradient(#6ea845, var(--moss-d)); border-radius: 14px; padding: 10px 18px; box-shadow: 0 4px 0 #2d5a1d; white-space: nowrap; transition: transform .12s ease, box-shadow .12s ease, filter .12s ease; }
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 5px 0 #2d5a1d; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #2d5a1d; }
.btn-big { font-size: 20px; padding: 14px 26px; border-radius: 18px; box-shadow: 0 5px 0 #2d5a1d; }
.btn-link { font-family: var(--font-display); font-weight: 600; color: var(--wood); text-decoration: none; padding: 8px 4px; }
.btn-link:hover { color: var(--wood-d); text-decoration: underline; }

/* ---------- herói ---------- */
.hero { padding-block: clamp(28px, 6vw, 72px) clamp(20px, 4vw, 40px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.eyebrow { font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--moss-d); margin-bottom: 10px; }
.hero h1 { font-size: clamp(40px, 6.2vw, 76px); font-weight: 700; letter-spacing: -.01em; line-height: 1.02; color: var(--wood-d); }
.lede { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink); margin-top: 18px; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 26px; }
.cta-row.center { justify-content: center; }
.fine { font-size: 14px; color: var(--ink); margin-top: 14px; }
/* sobre o céu (sem papel atrás), só cores escuras para manter contraste ≥ 4,5:1 */
.hero .eyebrow, .hero .btn-link { color: var(--wood-d); }
.hero-fig { margin: 0; }
.hero-media { border-radius: 26px; background: #d8eef4 url('assets/media/hero.webp') center / cover no-repeat; aspect-ratio: 720 / 482; overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
figcaption { font-size: 14px; color: var(--ink-2); margin-top: 10px; line-height: 1.45; }
.hero-fig figcaption { background: color-mix(in srgb, var(--paper) 80%, transparent); display: inline-block; padding: 4px 12px; border-radius: 99px; }

/* ---------- selos ---------- */
.seals { padding-block: 8px 28px; }
.seal-list { list-style: none; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.seal-list li { display: flex; align-items: center; gap: 8px; background: var(--paper); border-radius: 99px; padding: 7px 16px 7px 12px; font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--wood-d); box-shadow: 0 3px 0 var(--line); }
.seal-ico { color: var(--moss); font-size: 14px; }

/* ---------- folhas (seções) ---------- */
.sheet { padding-left: var(--gutter-l); padding-right: var(--gutter-r); padding-block: 14px; }
.sheet > .sheet-in { max-width: var(--maxw); margin-inline: auto; background: var(--paper); border-radius: var(--r); padding: clamp(22px, 4vw, 48px); box-shadow: var(--shadow); }
.sheet > .sheet-in + .sheet-in { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; padding-top: 0; }
.sheet > .sheet-in:has(+ .sheet-in) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.mech-anchor { position: relative; top: -10px; }
.sec-head { max-width: 46em; margin-bottom: clamp(20px, 3vw, 34px); }
.sec-head h2, .feat-copy h2 { font-size: clamp(28px, 3.4vw, 42px); }
.sec-lede { margin-top: 12px; color: var(--ink-2); font-size: 18px; }

/* passos */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.steps li { background: var(--paper-2); border-radius: 18px; padding: 20px 18px 22px; position: relative; }
.steps li::after { content: ""; position: absolute; right: -12px; top: 34px; width: 8px; height: 8px; border-top: 2.5px solid var(--line); border-right: 2.5px solid var(--line); transform: rotate(45deg); }
.steps li:last-child::after { display: none; }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--wood); color: var(--paper); font-family: var(--font-display); font-weight: 700; font-size: 17px; box-shadow: 0 3px 0 var(--wood-d); }
.steps h3 { font-size: 21px; margin: 12px 0 6px; }
.steps p { font-size: 15.5px; color: var(--ink-2); line-height: 1.55; }

/* recursos (texto + gravação) */
.feat-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(22px, 4vw, 56px); align-items: center; }
.flip .feat-grid .feat-copy { order: 2; }
.feat-copy { display: grid; gap: 14px; align-content: start; }
.feat-copy .eyebrow { margin-bottom: -4px; }
.feat-copy p { max-width: 36em; }
.facts { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.facts li { position: relative; padding-left: 22px; font-size: 15.5px; color: var(--ink-2); line-height: 1.5; }
.facts li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 9px; height: 9px; border-radius: 3px; background: var(--moss-l); box-shadow: 0 2px 0 var(--moss); }
.facts b { color: var(--ink); }
.callout { background: #fdf3dc; border-radius: 14px; padding: 12px 16px; font-size: 15.5px; box-shadow: inset 0 0 0 2px #f1d9a4; }
.callout b { color: var(--wood-d); }
.note { font-size: 14.5px; color: var(--ink-2); border-left: 3px solid var(--line); padding-left: 12px; }

.feat-fig, .still { margin: 0; min-width: 0; }
.media { position: relative; aspect-ratio: var(--ar, 16/9); max-width: 100%; border-radius: 18px; overflow: hidden; background: var(--paper-3); box-shadow: 0 0 0 1px rgba(59, 42, 28, .08), 0 14px 34px -18px rgba(40, 28, 18, .6); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.sub-fig { padding-bottom: clamp(22px, 4vw, 48px) !important; }
.sub-fig .wide { max-width: 860px; margin-inline: auto; }
.still img { border-radius: 16px; box-shadow: 0 0 0 1px rgba(59, 42, 28, .08), 0 14px 34px -18px rgba(40, 28, 18, .6); margin-inline: auto; }
.still figcaption, .sub-fig figcaption { text-align: center; }
.sub-fig .still img { max-width: 760px; width: 100%; }

/* ---------- eras em camadas ---------- */
.strata { list-style: none; margin: 0; padding: 0; border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 1px rgba(59, 42, 28, .1); }
.strata li { display: grid; grid-template-columns: 72px minmax(150px, 220px) minmax(0, 1fr); align-items: center; gap: 0 18px; background: var(--paper); border-top: 1px solid var(--paper-3); padding-right: 18px; min-height: 58px; }
.strata li:first-child { border-top: 0; }
.strata li:nth-child(even) { background: #fbf6ea; }
.s-n { align-self: stretch; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 18px; color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); background: var(--layer); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .22), inset 0 -3px 0 rgba(0, 0, 0, .14); }
.strata h3 { font-size: 19px; padding-block: 10px; }
.strata p { font-size: 15px; color: var(--ink-2); padding-block: 10px; }
/* cores das laterais do diorama: grama → terra → pedra (03-direcao-de-arte §3.2 e §5) */
.s10 { --layer: #80bb3f; } .s9 { --layer: #5f9d37; } .s8 { --layer: #a37c4c; } .s7 { --layer: #8f6a3f; }
.s6 { --layer: #7a5934; } .s5 { --layer: #9d8a72; } .s4 { --layer: #8a7a68; } .s3 { --layer: #7f6d5a; }
.s2 { --layer: #6f6152; } .s1 { --layer: #5d5246; }

/* ---------- modos ---------- */
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mode { border-radius: 18px; padding: 22px 22px 20px; display: grid; gap: 10px; align-content: start; }
.mode h3 { font-size: 24px; }
.mode p { font-size: 16px; }
.mode-for { font-family: var(--font-display); font-weight: 500; font-size: 15px !important; }
.mode.hard { background: #f6e1d6; box-shadow: inset 0 0 0 2px #e8bfa9; }
.mode.hard h3, .mode.hard .mode-for { color: #8a2f22; }
.mode.cycles { background: #e7f0d9; box-shadow: inset 0 0 0 2px #c4dba4; }
.mode.cycles h3, .mode.cycles .mode-for { color: var(--moss-d); }
.creator { margin-top: 26px; }

/* ---------- transparência ---------- */
.truths { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.truths div { background: var(--paper-2); border-radius: 16px; padding: 16px 18px; }
.truths dt { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--wood-d); margin-bottom: 6px; }
.truths dd { margin: 0; font-size: 15px; color: var(--ink-2); line-height: 1.55; }

/* ---------- perguntas ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(16px, 4vw, 48px); align-items: start; }
.faq { display: grid; gap: 8px; }
.faq details { background: var(--paper-2); border-radius: 14px; }
.faq summary { cursor: pointer; list-style: none; font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--ink); padding: 14px 48px 14px 18px; position: relative; border-radius: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--paper); color: var(--wood); font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { background: var(--paper-3); }
.faq details p { padding: 0 18px 16px; font-size: 15.5px; color: var(--ink-2); }

/* ---------- final e rodapé (noite) ---------- */
.final { padding-block: 120px clamp(30px, 5vw, 60px); text-align: center; background: linear-gradient(rgba(15, 26, 48, 0), var(--night-2) 100px, var(--night)); }
.final-in { display: grid; justify-items: center; gap: 14px; }
.final h2 { font-size: clamp(32px, 4.6vw, 56px); color: var(--night-ink); }
.final p { color: #d9cfbb; font-size: 18px; }
.soon { margin-top: 18px; display: grid; gap: 4px; background: rgba(248, 241, 226, .08); border: 1.5px dashed rgba(248, 241, 226, .35); border-radius: 16px; padding: 14px 20px; color: #d9cfbb; font-size: 15px; max-width: 30em; }
.soon b { font-family: var(--font-display); font-weight: 600; color: var(--night-ink); font-size: 17px; }
.foot { background: var(--night); color: #cfc5b1; padding-block: 40px calc(36px + env(safe-area-inset-bottom, 0px)); font-size: 14.5px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 4fr) minmax(0, 4fr); gap: 28px; }
.foot p + p { margin-top: 8px; }
.foot-brand { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: .06em; text-transform: uppercase; color: var(--night-ink); }
.foot-h { font-size: 16px; color: var(--night-ink); margin-bottom: 8px; letter-spacing: .04em; }
.credits { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.credits b { color: var(--night-ink); font-weight: 700; }
.foot a { color: #b8e08a; }

/* ---------- entrada suave (só com JS e sem "reduzir movimento") ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .hero-copy > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .js .hero-copy > :nth-child(2) { animation-delay: .06s; } .js .hero-copy > :nth-child(3) { animation-delay: .12s; }
  .js .hero-copy > :nth-child(4) { animation-delay: .18s; } .js .hero-copy > :nth-child(5) { animation-delay: .24s; }
  .js .hero-fig { animation: rise .9s .1s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  .steps li, .truths div { transition: transform .2s ease; }
  .steps li:hover, .truths div:hover { transform: translateY(-3px); }
}

/* ---------- responsivo ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li::after { display: none; }
  .truths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero-grid, .feat-grid, .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .flip .feat-grid .feat-copy { order: 0; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .strata li { grid-template-columns: 52px minmax(0, 1fr); padding-right: 14px; }
  .strata li .s-n { grid-row: span 2; }
  .strata h3 { padding-block: 10px 0; }
  .strata p { padding-block: 2px 10px; font-size: 14.5px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .clock { display: none; }
  .brand span { display: none; }
  .btn-ghost { margin-left: auto; }
  .steps, .modes, .truths { grid-template-columns: minmax(0, 1fr); }
  .btn-play { padding: 9px 14px; font-size: 15px; }
}
@media (min-width: 2000px) {
  :root { --maxw: 1440px; }
  body { font-size: 19px; }
}
