/* ============================================================
   Car Boot Crazy — teaser site (clean revamp)
   Hero is a live canvas scene (assets/boot-sim.js); palette and
   proportions are ported from the game source.
   ============================================================ */

:root {
  --sky:        #75B8EB;
  --grass:      #78B352;
  --grass-deep: #619442;
  --cream:      #efe6cf;
  --cream-2:    #f6efdc;
  --wood-deep:  #6a4526;
  --navy:       #1d2437;
  --red:        #d9483b;
  --yellow:     #f6c333;
  --ink:        #2a2620;
  --ink-soft:   #5c554a;
  --white:      #fffdf7;

  --shadow-sm: 0 3px 0 rgba(0,0,0,0.16);
  --shadow-md: 0 10px 26px rgba(29,36,55,0.18);
  --shadow-lg: 0 22px 50px rgba(29,36,55,0.28);

  --radius: 18px;
  --radius-lg: 26px;

  --font-display: "Press Start 2P", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Fredoka", "Segoe UI", system-ui, -apple-system, sans-serif;
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  padding: 15px 28px;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  box-shadow: 0 6px 0 rgba(0,0,0,0.18);
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,0.18); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 8px 0 rgba(0,0,0,0.2); }
.btn-primary.btn-gold { color: var(--yellow); text-shadow: 1px 1px 0 rgba(0,0,0,0.35); }
.btn-ghost {
  background: rgba(255,255,255,0.88);
  color: var(--ink);
  box-shadow: inset 0 0 0 2px rgba(42,38,32,0.14), 0 6px 0 rgba(0,0,0,0.08);
}
.btn-ghost:hover { transform: translateY(-2px); }

/* ---------- Bunting ---------- */
.bunting-strip { display: flex; justify-content: center; overflow: hidden; background: var(--sky); }
.flag {
  width: 0; height: 0;
  border-left: 22px solid transparent;
  border-right: 22px solid transparent;
  border-top: 30px solid var(--red);
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.12));
  transform-origin: top center;
  animation: sway 4s ease-in-out infinite;
}
.flag:nth-child(4n+2) { border-top-color: var(--yellow); animation-delay: .3s; }
.flag:nth-child(4n+3) { border-top-color: var(--grass); animation-delay: .6s; }
.flag:nth-child(4n+4) { border-top-color: #5aa9dd; animation-delay: .9s; }
@keyframes sway { 0%,100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246,239,220,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid rgba(138,90,52,0.18);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: .8rem;
  color: var(--wood-deep);
  letter-spacing: .5px;
  white-space: nowrap;
}
.brand-coin { width: 36px; height: 36px; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.22)); }
.topbar .btn { padding: 10px 20px; font-size: .95rem; box-shadow: 0 4px 0 rgba(0,0,0,0.18); }

/* ---------- Hero (live scene) ---------- */
.hero {
  position: relative;
  min-height: clamp(540px, 76vh, 690px);
  overflow: hidden;
  background: var(--sky);   /* painted over by the canvas */
}
.boot-sim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.hero-copy {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(34px, 5vh, 60px) 22px 0;
}
.hero-copy > * { max-width: 52ch; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--navy);
  color: #ffe9a8;
  font-weight: 600;
  font-size: .8rem;
  padding: 7px 15px;
  border-radius: 999px;
  letter-spacing: .3px;
}
.pill .dot { width: 9px; height: 9px; border-radius: 50%; background: #57e08a; animation: ping 1.8s infinite; }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(87,224,138,.7); }
  70% { box-shadow: 0 0 0 8px rgba(87,224,138,0); }
  100% { box-shadow: 0 0 0 0 rgba(87,224,138,0); }
}
.logo {
  font-family: var(--font-display);
  color: #fff;
  line-height: 1.05;
  margin: 12px 0 8px;
  font-size: clamp(1.6rem, 4.2vw, 2.7rem);
  text-shadow: 3px 3px 0 var(--red), 6px 6px 0 rgba(0,0,0,0.18);
  letter-spacing: 1px;
}
.logo .crazy { color: var(--yellow); display: inline-block; }
.hero-tag { font-size: 1.22rem; font-weight: 600; color: #0d3a54; margin: 4px 0 12px; }
.hero-sub {
  font-size: 1.04rem;
  color: #114a68;
  max-width: 44ch;
  margin: 0 0 20px;
}
.hero-cta { display: flex; gap: 13px; flex-wrap: wrap; align-items: center; }
.hero-note { font-size: .88rem; color: #0e435f; margin-top: 13px; opacity: .9; }

/* ---------- Section helpers ---------- */
.section-pad { padding: 72px 0; }
.eyebrow {
  font-family: var(--font-display);
  font-size: .72rem;
  color: var(--red);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.h2 {
  font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  margin: 0 0 12px;
  line-height: 1.15;
}
.lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 60ch; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- Newsletter ---------- */
.signup-bg { background: var(--navy); color: #fff; }
.signup-card { max-width: 720px; margin: 0 auto; text-align: center; }
.signup-card .h2 { color: #fff; }
.signup-card .lead { color: #c9d2e6; margin: 0 auto 8px; }
.beta-badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 18px 0 24px; }
.beta-badges span {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  padding: 8px 16px; border-radius: 999px; font-size: .92rem; font-weight: 500;
}
.form-shell {
  background: var(--cream-2);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  box-shadow: var(--shadow-lg);
}

/* Kit form overrides — Kit's own layout CSS is replaced with an explicit
   stacked layout so the field and button breathe. */
.form-shell .formkit-form { max-width: 520px !important; margin: 0 auto; }
.form-shell .formkit-fields {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 16px !important;
}
.form-shell .formkit-field { margin: 0 !important; width: 100% !important; }
.form-shell .formkit-input {
  width: 100% !important;
  border-radius: 999px !important;
  padding: 16px 22px !important;
  font-size: 1.05rem !important;
  border: 2px solid rgba(42,38,32,0.16) !important;
}
.form-shell .formkit-submit {
  width: 100% !important;
  margin: 0 !important;
  border-radius: 999px !important;
  box-shadow: 0 5px 0 rgba(0,0,0,0.18) !important;
  transition: transform .12s ease, filter .12s ease;
}
.form-shell .formkit-submit > span {
  display: block !important;
  background-color: var(--red) !important;
  padding: 16px 30px !important;
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  border-radius: 999px !important;
}
.form-shell .formkit-submit:hover { transform: translateY(-2px); filter: brightness(1.05); }
.form-shell .formkit-submit:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,0.18) !important; }

/* ---------- Screenshots ---------- */
.shots-bg { background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%); }
.shots {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.shot {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--navy);
  box-shadow: var(--shadow-md);
  aspect-ratio: 16 / 10;
  transition: transform .18s ease, box-shadow .18s ease;
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.shot:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--shadow-lg); z-index: 2; }

/* click-to-enlarge */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 4vmin;
  background: rgba(18,22,34,0.93);
  cursor: zoom-out;
}
.lightbox.open { display: grid; }
.lightbox img {
  max-width: 96vw;
  max-height: 92vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

/* ---------- Pitch band ---------- */
.pitch-bg { background: linear-gradient(180deg, var(--sky) 0%, #9fd6f2 100%); color: #0d3a54; }
.pitch-bg .lead { color: #14506e; }
.loop {
  margin: 30px auto 8px;
  display: flex; flex-wrap: wrap; gap: 10px;
  align-items: center; justify-content: center;
}
.loop-step {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.92);
  color: #0d3a54; font-weight: 700;
  padding: 10px 18px; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.loop-step b { font-size: 1.15rem; font-weight: 400; line-height: 1; }
.loop i { color: #0d3a54; opacity: .5; font-weight: 700; font-style: normal; }

.sub-label { margin: 32px 0 14px; font-weight: 600; color: #14506e; }
.upgrades {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 720px; margin: 0 auto;
}
.upgrade {
  background: rgba(255,255,255,0.85);
  border-radius: var(--radius);
  padding: 18px 12px;
  font-weight: 600; color: #0d3a54;
  box-shadow: var(--shadow-sm);
  border: 2px solid rgba(255,255,255,0.6);
  transition: transform .15s ease;
}
.upgrade span { display: block; font-size: 1.9rem; margin-bottom: 6px; }
.upgrade:hover { transform: translateY(-4px); }

.endgame {
  margin: 36px auto 0;
  max-width: 620px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-md);
  border: 3px solid var(--yellow);
}
.endgame-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: .62rem; letter-spacing: 1px; text-transform: uppercase;
  color: #5b3d05; background: var(--yellow);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 12px;
}
.endgame h3 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 700; }
.endgame p { margin: 0; color: #c9d2e6; }

@media (max-width: 560px) { .upgrades { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Newsletter consent ---------- */
.consent-row {
  display: flex; gap: 10px; align-items: flex-start;
  text-align: left; line-height: 1.4;
  font-size: .9rem; color: var(--ink-soft);
  margin: 2px 2px 4px;
  cursor: pointer;
}
.consent-row input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--red); cursor: pointer; }
.consent-row a { color: var(--red); font-weight: 600; }

/* ---------- Roadmap ---------- */
.roadmap {
  list-style: none; margin: 40px auto 0; padding: 0;
  max-width: 640px; text-align: left;
  display: flex; flex-direction: column; gap: 14px;
}
.milestone {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
  border-left: 5px solid var(--red);
  transition: transform .15s ease;
}
.milestone:hover { transform: translateX(4px); }
.ms-when { flex: 0 0 100px; font-weight: 700; color: var(--red); font-size: .98rem; padding-top: 2px; }
.ms-body h3 { margin: 0 0 3px; font-size: 1.15rem; font-weight: 700; }
.ms-body p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.milestone.done-target { border-left-color: var(--yellow); background: linear-gradient(180deg, #fff, #fff8e6); }
.milestone.done-target .ms-when, .milestone.done-target .ms-body h3 { color: #b07d1a; }
@media (max-width: 520px) { .milestone { flex-direction: column; gap: 4px; } }

/* ---------- Legal page ---------- */
.legal { max-width: 760px; margin: 0 auto; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0 0 6px; }
.legal .updated { color: var(--ink-soft); font-size: .95rem; margin: 0 0 26px; }
.legal h2 { font-size: 1.3rem; margin: 26px 0 8px; }
.legal p, .legal li { color: var(--ink); font-size: 1.02rem; }
.legal a { color: var(--red); font-weight: 600; }
.legal .back { display: inline-block; margin-top: 30px; font-weight: 600; }

/* ---------- Footer ---------- */
footer { background: var(--wood-deep); color: #f0e2cf; padding: 40px 0 30px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
footer .f-brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: .8rem; }
footer .muted { color: #d8c7ad; opacity: .9; font-size: .92rem; max-width: 60ch; }
footer small { display: block; margin-top: 8px; opacity: .75; color: #d8c7ad; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-copy { text-align: center; }
  .hero-copy > * { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .shots { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .section-pad { padding: 56px 0; }
  .shots { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .topbar .wrap { height: 56px; }
  .brand { font-size: .56rem; gap: 8px; }
  .brand-coin { width: 28px; height: 28px; }
  .topbar .btn { padding: 9px 14px; font-size: .8rem; box-shadow: 0 4px 0 rgba(0,0,0,0.18); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
