/* Project Milkman — playmilkman.com */
:root {
  --sky-top: #5ab8ff;
  --sky-mid: #ffd6a0;
  --sun: #fff1c9;
  --navy: #14336b;
  --navy-deep: #0c1f45;
  --blue: #1f7ae0;
  --milk: #fffdf6;
  --cream: #fff6e3;
  --ink: #1d2a3a;
  --muted: #5d6b7c;
  --green: #35b84a;
  --green-dark: #1f8a33;
  --orange: #ff9a2e;
  --gold: #ffcc3d;
  --red: #ff5b5b;
  --card: #ffffff;
  --shadow: 0 18px 40px rgba(16, 38, 84, .18);
  --radius: 26px;
  --font-title: "Luckiest Guy", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "Fredoka", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--font-title); font-weight: 400; letter-spacing: .5px; line-height: 1.05; margin: 0; }
h2 { font-size: clamp(34px, 5vw, 58px); color: var(--navy); }
h3 { font-size: 26px; color: var(--navy); }
.wrap { width: min(1180px, 100% - 32px); margin: 0 auto; }
.kicker {
  display: inline-block; font-weight: 600; font-size: 15px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--orange); margin-bottom: 10px;
}
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 640px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px max(16px, calc((100% - 1180px) / 2));
  transition: background .3s, box-shadow .3s, padding .3s;
}
.nav.scrolled { background: rgba(255, 250, 238, .92); backdrop-filter: blur(10px); box-shadow: 0 6px 24px rgba(16, 38, 84, .12); padding-block: 8px; }
.nav .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-family: var(--font-title); font-size: 22px; }
.nav .brand img { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,.2); }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav ul a { display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--navy); font-weight: 600; }
.nav ul a:hover { background: rgba(31, 122, 224, .12); }
.nav:not(.scrolled) .brand, .nav:not(.scrolled) ul a { color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.35); }
.nav:not(.scrolled) ul a:hover { background: rgba(255,255,255,.18); }
@media (max-width: 760px) { .nav ul { display: none; } }

/* ---------------------------------------------------------------- buttons */
.btn {
  --c: var(--green); --d: var(--green-dark);
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px 18px; border: 0; border-radius: 18px; cursor: pointer;
  font: 400 22px/1 var(--font-title); letter-spacing: .5px; color: #fff; text-decoration: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 82%, #fff) 0%, var(--c) 55%);
  box-shadow: 0 6px 0 var(--d), 0 14px 24px rgba(0,0,0,.22);
  transition: transform .12s, box-shadow .12s, filter .2s;
  text-shadow: 0 2px 0 rgba(0,0,0,.18);
}
.btn:hover { filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 8px 0 var(--d), 0 18px 28px rgba(0,0,0,.24); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--d), 0 6px 12px rgba(0,0,0,.2); }
.btn:focus-visible { outline: 4px solid #fff; outline-offset: 3px; }
.btn.blue { --c: var(--blue); --d: #1456a6; }
.btn.ghost { --c: rgba(255,255,255,.18); --d: rgba(0,0,0,.18); backdrop-filter: blur(6px); }
.btn svg { width: 26px; height: 26px; flex: none; }
.btn small { display: block; font: 600 12px/1 var(--font-body); letter-spacing: 1px; text-transform: uppercase; opacity: .9; margin-bottom: 4px; }
.btn .stack { display: flex; flex-direction: column; align-items: flex-start; }
.badge-soon { position: absolute; top: -12px; right: -10px; background: var(--gold); color: var(--navy); font: 600 12px/1 var(--font-body); padding: 6px 10px; border-radius: 999px; transform: rotate(6deg); box-shadow: 0 4px 10px rgba(0,0,0,.2); text-shadow: none; }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; min-height: max(640px, 100svh); overflow: hidden; isolation: isolate; padding: 0;
  display: grid; place-items: center; text-align: center; color: #fff;
  background: linear-gradient(180deg, var(--sky-top) 0%, #8ccfff 35%, var(--sky-mid) 75%, #ffc67a 100%);
}
.hero .layer { position: absolute; inset: 0; will-change: transform; }
.hero .street { background: url(street.webp) center 62% / cover no-repeat; inset: -4% -4% 0; }
.hero .glow { background: radial-gradient(circle at 50% 46%, rgba(255, 244, 205, .75), transparent 42%); mix-blend-mode: screen; }
.hero .shade { background: linear-gradient(180deg, rgba(10, 40, 90, .35), transparent 30%, transparent 62%, rgba(12, 31, 69, .55)); }

.hero-content { position: relative; z-index: 3; padding: 96px 16px 200px; display: grid; justify-items: center; gap: 16px; }
.hero-logo { width: min(560px, 86vw, 64vh); filter: drop-shadow(0 18px 24px rgba(10, 30, 70, .35)); animation: pop 1s cubic-bezier(.2, 1.6, .4, 1) both .15s; }
@keyframes pop { from { transform: scale(.4) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
.hero-tag { font-size: clamp(18px, 2.1vw, 23px); font-weight: 600; max-width: 620px; text-shadow: 0 2px 8px rgba(0, 20, 60, .45); margin: 0; padding: 12px 22px; border-radius: 22px; background: rgba(12, 31, 69, .38); backdrop-filter: blur(6px); animation: rise .8s ease both .55s; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 6px; animation: rise .8s ease both .75s; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* road + rider */
.road { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: 2; background: linear-gradient(180deg, #6d7480, #4d535d); box-shadow: 0 -10px 0 #d8c7a3, 0 -18px 0 #b9a37c; }
.road::before {
  content: ""; position: absolute; left: 0; right: 0; top: 56px; height: 9px;
  background: repeating-linear-gradient(90deg, #fff6c8 0 70px, transparent 70px 140px);
  animation: lanes .9s linear infinite;
}
@keyframes lanes { to { background-position: -140px 0; } }
.rider { position: absolute; z-index: 3; bottom: 26px; left: clamp(110px, 14vw, 260px); width: clamp(170px, 19vw, 280px); transform: translateX(-50%); animation: bob .45s ease-in-out infinite alternate; filter: drop-shadow(0 16px 10px rgba(0,0,0,.35)); cursor: pointer; }
@keyframes bob { from { transform: translateX(-50%) translateY(0) rotate(-.6deg); } to { transform: translateX(-50%) translateY(-5px) rotate(.6deg); } }
.rider.bell { animation: bob .45s ease-in-out infinite alternate, ding .5s ease; }
@keyframes ding { 30% { scale: 1.06; } }
.speech { position: absolute; z-index: 4; bottom: calc(26px + clamp(160px, 18vw, 265px)); left: calc(clamp(110px, 14vw, 260px) + 40px); background: #fff; color: var(--navy); font-weight: 600; padding: 10px 16px; border-radius: 18px; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px) scale(.9); transition: .25s; pointer-events: none; white-space: nowrap; }
.speech::after { content: ""; position: absolute; left: 22px; bottom: -10px; border: 10px solid transparent; border-top-color: #fff; border-bottom: 0; }
.speech.show { opacity: 1; transform: none; }
.scroll-hint { position: absolute; z-index: 4; bottom: 136px; left: 50%; translate: -50% 0; width: 30px; height: 48px; border: 3px solid rgba(255,255,255,.85); border-radius: 20px; }
.scroll-hint::after { content: ""; position: absolute; left: 50%; top: 8px; width: 6px; height: 10px; margin-left: -3px; background: #fff; border-radius: 3px; animation: wheel 1.6s infinite; }
@keyframes wheel { 60% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
@media (max-width: 760px) { .scroll-hint { display: none; } .hero-content { padding: 84px 16px 210px; } .rider { left: 50%; } .speech { left: calc(50% - 20px); } }

/* bottle burst */
.burst { position: fixed; z-index: 200; pointer-events: none; width: 22px; height: 34px; }
.burst svg { width: 100%; height: 100%; }

/* ---------------------------------------------------------------- sections */
section { position: relative; padding: clamp(70px, 10vw, 120px) 0; }
.wave { position: absolute; left: 0; right: 0; top: -1px; height: 60px; color: var(--cream); }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 50px; perspective: 900px; }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative; background: var(--card); border-radius: var(--radius); padding: 34px 28px 30px; box-shadow: var(--shadow);
  transform-style: preserve-3d; transition: transform .2s ease-out, box-shadow .2s;
}
.step:hover { box-shadow: 0 26px 50px rgba(16, 38, 84, .24); }
.step .num { position: absolute; top: -22px; left: 26px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; font: 400 28px var(--font-title); color: #fff; background: var(--c, var(--blue)); box-shadow: 0 6px 0 rgba(0,0,0,.15); transform: translateZ(30px) rotate(-6deg); }
.step .art { height: 170px; margin: 10px -6px 16px; border-radius: 18px; background: var(--tint, #e8f3ff) center / cover; transform: translateZ(20px); overflow: hidden; }
.step p { color: var(--muted); margin: 10px 0 0; }

/* ---------------------------------------------------------------- mini game */
.play-section { background: linear-gradient(180deg, #1b4fa0, var(--navy-deep)); color: #fff; overflow: hidden; }
.play-section h2 { color: #fff; }
.play-section .lead { color: #c9dbff; }
.game-card { position: relative; margin-top: 36px; border-radius: 30px; overflow: hidden; background: #000; box-shadow: 0 30px 60px rgba(0,0,0,.45), inset 0 0 0 6px rgba(255,255,255,.08); aspect-ratio: 16 / 7; min-height: 300px; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.game-card canvas { width: 100%; height: 100%; display: block; cursor: pointer; }
.hud { position: absolute; inset: 14px 14px auto 14px; display: flex; gap: 10px; pointer-events: none; }
.pill { display: flex; align-items: center; gap: 8px; background: rgba(9, 22, 48, .72); border: 2px solid rgba(255,255,255,.16); padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 17px; backdrop-filter: blur(6px); }
.pill b { font-family: var(--font-title); font-weight: 400; font-size: 22px; color: var(--gold); }
.pill.right { margin-left: auto; }
.game-overlay { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; background: radial-gradient(circle, rgba(10, 25, 60, .55), rgba(10, 25, 60, .82)); transition: opacity .3s; padding: 16px; }
.game-overlay.hidden { opacity: 0; pointer-events: none; }
.game-overlay h3 { color: #fff; font-size: clamp(30px, 4.5vw, 50px); }
.game-overlay p { margin: 10px 0 20px; color: #d6e4ff; }
.keys { display: inline-flex; gap: 8px; align-items: center; font-size: 15px; color: #b8cbef; }
kbd { font: 600 13px var(--font-body); background: #fff; color: var(--navy); border-radius: 6px; padding: 2px 8px; box-shadow: 0 2px 0 #9fb2d4; }

/* ---------------------------------------------------------------- screenshots */
.shots { margin-top: 40px; display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 760px); gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px max(16px, calc((100% - 1180px) / 2)) 30px; scrollbar-width: none; cursor: grab; }
.shots::-webkit-scrollbar { display: none; }
.shots.dragging { cursor: grabbing; scroll-snap-type: none; }
.shot { scroll-snap-align: center; margin: 0; }
.phone { position: relative; border-radius: 34px; padding: 14px; background: linear-gradient(145deg, #2b3242, #0f131c); box-shadow: 0 24px 50px rgba(16, 38, 84, .35), inset 0 0 0 2px rgba(255,255,255,.08); transition: transform .3s; }
.phone::before { content: ""; position: absolute; left: 6px; top: 50%; width: 6px; height: 54px; margin-top: -27px; border-radius: 6px; background: #000; }
.phone img { border-radius: 22px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; pointer-events: none; }
.shot figcaption { text-align: center; margin-top: 14px; font-weight: 600; color: var(--navy); }
.shot.active .phone { transform: scale(1.02) rotate(-.5deg); }
.dots { display: flex; justify-content: center; gap: 8px; }
.dots button { width: 12px; height: 12px; padding: 0; border-radius: 999px; border: 0; background: #c9d3e3; cursor: pointer; transition: .25s; }
.dots button[aria-current="true"] { width: 34px; background: var(--blue); }

/* ---------------------------------------------------------------- features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 46px; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--card); border-radius: 22px; padding: 26px; box-shadow: 0 10px 26px rgba(16, 38, 84, .10); transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: var(--shadow); }
.feature .ico { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: 30px; background: var(--tint, #e8f3ff); margin-bottom: 14px; }
.feature .ico svg { width: 32px; height: 32px; }
.feature p { margin: 8px 0 0; color: var(--muted); }

/* ---------------------------------------------------------------- map */
.map-section { background: linear-gradient(180deg, var(--cream), #e7f4d9); }
.map-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 50px; align-items: center; }
@media (max-width: 900px) { .map-grid { grid-template-columns: 1fr; } }
.map { position: relative; border-radius: 30px; overflow: hidden; box-shadow: var(--shadow); transform: rotate(1.2deg); }
.map img { width: 100%; }
.pin { position: absolute; transform: translate(-50%, -100%); display: grid; justify-items: center; gap: 4px; border: 0; background: none; cursor: pointer; padding: 0; font: inherit; }
.pin span { background: #fff; color: var(--navy); font-weight: 600; font-size: 14px; padding: 4px 10px; border-radius: 999px; box-shadow: 0 4px 10px rgba(0,0,0,.2); white-space: nowrap; transition: .2s; }
.pin i { width: 18px; height: 18px; border-radius: 50%; background: var(--c, var(--orange)); border: 3px solid #fff; box-shadow: 0 0 0 0 color-mix(in srgb, var(--c, var(--orange)) 60%, transparent); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 16px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.pin:hover span, .pin:focus-visible span, .pin.on span { background: var(--navy); color: #fff; transform: translateY(-3px); }
.map-note { margin-top: 18px; min-height: 56px; font-weight: 600; color: var(--green-dark); }
.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li::before { content: ""; flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 8px; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 18px no-repeat; }

/* ---------------------------------------------------------------- faq */
.faq { max-width: 820px; margin: 40px auto 0; display: grid; gap: 14px; }
.faq details { background: var(--card); border-radius: 20px; box-shadow: 0 8px 22px rgba(16, 38, 84, .08); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 60px 20px 24px; font-weight: 600; font-size: 19px; color: var(--navy); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; translate: 0 -50%; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: #e8f1ff; color: var(--blue); font: 400 22px var(--font-title); transition: .25s; }
.faq details[open] summary::after { content: "–"; background: var(--blue); color: #fff; }
.faq details p { margin: 0; padding: 0 24px 22px; color: var(--muted); }

/* ---------------------------------------------------------------- cta + footer */
.cta { background: url(delivery.webp) center / cover; color: #fff; text-align: center; }
.cta::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 31, 69, .55), rgba(12, 31, 69, .85)); }
.cta .wrap { position: relative; }
.cta h2 { color: #fff; }
.cta p { color: #dbe7ff; font-size: 20px; }
.cta img.icon { width: 120px; height: 120px; border-radius: 30px; margin: 0 auto 22px; box-shadow: 0 16px 34px rgba(0,0,0,.45); animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(2deg); } }
footer { background: var(--navy-deep); color: #b9c7e3; padding: 46px 0 30px; font-size: 16px; }
footer .cols { display: flex; flex-wrap: wrap; gap: 26px 48px; justify-content: space-between; align-items: flex-start; }
footer a { color: #fff; text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
footer .fine { margin-top: 26px; font-size: 14px; color: #8394b6; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* legal pages */
.legal-hero { background: linear-gradient(180deg, var(--sky-top), #8ccfff); padding: 120px 0 60px; color: #fff; }
.legal-hero h1 { font-size: clamp(38px, 6vw, 64px); text-shadow: 0 3px 0 rgba(0,0,0,.12); }
.legal { max-width: 800px; margin: -30px auto 60px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(24px, 5vw, 52px); position: relative; }
.legal h2 { font-size: 26px; margin: 30px 0 8px; }
.legal p, .legal li { color: #3b4a5c; }
.legal .eff { color: var(--muted); margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- small phones */
.nav .brand, .nav .btn { white-space: nowrap; }
@media (max-width: 720px) {
  .game-card { aspect-ratio: auto; height: clamp(320px, 62vw, 420px); min-height: 0; width: 100%; }
  .hud .pill { font-size: 14px; padding: 4px 10px; }
  .hud .pill b { font-size: 18px; }
}
@media (max-width: 520px) {
  .nav { padding-inline: 12px; }
  .nav .brand { font-size: 18px; gap: 8px; }
  .nav .brand img { width: 34px; height: 34px; }
  .nav .btn { font-size: 15px !important; padding: 9px 14px 11px !important; }
}
@media (max-width: 360px) { .nav .brand span, .nav .brand { font-size: 0; } .nav .brand img { width: 38px; height: 38px; } }
@media (max-width: 430px) {
  .nav { gap: 8px; }
  .nav .brand { font-size: 16px; }
  .nav .btn { font-size: 14px !important; padding: 8px 12px 10px !important; }
}
.legal p, .legal li, .legal a { overflow-wrap: anywhere; }
