/* Clareira: landing page. Tokens e regras vêm de design.md do projeto.
   Só tipografia e cor sólida: sem fotos, gradientes ou emojis. */

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dm-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --background: #FAF4E4;
  --surface: #FFFBF0;
  --surface-variant: #F0E7D0;
  --on-background: #23342B;
  --on-surface-variant: #55645A;
  --primary: #C07F23;
  --primary-text: #8A5300;
  --secondary: #2F4A3A;
  --outline: #8A8368;
  --on-primary: #17211B;
  --block-fg: #FAF4E4;
  --frame: #17211B;

  /* cor do dia: o script substitui estes valores; esta é a reserva sem JavaScript */
  --day-bg: #B0D5E2;
  --day-text: #23342B;
  --day-rule: #8A5300;

  --serif: "Source Serif 4", "Noto Serif", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: #17211B;
    --surface: #1E2A23;
    --surface-variant: #2A3830;
    --on-background: #F3ECD6;
    --on-surface-variant: #BCC6B8;
    --primary: #F2B84B;
    --primary-text: #F2B84B;
    --secondary: #A9C9A0;
    --outline: #75846F;
    --on-primary: #17211B;
    --block-fg: #17211B;
    --frame: #0E1511;

    --day-bg: #3B6472;
    --day-text: #F3ECD6;
    --day-rule: #F2B84B;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --background: #17211B;
  --surface: #1E2A23;
  --surface-variant: #2A3830;
  --on-background: #F3ECD6;
  --on-surface-variant: #BCC6B8;
  --primary: #F2B84B;
  --primary-text: #F2B84B;
  --secondary: #A9C9A0;
  --outline: #75846F;
  --on-primary: #17211B;

  --day-bg: #3B6472;
  --day-text: #F3ECD6;
  --day-rule: #F2B84B;
  color-scheme: dark;
  --block-fg: #17211B;
  --frame: #0E1511;
}
:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--on-background);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--primary-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--primary-text);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--surface); color: var(--on-background);
  padding: 10px 16px; border: 1px solid var(--outline); border-radius: 12px; z-index: 10;
}
.skip:focus { left: 8px; }

.wrap { width: min(100% - 40px, 1040px); margin-inline: auto; }

/* ---------- cabeçalho ---------- */
.site-header { position: sticky; top: 0; z-index: 5; padding: 14px 0; background: var(--background); border-bottom: 1px solid transparent; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--on-background); }
.brand svg { width: 36px; height: 36px; flex: none; }
.brand span { font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1; letter-spacing: -.01em; }
.header-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 12px; }
.site-nav { display: flex; gap: 4px; font-size: 15px; font-weight: 500; }
.site-nav a { color: var(--on-surface-variant); text-decoration: none; padding: 8px 14px; border-radius: 20px; }
.site-nav a:hover { color: var(--on-background); background: var(--surface-variant); }

/* interruptor de tema: sol (claro) e lua (escuro); o script o exibe, sem JavaScript o site segue o sistema */
.theme-switch {
  appearance: none; position: relative; display: inline-flex; align-items: center; justify-content: space-between;
  width: 60px; height: 32px; padding: 0 8px; cursor: pointer;
  border: 1px solid var(--outline); border-radius: 16px; background: var(--surface-variant);
  color: var(--on-surface-variant);
}
.theme-switch[hidden] { display: none; }
.theme-switch svg { position: relative; z-index: 1; width: 16px; height: 16px; }
.theme-switch .thumb {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 12px;
  background: var(--secondary); transition: transform .2s ease;
}
.theme-switch[aria-checked="true"] .thumb { transform: translateX(28px); }
.theme-switch[aria-checked="false"] .sun,
.theme-switch[aria-checked="true"] .moon { color: var(--background); }

/* ---------- herói ---------- */
.hero { padding: 32px 0 80px; }
.hero .wrap { display: grid; gap: 64px; align-items: center; }

.tag {
  display: inline-block; margin: 0 0 24px; padding: 8px 16px; border-radius: 20px;
  background: var(--surface-variant); color: var(--primary-text);
  font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
h1 {
  margin: 0 0 24px;
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(40px, 7vw, 72px); line-height: 1.04; letter-spacing: -.025em;
  text-wrap: balance;
}
.lede { margin: 0 0 36px; max-width: 32em; font-size: 20px; line-height: 1.55; color: var(--on-surface-variant); }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 16px; padding: 0; list-style: none; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-height: 60px; padding: 8px 28px; border-radius: 30px;
  background: var(--on-background); color: var(--background);
}
.store-link { flex-direction: row; align-items: center; gap: 14px; padding: 8px 28px 8px 22px; text-decoration: none; }
.store-link:hover { opacity: .9; }
.store-link svg { width: 26px; height: 26px; flex: none; }
.store-text { display: flex; flex-direction: column; justify-content: center; }
.store small { font-size: 12px; font-weight: 500; opacity: .8; line-height: 1.2; }
.store strong { font-size: 17px; font-weight: 600; line-height: 1.3; }
/* selos oficiais das lojas: use só os arquivos baixados das lojas, sem alterar (ver README) */
.store-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 0 0 16px; padding: 0; list-style: none; }
.store-badges a { display: block; padding: 6px; } /* área livre de 1/4 da altura */
.store-badges img { height: 56px; width: auto; }
.note { margin: 0; font-size: 15px; color: var(--on-surface-variant); }

/* ---------- palco do celular ---------- */
.stage { position: relative; display: grid; justify-items: center; padding: 8px 0; isolation: isolate; }
.orb {
  position: absolute; z-index: -1; inset: 6% 2% 4%; border-radius: 50%;
  background: var(--surface-variant);
}
.orb::after {
  content: ""; position: absolute; inset: 14%; border-radius: 50%;
  border: 2px solid var(--outline); opacity: .35;
}
.device {
  position: relative; width: min(100%, 330px);
  padding: 10px; border-radius: 48px;
  background: var(--frame); box-shadow: 0 0 0 2px var(--outline);
}
.device::before {
  content: ""; position: absolute; z-index: 2; top: 20px; left: 50%; width: 84px; height: 22px;
  transform: translateX(-50%); border-radius: 11px; background: var(--frame);
}
.card {
  position: relative;
  background: var(--day-bg); color: var(--day-text);
  border-radius: 38px; padding: 56px 26px 24px;
  min-height: 600px; display: flex; flex-direction: column;
  transition: background-color .3s ease, color .3s ease;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-label { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; line-height: 16px; }
.card-sub { margin-top: 4px; font-size: 14px; font-weight: 500; line-height: 20px; }

.card-body { flex: 1; display: grid; align-content: center; padding: 24px 0; }
.page[hidden] { display: none; }

.word {
  margin: 0; text-align: center;
  font-family: var(--serif); font-weight: 600;
  font-size: 29px; line-height: 1.3; text-wrap: balance;
}
.rule { width: 32px; height: 2px; margin: 24px auto 0; background: var(--day-rule); }
.ref { margin: 20px 0 0; text-align: center; font-size: 15px; font-weight: 700; line-height: 20px; }
.reflection { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 17px; line-height: 1.5; }

.card-foot { display: grid; justify-items: center; gap: 12px; }
.theme-week { margin: 0; font-size: 13px; line-height: 18px; }
.dots { display: flex; gap: 10px; align-items: center; }
.dot {
  appearance: none; background: transparent; padding: 0; cursor: pointer;
  width: 8px; height: 8px; border-radius: 4px;
  border: 1.5px solid var(--day-text);
  transition: width .2s ease;
  position: relative;
}
.dot::after { content: ""; position: absolute; inset: -20px -8px; } /* alvo de toque maior */
.dot[aria-selected="true"] { width: 20px; background: var(--day-text); }

.chips { display: none; margin: 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 12px; border-radius: 28px;
  background: var(--surface); border: 1px solid var(--surface-variant);
  font-size: 14px; font-weight: 600; line-height: 1.25; color: var(--on-background);
}
.chip svg { width: 36px; height: 36px; padding: 8px; border-radius: 50%; background: var(--primary); color: var(--on-primary); flex: none; }

.card-caption { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--on-surface-variant); }

/* ---------- seções ---------- */
section { padding: 72px 0; }
h2 {
  margin: 0 0 40px;
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(30px, 5vw, 48px); line-height: 1.1; letter-spacing: -.02em; text-wrap: balance;
}

.bento { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.tile { padding: 32px; border-radius: 32px; background: var(--surface); border: 1px solid var(--surface-variant); }
.tile svg { width: 40px; height: 40px; margin-bottom: 32px; padding: 8px; border-radius: 50%; background: var(--surface-variant); color: var(--primary-text); }
.tile h3 { margin: 0 0 10px; font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 1.2; letter-spacing: -.01em; }
.tile p { margin: 0; color: var(--on-surface-variant); }
.swatches { display: grid; grid-template-columns: repeat(3, 64px); gap: 16px; margin: 0 0 24px; }
.swatches button {
  appearance: none; position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
}
.swatches button[data-i="8"] { background: #B0D5E2; }
.swatches button[data-i="6"] { background: #B6D6C7; }
.swatches button[data-i="2"] { background: #EAC7BE; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .swatches button[data-i="8"] { background: #3B6472; }
:root:not([data-theme="light"]) .swatches button[data-i="6"] { background: #446557; }
:root:not([data-theme="light"]) .swatches button[data-i="2"] { background: #77574E; }
}
:root[data-theme="dark"] .swatches button[data-i="8"] { background: #3B6472; }
:root[data-theme="dark"] .swatches button[data-i="6"] { background: #446557; }
:root[data-theme="dark"] .swatches button[data-i="2"] { background: #77574E; }
.swatches button[aria-pressed="true"] { outline: 3px solid var(--on-background); outline-offset: 3px; }
.swatch-hint { margin: -8px 0 24px; font-size: 14px; color: var(--on-surface-variant); }
.swatch-preview {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 32px;
  padding: 16px 20px; border-radius: 20px; background: var(--day-bg); color: var(--day-text);
  font-size: 15px; transition: background-color .3s ease, color .3s ease;
}
.swatch-preview strong { font-family: var(--serif); font-size: 20px; font-weight: 600; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) :root:not([data-theme="light"]) :root:not([data-theme="light"]) :root:not([data-theme="light"]) :root:not([data-theme="light"]) :root:not([data-theme="light"]) :root:not([data-theme="light"]) :root:not([data-theme="light"]) :root:not([data-theme="light"]) :root:not([data-theme="light"]) :root:not([data-theme="light"]) :root:not([data-theme="light"]) }
:root[data-theme="dark"] :root[data-theme="dark"] :root[data-theme="dark"] :root[data-theme="dark"] :root[data-theme="dark"] :root[data-theme="dark"] :root[data-theme="dark"] :root[data-theme="dark"] :root[data-theme="dark"] :root[data-theme="dark"] :root[data-theme="dark"] :root[data-theme="dark"] 
.tile-a { background: var(--surface-variant); border-color: transparent; }
.tile-b { background: var(--primary); border-color: transparent; color: var(--on-primary); }
.tile-b svg { background: var(--on-primary); color: var(--primary); }
.tile-b p { color: var(--on-primary); }

.faq { max-width: 760px; display: grid; gap: 12px; }
.faq details { padding: 0 24px; border-radius: 24px; background: var(--surface); border: 1px solid var(--surface-variant); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer;
  padding: 20px 0; font-weight: 600; font-size: 18px; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 26px; line-height: 1; color: var(--primary-text); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 20px; color: var(--on-surface-variant); }
.statement { padding: 0 0 80px; }
.statement .block {
  padding: clamp(32px, 7vw, 80px); border-radius: 40px;
  background: var(--secondary); color: var(--block-fg);
}
.statement h2 { margin: 0 0 24px; max-width: 14em; }
.statement p { margin: 0 0 14px; max-width: 34em; font-size: 20px; line-height: 1.55; }
.statement p:last-child { margin: 0; opacity: .85; font-size: 18px; }

/* ---------- rodapé ---------- */
.site-footer { padding: 40px 0 56px; border-top: 1px solid var(--surface-variant); font-size: 14px; color: var(--on-surface-variant); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; padding: 0; list-style: none; }
.site-footer a { display: inline-block; padding: 8px 0; }

/* ---------- entrada suave ao rolar (só com JavaScript) ---------- */
.reveal-on [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal-on [data-reveal].in { opacity: 1; transform: none; }

/* ---------- páginas de texto (privacidade, suporte) ---------- */
.doc { padding: 40px 0 72px; }
.doc .wrap { max-width: 720px; }
.doc h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 8px; }
.doc .meta { margin: 0 0 40px; font-size: 14px; color: var(--on-surface-variant); }
.doc h2 { margin: 48px 0 12px; font-size: 26px; letter-spacing: -.01em; }
.doc h3 { margin: 28px 0 8px; font-size: 18px; font-family: var(--sans); font-weight: 700; }
.doc p, .doc li { margin: 0 0 12px; }
.doc ul { padding-left: 22px; margin: 0 0 12px; }
.doc table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--surface-variant); }
.doc th { font-weight: 700; }
.draft { margin: 0 0 32px; padding: 14px 16px; border-radius: 20px; background: var(--surface-variant); font-size: 15px; }

@media (max-width: 559px) {
  .site-header .wrap { flex-wrap: wrap; }
  .header-end { display: contents; }
  .brand { order: 1; }
  .theme-switch { order: 2; margin-left: auto; }
  .site-nav { order: 3; width: 100%; margin: 0 -14px; }
  .doc table { table-layout: fixed; font-size: 14px; }
  .doc th, .doc td { padding: 8px 6px; overflow-wrap: anywhere; }
}

@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-10px); } }

@media (min-width: 860px) {
  .hero { padding: 48px 0 112px; }
  .hero .wrap { grid-template-columns: 1.05fr .95fr; gap: 56px; }
  .bento { grid-template-columns: repeat(6, 1fr); gap: 20px; }
  .tile-a { grid-column: span 3; grid-row: span 2; display: flex; flex-direction: column; justify-content: space-between; }
  .tile-b { grid-column: span 3; }
  .tile-c { grid-column: span 3; }
  .chips { display: block; }
  .chip { position: absolute; z-index: 3; }
  .chip-1 { top: 1%; left: -14%; }
  .chip-2 { top: 50%; right: -16%; }
  .chip-3 { bottom: 12%; left: -10%; }
}
@media (min-width: 860px) and (prefers-reduced-motion: no-preference) {
  .chip { animation: drift 4s ease-in-out infinite alternate; }
  .chip-2 { animation-delay: -1.3s; }
  .chip-3 { animation-delay: -2.6s; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .dot, .swatch-preview, .theme-switch .thumb, .reveal-on [data-reveal] { transition: none; }
}

/* ---------- passos ---------- */
.steps { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; padding: 32px; border-radius: 32px; background: var(--surface); border: 1px solid var(--surface-variant); }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 24px;
  border-radius: 50%; background: var(--surface-variant); color: var(--primary-text);
  font-family: var(--serif); font-weight: 600; font-size: 20px;
}
.steps h3 { margin: 0 0 10px; font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 1.2; letter-spacing: -.01em; }
.steps p { margin: 0; color: var(--on-surface-variant); }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
