/* Dictadito web system — warm, quiet, and deliberately useful. */
:root {
  color-scheme: light;
  --ink: #242622;
  --ink-soft: #5d625b;
  --paper: #f5f3ee;
  --surface: #fffdfa;
  --surface-muted: #ebe9e2;
  --line: #d8d8cf;
  --line-strong: #bfc2b7;
  --accent: #287b68;
  --accent-strong: #1e5f51;
  --accent-wash: #dcebe5;
  --danger: #a1433a;
  --focus: #0d7560;
  --radius-sm: .55rem;
  --radius-md: .85rem;
  --radius-lg: 1.35rem;
  --max-width: 72rem;
  --shadow: 0 18px 44px rgba(40, 43, 35, .08);
  font-family: "Geist", "Satoshi", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.58;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link {
  position: fixed; left: 1rem; top: 1rem; z-index: 20;
  transform: translateY(-180%); opacity: 0;
  padding: .7rem 1rem; border-radius: var(--radius-sm);
  background: var(--ink); color: var(--surface); font-weight: 700;
  transition: transform .2s ease, opacity .2s ease;
}
.skip-link:focus { transform: translateY(0); opacity: 1; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  background: color-mix(in srgb, var(--paper) 91%, transparent);
  backdrop-filter: blur(14px);
}
.site-header > .shell { min-height: 4.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); font-weight: 800; letter-spacing: -.03em; text-decoration: none; }
.brand-mark { width: 2rem; height: 2rem; border-radius: .55rem; background: var(--accent); color: white; display: grid; place-items: center; font-size: .9rem; }
nav { display: flex; align-items: center; gap: .2rem; }
nav:not(.site-nav):not([data-mobile-menu]) { flex-wrap: wrap; }
nav a { min-height: 44px; display: inline-flex; align-items: center; padding: .55rem .8rem; border-radius: var(--radius-sm); color: var(--ink-soft); text-decoration: none; font-size: .94rem; }
nav a:hover, nav a[aria-current="page"] { color: var(--ink); background: var(--surface-muted); }
.nav-toggle { display: none; min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }

.shell { width: min(calc(100% - 3rem), var(--max-width)); margin-inline: auto; }
.hero { padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(4rem, 9vw, 7rem); }
.hero .shell { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(19rem, .92fr); align-items: center; gap: clamp(2rem, 7vw, 7.5rem); }
.hero-copy { max-width: 40rem; }
.eyebrow, .kicker { margin: 0 0 1rem; color: var(--accent-strong); font-size: .76rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; color: var(--ink); letter-spacing: -.045em; line-height: 1.08; }
h1 { max-width: 12ch; font-size: clamp(2.75rem, 7vw, 5.75rem); font-weight: 750; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: 1.25rem; letter-spacing: -.025em; }
.hero-copy > p { max-width: 58ch; margin: 1.5rem 0 0; color: var(--ink-soft); font-size: clamp(1.05rem, 1.8vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-top: 2rem; }
.hero-visual { position: relative; min-height: 24rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.hero-visual::before { content: ""; position: absolute; inset: 0 45% 0 0; background: var(--accent-wash); opacity: .7; }
.hero-visual > * { position: relative; }

.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section-header { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 2.25rem; }
.section-header > p { max-width: 42ch; margin: 0; color: var(--ink-soft); }
.prose { max-width: 68ch; color: var(--ink-soft); }
.prose p { margin: 0 0 1.2rem; }

.button, button.button, a.button {
  min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.05rem; border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff; font-weight: 750; text-decoration: none;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease;
}
.button:hover { background: var(--accent-strong); transform: translateY(-1px); }
.button:active { transform: translateY(0) scale(.98); }
.button.secondary { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.button.secondary:hover { background: var(--surface-muted); border-color: var(--ink-soft); }
.button.ghost { background: transparent; color: var(--accent-strong); }
.button.ghost:hover { background: var(--accent-wash); }
.button.danger { background: var(--danger); }
.button[disabled], button:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, .75fr); gap: 1rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.demo-output { min-height: 13rem; padding: 1.25rem; border-radius: var(--radius-md); background: var(--surface-muted); }
.demo-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }

.form, form { display: grid; gap: 1.1rem; max-width: 38rem; }
.field { display: grid; gap: .38rem; }
label { color: var(--ink); font-size: .92rem; font-weight: 700; }
input, textarea, select { width: 100%; min-height: 46px; padding: .7rem .8rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
textarea { min-height: 8rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: #858a80; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
.helper, .field-help { margin: 0; color: var(--ink-soft); font-size: .82rem; }
.error, .field-error { margin: 0; color: var(--danger); font-size: .84rem; font-weight: 650; }

details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; list-style: none; font-weight: 750; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent-strong); font-size: 1.4rem; font-weight: 400; }
details[open] summary::after { content: "–"; }
details > p { max-width: 66ch; margin: 0 2rem 1.1rem 0; color: var(--ink-soft); }

.legal-page, .status-page, .auth-page, .referral-page { padding: clamp(3rem, 8vw, 6rem) 0; }
.legal-page .prose h2 { margin: 2.5rem 0 .8rem; font-size: 1.55rem; }
.status-state, .auth-state, .referral-state { max-width: 40rem; padding: 2rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.status-page > .shell { min-height: calc(100vh - 6rem); display: grid; place-items: center; }
.status-state h1, .auth-state h1, .referral-state h1 { max-width: 14ch; font-size: clamp(2.2rem, 6vw, 3.8rem); }
.status-state[data-state="error"], .auth-state[data-state="error"] { border-color: color-mix(in srgb, var(--danger) 48%, var(--line)); }
.status-state[data-state="success"], .auth-state[data-state="success"] { border-color: color-mix(in srgb, var(--accent) 48%, var(--line)); }
.status-label { display: inline-flex; align-items: center; gap: .45rem; margin-bottom: 1rem; color: var(--accent-strong); font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.status-label::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.loading { color: var(--ink-soft); }
.loading::after { content: ""; display: block; width: 100%; height: .55rem; margin-top: 1rem; border-radius: 99px; background: linear-gradient(90deg, var(--surface-muted), var(--accent-wash), var(--surface-muted)); background-size: 220% 100%; animation: loading 1.8s ease-in-out infinite; }
@keyframes loading { from { background-position: 100% 0; } to { background-position: -100% 0; } }

footer { padding: 2.5rem 0; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-links a:hover { color: var(--ink); }

@media (max-width: 767px) {
  .shell { width: min(calc(100% - 2rem), var(--max-width)); }
  .site-header > .shell { min-height: 4rem; }
  .js .nav-toggle { display: inline-grid; place-items: center; }
  .hero { padding-top: 3.5rem; }
  .hero .shell, .demo { grid-template-columns: 1fr; }
  .hero-visual { min-height: 17rem; }
  .section-header { display: grid; align-items: start; gap: .8rem; }
  h1 { max-width: 11ch; font-size: clamp(2.65rem, 13vw, 4.3rem); }
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --ink: #eeece5; --ink-soft: #a8aca3; --paper: #1c1e1b; --surface: #252824; --surface-muted: #30342e; --line: #41463e; --line-strong: #646b60; --accent: #6ba995; --accent-strong: #8bc1ad; --accent-wash: #263f37; --danger: #df8278; --focus: #8bd0b8; --shadow: 0 18px 44px rgba(0, 0, 0, .22); }
  .site-header { background: color-mix(in srgb, var(--paper) 90%, transparent); }
  .hero-visual::before { opacity: .45; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Landing composition: these selectors mirror the static page markup. */
.header-inner { min-height: 4.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand span { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: .2rem; }
.site-nav a { min-height: 44px; display: inline-flex; align-items: center; padding: .55rem .8rem; border-radius: var(--radius-sm); color: var(--ink-soft); text-decoration: none; font-size: .94rem; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--ink); background: var(--surface-muted); }
.site-nav .button { color: #fff; background: var(--accent); }
.site-nav .button:hover { color: #fff; background: var(--accent-strong); }
.menu-toggle, .nav-toggle { display: none; min-width: 44px; min-height: 44px; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
.menu-toggle:hover, .nav-toggle:hover { background: var(--surface-muted); }
.hero.shell { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(19rem, .92fr); align-items: center; gap: clamp(2rem, 7vw, 7.5rem); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-top: 2rem; }
.micro-note { margin: 1rem 0 0; color: var(--ink-soft); font-size: .82rem; }
.hero-art { position: relative; min-height: 24rem; }
.paper-sheet { position: absolute; overflow: hidden; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.sheet-main { inset: 2rem 0 0 3rem; transform: rotate(3deg); }
.sheet-back { inset: 0 3rem 4rem 0; transform: rotate(-5deg); background: var(--surface-muted); }
.sheet-label { color: var(--ink-soft); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.sheet-line { width: 82%; height: .6rem; margin: .7rem 0; border-radius: 4px; background: color-mix(in srgb, var(--line-strong) 52%, var(--surface)); }
.sheet-line.short { width: 56%; }
.quote { margin: 1.4rem 0; padding-left: .8rem; border-left: 3px solid var(--accent); color: var(--ink-soft); }
.sound-bar { display: flex; align-items: end; gap: 4px; height: 65px; margin-top: 2rem; }
.sound-bar i { display: block; width: 5px; height: var(--h); border-radius: 5px; background: var(--accent); opacity: .82; }
.sound-bar i:nth-child(12n+1) { height: 28%; }
.sound-bar i:nth-child(12n+2) { height: 62%; }
.sound-bar i:nth-child(12n+3) { height: 42%; }
.sound-bar i:nth-child(12n+4) { height: 90%; }
.sound-bar i:nth-child(12n+5) { height: 54%; }
.sound-bar i:nth-child(12n+6) { height: 76%; }
.sound-bar i:nth-child(12n+7) { height: 36%; }
.sound-bar i:nth-child(12n+8) { height: 66%; }
.sound-bar i:nth-child(12n+9) { height: 46%; }
.sound-bar i:nth-child(12n+10) { height: 82%; }
.sound-bar i:nth-child(12n+11) { height: 30%; }
.sound-bar i:nth-child(12n+12) { height: 58%; }
.signal { position: absolute; right: -1rem; bottom: 2rem; padding: 1rem 1.1rem; border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line)); border-radius: var(--radius-md); background: var(--accent-wash); color: var(--ink); font-size: .83rem; box-shadow: var(--shadow); }
.section-intro { display: grid; grid-template-columns: .75fr 1.25fr; gap: 4rem; margin-bottom: 3rem; }
.section-intro p { color: var(--ink-soft); font-size: 1.08rem; }
.feature-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 1.2rem; }
.feature { min-height: 220px; padding: 2rem; border-top: 3px solid var(--ink); background: var(--surface); }
.feature:nth-child(2) { margin-top: 3rem; background: var(--surface-muted); }
.feature:nth-child(3) { background: var(--accent-wash); }
.feature p, .step p { color: var(--ink-soft); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.step { padding-top: 1.2rem; border-top: 1px solid var(--ink); }
.step-number { color: var(--accent-strong); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
.evidence { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.evidence-board { min-height: 300px; padding: 2rem; border-radius: var(--radius-lg); background: #263a32; color: #e9f0e9; }
.evidence-board .tag { display: inline-block; padding: .25rem .55rem; border-radius: 999px; background: #a8cbb8; color: #173f31; font-size: .72rem; font-weight: 700; }
.evidence-board p { color: #e9f0e9; font-family: Georgia, "Times New Roman", serif; font-size: 1.5rem; line-height: 1.3; }
.evidence-board small { color: #b8cbbd; }
.privacy-band { background: var(--accent); color: #f5f8f3; }
.privacy-band h2 { color: #f5f8f3; }
.privacy-band p { color: #d6e6dc; }
.privacy-band .eyebrow { color: #bddcc9; }
.privacy-band .button.secondary { border-color: #b9d7c8; color: #fff; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.plan { padding: 2rem; border: 1px solid var(--line); background: var(--surface); }
.plan.highlight { border: 2px solid var(--accent); }
.plan ul { padding-left: 1.2rem; color: var(--ink-soft); }
.demo { padding: 2.2rem; border-radius: var(--radius-lg); background: var(--surface-muted); }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.demo label { display: block; margin-bottom: .5rem; font-size: .82rem; font-weight: 800; }
.demo textarea, .demo select, .demo input { border-color: var(--line-strong); }
.range-row { display: flex; align-items: center; gap: 1rem; margin: 1rem 0; }
.range-row input { min-height: auto; padding: 0; }
.demo-controls { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.demo-controls .button { min-height: 44px; padding: .6rem .8rem; }
.demo-status { margin: 1rem 0 0; color: var(--ink-soft); font-size: .82rem; }
.demo progress[data-demo-progress] { display: block; width: 100%; height: .5rem; margin-top: 1rem; overflow: hidden; border: 0; border-radius: 999px; background: var(--line); accent-color: var(--accent); }
.demo progress[data-demo-progress]::-webkit-progress-bar { border-radius: 999px; background: var(--line); }
.demo progress[data-demo-progress]::-webkit-progress-value { border-radius: 999px; background: var(--accent); }
.demo progress[data-demo-progress]::-moz-progress-bar { border-radius: 999px; background: var(--accent); }
[data-demo-current] { display: block; min-height: 1.6em; color: var(--ink); font-size: .94rem; line-height: 1.5; }
.visually-hidden-copy { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; user-select: text !important; }
.faq details { padding: 1.3rem 0; }
.faq summary { min-height: auto; }
.cta { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.site-footer { padding: 2.5rem 0 3rem; }
.muted, .guide-muted { color: var(--ink-soft); }
.guide-panel { padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.guide-display { max-width: 13ch; font-size: clamp(2.45rem, 6vw, 5rem); font-weight: 750; letter-spacing: -.055em; line-height: 1.02; }
.guide-muted { max-width: 60ch; font-size: 1.05rem; }
.guide-cta-title { max-width: 18ch; font-size: clamp(1.8rem, 3.5vw, 2.8rem); }

/* The script toggles either a class or an attribute; hidden always wins. */
.site-nav[hidden] { display: none !important; }
.site-nav[data-open="true"] { display: flex; }

@media (max-width: 767px) {
  .header-inner { min-height: 4rem; }
  .js .menu-toggle, .js .nav-toggle { display: inline-grid; place-items: center; }
  .js .site-nav, .js nav[data-mobile-menu] { display: none; position: absolute; left: 1rem; right: 1rem; top: calc(100% + .5rem); flex-direction: column; align-items: stretch; gap: .15rem; padding: .5rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow); }
  .site-nav[data-open="true"], .site-nav.is-open, nav[data-mobile-menu][data-open="true"], nav[data-mobile-menu].is-open { display: flex; }
  .site-nav a, nav[data-mobile-menu] a { justify-content: flex-start; }
  .site-nav .button, nav[data-mobile-menu] .button { justify-content: center; margin-top: .35rem; }
  .hero.shell { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-art { min-height: 20rem; }
  .guide-display { max-width: 11ch; font-size: clamp(2.35rem, 12vw, 4rem); }
  .guide-panel { padding: 1.25rem; }
  .sheet-main { inset: 1.5rem 0 0 1rem; }
  .sheet-back { inset: 0 1rem 3rem 0; }
  .section-intro, .feature-grid, .evidence, .demo-grid, .plans { grid-template-columns: 1fr; gap: 1.5rem; }
  .feature:nth-child(2) { margin-top: 0; }
  .steps { grid-template-columns: 1fr; gap: 1.5rem; }
  .cta { display: block; }
  .cta .button { margin-top: 1.5rem; }
  html:not(.js) .site-header > .shell, html:not(.js) .header-inner { flex-wrap: wrap; padding-block: .5rem; }
  html:not(.js) .site-nav, html:not(.js) nav[data-mobile-menu] { width: 100%; flex-wrap: wrap; }
}

@media (prefers-color-scheme: dark) {
  .evidence-board { background: #14231e; }
  .privacy-band { background: #245c4d; }
}
