/* Traffic Whisperer site: the game's own palette (sky, field, asphalt, destination colours) */
:root {
  --sky: #5BC7FA;
  --sky-deep: #2E9FD8;
  --field: #6BD173;
  --field-deep: #3FA64A;
  --asphalt: #5C5E73;
  --lane: #F4F6FA;
  --pink: #FF5C80;
  --sun: #FFD133;
  --orange: #FF9A3D;
  --purple: #9B6BFF;
  --teal: #2CC9B0;
  --ink: #1E2240;
  --ink-soft: #4A5070;
  --paper: #FFFFFF;
  --display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--lane);
}
img { max-width: 100%; display: block; }
a { color: var(--sky-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- top bar */
.bar { position: absolute; inset: 0 0 auto 0; z-index: 3; }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-family: var(--display); font-size: 1.35rem; letter-spacing: .01em; }
.brand img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 3px 0 rgba(30,34,64,.25); }
.bar nav a { color: var(--ink); text-decoration: none; margin-left: 22px; font-weight: 700; }
.bar nav a:hover { text-decoration: underline; color: var(--ink); }

/* ---------- hero: the sky/field split of the app icon, with a road that draws itself */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background: linear-gradient(180deg, #8ED8FB 0%, var(--sky) 54%, var(--field) 54.1%, var(--field-deep) 100%);
  min-height: 720px;
}
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr); padding: 132px 0 0; }
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.9rem, 7.4vw, 5.6rem);
  line-height: .96;
  margin: 0;
  max-width: 11ch;
  text-shadow: 0 4px 0 rgba(255,255,255,.55);
}
.hero p.lede { font-size: 1.25rem; max-width: 34ch; margin: 22px 0 30px; color: var(--ink); font-weight: 700; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink); color: var(--paper); text-decoration: none;
  padding: 14px 22px; border-radius: 14px; font-weight: 700;
  box-shadow: 0 5px 0 #0E1130;
  width: fit-content;
}
.store small { display: block; font-weight: 400; opacity: .8; font-size: .8rem; }
.store svg { width: 26px; height: 26px; }
.store[aria-disabled="true"] { cursor: default; }

.scene { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.scene svg { width: 100%; height: 100%; }
.road-edge { fill: none; stroke: var(--lane); stroke-width: 74; stroke-linecap: round; stroke-linejoin: round; }
.road { fill: none; stroke: var(--asphalt); stroke-width: 62; stroke-linecap: round; stroke-linejoin: round; }
.lane-mark { fill: none; stroke: #FFFBE6; stroke-width: 4; stroke-dasharray: 22 20; stroke-linecap: round; }
.draw { stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: draw 2.4s cubic-bezier(.6,.05,.25,1) .25s forwards; }
.draw-late { opacity: 0; animation: appear .4s ease 2.5s forwards; }
.car { opacity: 0; animation: appear .3s ease 2.6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

/* ---------- sections */
section { padding: 96px 0; }
h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.05; margin: 0 0 18px; max-width: 22ch; text-wrap: balance; }
.intro { color: var(--ink-soft); font-size: 1.15rem; max-width: 56ch; margin: 0 0 48px; }

/* the core loop really is a sequence: stops along one road */
.route { position: relative; display: grid; gap: 42px; padding-left: 92px; max-width: 760px; }
.route::before {
  content: ""; position: absolute; left: 30px; top: 8px; bottom: 8px; width: 22px;
  background: var(--asphalt); border-radius: 11px;
  box-shadow: inset 0 0 0 3px var(--lane), 0 0 0 0 transparent;
}
.route::after {
  content: ""; position: absolute; left: 40px; top: 24px; bottom: 24px; width: 2px;
  background: repeating-linear-gradient(to bottom, #FFFBE6 0 14px, transparent 14px 28px);
}
.stop { position: relative; }
.stop .pin {
  position: absolute; left: -92px; top: -4px; width: 82px; display: flex; justify-content: center;
}
.stop .pin span {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-size: 1.4rem; color: var(--paper);
  border: 4px solid var(--lane); position: relative; z-index: 1;
}
.stop:nth-child(1) .pin span { background: var(--sky-deep); }
.stop:nth-child(2) .pin span { background: var(--orange); }
.stop:nth-child(3) .pin span { background: var(--field-deep); }
.stop h3 { font-family: var(--display); font-weight: 400; font-size: 1.7rem; margin: 0 0 6px; }
.stop p { margin: 0; color: var(--ink-soft); max-width: 58ch; }

/* screenshots */
.shots { background: var(--ink); color: var(--paper); }
.shots .intro { color: #C9CDE6; }
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; align-items: start; max-width: 880px; padding-bottom: 36px; }
.phone {
  margin: 0; background: #0E1130; border-radius: 34px; padding: 10px;
  box-shadow: 0 0 0 2px #343A63, 0 18px 40px rgba(0,0,0,.35);
}
.phone img { border-radius: 26px; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background: #283060; }
.phone figcaption { text-align: center; font-size: .95rem; color: #C9CDE6; padding: 12px 6px 4px; }
.strip .phone:nth-child(2) { transform: translateY(36px); }

/* hazards as road signs */
.signs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 30px 24px; margin-top: 8px; }
.sign { text-align: left; }
.sign svg { width: 64px; height: 64px; margin-bottom: 10px; }
.sign h3 { font-family: var(--display); font-weight: 400; font-size: 1.25rem; margin: 0 0 2px; }
.sign p { margin: 0; color: var(--ink-soft); font-size: .98rem; }

/* fair ads */
.fair { background: var(--paper); }
.fair .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.fair ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.fair li { padding-left: 38px; position: relative; }
.fair li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}

/* footer */
footer { background: var(--asphalt); color: #E6E8F2; padding: 44px 0 52px; font-size: .95rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; justify-content: space-between; align-items: center; }
footer a { color: var(--paper); }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---------- legal pages */
.legal-head { background: linear-gradient(180deg, var(--sky) 0%, var(--sky) 82%, var(--field) 82.1%, var(--field) 100%); color: var(--ink); padding: 110px 0 70px; }
.legal-head h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, 6vw, 3.6rem); margin: 0; line-height: 1; text-shadow: 0 3px 0 rgba(255,255,255,.55); }
.legal-head p { margin: 10px 0 0; color: var(--ink); font-weight: 700; }
.legal { padding: 56px 0 90px; }
.legal article { max-width: 72ch; }
.legal h2 { font-size: 1.75rem; margin: 46px 0 10px; max-width: none; }
.legal h3 { font-size: 1.1rem; margin: 26px 0 6px; }
.legal p, .legal li { color: #2C3152; }
.legal ul { padding-left: 1.2em; }
.legal li { margin: 6px 0; }
.legal table { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: .97rem; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #D8DCEB; vertical-align: top; }
.legal th { background: #E9EDF7; }
.legal .summary { background: var(--paper); border-left: 6px solid var(--field); padding: 18px 22px; border-radius: 0 12px 12px 0; }
.legal .tablewrap { overflow-x: auto; }

@media (max-width: 860px) {
  .hero { min-height: 760px; background: linear-gradient(180deg, #8ED8FB 0%, var(--sky) 62%, var(--field) 62.1%, var(--field-deep) 100%); }
  .hero .wrap { padding-top: 112px; }
  .strip { grid-template-columns: 1fr; max-width: 320px; margin-inline: auto; }
  .strip .phone:nth-child(2) { transform: none; }
  .fair .cols { grid-template-columns: 1fr; gap: 28px; }
  .bar nav a { margin-left: 14px; font-size: .95rem; }
  section { padding: 72px 0; }
}
@media (max-width: 520px) {
  .bar nav a.hide-sm { display: none; }
  .route { padding-left: 72px; }
  .route::before { left: 20px; }
  .route::after { left: 30px; }
  .stop .pin { left: -72px; width: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  .draw { animation: none; stroke-dashoffset: 0; }
  .draw-late, .car { animation: none; opacity: 1; }
  .car animateMotion { display: none; }
}
