/* Festive website. CSP: style-src 'self', so no inline styles anywhere. */

:root {
  color-scheme: dark;
  --night: #0b1e3f;
  --night-2: #13294f;
  --night-3: #1b3768;
  --ink: #eef4ff;
  --muted: #a9bddb;
  --faint: #6f86ab;
  --line: rgba(190, 214, 255, 0.14);
  --card: rgba(255, 255, 255, 0.045);
  --card-hover: rgba(255, 255, 255, 0.07);
  --red: #ff3b30;
  --green: #34c759;
  --gold: #ffcc00;
  --blue: #0a84ff;
  --orange: #ff9f0a;
  --pro: #ffd34d;
  --radius: 18px;
  --wrap: 1120px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font: 17px/1.6 var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 9%, rgba(255,255,255,.45) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 36% 64%, rgba(255,241,184,.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 52%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 82%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1200px 700px at 50% -10%, #1d3f78 0%, transparent 60%),
    linear-gradient(180deg, var(--night) 0%, #081631 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: #9fd0ff; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #cfe7ff; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

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

kbd {
  display: inline-block;
  font: 600 0.85em/1 var(--sans);
  padding: 0.3em 0.5em 0.28em;
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-bottom-width: 2px;
  white-space: nowrap;
}

.skip {
  position: absolute; left: 12px; top: -48px;
  background: var(--gold); color: #1b1300; padding: 8px 14px; border-radius: 8px; z-index: 20;
}
.skip:focus { top: 12px; }

/* ---------- Header ---------- */

.top {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: rgba(9, 24, 52, 0.72);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 19px/1 var(--round); color: var(--ink); text-decoration: none; letter-spacing: -0.01em;
}
.brand img { border-radius: 8px; }
.top nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.top nav .lang {
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; color: var(--ink);
}
@media (max-width: 720px) {
  .top nav a:not(.lang) { display: none; }
}

/* ---------- Hero ---------- */

.hero { padding: 72px 0 24px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px 5px 10px; margin: 0 0 22px;
  background: rgba(255,255,255,.03);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.hero h1 {
  font: 800 clamp(40px, 6.4vw, 72px)/1.04 var(--round);
  letter-spacing: -0.025em;
  margin: 0 auto 20px;
  max-width: 14ch;
  text-wrap: balance;
}
.hero h1 .glow {
  background: linear-gradient(90deg, #ff6b5e, #ffd34d 35%, #5be38a 65%, #6cc6ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 40em; margin: 0 auto 30px; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 650 17px/1 var(--sans);
  padding: 15px 24px; border-radius: 999px; text-decoration: none;
  background: linear-gradient(180deg, #ff5a4f, #e0261c);
  color: #fff;
  box-shadow: 0 8px 28px rgba(255, 59, 48, 0.35), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 12px 34px rgba(255, 59, 48, 0.45), inset 0 1px 0 rgba(255,255,255,.3); }
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.ghost { color: var(--ink); text-decoration: none; font-weight: 600; }
.ghost:hover { color: #fff; }
.ghost::after { content: " →"; }
.hero-note { color: var(--faint); font-size: 14.5px; margin: 20px 0 0; }

/* ---------- Demo ---------- */

.demo-wrap { padding: 36px 0 40px; }
.demo {
  position: relative;
  width: min(1040px, 100%);
  margin: 0 auto;
}
.demo-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55), 0 0 0 10px rgba(255,255,255,.035);
  background: linear-gradient(180deg, #0c2147 0%, #183f77 55%, #2e5e96 100%);
  isolation: isolate;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.demo[data-theme="spring"] .demo-screen {
  background: linear-gradient(180deg, #2a0707 0%, #5b1010 55%, #8a2a14 100%);
}
@media (max-width: 640px) { .demo-screen { aspect-ratio: 4 / 5; } }

.demo-hills {
  position: absolute; inset: auto 0 0 0; height: 30%; z-index: 0;
  background:
    radial-gradient(80% 120% at 15% 100%, #dfeaf7 0 45%, transparent 46%),
    radial-gradient(70% 110% at 75% 100%, #cddcf0 0 48%, transparent 49%),
    radial-gradient(60% 90% at 45% 100%, #eef5fd 0 50%, transparent 51%);
  opacity: .9;
}
.demo[data-theme="spring"] .demo-hills {
  background:
    radial-gradient(80% 120% at 15% 100%, #3d0b0b 0 45%, transparent 46%),
    radial-gradient(70% 110% at 75% 100%, #4a1010 0 48%, transparent 49%),
    radial-gradient(60% 90% at 45% 100%, #2c0606 0 50%, transparent 51%);
}

/* Mock menu bar */
.mb {
  position: absolute; inset: 0 0 auto 0; height: 26px; z-index: 4;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px;
  font: 13px/1 var(--sans);
  color: #fff;
  background: linear-gradient(90deg, #0b1e3f, #16335f, #0b1e3f);
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
  overflow: hidden;
}
.mb::before { /* flake pattern on the backdrop */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image:
    radial-gradient(1.2px 1.2px at 10px 7px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 34px 18px, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 58px 10px, #fff 50%, transparent 51%);
  background-size: 72px 26px;
}
.demo[data-theme="spring"] .mb { background: linear-gradient(90deg, #6e0b0b, #a3161a, #6e0b0b); }
.demo[data-theme="spring"] .mb::before {
  background-image:
    radial-gradient(1.4px 1.4px at 14px 8px, #ffd34d 50%, transparent 51%),
    radial-gradient(1px 1px at 46px 17px, #ffd34d 50%, transparent 51%);
  background-size: 64px 26px;
}
.mb-left, .mb-right { display: flex; align-items: center; gap: 16px; white-space: nowrap; position: relative; z-index: 1; }
.mb-left b { font-weight: 700; }
.mb-apple { width: 13px; height: 15px; fill: #fff; }
.mb-right svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 1.6; }
.mb-right .festive-icon { fill: #fff; stroke: none; }
@media (max-width: 760px) { .mb-left .opt, .mb-right .opt { display: none; } }

.mb-critter {
  position: absolute; top: 1px; left: 0; z-index: 2;
  font-size: 18px; line-height: 24px; height: 24px;
  will-change: transform;
  pointer-events: none;
}

/* Lights + snow canvas */
.demo-lights { position: absolute; left: 0; top: 26px; width: 100%; height: 80px; z-index: 5; overflow: visible; pointer-events: none; }
.demo-lights .wire { fill: none; stroke-width: 1.6; stroke-linecap: round; }
.demo-lights .bulb { animation: twinkle 2.6s ease-in-out infinite; }
.demo-lights .lantern { font-size: 22px; }
@keyframes twinkle {
  0%, 100% { opacity: 1; }
  45% { opacity: 1; }
  60% { opacity: .38; }
  75% { opacity: 1; }
}

.demo-snow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.demo-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; }

/* Mock window */
.demo-window {
  position: absolute; z-index: 2;
  left: 9%; top: 22%; width: 56%; height: 58%;
  border-radius: 12px;
  background: #f6f8fc;
  color: #1d2433;
  box-shadow: 0 24px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.15);
  overflow: hidden;
}
.demo-window.back {
  left: 52%; top: 32%; width: 40%; height: 50%; z-index: 1;
  background: #e6ebf3;
}
@media (max-width: 640px) {
  .demo-window { left: 6%; top: 28%; width: 76%; height: 44%; }
  .demo-window.back { left: 30%; top: 46%; width: 64%; height: 40%; }
}
.win-bar { height: 30px; display: flex; align-items: center; gap: 7px; padding: 0 12px; border-bottom: 1px solid rgba(0,0,0,.07); background: rgba(255,255,255,.6); }
.win-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.win-bar i + i { background: #febc2e; }
.win-bar i + i + i { background: #28c840; }
.win-bar span { margin-left: 10px; font: 600 12px/1 var(--sans); color: #5c6475; }
.win-body { padding: 18px 20px; display: grid; gap: 10px; }
.win-body .l { height: 9px; border-radius: 5px; background: #dde3ee; }
.win-body .l.h { height: 14px; width: 46%; background: #c4cede; margin-bottom: 6px; }
.win-body .l.w80 { width: 80%; }
.win-body .l.w60 { width: 60%; }
.win-body .l.w90 { width: 90%; }
.win-body .l.w40 { width: 40%; }

.demo-controls {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px;
  margin-top: 22px;
}
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.seg button, .pause {
  font: 600 14px/1 var(--sans); color: var(--muted);
  background: none; border: 0; border-radius: 999px; padding: 9px 16px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: rgba(255,255,255,.14); color: var(--ink); }
.seg button:hover, .pause:hover { color: var(--ink); }
.pause { border: 1px solid var(--line); }
.demo-hint { width: 100%; text-align: center; color: var(--faint); font-size: 14px; margin: 4px 0 0; }

/* ---------- Sections ---------- */

section.block { padding: 84px 0 12px; scroll-margin-top: 60px; }
.block h2 {
  font: 800 clamp(30px, 4vw, 44px)/1.12 var(--round); letter-spacing: -0.02em;
  margin: 0 0 14px; text-wrap: balance;
}
.block .sub { color: var(--muted); max-width: 44em; margin: 0 0 36px; font-size: 18.5px; }

.group-title {
  display: flex; align-items: center; gap: 12px;
  font: 700 21px/1.2 var(--round); margin: 40px 0 18px;
}
.group-title .em { font-size: 26px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  transition: background .2s ease, border-color .2s ease;
}
.card:hover { background: var(--card-hover); border-color: rgba(190,214,255,.22); }
.card .ic { font-size: 28px; line-height: 1; margin-bottom: 14px; display: block; }
.card h3 { font: 700 18px/1.3 var(--sans); margin: 0 0 6px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.tag {
  display: inline-block; vertical-align: 2px; margin-left: 6px;
  font: 700 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase;
  color: #2a1d00; background: var(--pro); border-radius: 5px; padding: 4px 6px 3px;
}

/* Themes */
.themes { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.theme-card {
  border-radius: 22px; padding: 26px; border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px; min-height: 260px;
  position: relative; overflow: hidden;
}
.theme-card.christmas { background: linear-gradient(160deg, #123067, #0b1e3f 70%); }
.theme-card.spring { background: linear-gradient(160deg, #8e1420, #4a0909 70%); }
.theme-card h3 { font: 800 26px/1.1 var(--round); margin: 0; }
.theme-card p { margin: 0; color: rgba(238,244,255,.78); }
.theme-card .glyphs { font-size: 30px; letter-spacing: 6px; }
.swatches { display: flex; gap: 8px; }
.swatches i { width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 12px currentColor; background: currentColor; }
.sw-red { color: #ff3b30; } .sw-green { color: #34c759; } .sw-gold { color: #ffcc00; }
.sw-blue { color: #0a84ff; } .sw-orange { color: #ff9f0a; } .sw-white { color: #f2f2f7; }
.sw-cn-red { color: #e5252a; } .sw-cn-gold { color: #f5b32f; }
.theme-card button {
  align-self: flex-start; margin-top: auto;
  font: 650 15px/1 var(--sans); color: var(--ink);
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px; padding: 10px 16px; cursor: pointer;
}
.theme-card button:hover { background: rgba(255,255,255,.2); }
.themes-note { color: var(--muted); margin: 22px 0 0; font-size: 16px; }

/* Considerate */
.list-2 { display: grid; gap: 14px 40px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); padding: 0; margin: 0; list-style: none; }
.list-2 li { display: grid; grid-template-columns: 34px 1fr; gap: 4px 12px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.list-2 .em { font-size: 22px; line-height: 1.3; }
.list-2 strong { display: block; font-size: 17px; }
.list-2 span.d { color: var(--muted); font-size: 15.5px; }

/* Privacy + Pro panels */
.panels { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 30px; }
.panel h2 { font-size: clamp(26px, 3vw, 34px); }
.panel p { color: var(--muted); margin: 0 0 14px; }
.panel ul { margin: 0 0 16px; padding-left: 1.1em; color: var(--muted); }
.panel li { margin: 6px 0; }
.panel li::marker { color: var(--gold); }

/* Beta CTA */
.cta {
  margin: 96px auto 0; text-align: center; padding: 56px 24px;
  border-radius: 28px; border: 1px solid var(--line);
  background:
    radial-gradient(600px 220px at 50% 0%, rgba(255, 204, 0, .14), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
}
.cta h2 { font: 800 clamp(30px, 4vw, 44px)/1.12 var(--round); margin: 0 0 12px; letter-spacing: -0.02em; }
.cta p { color: var(--muted); margin: 0 auto 28px; max-width: 36em; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 650; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-weight: 400; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* Footer */
footer { margin-top: 96px; padding: 34px 0 48px; border-top: 1px solid var(--line); color: var(--faint); font-size: 14.5px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* ---------- Legal / simple pages ---------- */

.doc { padding: 64px 0 24px; max-width: 760px; }
.doc h1 { font: 800 clamp(34px, 5vw, 48px)/1.1 var(--round); margin: 0 0 8px; letter-spacing: -0.02em; }
.doc .updated { color: var(--faint); margin: 0 0 32px; }
.doc h2 { font: 700 22px/1.3 var(--round); margin: 36px 0 10px; }
.doc p, .doc li { color: #d3def0; }
.doc ul { padding-left: 1.2em; }

.notfound { text-align: center; padding: 120px 0 40px; }
.notfound .big { font-size: 64px; margin: 0; }
.notfound h1 { font: 800 40px/1.1 var(--round); margin: 12px 0; }
.notfound p { color: var(--muted); }

.is-paused .demo-lights .bulb { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .demo-lights .bulb { animation: none; } }
.win-bar { cursor: grab; touch-action: none; }
.win-bar:active { cursor: grabbing; }
