:root {
  color-scheme: dark;
  font-family: ui-rounded, "Avenir Next", system-ui, sans-serif;
  color: #fff6e7;
  background: #101027;
  --ink: #fff6e7;
  --muted: #d0cae5;
  --gold: #ffd375;
  --line: #ffffff24;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(ellipse at 68% 7%, #39205a, transparent 38rem), #101027; }
a { color: inherit; }
button { font: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 5px; }
.shell { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.site-header, .footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-header { min-height: 81px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 850; text-decoration: none; }
.brand img { object-fit: contain; }
nav { display: flex; gap: clamp(14px, 3vw, 32px); flex-wrap: wrap; }
nav a { text-decoration: none; color: var(--muted); font-weight: 650; font-size: .92rem; }
nav a:hover, nav a[aria-current] { color: var(--gold); }
.hero {
  position: relative;
  isolation: isolate;
  min-height: 600px;
  display: grid;
  align-items: center;
  overflow: hidden;
  border: 1px solid #624075;
  border-radius: 34px;
  background: radial-gradient(ellipse at 12% 85%, #39215b, transparent 65%), #191433;
  box-shadow: 0 26px 90px #06061185;
}
.hero-art { position: absolute; inset: 0 0 0 31%; z-index: -1; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }
.hero-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, #21183d 0%, #21183dbb 14%, transparent 52%),
              linear-gradient(0deg, #21183d85, transparent 24%);
}
.hero-copy { padding: 40px 0 48px clamp(30px, 6vw, 85px); max-width: 50%; }
.hero h1 { margin: 0; }
.hero h1 img { width: min(440px, 100%); height: auto; display: block; filter: drop-shadow(0 14px 12px #0c072d9c); }
.hero p { max-width: 27ch; margin: 0 0 25px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.28rem); line-height: 1.55; }
.primary { display: inline-flex; gap: 22px; align-items: center; border: 1px solid #c3f870; border-radius: 15px; background: linear-gradient(#b9f556, #72db30); box-shadow: 0 5px 0 #398124; padding: 13px 23px; color: #172812; font-weight: 850; text-decoration: none; }
.primary:hover { background: #c8ff77; }
.play-section { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: clamp(32px, 6vw, 96px); padding-block: 100px; scroll-margin-top: 24px; }
h2 { margin: 0 0 16px; font-size: clamp(2rem, 5vw, 4.4rem); line-height: .98; letter-spacing: -.055em; }
.play-copy p, .journey p, .legal p { line-height: 1.65; color: var(--muted); }
.play-copy p, .journey p { max-width: 35ch; font-size: 1.07rem; }
.puzzle { padding: clamp(16px, 4vw, 36px); border: 1px solid #674791; border-radius: 27px; background: radial-gradient(ellipse at 50% 100%, #39245c, transparent 68%), #211736; }
.puzzle-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-weight: 750; }
.puzzle-header p { margin: 0; }
.puzzle-header button { cursor: pointer; background: #42315f; border: 1px solid #9374b8; border-radius: 10px; color: var(--ink); padding: 8px 12px; }
.board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); justify-items: center; gap: clamp(6px, 2vw, 16px); margin-top: 42px; }
.tube {
  display: flex; flex-direction: column-reverse; align-items: center; justify-content: flex-start;
  width: min(100%, 67px); aspect-ratio: 1 / 3.45; padding: 0 6% 7%;
  border: 2px solid #b4a9dd; border-top-width: 4px; border-radius: 6px 6px 32px 32px;
  background: linear-gradient(90deg, #b8a8e91d, #1e1535 25%, #30234f 78%, #c7b8fa1f);
  box-shadow: inset 2px 0 #ffffff22, inset -2px 0 #ffffff22;
  cursor: pointer;
}
.tube:hover, .tube[aria-pressed="true"] { border-color: #ffdc85; }
.ball { display: grid; place-items: center; width: 100%; aspect-ratio: 1; max-width: 47px; flex: none; border-radius: 50%; color: #111126; font-weight: 900; font-size: clamp(.65rem, 1.6vw, 1.05rem); box-shadow: inset 0 -3px #10102745; transition: transform .2s ease; }
.ball.pink { background: radial-gradient(circle at 30% 20%, #fff9fb, #ff98df 18%, #f329ab 55%, #a21578); }
.ball.gold { background: radial-gradient(circle at 30% 20%, #fffdee, #fff390 18%, #ffd533 55%, #e58011); }
.ball.blue { background: radial-gradient(circle at 30% 20%, #f3feff, #b3f9ff 18%, #52d7ff 55%, #2854e2); }
.ball.lifted { transform: translateY(-32%); }
.status { min-height: 2.8em; margin: 18px 0 0; color: #f3ddff; }
.journey {
  isolation: isolate; position: relative; min-height: 380px; display: grid; align-content: end;
  padding: clamp(25px, 6vw, 68px); overflow: hidden; border: 1px solid #5967a2; border-radius: 30px;
  background: linear-gradient(90deg, #16162df2, #16162d7a 54%, #1c215934), url("/art/island.webp") center 53% / cover no-repeat;
}
.journey p { margin-bottom: 0; }
.mascot { z-index: -1; position: absolute; width: min(50%, 380px); height: auto; right: 3%; bottom: -16%; filter: drop-shadow(0 0 32px #120932); }
.footer { border-top: 1px solid var(--line); margin-top: 70px; padding-block: 26px 35px; }
.legal { width: min(100%, 790px); margin: 42px auto 0; padding: clamp(24px, 5vw, 64px); border: 1px solid #624075; border-radius: 28px; background: #211833; }
.legal h1 { margin: 0; font-size: clamp(2.2rem, 5.4vw, 4.2rem); line-height: 1.03; letter-spacing: -.05em; }
.legal h2 { margin-top: 30px; margin-bottom: 8px; font-size: 1.4rem; letter-spacing: -.025em; line-height: 1.2; }
.legal p { margin-top: 8px; overflow-wrap: anywhere; }
.legal p a { color: #ffe29c; }
.legal .updated { color: var(--gold); margin: 14px 0 24px; font-size: .9rem; font-weight: 750; }
@media (max-width: 740px) {
  .shell { width: calc(100% - 32px); }
  .site-header { min-height: 66px; }
  .hero { min-height: 630px; align-items: end; border-radius: 23px; }
  .hero-art { inset: 0; }
  .hero-art img { object-position: 50% 53%; }
  .hero-art::after { background: linear-gradient(0deg, #221639 4%, #221639ed 21%, transparent 48%, #22163918 80%, #22163955); }
  .hero-copy { align-self: stretch; display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; padding: 28px; }
  .hero h1 { align-self: center; margin-bottom: auto; }
  .hero h1 img { width: 215px; }
  .hero p { margin-bottom: 15px; }
  .play-section { grid-template-columns: 1fr; gap: 22px; padding-block: 60px; }
  .journey { min-height: 305px; }
  .journey-copy { max-width: 62%; }
  .mascot { bottom: -5%; right: -7%; width: 61%; }
  .footer { margin-top: 42px; align-items: start; }
  .footer nav { justify-content: flex-end; }
  .legal { margin-top: 24px; }
}
@media (max-width: 390px) {
  .hero { min-height: 550px; }
  .footer { flex-direction: column; }
  .journey-copy { max-width: 68%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ball { transition: none; }
}
