/* Theme tokens. Light is the default; dark follows the device unless the visitor picks a theme. */
:root {
  --navy: #0a1f44;
  --ink: #2b1430;
  --ink-soft: #5e4d63;
  --sand: #fff8ef;
  --card: #ffffff;
  --line: #eadfce;
  --teal: #007a8e;
  --teal-dark: #005d6c;
  --on-teal: #ffffff;
  --gold: #e39b27;
  --emerald: #1fa77a;
  --check: #f1c40f;
  --glow: rgba(241, 196, 15, 0.45);
  --header-bg: rgba(255, 248, 239, 0.88);
  --shadow: 0 10px 30px rgba(43, 20, 48, 0.08);
  --radius: 20px;
  --max: 1080px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #eef1fa;
    --ink: #f4ecf5;
    --ink-soft: #c2b4c6;
    --sand: #17111c;
    --card: #221a29;
    --line: #3a2e42;
    --teal: #4fb7c6;
    --teal-dark: #7bc9d3;
    --on-teal: #10141c;
    --emerald: #3cc895;
    --glow: rgba(227, 155, 39, 0.28);
    --header-bg: rgba(23, 17, 28, 0.88);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --navy: #eef1fa;
  --ink: #f4ecf5;
  --ink-soft: #c2b4c6;
  --sand: #17111c;
  --card: #221a29;
  --line: #3a2e42;
  --teal: #4fb7c6;
  --teal-dark: #7bc9d3;
  --on-teal: #10141c;
  --emerald: #3cc895;
  --glow: rgba(227, 155, 39, 0.28);
  --header-bg: rgba(23, 17, 28, 0.88);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Smooth colour change when the visitor flips the theme (class added briefly by script.js). */
.theme-anim, .theme-anim * {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease !important;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-dark); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.emerald { color: var(--emerald); }

/* Logo (inline SVG; letters take the text colour so it works in both themes) */
.logo-svg { display: block; height: auto; color: var(--navy); overflow: visible; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: block; line-height: 0; }
.brand .logo-svg { width: 150px; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 15px; font-weight: 500; }
.nav a { color: var(--ink-soft); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.theme-toggle:hover { border-color: var(--gold); transform: rotate(-8deg); }
.theme-toggle svg {
  position: absolute;
  width: 20px;
  height: 20px;
  transition: transform 0.5s var(--ease-back), opacity 0.3s ease;
}
.theme-toggle .i-sun { color: var(--gold); }
/* Light theme shows the moon (switch to dark); dark theme shows the sun. */
.theme-toggle .i-sun { opacity: 0; transform: rotate(-90deg) scale(0.4); }
.theme-toggle .i-moon { opacity: 1; transform: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { opacity: 1; transform: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { opacity: 0; transform: rotate(90deg) scale(0.4); }
}
:root[data-theme="dark"] .theme-toggle .i-sun { opacity: 1; transform: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { opacity: 0; transform: rotate(90deg) scale(0.4); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.2s var(--ease-back), background 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary, .btn-primary:hover { background: var(--teal); color: var(--on-teal); }
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn-ghost:hover { color: var(--ink); border-color: var(--teal); }
.btn svg { width: 20px; height: 20px; }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero-logo { width: min(340px, 80%); margin-bottom: 18px; }
/* The lockup's viewBox has ~8.6% padding before the J; pull it back so it lines up with the headline. */
.hero-logo .logo-svg { width: 100%; margin-left: -8.6%; }
.brand .logo-svg { margin-left: -13px; }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 14px; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.6rem); font-weight: 700; letter-spacing: -0.02em; }
.tagline { text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.1; }
.tagline .tl-tail { color: var(--emerald); }
.tl-word { display: inline-block; white-space: nowrap; }
.tl-char { display: inline-block; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; font-weight: 600; }
.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 34em; margin: 0 0 28px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { position: relative; justify-self: center; max-width: 380px; isolation: isolate; }
.hero-art::before {
  content: "";
  position: absolute;
  inset: 12% -6% 4%;
  background: radial-gradient(circle at 50% 45%, var(--glow), transparent 70%);
  z-index: -1;
}
.hero-art .stamp {
  position: absolute;
  width: 84px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
}
.hero-art .stamp-a { top: 6%; left: -10%; transform: rotate(-10deg); }
.hero-art .stamp-b { bottom: 10%; right: -8%; transform: rotate(8deg); }

/* Stats */
.stats { padding: 8px 0 40px; }
.stats ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stats li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
}
.stats strong { display: block; font-size: 1.8rem; color: var(--teal); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats span { font-size: 14px; color: var(--ink-soft); }

/* Sections */
section { padding: 56px 0; }
.section-head { max-width: 620px; margin-bottom: 32px; }
.section-head p { color: var(--ink-soft); margin: 0; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: opacity 0.7s var(--ease-out), transform 0.4s var(--ease-back), border-color 0.3s ease;
}
.feature img { height: 150px; width: auto; margin: 0 auto 16px; transition: transform 0.4s var(--ease-back); }
.feature p { margin: 0; color: var(--ink-soft); font-size: 15px; }

.collect { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.collect .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: center; }
.gallery img { width: 100%; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.12)); }
.gallery .badge { padding: 6px; }

.checklist { list-style: none; padding: 0; margin: 20px 0 0; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--check) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b1430' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.privacy-band .wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
  background: linear-gradient(135deg, #007a8e, #005d6c);
  color: #fff;
  border-radius: 28px;
  padding: 36px;
  width: calc(100% - 40px);
  max-width: calc(var(--max) - 40px);
}
.privacy-band h2 { color: #fff; }
.privacy-band p { margin: 0 0 16px; color: rgba(255, 255, 255, 0.9); }
.privacy-band a { color: #fff; font-weight: 600; }
.privacy-band img { width: 160px; }

.download { text-align: center; }
.download .cta-row { justify-content: center; }
.download p { color: var(--ink-soft); }

/* Legal pages */
.legal { padding: 48px 0 72px; }
.legal .wrap { max-width: 780px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.legal .meta { color: var(--ink-soft); font-size: 14px; margin-bottom: 28px; }
.legal h2 { font-size: 1.35rem; margin-top: 40px; padding-top: 8px; scroll-margin-top: 80px; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.toc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 22px;
  font-size: 15px;
}
.toc ol { margin: 6px 0 0; padding-left: 22px; }

/* Press kit */
.press-hero { padding: 48px 0 24px; }
.press-hero .wrap { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.press-hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
.press-mascot { width: 220px; }
.eyebrow { margin: 0 0 8px; font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.press-section { padding: 40px 0; }
.section-note { color: var(--ink-soft); margin: -4px 0 20px; font-size: 15px; }
.press h3.sub { margin-top: 36px; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0; }
.facts div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.facts dt { font-size: 13px; color: var(--ink-soft); }
.facts dd { margin: 2px 0 0; font-weight: 600; color: var(--navy); }

.blurb { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 16px; }
.blurb header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.blurb h3 { margin: 0; font-size: 1rem; }
.blurb p { margin: 0 0 12px; }
.blurb p:last-child { margin-bottom: 0; }
.copy-btn {
  flex: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--sand);
  color: var(--ink);
  cursor: pointer;
}
.copy-btn:hover { border-color: var(--teal); }
.copy-btn.copied { border-color: var(--emerald); color: var(--emerald); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.angles { list-style: none; padding: 0; margin: 0; }
.angles li { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.angles li:first-child { padding-top: 0; }
.angles strong { color: var(--ink); }

.asset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.asset { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.asset-preview { height: 150px; display: grid; place-items: center; padding: 24px; }
.asset-preview img { max-height: 100%; width: auto; }
.asset-preview .icon { width: 96px; border-radius: 22px; }
.asset-preview.on-light { background: #fff8ef; }
.asset-preview.on-dark { background: #0a1f44; }
.asset figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; font-size: 14px; border-top: 1px solid var(--line); }
.asset .dl { display: flex; gap: 12px; font-weight: 600; }

.swatches { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.swatches button {
  width: 100%;
  font: inherit;
  text-align: left;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  cursor: pointer;
}
.swatches button:hover { border-color: var(--teal); }
.swatches .chip { display: block; height: 52px; border-radius: 10px; background: var(--sw); border: 1px solid rgba(0, 0, 0, 0.08); margin-bottom: 8px; }
.swatches strong { display: block; font-size: 14px; }
.swatches code { font-size: 13px; color: var(--ink-soft); }
.swatches button.copied code { color: var(--emerald); }

.donts { padding-left: 22px; color: var(--ink-soft); }

.visual-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.visual-grid a { display: block; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; aspect-ratio: 1; overflow: hidden; }
.visual-grid a:hover { border-color: var(--gold); }
.visual-grid img { width: 100%; height: 100%; object-fit: contain; }
.press-hero .wrap > *, .two-col > *, .facts div, .asset { min-width: 0; }

.reels { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.reels > * { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.reels strong { display: block; color: var(--navy); }
.reels span { font-size: 14px; color: var(--ink-soft); }

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.contact-card p { margin: 0; color: var(--ink-soft); max-width: 36em; }

/* Launch promo */
.promo-tags { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hashtag { padding: 8px 18px; border-radius: 999px; background: linear-gradient(135deg, #ffc300, #ff5733); color: #2b1430; font-weight: 700; font-size: 1.1rem; }
.pill { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 14px; font-weight: 600; }
/* Placeholder values still to be decided; easy to spot before the page is shared. */
.tbd { background: rgba(241, 196, 15, 0.22); outline: 1px dashed var(--gold); border-radius: 4px; padding: 0 4px; }
.steps-cards .feature { position: relative; }
.step-num { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 50%; border: 2px solid var(--gold); color: var(--gold); font-weight: 700; }
.platforms span b { color: var(--ink); }
.facts.dates { grid-template-columns: 1fr 1fr; }
.promo .legal { padding: 40px 0 72px; }
.promo .legal h2 { margin-top: 0; }
.rules { padding-left: 22px; }
.rules > li { margin-bottom: 14px; }
.rules ul { margin-top: 8px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 14px; color: var(--ink-soft); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-soft); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Logo build, after the app's splash: the A grows, the spire drops, letters burst out, the diamond lands. */
  .hero-logo .lg-body { animation: lg-grow 0.6s var(--ease-back) 0.1s both; }
  .hero-logo .lg-spire { animation: lg-drop 0.7s cubic-bezier(0.5, 0, 0.4, 1.4) 0.45s both; }
  .hero-logo .lg-letter { animation: lg-pop 0.55s var(--ease-back) calc(0.75s + var(--i) * 0.06s) both; }
  .hero-logo .lg-diamond { animation: lg-fall 0.9s linear 1.25s both; }

  /* Tagline: letters rise in one by one (script.js wraps them). */
  .js .tagline .tl-char { animation: tl-rise 0.5s var(--ease-out) calc(1.7s + var(--c) * 0.025s) both; }
  .js .hero-fade { animation: fade-up 0.7s var(--ease-out) 2.3s both; }
  .js .hero-fade + .hero-fade { animation-delay: 2.45s; }

  /* Mascot and stamps */
  .hero-art .mascot { animation: fade-up 0.8s var(--ease-out) 0.3s both, float 5s ease-in-out 1.1s infinite; }
  .hero-art .stamp { animation: stamp-in 0.6s var(--ease-back) both, sway 4.5s ease-in-out infinite; }
  .hero-art .stamp-a { animation-delay: 1.1s, 1.7s; }
  .hero-art .stamp-b { animation-delay: 1.35s, 2.4s; }

  /* Scroll reveals */
  .js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); transition-delay: calc(var(--d, 0) * 0.09s); }
  .js .reveal.pop { transform: translateY(20px) scale(0.85) rotate(-4deg); }
  .js .reveal.in { opacity: 1; transform: none; }

  /* Hover play */
  .js .feature.in:hover, .feature:hover { transform: translateY(-6px); border-color: var(--gold); transition-delay: 0s; }
  .feature:hover img { transform: scale(1.06) rotate(-3deg); }
  .gallery img.in:hover { transform: scale(1.08) rotate(3deg); transition: transform 0.35s var(--ease-back); }
  .gallery .badge.in { animation: float 4s ease-in-out infinite; animation-delay: calc(var(--d) * -0.7s); }
  .trophy { animation: float 4s ease-in-out infinite; }
}

@keyframes lg-grow { from { transform: scale(0); } to { transform: none; } }
@keyframes lg-drop {
  0% { transform: translateY(-260px); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}
@keyframes lg-pop { from { transform: scale(0.2); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes lg-fall {
  0% { transform: translateY(-320px); opacity: 0; animation-timing-function: cubic-bezier(0.5, 0, 1, 1); }
  10% { opacity: 1; }
  55% { transform: translateY(0) scale(1.15, 0.8); animation-timing-function: cubic-bezier(0, 0, 0.5, 1); }
  75% { transform: translateY(-40px) scale(0.95, 1.05); animation-timing-function: cubic-bezier(0.5, 0, 1, 1); }
  90% { transform: translateY(0) scale(1.05, 0.95); }
  100% { transform: none; opacity: 1; }
}
@keyframes tl-rise { from { opacity: 0; transform: translateY(0.35em); } to { opacity: 1; transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes sway { 0%, 100% { rotate: 0deg; translate: 0 0; } 50% { rotate: 4deg; translate: 0 -6px; } }
@keyframes stamp-in { from { opacity: 0; scale: 0.3; } to { opacity: 1; scale: 1; } }

/* ---------- Layout breakpoints ---------- */
@media (max-width: 860px) {
  .hero .wrap, .collect .wrap { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; }
  .hero-art { max-width: 260px; order: -1; }
  .features { grid-template-columns: 1fr; }
  .stats ul { grid-template-columns: repeat(2, 1fr); }
  .privacy-band .wrap { grid-template-columns: 1fr; padding: 28px 22px; }
  .privacy-band img { width: 110px; }
  .press-hero .wrap, .two-col { grid-template-columns: 1fr; }
  .press-mascot { width: 160px; order: -1; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .asset-grid { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: repeat(3, 1fr); }
  .visual-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-card { flex-direction: column; align-items: flex-start; padding: 24px; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .nav { gap: 14px; font-size: 14px; }
  .nav .hide-sm { display: none; }
  .brand .logo-svg { width: 120px; margin-left: -10px; }
  .btn { width: 100%; justify-content: center; }
  .hero-art .stamp { width: 64px; }
  .hero-logo { width: 240px; }
  .privacy-band .wrap { width: calc(100% - 32px); gap: 16px; padding: 24px 20px; border-radius: 22px; }
  .privacy-band img { width: 84px; }
  .privacy-band h2 { font-size: 1.45rem; }
  .privacy-band p { font-size: 15px; }
  .reels { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: repeat(2, 1fr); }
  .contact-card .btn { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .feature, .feature img, .theme-toggle, .theme-toggle svg { transition: none; }
}
