/* Dear Cosmos — landing page
   Aesthetic: refined celestial. Deep void, high-contrast gold serif, cyan starlight,
   a single bespoke focal element (the orbital emblem) carrying the page's only motion. */

/* ── i18n (behavior.js sets html[lang]; visibility is attribute-driven) ───────── */
.lang-es { display: none; }
html[lang="es"] .lang-en { display: none; }
html[lang="es"] .lang-es { display: revert; }

/* ── tokens ───────────────────────────────────────────────────────────────────── */
:root {
  --void:      #05060d;
  --void-2:    #080b16;
  --panel:     #0b0f1e;
  --panel-2:   #0e1325;
  --gold:      #e8c879;
  --gold-1:    #f2d88a;
  --gold-deep: #b8923f;
  --cyan:      #7fe3f0;
  --ink:       #f4eddd;
  --ink-soft:  #c9c6d2;
  --ink-mute:  #84849a;
  --line:      rgba(232,200,121,.15);
  --line-soft: rgba(244,237,221,.08);

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Hanken Grotesk", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --maxw: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* fixed nav clearance so anchored section heads aren't hidden under the bar */
section[id], article[id] { scroll-margin-top: 92px; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--void);
  line-height: 1.6;
  font-size: 17px;
  letter-spacing: .005em;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* atmosphere: nebula glow + two starfield layers, all fixed behind content */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(1100px 720px at 78% -8%, rgba(232,200,121,.14), transparent 60%),
    radial-gradient(900px 680px at 12% 8%,  rgba(127,227,240,.09), transparent 58%),
    radial-gradient(1200px 900px at 50% 116%, rgba(58,46,120,.22), transparent 62%),
    linear-gradient(180deg, var(--void) 0%, var(--void-2) 46%, var(--void) 100%);
}
.stars, .stars-2 {
  content: ""; position: fixed; inset: -2px; z-index: -2; pointer-events: none;
}
.stars {
  background-image:
    radial-gradient(1.4px 1.4px at 16% 22%, rgba(255,252,240,.9), transparent),
    radial-gradient(1.2px 1.2px at 72% 14%, rgba(255,252,240,.75), transparent),
    radial-gradient(1px 1px   at 44% 62%, rgba(255,252,240,.7), transparent),
    radial-gradient(1.6px 1.6px at 88% 48%, rgba(232,200,121,.8), transparent),
    radial-gradient(1px 1px   at 28% 84%, rgba(255,252,240,.6), transparent),
    radial-gradient(1.3px 1.3px at 62% 78%, rgba(127,227,240,.7), transparent),
    radial-gradient(1px 1px   at 8% 54%,  rgba(255,252,240,.5), transparent),
    radial-gradient(1.1px 1.1px at 94% 82%, rgba(255,252,240,.55), transparent);
  background-size: 100% 100%;
}
.stars-2 {
  background-image:
    radial-gradient(1px 1px at 34% 12%, rgba(255,252,240,.55), transparent),
    radial-gradient(1px 1px at 56% 36%, rgba(255,252,240,.45), transparent),
    radial-gradient(1.4px 1.4px at 80% 68%, rgba(232,200,121,.6), transparent),
    radial-gradient(1px 1px at 20% 40%, rgba(127,227,240,.5), transparent),
    radial-gradient(1px 1px at 48% 90%, rgba(255,252,240,.4), transparent);
  animation: twinkle 7s ease-in-out infinite;
}
@keyframes twinkle { 0%,100% { opacity:.35 } 50% { opacity:.9 } }

::selection { background: rgba(232,200,121,.28); color: #fff; }

/* ── shared layout ────────────────────────────────────────────────────────────── */
.wrap { width: min(var(--maxw), 100% - 48px); margin-inline: auto; }
section { position: relative; }

.eyebrow {
  font-family: var(--sans);
  font-size: .74rem; font-weight: 600;
  letter-spacing: .34em; text-transform: uppercase;
  color: var(--gold); opacity: .92;
}
.serif { font-family: var(--serif); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.04; letter-spacing: .005em; }

.gold { color: var(--gold-1); }
.italic { font-style: italic; }

a { color: inherit; text-decoration: none; }

/* ── nav ──────────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 44px);
  transition: background .4s var(--ease), border-color .4s var(--ease), padding .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(6,7,15,.82);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
  padding-top: 13px; padding-bottom: 13px;
}
.brand { font-family: var(--serif); font-size: 1.42rem; font-weight: 500; letter-spacing: .01em; color: var(--ink); display: inline-flex; gap: .34em; }
.brand b { font-weight: 500; color: var(--gold-1); }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); transition: color .25s; font-weight: 500; }
.nav-links a:hover { color: var(--gold-1); }
.nav-right { display: flex; align-items: center; gap: 18px; }

.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-toggle__btn {
  font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .12em;
  background: transparent; color: var(--ink-mute); border: 0; cursor: pointer;
  padding: 6px 13px; transition: color .25s, background .25s;
}
.lang-toggle__btn.active { color: var(--void); background: linear-gradient(180deg, var(--gold-1), var(--gold)); }

/* ── hero ─────────────────────────────────────────────────────────────────────── */
.hero { padding: clamp(132px, 17vh, 188px) 0 clamp(64px, 9vh, 110px); }
.hero .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(24px, 3.5vw, 56px); align-items: center; }
.hero-copy { max-width: 640px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.hero-eyebrow::before { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.hero h1 { font-size: clamp(2.9rem, 5.1vw, 4.6rem); margin-bottom: 22px; letter-spacing: .003em; }
.hero h1 .line { display: block; }
.hero h1 em { font-style: italic; color: var(--gold-1); }
.hero-sub { font-size: 1.08rem; color: var(--ink-soft); max-width: 46ch; margin-bottom: 18px; line-height: 1.6; }
.hero-meta { display: inline-flex; align-items: center; gap: 9px; font-size: .82rem; color: var(--ink-mute); letter-spacing: .02em; margin-bottom: 34px; }
.hero-meta svg { width: 15px; height: 15px; stroke: var(--cyan); opacity: .85; }

/* badges */
.badges { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.store-badge { display: inline-block; transition: transform .3s var(--ease), filter .3s; will-change: transform; }
.store-badge img { display: block; height: 50px; width: auto; }
.store-badge:hover { transform: translateY(-3px); filter: brightness(1.06); }
.cta-badges .store-badge img { height: 56px; }

/* hero device + emblem */
.hero-stage { position: relative; display: grid; place-items: center; }
.hero-stage .orbit { position: absolute; width: min(128%, 500px); max-width: none; z-index: 1; opacity: .85; }
.emblem-glow { position: absolute; width: 132%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,200,121,.20), rgba(127,227,240,.06) 42%, transparent 66%);
  filter: blur(8px); z-index: 0; }

/* ── orbital emblem (the one bespoke motion) ──────────────────────────────────── */
.orbit { position: relative; width: 100%; aspect-ratio: 1; max-width: 340px; z-index: 1; }
.orbit svg { width: 100%; height: 100%; overflow: visible; display: block; }
.orbit .ring { transform-origin: 50% 50%; animation: spin 64s linear infinite; }
.orbit .ring-2 { animation-duration: 96s; animation-direction: reverse; }
.orbit .core { filter: drop-shadow(0 0 22px rgba(232,200,121,.35)); }
@keyframes spin { to { transform: rotate(360deg); } }

/* device bezel — page composes the frame around the raw screenshot */
.device {
  position: relative; z-index: 2;
  width: clamp(200px, 64%, 290px);
  border-radius: 40px;
  padding: 11px;
  background: linear-gradient(155deg, #20243a, #0a0c16 52%, #1a1d30);
  box-shadow:
    0 2px 1px rgba(232,200,121,.18) inset,
    0 -2px 2px rgba(0,0,0,.6) inset,
    0 44px 90px -34px rgba(0,0,0,.9),
    0 0 0 1px rgba(232,200,121,.12);
}
.device::before { /* neutral earpiece slit (platform-agnostic) */
  content: ""; position: absolute; top: 19px; left: 50%; transform: translateX(-50%);
  width: 15%; height: 5px; background: #04050a; border-radius: 999px; z-index: 3;
  box-shadow: 0 0 0 1px rgba(255,255,255,.03);
}
.device img { display: block; width: 100%; border-radius: 30px; }
/* per-locale screenshots inside a frame — controlled explicitly so html[lang] flips
   the en/es capture without fighting the generic .lang-* revert rule */
.device .shot { display: block; }
.device .shot.lang-es { display: none; }
html[lang="es"] .device .shot.lang-en { display: none; }
html[lang="es"] .device .shot.lang-es { display: block; }
.device--floats { animation: float 11s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-12px) } }

/* ── ritual band (3 steps, static editorial) ──────────────────────────────────── */
.ritual { padding: clamp(64px, 10vh, 120px) 0; border-top: 1px solid var(--line-soft); }
.section-head { text-align: center; max-width: 30ch; margin: 0 auto clamp(44px, 6vh, 72px); }
.section-head .eyebrow { display: block; margin-bottom: 16px; }
.section-head h2 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.section-head p { color: var(--ink-soft); margin-top: 16px; font-size: 1.04rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 3vw, 34px); }
.step { position: relative; padding: 30px 26px; border: 1px solid var(--line-soft); border-radius: 18px;
  background: linear-gradient(180deg, rgba(14,19,37,.6), rgba(8,11,22,.35)); }
.step .num { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--gold); display: block; margin-bottom: 14px; }
.step h3 { font-size: 1.5rem; margin-bottom: 9px; }
.step p { color: var(--ink-soft); font-size: .96rem; line-height: 1.58; }

/* ── feature rows (alternating, bezeled) ──────────────────────────────────────── */
.features { padding: clamp(40px, 6vh, 72px) 0 clamp(20px,4vh,40px); }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 96px); align-items: center;
  padding: clamp(46px, 7vh, 92px) 0; }
.feature:nth-child(even) .feature-media { order: -1; }
.feature-copy { max-width: 38ch; }
.feature-copy .eyebrow { display: block; margin-bottom: 18px; }
.feature-copy h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 18px; }
.feature-copy h2 em { font-style: italic; color: var(--gold-1); }
.feature-copy p { color: var(--ink-soft); font-size: 1.06rem; line-height: 1.66; }
.feature-media { display: grid; place-items: center; position: relative; }
.feature-media .device { width: clamp(190px, 56%, 270px); }

/* tone chips, decorative truth from the app */
.tones { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.tone-chip { font-size: .78rem; letter-spacing: .04em; padding: 7px 15px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-soft); background: rgba(232,200,121,.04); }
.tone-chip.on { color: var(--void); background: linear-gradient(180deg, var(--gold-1), var(--gold)); border-color: transparent; font-weight: 600; }

/* dual-theme media (two devices) */
.feature-media--pair { display: flex; justify-content: center; gap: clamp(8px,2vw,20px); }
.feature-media--pair .device { width: clamp(140px, 42%, 200px); }
.feature-media--pair .device:last-child { margin-top: 42px; }

/* ── trust band ───────────────────────────────────────────────────────────────── */
.trust { padding: clamp(60px, 9vh, 110px) 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.trust .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(22px, 4vw, 54px); }
.trust-item h3 { font-size: 1.42rem; margin-bottom: 11px; display: flex; align-items: center; gap: 11px; }
.trust-item h3 svg { width: 20px; height: 20px; stroke: var(--gold); fill: none; }
.trust-item p { color: var(--ink-soft); font-size: .98rem; line-height: 1.6; }

/* ── download CTA ─────────────────────────────────────────────────────────────── */
.cta { padding: clamp(80px, 13vh, 150px) 0; text-align: center; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(620px 360px at 50% 18%, rgba(232,200,121,.16), transparent 70%); }
.cta .eyebrow { margin-bottom: 20px; display: block; }
.cta h2 { font-size: clamp(2.6rem, 6vw, 4.6rem); margin-bottom: 22px; }
.cta h2 em { font-style: italic; color: var(--gold-1); }
.cta p { color: var(--ink-soft); max-width: 38ch; margin: 0 auto 38px; font-size: 1.08rem; }
.cta-badges { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.cta-foot { margin-top: 40px; font-family: var(--serif); font-style: italic; font-size: 1.16rem; color: var(--gold); opacity: .9; }

/* contact */
.contact { text-align: center; padding-bottom: clamp(20px,4vh,40px); }
.btn-contact {
  font-family: var(--sans); font-size: .8rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink); background: transparent; border: 1px solid var(--line); cursor: pointer;
  padding: 14px 30px; border-radius: 999px; transition: border-color .3s, color .3s, background .3s;
}
.btn-contact:hover { border-color: var(--gold); color: var(--gold-1); background: rgba(232,200,121,.05); }

/* ── footer ───────────────────────────────────────────────────────────────────── */
.footer { padding: 54px 0 64px; border-top: 1px solid var(--line-soft); }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; }
.footer .brand { font-size: 1.2rem; }
.footer-links { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.footer-links a { font-size: .86rem; color: var(--ink-soft); letter-spacing: .04em; transition: color .25s; }
.footer-links a:hover { color: var(--gold-1); }
.copyright { color: var(--ink-mute); font-size: .82rem; width: 100%; letter-spacing: .02em; }

/* ── snackbar ─────────────────────────────────────────────────────────────────── */
.snackbar {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 24px);
  background: rgba(12,16,30,.96); color: var(--ink); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  padding: 13px 22px; border-radius: 12px; font-size: .9rem; letter-spacing: .02em;
  box-shadow: 0 18px 50px -16px rgba(0,0,0,.8); z-index: 90;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.snackbar--show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ── hero load orchestration ──────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); animation: rise .9s var(--ease) forwards; }
.r1 { animation-delay: .05s } .r2 { animation-delay: .18s } .r3 { animation-delay: .31s }
.r4 { animation-delay: .44s } .r5 { animation-delay: .57s } .r6 { animation-delay: .72s }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ── responsive ───────────────────────────────────────────────────────────────── */
@media (max-width: 920px) {
  .nav-links { display: none; }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; gap: 48px; }
  .hero-copy { max-width: none; margin-inline: auto; }
  .hero-eyebrow { justify-content: center; }
  .hero-sub { margin-inline: auto; }
  .badges, .hero-meta { justify-content: center; }
  .hero-stage { order: -1; }
  .feature { grid-template-columns: 1fr; gap: 40px; text-align: center; padding: 56px 0; }
  .feature:nth-child(even) .feature-media { order: 0; }
  .feature-copy { max-width: none; margin-inline: auto; }
  .feature-copy .eyebrow { margin-inline: auto; }
  .tones { justify-content: center; }
  .steps { grid-template-columns: 1fr; }
  .trust .wrap { grid-template-columns: 1fr; text-align: center; }
  .trust-item h3 { justify-content: center; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero h1 { font-size: clamp(2.7rem, 13vw, 3.6rem); }
  .device { width: clamp(190px, 70%, 250px); }
  .footer .wrap { flex-direction: column; align-items: flex-start; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
