/* ColorRail website. Colors come from the game (lib/game/ui/hud.dart, piece_colors.dart, world_theme.dart). */
@font-face {
  font-family: "Lilita One";
  src: url("/assets/fonts/LilitaOne-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --sky-top: #5EC2F2;
  --sky-bottom: #BDE9FF;
  --grass-top: #A3E07F;
  --grass: #7CC95A;
  --grass-edge: #5E9F41;
  --dirt-top: #A9744B;
  --dirt-bottom: #7A5233;
  --ink: #0B2545;
  --ink-soft: #33496A;
  --navy: #0F2A5C;
  --white: #FFFFFF;
  --blue: #3B82F6; --blue-l: #BAE6FD; --blue-d: #1E40AF;
  --orange: #F97316; --orange-l: #FED7AA; --orange-d: #C2410C;
  --green: #22C55E; --green-l: #BBF7D0; --green-d: #15803D;
  --purple: #A855F7; --purple-l: #E9D5FF; --purple-d: #6B21A8;
  --pink: #EC4899; --pink-l: #FBCFE8; --pink-d: #9D174D;
  --yellow: #FACC15; --yellow-l: #FEF08A; --yellow-d: #A16207;
  --red: #EF4444;
  --display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --radius: 26px;
  --gutter: 16px;
  --vh: 100vh;
  color-scheme: light;
}
@supports (height: 100svh) { :root { --vh: 100svh; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--sky-bottom);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
img, svg, video { display: block; max-width: 100%; }
a { color: var(--blue-d); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0; letter-spacing: .01em; }
p { margin: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--white); color: var(--ink); padding: 10px 16px; border-radius: 12px; font-weight: 700; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--blue-d); outline-offset: 3px; border-radius: 8px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 820px; }

/* ---------- Candy buttons (raised, like the in-game buttons) ---------- */
.btn {
  --top: #4ADE80; --base: var(--green); --edge: var(--green-d);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display); font-size: 20px; line-height: 1; color: #fff;
  text-decoration: none; text-shadow: 0 2px 0 var(--edge);
  padding: 14px 22px;
  border: 3px solid #fff; border-radius: 20px;
  background: linear-gradient(180deg, var(--top) 0%, var(--top) 42%, var(--base) 58%, var(--base) 100%);
  box-shadow: 0 6px 0 var(--edge), 0 12px 22px rgba(11, 37, 69, .28), inset 0 2px 0 rgba(255, 255, 255, .55);
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--edge), 0 16px 26px rgba(11, 37, 69, .3), inset 0 2px 0 rgba(255, 255, 255, .55); filter: saturate(1.08); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--edge), 0 4px 10px rgba(11, 37, 69, .25), inset 0 2px 0 rgba(255, 255, 255, .55); }
.btn-green { --top: #4ADE80; --base: #22C55E; --edge: #15803D; }
.btn-sm { font-size: 16px; padding: 9px 14px 9px 12px; border-radius: 16px; border-width: 2.5px; box-shadow: 0 4px 0 var(--edge), 0 8px 14px rgba(11, 37, 69, .22), inset 0 2px 0 rgba(255, 255, 255, .5); gap: 8px; }
.btn-sm:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }
.play-ico { width: 22px; height: 24px; flex: none; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .25)); }
.btn-sm .play-ico { width: 18px; height: 20px; }
.btn-play { padding: 12px 26px 12px 18px; gap: 14px; min-height: 68px; border-radius: 22px; }
.btn-play .play-ico { width: 34px; height: 37px; background: #fff; border-radius: 12px; padding: 7px 6px 6px 8px; box-sizing: content-box; filter: none; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .08); }
.btn-play-text { display: flex; flex-direction: column; align-items: flex-start; font-size: 28px; line-height: 1; }
.btn-play-text small { font-family: var(--body); font-weight: 800; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; text-shadow: none; opacity: .95; }
.btn-xl { transform-origin: center; }

/* ---------- Kickers (pill labels like the in-game "SIDING" tag) ---------- */
.kicker {
  --k1: #FDBA74; --k2: var(--orange); --k3: var(--orange-d);
  display: inline-block; font-family: var(--display); font-size: 15px; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; text-shadow: 0 1px 0 var(--k3);
  padding: 6px 14px 5px; border-radius: 999px; border: 2.5px solid #fff;
  background: linear-gradient(180deg, var(--k1) 0 45%, var(--k2) 55% 100%);
  box-shadow: 0 3px 0 var(--k3);
}
.kicker-orange { --k1: #FDBA74; --k2: #F97316; --k3: #C2410C; }
.kicker-blue { --k1: #93C5FD; --k2: #3B82F6; --k3: #1E40AF; }
.kicker-green { --k1: #86EFAC; --k2: #22C55E; --k3: #15803D; }
.kicker-purple { --k1: #D8B4FE; --k2: #A855F7; --k3: #6B21A8; }
.kicker-pink { --k1: #F9A8D4; --k2: #EC4899; --k3: #9D174D; }
.kicker-yellow { --k1: #FDE047; --k2: #EAB308; --k3: #A16207; color: #fff; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; z-index: 50; top: 10px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 20px); max-width: 1180px;
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  padding: 7px 8px 7px 10px; border-radius: 22px;
  background: rgba(255, 255, 255, .0);
  transition: background .25s ease, box-shadow .25s ease, backdrop-filter .25s ease;
}
.nav.scrolled { background: rgba(255, 255, 255, .86); box-shadow: 0 6px 24px rgba(11, 37, 69, .14), 0 3px 0 rgba(11, 37, 69, .06); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-family: var(--display); font-size: 24px; -webkit-text-stroke: 5px var(--navy); paint-order: stroke fill; filter: drop-shadow(0 2px 0 var(--navy)); }
.brand img { width: 40px; height: 40px; border-radius: 12px; border: 2.5px solid #fff; box-shadow: 0 3px 0 rgba(11, 37, 69, .25); }
.nav.scrolled .brand { color: var(--ink); -webkit-text-stroke: 0; filter: none; }
.nav-links { display: none; gap: 4px; }
.nav-links a { font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 12px; }
.nav-links a:hover { background: rgba(255, 255, 255, .7); }
@media (min-width: 900px) { .nav-links { display: flex; } }

/* ---------- Story: sticky 3D stage + panels ---------- */
.story { position: relative; background: linear-gradient(180deg, var(--sky-top) 0%, #8AD5F7 45%, var(--sky-bottom) 100%); }
.stage { position: sticky; top: 0; height: var(--vh); overflow: hidden; z-index: 0;
  background:
    radial-gradient(120% 70% at 70% 105%, rgba(255, 255, 255, .55), transparent 60%),
    linear-gradient(180deg, var(--sky-top) 0%, #8FD7F8 55%, var(--sky-bottom) 100%); }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; opacity: 0; transition: opacity .9s ease; }
.scene-ready #scene { opacity: 1; }
.stage-fallback { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 0 var(--gutter); }
.stage-fallback img { width: min(92%, 760px); height: auto; border-radius: 28px; border: 4px solid #fff; box-shadow: 0 10px 0 rgba(11, 37, 69, .18), 0 30px 60px rgba(11, 37, 69, .25); }
html:not(.js) .stage-fallback, .no-webgl .stage-fallback { display: flex; }
.no-webgl #scene { display: none; }
@media (max-width: 899px) {
  .stage-fallback { align-items: flex-end; padding-bottom: 14vh; }
}
@media (min-width: 900px) {
  .stage-fallback { justify-content: flex-end; padding-right: 4vw; }
  .stage-fallback img { width: min(50vw, 720px); }
}

.stage-hud { position: absolute; inset: 0; pointer-events: none; }
.hud-pill {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(20px); opacity: 0;
  display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .9); border: 2.5px solid #fff; box-shadow: 0 4px 0 rgba(11, 37, 69, .15), 0 10px 24px rgba(11, 37, 69, .15);
  font-weight: 800; font-size: 14px; color: var(--ink); transition: opacity .4s ease, transform .4s ease;
}
.hud-pill svg { width: 34px; height: 22px; }
.hud-pill b { font-family: var(--display); font-weight: 400; font-size: 20px; color: var(--green-d); min-width: 1.2em; text-align: center; }
.hud-on .hud-pill { opacity: 1; transform: translateX(-50%) translateY(0); }
.hud-pill.bump b { animation: bump .5s ease; }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.6); } 100% { transform: scale(1); } }
.tap-hint {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); opacity: 0;
  font-family: var(--display); font-size: 18px; color: #fff; text-shadow: 0 2px 0 var(--orange-d);
  background: linear-gradient(180deg, #FDBA74 0 45%, var(--orange) 55%); border: 2.5px solid #fff; border-radius: 16px;
  padding: 6px 12px 5px; box-shadow: 0 4px 0 var(--orange-d); white-space: nowrap; transition: opacity .35s ease;
}
.tap-hint::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 14px; height: 14px; background: var(--orange); border-right: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: translateX(-50%) rotate(45deg); border-radius: 0 0 4px 0; }
.tap-hint.show { opacity: 1; animation: hintbob 1.6s ease-in-out infinite; }
@keyframes hintbob { 0%, 100% { margin-top: 0; } 50% { margin-top: -6px; } }

.panels { position: relative; z-index: 1; margin-top: calc(-1 * var(--vh)); pointer-events: none; }
.panel { min-height: var(--vh); display: flex; padding: 0 var(--gutter); }
.panel a, .panel button, .step-card, .hero-copy .tagline, .hero-copy .chips { pointer-events: auto; }

/* Hero */
.panel-hero { flex-direction: column; justify-content: flex-start; padding-top: 84px; position: relative; }
.hero-copy { max-width: 600px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); background: rgba(255, 255, 255, .78); padding: 5px 14px 5px 5px; border-radius: 999px; box-shadow: 0 3px 0 rgba(11, 37, 69, .1); }
.eyebrow img { width: 30px; height: 30px; border-radius: 9px; }
h1 { display: flex; flex-direction: column; gap: 4px; }
.logo-word { font-size: clamp(56px, 15vw, 118px); line-height: .92; letter-spacing: .005em; display: inline-flex;
  -webkit-text-stroke: .11em var(--navy); paint-order: stroke fill;
  filter: drop-shadow(0 .06em 0 var(--navy)) drop-shadow(0 .14em .12em rgba(11, 37, 69, .25)); }
.logo-word span { display: inline-block; transform-origin: 50% 90%; }
.logo-word .c1 { color: #EF4444; } .logo-word .c2 { color: #F97316; } .logo-word .c3 { color: #FACC15; }
.logo-word .c4 { color: #22C55E; } .logo-word .c5 { color: #3B82F6; }
.logo-word .c6, .logo-word .c7, .logo-word .c8, .logo-word .c9 { color: #fff; }
.logo-word .c2 { transform: rotate(-4deg); } .logo-word .c4 { transform: rotate(3deg) translateY(.02em); } .logo-word .c7 { transform: rotate(-3deg); }
.js .logo-word span { animation: letter-in .7s cubic-bezier(.34, 1.56, .64, 1) both; }
.js .logo-word span:nth-child(2) { animation-delay: .04s; } .js .logo-word span:nth-child(3) { animation-delay: .08s; }
.js .logo-word span:nth-child(4) { animation-delay: .12s; } .js .logo-word span:nth-child(5) { animation-delay: .16s; }
.js .logo-word span:nth-child(6) { animation-delay: .2s; } .js .logo-word span:nth-child(7) { animation-delay: .24s; }
.js .logo-word span:nth-child(8) { animation-delay: .28s; } .js .logo-word span:nth-child(9) { animation-delay: .32s; }
@keyframes letter-in { from { opacity: 0; translate: 0 .4em; scale: .6; } to { opacity: 1; translate: 0 0; scale: 1; } }
.h1-sub { font-size: clamp(24px, 6.6vw, 40px); color: #fff; -webkit-text-stroke: .14em var(--navy); paint-order: stroke fill; filter: drop-shadow(0 3px 0 var(--navy)); padding-left: .12em; }
.tagline { font-size: clamp(17px, 4.4vw, 21px); font-weight: 650; color: var(--navy); max-width: 30ch; line-height: 1.4; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 4px; }
.chips { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 13.5px; font-weight: 800; color: var(--navy); background: rgba(255, 255, 255, .8); border: 2px solid #fff; padding: 4px 12px; border-radius: 999px; box-shadow: 0 2px 0 rgba(11, 37, 69, .12); }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: none; flex-direction: column; align-items: center; gap: 2px; color: var(--navy); font-weight: 800; font-size: 13px; text-decoration: none; letter-spacing: .06em; text-transform: uppercase; }
.scroll-cue svg { width: 28px; height: 28px; animation: cue 1.6s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

@media (max-width: 899px) {
  .hero-copy { align-items: center; text-align: center; margin: 0 auto; gap: 10px; }
  .tagline { max-width: 34ch; }
  .chips { justify-content: center; }
  .chips li:nth-child(4) { display: none; }
  .logo-word { justify-content: center; }
  .h1-sub { padding-left: 0; }
  h1 { align-items: center; }
  .btn-play { min-height: 60px; padding: 9px 22px 9px 12px; }
  .btn-play-text { font-size: 25px; }
}
@media (max-width: 899px) and (max-height: 700px) {
  .panel-hero { padding-top: 70px; }
  .eyebrow { display: none; }
}
@media (min-width: 900px) {
  :root { --gutter: 32px; }
  .panel-hero { justify-content: center; padding-top: 40px; padding-left: max(5vw, calc((100vw - 1180px) / 2 + 32px)); }
  .scroll-cue { display: flex; }
  .hud-pill { left: auto; right: 28px; transform: translateY(20px); bottom: 26px; }
  .hud-on .hud-pill { transform: translateY(0); }
}

/* Steps */
.panel-step { align-items: flex-end; justify-content: center; padding-bottom: 22px; }
.step-card {
  width: 100%; max-width: 440px;
  background: rgba(255, 255, 255, .94); border: 3px solid #fff; border-radius: var(--radius);
  padding: 18px 18px 16px; box-shadow: 0 8px 0 rgba(11, 37, 69, .12), 0 24px 50px rgba(11, 37, 69, .2);
  display: flex; flex-direction: column; gap: 10px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.step-card .kicker { align-self: flex-start; margin-bottom: 2px; color: #fff; font-size: 15px; }
.step-head { display: flex; align-items: center; gap: 12px; }
.step-num { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 24px; color: #fff; text-shadow: 0 2px 0 var(--blue-d);
  background: linear-gradient(180deg, #93C5FD 0 45%, var(--blue) 55%); border: 3px solid #fff; box-shadow: 0 4px 0 var(--blue-d); }
[data-step="2"] .step-num { background: linear-gradient(180deg, #FDBA74 0 45%, var(--orange) 55%); box-shadow: 0 4px 0 var(--orange-d); text-shadow: 0 2px 0 var(--orange-d); }
[data-step="3"] .step-num { background: linear-gradient(180deg, #D8B4FE 0 45%, var(--purple) 55%); box-shadow: 0 4px 0 var(--purple-d); text-shadow: 0 2px 0 var(--purple-d); }
.step-card h2 { font-size: clamp(28px, 7.5vw, 38px); color: var(--ink); }
.step-card p { color: var(--ink-soft); font-size: 16px; }
.step-art { background: linear-gradient(180deg, #DDF6CF, #C4EBB0); border-radius: 18px; padding: 8px 10px; border: 2px solid #fff; box-shadow: inset 0 -4px 0 rgba(94, 159, 65, .25); }
.step-art svg { width: 100%; height: auto; max-height: 84px; }
.ripple { transform-origin: 46px 30px; animation: ripple 1.8s ease-out infinite; }
@keyframes ripple { 0% { transform: scale(.4); opacity: .95; } 100% { transform: scale(1.3); opacity: 0; } }
.step-tip { font-size: 14.5px !important; background: #FFF7ED; border: 2px dashed #FDBA74; border-radius: 14px; padding: 8px 12px; }
.step-tip strong { color: var(--orange-d); }
@media (max-width: 899px) and (max-height: 760px) {
  .step-art { display: none; }
}
@media (min-width: 900px) {
  .panel-step { align-items: center; justify-content: flex-start; padding-bottom: 0; padding-left: max(5vw, calc((100vw - 1180px) / 2 + 32px)); }
  .step-card { padding: 26px 26px 22px; gap: 14px; }
  .step-card p { font-size: 17.5px; }
  .step-head { gap: 14px; }
  .step-num { width: 52px; height: 52px; font-size: 28px; }
  .step-art svg { max-height: 110px; }
}

/* ---------- Generic sections ---------- */
.section { position: relative; padding: 72px 0 80px; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 36px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.section-head h2 { font-size: clamp(36px, 8.5vw, 60px); color: var(--ink); }
.lede { font-size: clamp(17px, 2.2vw, 19px); color: var(--ink-soft); max-width: 58ch; }
.section-head-light h2 { color: #fff; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .25)); }
.section-head-light .lede { color: #DCE8FF; }

/* reveal on scroll */
.js [data-reveal] { opacity: 0; transform: translateY(28px) scale(.98); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- Worlds ---------- */
.worlds { background: #F3FAFF; padding-top: 96px; }
.cloud-edge { position: absolute; left: 0; right: 0; top: -58px; height: 60px; pointer-events: none;
  background:
    radial-gradient(40px 34px at 30px 60px, #F3FAFF 98%, transparent) repeat-x,
    radial-gradient(64px 50px at 110px 60px, #F3FAFF 98%, transparent) repeat-x;
  background-size: 120px 60px, 180px 60px; }
.world-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 18px; perspective: 1200px; }
@media (min-width: 640px) { .world-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .world-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.world {
  position: relative; border-radius: var(--radius); overflow: hidden; border: 3px solid #fff;
  background: #fff;
  box-shadow: 0 8px 0 rgba(11, 37, 69, .08), 0 20px 40px rgba(11, 37, 69, .12);
  transform-style: preserve-3d; transition: transform .25s ease, box-shadow .25s ease;
  --rx: 0deg; --ry: 0deg;
}
.js .world.in { transform: rotateX(var(--rx)) rotateY(var(--ry)); }
.world:hover { box-shadow: 0 12px 0 rgba(11, 37, 69, .08), 0 30px 50px rgba(11, 37, 69, .18); }
.world-art { height: 176px; display: grid; place-items: center; position: relative; overflow: hidden; background: linear-gradient(180deg, var(--sky1), var(--sky2)); }
.world-art::before, .world-art::after { content: ""; position: absolute; background: #fff; border-radius: 999px; opacity: .85; }
.world-art::before { width: 70px; height: 22px; top: 26px; left: 18px; box-shadow: 26px -10px 0 4px #fff; }
.world-art::after { width: 54px; height: 16px; top: 50px; right: 22px; box-shadow: -18px -7px 0 3px #fff; opacity: .7; }
.mini-island { position: relative; width: 150px; height: 46px; border-radius: 50%; margin-top: -10px;
  background: radial-gradient(ellipse at 40% 35%, var(--g1), var(--g2));
  box-shadow: 0 7px 0 var(--ge), inset 0 -3px 0 rgba(0, 0, 0, .06);
  animation: bob 5s ease-in-out infinite; }
.world:nth-child(2n) .mini-island { animation-delay: -1.7s; } .world:nth-child(3n) .mini-island { animation-delay: -3.1s; }
.mini-island::after { content: ""; position: absolute; left: 14px; right: 14px; top: 26px; height: 74px; z-index: -1;
  background: linear-gradient(180deg, var(--d1), var(--d2));
  clip-path: polygon(0 0, 100% 0, 88% 28%, 76% 52%, 64% 70%, 54% 100%, 42% 74%, 30% 58%, 18% 34%); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.mi-badge { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff, #EAF6FF 60%, #CFE8F7); border: 3px solid #fff; box-shadow: 0 5px 0 rgba(11, 37, 69, .15), 0 10px 20px rgba(11, 37, 69, .18); }
.mi-badge svg { width: 46px; height: 46px; }
.mi-badge.mi-siding svg, .mi-badge.mi-wide svg { width: 56px; }
.mi-badge.mi-wide { width: 84px; border-radius: 26px; }
.world-body { padding: 16px 20px 22px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.world-no { font-weight: 800; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); opacity: .75; }
.world h3 { font-size: 30px; color: var(--ink); }
.world-body p:last-child { color: var(--ink-soft); }
@media (max-width: 639px) {
  .world { display: grid; grid-template-columns: 118px 1fr; }
  .world-art { height: auto; min-height: 140px; }
  .world-art::before, .world-art::after { display: none; }
  .mini-island { position: absolute; left: 50%; top: 50%; margin: 0; transform: translate(-50%, -60%) scale(.62); animation: none; }
  .world-body { padding: 14px 16px 16px; gap: 4px; }
  .world h3 { font-size: 26px; }
  .world-body p:last-child { font-size: 15.5px; }
}

/* ---------- Features ---------- */
.features { background: linear-gradient(180deg, #F3FAFF 0%, #E9F8E1 100%); padding-top: 40px; }
.feature-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; } }
@media (min-width: 1000px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }
.feature { background: #fff; border-radius: 22px; padding: 18px 18px 20px; border: 3px solid #fff;
  box-shadow: 0 6px 0 rgba(11, 37, 69, .07), 0 14px 30px rgba(11, 37, 69, .08);
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; column-gap: 14px; row-gap: 4px; align-items: start; }
.feature h3 { font-size: 22px; color: var(--ink); align-self: center; }
.feature p { grid-column: 2; color: var(--ink-soft); font-size: 15.5px; }
.f-ico { grid-row: span 2; width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--c1) 0 45%, var(--c2) 55%); border: 3px solid #fff; box-shadow: 0 4px 0 var(--c3); }
.f-ico svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1.5px 0 var(--c3)); }
@media (min-width: 1000px) {
  .feature { grid-template-columns: 1fr; grid-template-rows: auto; row-gap: 10px; padding: 22px; }
  .f-ico { grid-row: auto; }
  .feature p { grid-column: auto; }
  .feature-lang { grid-column: 1 / -1; grid-template-columns: auto 1fr; column-gap: 18px; align-items: center; }
  .feature-lang .f-ico { grid-row: span 2; }
  .feature-lang p { grid-column: 2; }
}
.langs { line-height: 1.8; }

/* ---------- Showcase (screenshots + video) ---------- */
.showcase { background: radial-gradient(120% 60% at 50% 0%, #1F4FA8 0%, var(--navy) 55%, #0A1F45 100%); color: #fff; overflow: hidden; padding-bottom: 96px; }
.stars { position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image: radial-gradient(2px 2px at 20% 30%, #fff 50%, transparent), radial-gradient(2px 2px at 70% 20%, #fff 50%, transparent), radial-gradient(1.5px 1.5px at 40% 70%, #fff 50%, transparent), radial-gradient(1.5px 1.5px at 85% 60%, #fff 50%, transparent), radial-gradient(2px 2px at 10% 85%, #fff 50%, transparent);
  background-size: 420px 420px; }
.carousel { position: relative; }
.shot-track { list-style: none; margin: 0; padding: 16px max(var(--gutter), calc((100vw - 1180px) / 2 + 16px)) 34px; display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; perspective: 1400px; }
.shot-track::-webkit-scrollbar { display: none; }
.shot { flex: none; width: min(68vw, 250px); scroll-snap-align: center; }
.shot figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; transition: transform .35s ease; transform-style: preserve-3d; }
.shot figcaption { font-family: var(--display); font-size: 18px; text-align: center; color: #fff; line-height: 1.15; }
.phone { position: relative; width: 100%; aspect-ratio: 9 / 16; border-radius: 30px; padding: 9px; background: linear-gradient(145deg, #334155, #0F172A 60%); box-shadow: 0 0 0 2px rgba(255, 255, 255, .12), 0 24px 50px rgba(0, 0, 0, .45), inset 0 0 0 2px #475569; }
.phone::before { content: ""; position: absolute; top: 15px; left: 50%; width: 22%; height: 7px; border-radius: 999px; background: #0F172A; transform: translateX(-50%); z-index: 2; opacity: .85; }
.phone img, .phone video { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; background: #5EC2F2; }
.car-btn { position: absolute; top: calc(50% - 40px); z-index: 2; width: 54px; height: 54px; border-radius: 50%; border: 3px solid #fff; cursor: pointer;
  background: linear-gradient(180deg, #D8B4FE 0 45%, var(--purple) 55%); box-shadow: 0 5px 0 var(--purple-d), 0 10px 20px rgba(0, 0, 0, .3); display: none; place-items: center; }
.car-btn svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.car-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--purple-d); }
.car-prev { left: 18px; } .car-next { right: 18px; }
@media (min-width: 900px) { .js .car-btn:not([hidden]) { display: grid; } .shot { width: 250px; } }

.video-wrap { display: grid; grid-template-columns: 1fr; gap: 34px; align-items: center; margin-top: 60px; }
.video-copy { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.video-copy h2 { font-size: clamp(36px, 8vw, 56px); color: #fff; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .25)); }
.video-copy p { color: #DCE8FF; max-width: 40ch; }
.video-phone { display: flex; justify-content: center; }
.phone-lg { width: min(78vw, 330px); border-radius: 40px; padding: 11px; }
.phone-lg img, .phone-lg video { border-radius: 30px; }
.phone-lg::before { top: 19px; }
.video-fallback[hidden] { display: none; }
.video-missing video { display: none; }
@media (min-width: 900px) {
  .video-wrap { grid-template-columns: 1.1fr 1fr; gap: 60px; }
  .video-copy { align-items: flex-start; text-align: left; }
}

/* ---------- FAQ ---------- */
.faq { background: linear-gradient(180deg, #FFF7ED 0%, #FFF1DC 100%); }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq details { background: #fff; border-radius: 20px; border: 3px solid #fff; box-shadow: 0 5px 0 rgba(194, 65, 12, .12), 0 12px 26px rgba(194, 65, 12, .08); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; font-family: var(--display); font-size: 21px; color: var(--ink); line-height: 1.15; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; color: #fff; line-height: 1;
  background: linear-gradient(180deg, #FDBA74 0 45%, var(--orange) 55%); border: 2.5px solid #fff; box-shadow: 0 3px 0 var(--orange-d); transition: transform .25s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 18px 18px; color: var(--ink-soft); }
.faq details[open] { box-shadow: 0 5px 0 rgba(194, 65, 12, .18), 0 16px 30px rgba(194, 65, 12, .12); }

/* ---------- Final CTA ---------- */
.final { background: linear-gradient(180deg, var(--sky-top) 0%, #9BDDFB 60%, var(--sky-bottom) 100%); padding: 84px 0 0; text-align: center; overflow: hidden; }
.final-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-bottom: 40px; }
.final-icon { width: 116px; height: 116px; border-radius: 30px; border: 4px solid #fff; box-shadow: 0 8px 0 rgba(11, 37, 69, .2), 0 20px 40px rgba(11, 37, 69, .25); }
.js .final-inner.in .final-icon { animation: hop 2.8s ease-in-out infinite; }
@keyframes hop { 0%, 70%, 100% { transform: translateY(0) rotate(0); } 78% { transform: translateY(-16px) rotate(-6deg); } 86% { transform: translateY(0) rotate(3deg); } }
.final h2 { font-size: clamp(40px, 10vw, 76px); color: #fff; -webkit-text-stroke: .12em var(--navy); paint-order: stroke fill; filter: drop-shadow(0 .06em 0 var(--navy)); }
.final p { font-size: 18px; color: var(--navy); font-weight: 650; max-width: 40ch; }
.final .btn { margin-top: 8px; }
.parade { position: relative; height: 70px; margin-top: 10px; }
.parade-track { position: absolute; left: 0; right: 0; bottom: 6px; height: 16px; background:
  linear-gradient(#94A3B8, #94A3B8) 0 3px / 100% 2px no-repeat,
  linear-gradient(#94A3B8, #94A3B8) 0 11px / 100% 2px no-repeat,
  repeating-linear-gradient(90deg, #A0714A 0 6px, transparent 6px 18px) 0 0 / 100% 16px,
  #E9DCC0; border-radius: 4px; }
.parade-trains { position: absolute; bottom: 14px; left: 0; display: flex; gap: 14px; animation: parade 22s linear infinite; }
.parade-trains svg { width: 72px; height: 47px; flex: none; }
@keyframes parade { from { transform: translateX(-560px); } to { transform: translateX(100vw); } }
.island-base { height: 70px; background: linear-gradient(180deg, var(--grass-top) 0 18px, var(--grass-edge) 18px 26px, var(--dirt-top) 26px, var(--dirt-bottom)); }

/* ---------- Footer ---------- */
.footer { background: var(--dirt-bottom); color: #F5E6D6; padding: 26px 0 40px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.brand-foot { color: #fff; text-shadow: 0 2px 0 #4A3020; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.footer-links a { color: #fff; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: rgba(255, 255, 255, .45); }
.footer-links a:hover { text-decoration-color: #fff; }
.fine { font-size: 13.5px; color: #F0DCC6; }
@media (max-width: 899px) { .footer { padding-bottom: 104px; } .in-steps .hud-pill { opacity: 0; } }
@media (min-width: 900px) { .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; } .fine { order: 3; flex-basis: 100%; text-align: center; } }

/* ---------- Mobile install dock ---------- */
.dock { position: fixed; z-index: 40; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translate(-50%, 140%); padding: 8px 16px 8px 8px; font-size: 19px; border-radius: 20px; gap: 10px; transition: transform .35s cubic-bezier(.2, .8, .2, 1); white-space: nowrap; }
.dock img { width: 36px; height: 36px; border-radius: 10px; border: 2px solid #fff; }
.dock.show { transform: translate(-50%, 0); }
.dock.show:active { transform: translate(-50%, 4px); }
@media (min-width: 900px) { .dock { display: none; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .parade-trains { animation: none; left: 50%; transform: translateX(-50%); }
  .tap-hint.show { animation: none; }
}
