/* Starwick website: the game's night, gold and starlight. Fonts are the
   game's own (Fraunces for titles, Nunito for text), served from here. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/Fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --night-950: #070A1C;
  --night-900: #0B1026;
  --night-800: #10163A;
  --night-700: #151B3D;
  --night-600: #1E2652;
  --gold: #FFC857;
  --gold-deep: #F2A93B;
  --ember: #FF8A3D;
  --star: #FFF6E0;
  --moon: #C9D3F2;
  --lilac: #CFC2F5;
  --text: #EEF0FF;
  --muted: #A7B0D8;
  --line: rgba(201, 211, 242, 0.14);
  --card: rgba(21, 27, 61, 0.72);
  --radius: 20px;
  --shadow: 0 24px 60px rgba(3, 5, 18, 0.55);
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

/* One language at a time (the other one stays in the page for search
   engines and for readers without JavaScript, who see English). */
[data-lang="en"] [data-l="fr"],
[data-lang="fr"] [data-l="en"] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--night-900);
  background-image:
    radial-gradient(1200px 700px at 80% -10%, rgba(91, 66, 180, 0.28), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(42, 64, 160, 0.22), transparent 60%);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 0;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }
.gold { color: var(--gold); }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 32px); margin-inline: auto; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--body); font-weight: 800; font-size: 12.5px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
}
.kicker::before, .kicker::after { content: "✦"; font-size: 10px; opacity: 0.8; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- Top bar ---------------------------------------------------------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.topbar.solid {
  background: rgba(11, 16, 38, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--display); font-weight: 700; font-size: 21px; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4); }
.toplinks { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.toplinks a.link { color: var(--muted); font-weight: 700; font-size: 14.5px; padding: 8px 10px; border-radius: 10px; }
.toplinks a.link:hover { color: var(--text); text-decoration: none; background: rgba(255, 255, 255, 0.05); }
.lang {
  display: inline-flex; padding: 3px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); margin-left: 6px;
}
.lang button {
  font: 800 12.5px var(--body); letter-spacing: 0.06em; color: var(--muted);
  background: none; border: 0; padding: 6px 11px; border-radius: 999px; cursor: pointer;
}
[data-lang="en"] .lang [data-set="en"], [data-lang="fr"] .lang [data-set="fr"] { background: var(--gold); color: var(--night-900); }
@media (max-width: 640px) {
  .toplinks a.link.optional { display: none; }
}

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  font: 800 16px var(--body); padding: 14px 22px; border-radius: 14px;
  border: 1px solid transparent; cursor: pointer; transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-gold { background: linear-gradient(180deg, #FFD777, var(--gold-deep)); color: #2A1A05; box-shadow: 0 10px 30px rgba(255, 184, 70, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.btn-ghost { background: rgba(255, 255, 255, 0.06); color: var(--text); border-color: var(--line); }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 14px;
  border-radius: 14px; background: #000; color: #fff; border: 1px solid rgba(255, 255, 255, 0.25);
}
.store-badge svg { width: 26px; height: 26px; fill: #fff; }
.store-badge small { display: block; font-size: 11px; line-height: 1.1; opacity: 0.8; font-weight: 600; }
.store-badge strong { display: block; font-size: 18px; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
.store-badge:hover { text-decoration: none; }
.soon { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ---- Hero ------------------------------------------------------------- */
.hero { position: relative; min-height: min(100svh, 980px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero-art { position: absolute; inset: 0; z-index: -2; }
/* The key art is mirrored: Wick and Pip stand on the right, facing the words. */
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 35%; transform: scaleX(-1); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 10, 28, 0.94) 0%, rgba(7, 10, 28, 0.72) 38%, rgba(7, 10, 28, 0.1) 70%),
    linear-gradient(0deg, var(--night-900) 0%, rgba(11, 16, 38, 0) 34%);
}
#sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero .wrap { padding: 140px 0 110px; }
.hero h1 { font-size: clamp(42px, 7.2vw, 92px); font-weight: 800; margin: 18px 0 20px; max-width: 12ch; }
.hero .lead { font-size: clamp(18px, 2.2vw, 22px); color: var(--moon); max-width: 34ch; margin-bottom: 30px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
/* Phones: the art on top, the words below it. */
@media (max-width: 760px) {
  .hero { min-height: 0; display: block; }
  .hero-art { position: relative; inset: auto; height: 58svh; min-height: 360px; z-index: -2; }
  .hero-art img { object-position: 24% 30%; }
  .hero::before {
    inset: 0 0 auto 0; height: 58svh; min-height: 360px;
    background: linear-gradient(0deg, var(--night-900) 0%, rgba(11, 16, 38, 0) 45%),
      linear-gradient(180deg, rgba(7, 10, 28, 0.6) 0%, rgba(7, 10, 28, 0) 22%);
  }
  .hero .wrap { padding: 0 0 64px; margin-top: -72px; position: relative; }
}

/* ---- Sections --------------------------------------------------------- */
section { position: relative; }
.section { padding: 110px 0; }
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(32px, 4.4vw, 54px); font-weight: 750; margin: 14px 0 16px; }
.section-head p { color: var(--muted); font-size: 18.5px; }
.center { text-align: center; margin-inline: auto; }

.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.split.flip { grid-template-columns: 0.95fr 1.05fr; }
.split.flip .split-media { order: -1; }
@media (max-width: 900px) { .split, .split.flip { grid-template-columns: 1fr; gap: 36px; } .split.flip .split-media { order: 0; } }
.frame {
  border-radius: 28px; overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line); background: var(--night-800);
}
.frame.tall { aspect-ratio: 9 / 13; }
.frame.tall img { width: 100%; height: 100%; object-fit: cover; }

.cast { display: grid; gap: 16px; margin-top: 28px; }
.cast-item { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.cast-mark {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px;
  background: rgba(255, 200, 87, 0.12); border: 1px solid rgba(255, 200, 87, 0.3);
}
.cast-item h3 { font-size: 21px; margin-bottom: 2px; }
.cast-item p { color: var(--muted); margin: 0; }

/* The three beats of a maze. */
.beats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: beat; }
@media (max-width: 900px) { .beats { grid-template-columns: 1fr; } }
.beat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px 26px; position: relative; overflow: hidden;
}
.beat::before {
  counter-increment: beat; content: counter(beat);
  font-family: var(--display); font-weight: 800; font-size: 64px; line-height: 1;
  color: rgba(255, 200, 87, 0.16); position: absolute; right: 18px; top: 10px;
}
.beat .icon { font-size: 28px; margin-bottom: 14px; }
.beat h3 { font-size: 23px; margin-bottom: 8px; }
.beat p { color: var(--muted); margin: 0; }

.ignite { margin: 26px 0 0; border-radius: 28px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; }
.ignite img { width: 100%; height: clamp(260px, 40vw, 460px); object-fit: cover; object-position: center 42%; }
.ignite figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 28px 22px;
  background: linear-gradient(0deg, rgba(7, 10, 28, 0.9), transparent);
  font-family: var(--display); font-size: clamp(20px, 2.6vw, 28px); font-weight: 650;
}

/* Worlds and wonders. */
.wonders { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 980px) { .wonders { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .wonders { grid-template-columns: repeat(2, 1fr); } }
.wonder { border-radius: 18px; overflow: hidden; position: relative; aspect-ratio: 1; border: 1px solid var(--line); background: var(--night-800); }
.wonder img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.wonder:hover img { transform: scale(1.05); }
.wonder span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px;
  background: linear-gradient(0deg, rgba(7, 10, 28, 0.92), transparent);
  font-weight: 800; font-size: 14.5px;
}
.worlds-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.worlds-list li {
  list-style: none; padding: 8px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 700;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--moon);
}
.worlds-list { padding: 0; }

/* Screenshots: a strip that scrolls sideways. */
.shots {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 6px 16px 22px; margin: 0 -16px; scrollbar-width: thin; scrollbar-color: var(--night-600) transparent;
}
.shots img {
  flex: 0 0 auto; width: clamp(200px, 24vw, 270px); aspect-ratio: 1320 / 2868; height: auto;
  border-radius: 26px; scroll-snap-align: center; border: 1px solid var(--line); box-shadow: var(--shadow);
  background: var(--night-800);
}

/* Promises. */
.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .promises { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .promises { grid-template-columns: 1fr; } }
.promise { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.promise .icon { font-size: 24px; margin-bottom: 10px; }
.promise h3 { font-size: 19px; font-family: var(--body); font-weight: 800; margin-bottom: 4px; }
.promise p { color: var(--muted); margin: 0; font-size: 15.5px; }

/* Closing call. */
.finale { text-align: center; padding: 120px 0 130px; position: relative; overflow: hidden; }
.finale::before {
  content: ""; position: absolute; inset: auto 0 -40% 0; height: 90%; z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 200, 87, 0.22), transparent 70%);
}
.finale img.icon { width: 112px; height: 112px; border-radius: 26px; margin: 0 auto 26px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 60px rgba(255, 200, 87, 0.25); }
.finale h2 { font-size: clamp(34px, 5vw, 60px); margin-bottom: 14px; }
.finale p { color: var(--muted); font-size: 18.5px; margin-bottom: 28px; }
.finale .cta-row { justify-content: center; }

/* ---- Inner pages (support, privacy, legal) ------------------------------- */
.page-hero { padding: 140px 0 56px; position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(38px, 5.4vw, 64px); margin: 14px 0 12px; }
.page-hero p { color: var(--muted); font-size: 19px; margin: 0; max-width: 46ch; }
.page-hero .art {
  position: absolute; right: -6%; top: 0; bottom: 0; width: 56%; z-index: -1; opacity: 0.55;
  mask-image: linear-gradient(90deg, transparent, #000 45%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%);
}
.page-hero .art img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .page-hero .art { width: 100%; right: 0; opacity: 0.22; } }

.page { padding: 56px 0 96px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 44px; }
.toc a {
  font-size: 14px; font-weight: 700; color: var(--moon); padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04);
}
.toc a:hover { text-decoration: none; border-color: rgba(255, 200, 87, 0.5); color: var(--gold); }
.doc h2 {
  font-size: clamp(25px, 3vw, 32px); margin: 56px 0 18px; padding-top: 8px;
  display: flex; align-items: center; gap: 14px; scroll-margin-top: 90px;
}
.doc h2 .n {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  font: 800 15px var(--body); color: var(--night-900); background: var(--gold);
}
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 20px; margin: 26px 0 8px; }
.doc p, .doc li { color: #D9DDF5; }
.doc ul { padding-left: 22px; margin: 0 0 1em; }
.doc li { margin-bottom: 6px; }
.doc strong { color: var(--text); }
.note {
  border-radius: 16px; padding: 18px 20px; margin: 18px 0; background: rgba(255, 200, 87, 0.08);
  border: 1px solid rgba(255, 200, 87, 0.28);
}
.note strong { display: block; color: var(--gold); margin-bottom: 4px; }
.note p:last-child { margin-bottom: 0; }
.summary-card {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 40px;
}
@media (max-width: 700px) { .summary-card { grid-template-columns: 1fr; } }
.summary-card > div { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.summary-card .big { font-size: 26px; margin-bottom: 6px; }
.summary-card h3 { font: 800 17px var(--body); margin-bottom: 4px; }
.summary-card p { color: var(--muted); font-size: 15px; margin: 0; }

.faq { display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: border-color 0.2s; }
.faq details[open] { border-color: rgba(255, 200, 87, 0.45); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 20px; font-weight: 800; font-size: 16.5px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 26px/1 var(--body); color: var(--gold); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 20px 18px; color: #CDD3EE; }
.faq .answer p:last-child, .faq .answer ul:last-child { margin-bottom: 0; }

.steps { display: grid; gap: 12px; margin: 18px 0 24px; counter-reset: step; }
.step { display: grid; grid-template-columns: 36px 1fr; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.step::before {
  counter-increment: step; content: counter(step);
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  font: 800 14px var(--body); background: rgba(255, 200, 87, 0.15); color: var(--gold);
}
.step strong { display: block; }
.step span { color: var(--muted); font-size: 15.5px; }

.contact {
  display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: 20px; margin: 18px 0;
  background: linear-gradient(135deg, rgba(255, 200, 87, 0.14), rgba(91, 66, 180, 0.16));
  border: 1px solid rgba(255, 200, 87, 0.35); color: var(--text);
}
.contact:hover { text-decoration: none; border-color: var(--gold); transform: translateY(-1px); }
.contact .icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; background: rgba(7, 10, 28, 0.5); flex: 0 0 auto; }
.contact strong { display: block; font-size: 17.5px; }
.contact span { color: var(--muted); font-size: 14.5px; }
.contact .go { margin-left: auto; color: var(--gold); font-size: 26px; }

.meta { width: 100%; border-collapse: separate; border-spacing: 0; margin: 16px 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; font-size: 15.5px; }
.meta td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.meta tr:last-child td { border-bottom: 0; }
.meta td:first-child { width: 38%; color: var(--muted); font-weight: 700; background: rgba(255, 255, 255, 0.03); }

/* ---- Footer ----------------------------------------------------------- */
footer { border-top: 1px solid var(--line); padding: 46px 0 52px; background: var(--night-950); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer nav a { color: var(--moon); font-weight: 700; font-size: 15px; }
footer small { color: var(--muted); font-size: 13.5px; }

/* ---- Motion ----------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .wonder img, .btn { transition: none; }
}
