/* Starlight Dolls: Dress Up — website styles.
   Colors come from the game (src/studio.rs): ink #4b3a5e, muted #9a89ab,
   accent pink #ff86b8, accent violet #b08cff, panels #fffbfd → #faf4ff.
   The night sky is the splash screen's. */

@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/Nunito-SemiBold.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/Nunito-ExtraBold.woff2") format("woff2");
  font-weight: 700 900;
  font-display: swap;
}
@font-face {
  font-family: "Dancing Script";
  src: url("/assets/fonts/DancingScript-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #4b3a5e;
  --muted: #86769a;
  --accent: #ff86b8;
  --accent-2: #b08cff;
  --gold: #f3c96b;
  --panel: #fffbfd;
  --panel-2: #faf4ff;
  --page: #f6eefc;
  --line: #eadff5;
  --night-1: #140c2c;
  --night-2: #2a1752;
  --night-3: #5b2e7e;
  --radius: 22px;
  --shadow: 0 18px 50px -24px rgba(75, 58, 94, 0.45);
  --wrap: 1120px;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 600 17px/1.6 "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a { color: #c0438a; text-underline-offset: 3px; }
a:hover { color: #8a4ad6; }

:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 8px; }

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

.script { font-family: "Dancing Script", "Brush Script MT", cursive; font-weight: 700; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 10;
  background: #fff; color: var(--ink); padding: 8px 14px; border-radius: 10px;
}
.skip:focus { left: 12px; }

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

.hero {
  /* The banner is as tall as the art allows, and the art (1672 × 941) is
     always shown at the banner's full height so the doll is never cropped
     top or bottom. On wide screens the sky continues to the left of it. */
  --hero-h: clamp(620px, 92vh, 860px);
  --art-w: calc(var(--hero-h) * 1672 / 941);
  position: relative;
  height: var(--hero-h);
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  /* The art's own sky, sampled down its left edge. */
  background: linear-gradient(180deg,
    #231447 0%, #2b174f 8%, #3d226a 15%, #4a3381 20%, #4a4b8f 26%, #4a5392 30%,
    #36256c 35%, #331e64 42%, #381e68 50%, #432373 60%, #542980 70%,
    #6b338e 80%, #793794 85%, #4e2574 90%, #261245 95%, #261244 100%);
}

.hero-art {
  position: absolute; top: 0; bottom: 0; z-index: -2;
  width: var(--art-w);
  /* The doll stands at 75.4% of the art's width. On wide screens she stays
     beside the text, 380px right of the page's center line, so the pair is
     centered as one; on narrower ones the art's empty left sky is cropped
     first (70/30) so she keeps clear of the text. */
  left: min(
    max(calc((100% - var(--art-w)) * 0.7), calc(100% - var(--art-w))),
    calc(50% + 380px - var(--art-w) * 0.754)
  );
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 90%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 90%, transparent 100%);
}
.hero-art img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Keeps the title readable over any part of the art. */
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(20, 12, 44, 0.72) 0%, rgba(20, 12, 44, 0.35) 45%, rgba(20, 12, 44, 0) 70%),
    linear-gradient(0deg, rgba(20, 12, 44, 0.55) 0%, rgba(20, 12, 44, 0) 30%);
}

.hero-copy { position: relative; padding-top: 72px; padding-bottom: 104px; }
.hero-title { max-width: 820px; }
.hero-actions { max-width: 620px; }

.hero-icon {
  width: 76px; height: 76px; border-radius: 20px;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.6), 0 0 0 3px rgba(255, 255, 255, 0.18);
  margin-bottom: 22px;
}

.logo { margin: 0; line-height: 0.95; }
.logo .script {
  display: block;
  font-size: clamp(64px, 8.4vw, 118px);
  white-space: nowrap;
  color: #fdf3ff;
  text-shadow: 0 3px 0 rgba(90, 40, 120, 0.55), 0 0 36px rgba(214, 160, 255, 0.55);
  letter-spacing: 0.5px;
}
.logo .sub {
  display: flex; align-items: center; gap: 16px;
  margin-top: 18px;
  font: 800 clamp(14px, 1.8vw, 18px)/1 "Nunito", sans-serif;
  letter-spacing: 0.55em;
  color: #e6d6ff;
  text-transform: uppercase;
}
.logo .sub::before, .logo .sub::after {
  content: ""; height: 1px; flex: 0 0 56px;
  background: linear-gradient(90deg, transparent, rgba(255, 236, 190, 0.9), transparent);
}

.tagline {
  margin: 26px 0 34px;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.45;
  color: #f1e8ff;
  max-width: 36ch;
  text-shadow: 0 1px 12px rgba(20, 12, 44, 0.6);
}

.stores { display: flex; flex-wrap: wrap; gap: 14px; }

.store {
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  min-width: 232px;
  padding: 12px 22px 12px 16px;
  border-radius: 18px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #d58cf0 55%, var(--accent-2) 100%);
  box-shadow: 0 12px 28px -10px rgba(255, 134, 184, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.store:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 34px -10px rgba(255, 134, 184, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.store:active { transform: translateY(0) scale(0.98); }
.store svg { width: 30px; height: 30px; flex: none; }
.store .lines { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store small { font-size: 12.5px; font-weight: 600; opacity: 0.92; letter-spacing: 0.02em; }
.store strong { font-size: 19px; font-weight: 800; }

.store[aria-disabled="true"] {
  cursor: default;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.store[aria-disabled="true"]:hover { transform: none; }
.store .soon { display: none; color: var(--gold); }
.store[aria-disabled="true"] .soon { display: inline; }
.store[aria-disabled="true"] .live { display: none; }
.store[aria-disabled="true"] strong { opacity: 0.85; }

.promise {
  margin: 22px 0 0; padding: 0;
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-size: 15px; color: #e6d6ff;
}
.promise li { display: inline-flex; align-items: center; gap: 7px; }
.promise li::before {
  content: ""; width: 10px; height: 10px; flex: none;
  background: var(--gold);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

/* Twinkles over the hero, like the splash screen's. */
.twinkles { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.twinkles i {
  position: absolute; width: 14px; height: 14px;
  background: #fff;
  clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
  opacity: 0;
  animation: twinkle 4.8s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
  50% { opacity: 0.95; transform: scale(1) rotate(45deg); }
}

.hero-hills {
  position: absolute; left: 0; right: 0; bottom: -1px; z-index: 0;
  width: 100%; height: 70px;
  color: var(--page);
}

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

section { padding: 88px 0; }

.eyebrow {
  margin: 0 0 6px;
  font-size: 14px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase;
  color: #c0438a;
}
.section-title {
  margin: 0 0 14px;
  font-family: "Dancing Script", cursive; font-weight: 700;
  font-size: clamp(40px, 6vw, 60px);
  line-height: 1.05;
  color: var(--ink);
}
.lede { margin: 0 0 44px; max-width: 58ch; color: var(--muted); font-size: 18px; }

/* Seasons: arched windows, like the studio's. */
.seasons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.season { margin: 0; text-align: center; }
.season .window {
  position: relative;
  aspect-ratio: 627 / 720;
  border-radius: 50% 50% 22px 22px / 30% 30% 22px 22px;
  overflow: hidden;
  background: #e9dcf7;
  box-shadow: 0 0 0 5px #f6dfa5, 0 0 0 7px rgba(214, 170, 90, 0.35), var(--shadow);
  transition: transform 0.25s ease;
}
.season:hover .window { transform: translateY(-6px); }
.season img { width: 100%; height: 100%; object-fit: cover; }
.season figcaption { margin-top: 18px; }
.season .name { display: block; font-family: "Dancing Script", cursive; font-size: 30px; line-height: 1.1; }
.season .note { display: block; font-size: 14.5px; color: var(--muted); }
.season .tag {
  display: inline-block; margin-top: 6px; padding: 2px 10px;
  border-radius: 99px; font-size: 12px; font-weight: 800; letter-spacing: 0.04em;
  background: #fde6f1; color: #b03a7c;
}
.season .tag.free { background: #ece3ff; color: #6a44c2; }

/* Features */
.features { background: linear-gradient(180deg, var(--page) 0%, #fdf6fb 100%); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  box-shadow: 0 10px 30px -22px rgba(75, 58, 94, 0.5);
}
.card h3 { margin: 14px 0 6px; font-size: 19px; font-weight: 800; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.badge-icon {
  width: 48px; height: 48px; border-radius: 15px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 18px -8px rgba(176, 140, 255, 0.9);
}
.badge-icon svg { width: 26px; height: 26px; }

.studio-shot img { width: 100%; }
.studio-shot {
  display: block;
  margin: 56px auto 0;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 0 0 10px #fff, 0 0 0 11px var(--line), 0 40px 80px -40px rgba(75, 58, 94, 0.6);
}

/* Grown-ups */
.grownups .panel {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
  padding: 48px;
  border-radius: 32px;
  color: #f4ecff;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(176, 140, 255, 0.35), transparent 60%),
    linear-gradient(160deg, #2a1752 0%, #3d1f66 100%);
  box-shadow: var(--shadow);
}
.grownups .section-title { color: #fff; }
.grownups .eyebrow { color: #ffb6d5; }
.grownups p { color: #dccdf3; margin: 0 0 14px; }
.grownups a { color: #ffc4de; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.checks svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.checks strong { display: block; color: #fff; }
.checks span { color: #cdbde6; font-size: 15px; }

/* Footer */
footer {
  padding: 40px 0 48px;
  color: var(--muted);
  font-size: 15px;
  border-top: 1px solid var(--line);
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { color: var(--ink); text-decoration: none; }
footer a:hover { color: #c0438a; text-decoration: underline; }
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand img { width: 32px; height: 32px; border-radius: 9px; }
.fine { width: 100%; margin: 0; font-size: 13px; }

/* ---------- Document pages (privacy, help) ---------- */

.doc-head {
  position: relative;
  color: #fff;
  padding: 28px 0 92px;
  background:
    radial-gradient(120% 90% at 80% 120%, var(--night-3) 0%, transparent 60%),
    linear-gradient(180deg, var(--night-1) 0%, var(--night-2) 100%);
  overflow: hidden;
  isolation: isolate;
}
.doc-head .hero-hills { height: 50px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 48px; }
.home-link { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.home-link:hover { color: #fff; }
.home-link img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2); }
.home-link .script { font-size: 30px; line-height: 1; }
.topbar nav { display: flex; gap: 18px; font-size: 15px; }
.topbar nav a { color: #e6d6ff; text-decoration: none; }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { color: #fff; text-decoration: underline; }
.doc-head h1 {
  margin: 0;
  font-family: "Dancing Script", cursive;
  font-size: clamp(46px, 7vw, 72px);
  line-height: 1.05;
  text-shadow: 0 0 30px rgba(214, 160, 255, 0.5);
}
.doc-head .meta { margin: 10px 0 0; color: #d8c8f2; }

.doc { padding: 24px 0 80px; }
.doc .wrap { max-width: 780px; }
.doc h2 { margin: 48px 0 10px; font-size: 24px; font-weight: 800; line-height: 1.3; }
.doc h3 { margin: 28px 0 6px; font-size: 18px; font-weight: 800; }
.doc p, .doc li { color: #5a4970; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc strong { color: var(--ink); }

.summary {
  margin-top: -64px;
  position: relative;
  padding: 28px 30px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.summary h2 { margin-top: 0; }
.summary ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.summary li { display: flex; gap: 12px; align-items: flex-start; margin: 0; }
.summary li svg { flex: none; width: 22px; height: 22px; margin-top: 2px; }

.doc .toc { display: flex; flex-wrap: wrap; gap: 10px; margin: 32px 0 0; padding: 0; list-style: none; }
.toc a {
  display: inline-block; padding: 7px 14px; border-radius: 99px;
  background: #fff; border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-size: 15px;
}
.toc a:hover { border-color: var(--accent); color: #c0438a; }

details.qa {
  margin: 12px 0;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px -20px rgba(75, 58, 94, 0.6);
}
details.qa summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 52px 18px 22px;
  font-weight: 800;
  position: relative;
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: #f6eefc; color: #a24ad0; font-size: 20px; line-height: 1;
}
details.qa[open] summary::after { content: "–"; }
details.qa .body { padding: 0 22px 18px; }
details.qa .body > :first-child { margin-top: 0; }
details.qa .body > :last-child { margin-bottom: 0; }

.contact-card {
  margin-top: 48px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  padding: 26px 28px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffe3f0 0%, #ece3ff 100%);
}
.contact-card h2 { margin: 0 0 4px; }
.contact-card p { margin: 0; }
.button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 99px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 800; text-decoration: none;
  box-shadow: 0 10px 22px -10px rgba(255, 134, 184, 0.9);
}
.button:hover { color: #fff; filter: brightness(1.05); }

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
  .seasons { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 22px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grownups .panel { grid-template-columns: 1fr; padding: 34px 26px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  section { padding: 64px 0; }
  /* Phones: the portrait art on top with the title over its sky, the store
     buttons below it on the night color the art ends in. */
  .hero { display: grid; height: auto; align-items: start; background: #512d7d; }
  .hero::before { display: none; }
  .hero-art { position: relative; left: auto; width: 100%; grid-area: 1 / 1; aspect-ratio: 2 / 3; -webkit-mask-image: none; mask-image: none; }
  .hero-art img { object-position: 50% 100%; }
  .hero-art::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(20, 12, 44, 0.45) 0%, rgba(20, 12, 44, 0) 34%, rgba(81, 45, 125, 0) 88%, #512d7d 100%);
  }
  .twinkles { grid-area: 1 / 1; z-index: 0; }
  .hero-copy { display: contents; }
  .hero-title { grid-area: 1 / 1; position: relative; z-index: 1; padding: 34px 16px 0; text-align: center; max-width: none; }
  .hero-actions { grid-area: 2 / 1; position: relative; z-index: 1; padding: 6px 16px 76px; max-width: 420px; width: 100%; margin: 0 auto; }
  .hero-icon { display: none; }
  .logo .script { font-size: clamp(44px, 15.5vw, 84px); }
  .logo .sub { justify-content: center; letter-spacing: 0.45em; margin-top: 12px; }
  .logo .sub::before, .logo .sub::after { flex-basis: 32px; }
  .tagline { margin: 14px auto 0; font-size: 17px; }
  .stores { flex-direction: column; align-items: stretch; }
  .store { min-width: 0; }
  .promise { justify-content: center; }
  .feature-grid { grid-template-columns: 1fr; gap: 12px; }
  .card { display: grid; grid-template-columns: 44px 1fr; gap: 2px 14px; padding: 16px; }
  .card .badge-icon { grid-row: span 2; width: 44px; height: 44px; border-radius: 13px; }
  .card h3 { margin: 0; font-size: 17px; }
  .card p { font-size: 15px; }
  .seasons { gap: 30px 14px; }
  .season .name { font-size: 25px; }
  .season .note { font-size: 13px; }
  .studio-shot { width: min(270px, 72vw); margin-top: 44px; border-radius: 30px; box-shadow: 0 0 0 8px #2a1752, 0 0 0 9px #4a3170, 0 30px 60px -24px rgba(75, 58, 94, 0.7); }
  .topbar nav { gap: 12px; }
  .home-link .script { font-size: 24px; }
  .summary { padding: 22px 18px; }
  .contact-card { padding: 22px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .twinkles i { animation: none; opacity: 0.7; transform: none; }
  .store, .season .window { transition: none; }
}
