/* The car park plan that builds itself on scroll. Colours in :root (the Playground palette): mint is the only accent
   (the free bays, the route, the button), everything else is a cool dark neutral with hairlines in white.
   GSAP moves .frame, the CSS styles .panel inside it; GSAP moves .fact and the parts of the plan (bays, car, tag). */
:root {
  --page: #0b0d10;          /* the page */
  --page-lift: #151a20;     /* the soft lift of the page behind the panel */
  --panel: #13171c;         /* the panel */
  --ink: #eef2f1;           /* the words */
  --muted: #7f8892;         /* the small words */
  --hair: rgba(226, 236, 240, 0.34); /* the lines of the plan */
  --hair-soft: rgba(226, 236, 240, 0.14); /* the softer lines: stripes, hatching */
  --mint: #63f0b4;          /* the accent: free bays, route, button */
  --cool: #5a8cff;          /* the second light behind the panel */
  --car: #f3f6f7;           /* the car on its way */
  --button-ink: #062016;    /* the words on the lit button */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--page); }
html, body { overflow-x: clip; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: 'Mona Sans Variable', 'Mona Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }

.park { position: relative; height: 460vh; }
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(8px, 2.4vh, 40px) 12px;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(120% 90% at 50% 40%, var(--page-lift), var(--page) 68%);
}
@supports (height: 100lvh) {
  .stage { height: 100lvh; }
}

/* two soft lights behind the panel, mint high on the left and cool blue low on the right */
.light {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: min(70vw, 70vh, 560px);
  height: min(70vw, 70vh, 560px);
  margin: calc(min(70vw, 70vh, 560px) / -2) 0 0 calc(min(70vw, 70vh, 560px) / -2);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(48px);
}
.light--a { background: radial-gradient(closest-side, color-mix(in srgb, var(--mint) 30%, transparent), color-mix(in srgb, var(--mint) 8%, transparent) 60%, transparent); }
.light--b { background: radial-gradient(closest-side, color-mix(in srgb, var(--cool) 32%, transparent), color-mix(in srgb, var(--cool) 8%, transparent) 60%, transparent); }
.grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- the panel */
.frame { width: min(100%, 720px); }
.panel {
  position: relative;
  border-radius: clamp(16px, 4vh, 26px);
  padding: clamp(10px, 2.8vh, 22px) clamp(10px, 3vw, 22px) clamp(10px, 2.8vh, 22px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 86%, white 4%), color-mix(in srgb, var(--panel) 94%, transparent));
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 10px 24px -10px rgba(0, 0, 0, 0.6),
    0 40px 80px -30px rgba(0, 0, 0, 0.75);
}
.panel__edge {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(220, 255, 240, 0.5), transparent);
}
.panel__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.5s ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, -30%), color-mix(in srgb, var(--mint) 8%, transparent), transparent 70%);
}
@media (hover: hover) {
  .panel:hover .panel__glow { opacity: 1; }
}

/* the head: mark, name, the garage, the button */
.head { position: relative; display: flex; align-items: center; gap: 9px; }
.mark {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(24px, 6.4vh, 30px);
  height: clamp(24px, 6.4vh, 30px);
  border-radius: 9px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--mint) 80%, white), var(--mint) 55%, color-mix(in srgb, var(--mint) 70%, #0b5a3c));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(0, 0, 0, 0.15), 0 6px 14px -6px color-mix(in srgb, var(--mint) 80%, transparent);
}
.mark svg { width: 15px; height: 15px; fill: none; stroke: var(--button-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.brand { font-size: clamp(13px, 3.4vh, 15px); font-weight: 650; font-variation-settings: 'wdth' 106; letter-spacing: -0.01em; }
.where { flex: 1; min-width: 0; font-size: clamp(10.5px, 2.8vh, 12px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.where__sep { flex: none; width: 1px; height: 10px; background: rgba(255, 255, 255, 0.16); }
.cta {
  position: relative;
  flex: none;
  display: inline-grid;
  place-items: center;
  height: clamp(26px, 6.6vh, 32px);
  padding: 0 14px;
  border-radius: 999px;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
  font-weight: 580;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: color 0.35s ease, font-variation-settings 0.45s cubic-bezier(.34, 1.56, .64, 1);
  font-variation-settings: 'wdth' 100;
}
.cta__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--mint);
  transform: scale(0.4);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(.34, 1.56, .64, 1), opacity 0.3s ease;
}
.cta__words { position: relative; }
.cta.is-lit { color: var(--button-ink); font-variation-settings: 'wdth' 112; }
.cta.is-lit .cta__fill { transform: scale(1); opacity: 1; }
@media (hover: hover) {
  .cta:hover { color: var(--button-ink); font-variation-settings: 'wdth' 112; }
  .cta:hover .cta__fill { transform: scale(1); opacity: 1; }
}

/* ---------------------------------------------------------------- the body: the words and the plan */
.body {
  display: grid;
  grid-template-columns: minmax(0, 0.74fr) minmax(0, 1.26fr);
  gap: clamp(14px, 3vw, 26px);
  align-items: center;
  margin-top: clamp(10px, 3vh, 22px);
}
.title {
  font-size: clamp(19px, min(3.1vw, 5.2vh), 27px);
  line-height: 1.08;
  font-weight: 560;
  font-variation-settings: 'wdth' 92;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.title em { font-style: normal; color: var(--mint); font-variation-settings: 'wdth' 112; }

.facts { list-style: none; margin-top: clamp(10px, 3vh, 22px); display: grid; gap: clamp(6px, 1.8vh, 12px); }
.fact {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: center;
  padding: clamp(6px, 1.6vh, 10px) 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.fact.is-on { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mint) 22%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--mint) 7%, transparent), rgba(255, 255, 255, 0.02)); }
.fact__icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: clamp(24px, 6vh, 28px);
  height: clamp(24px, 6vh, 28px);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: background 0.4s ease;
}
.fact__icon svg { width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.4s ease; }
.fact.is-on .fact__icon { background: color-mix(in srgb, var(--mint) 14%, transparent); }
.fact.is-on .fact__icon svg { stroke: var(--mint); }
.fact__data { font-size: clamp(12.5px, 3.2vh, 14.5px); font-weight: 560; white-space: nowrap; }
.fact__num { font-weight: 700; font-variant-numeric: tabular-nums; font-variation-settings: 'wdth' 108; display: inline-block; }
.fact__line { font-size: clamp(10.5px, 2.6vh, 11.5px); margin-top: 1px; line-height: 1.3; }

/* ---------------------------------------------------------------- the plan */
.map { position: relative; min-width: 0; }
.plan { display: block; width: 100%; height: auto; max-height: min(58vh, 330px); overflow: visible; }
.slab { stroke: none; }
.wall { fill: none; stroke: var(--hair); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.gate__post { stroke: var(--hair); stroke-width: 1.4; stroke-linecap: round; }
.gate__bar { stroke: var(--mint); stroke-width: 1.6; stroke-linecap: round; }
.pillars rect { fill: rgba(226, 236, 240, 0.16); stroke: var(--hair); stroke-width: 0.8; }
.lanes path { fill: none; stroke: var(--hair-soft); stroke-width: 1; stroke-linecap: round; }
.stripes path { fill: none; stroke: var(--hair); stroke-width: 1; stroke-linecap: round; }
.ramp path { stroke: var(--hair-soft); stroke-width: 1; stroke-linecap: round; }
.ramp text, .labels text { fill: var(--muted); font-size: 7.2px; font-weight: 600; letter-spacing: 0.08em; font-family: inherit; }
.arrows path { fill: none; stroke: rgba(226, 236, 240, 0.5); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.taken rect { fill: rgba(226, 236, 240, 0.045); stroke: rgba(226, 236, 240, 0.2); stroke-width: 0.8; }
.taken path { fill: rgba(226, 236, 240, 0.08); stroke: none; }
.free rect { fill: color-mix(in srgb, var(--mint) 13%, transparent); stroke: var(--mint); stroke-width: 1; }
.free rect.is-chosen { fill: color-mix(in srgb, var(--mint) 22%, transparent); stroke-width: 1.4; }
.route { fill: none; stroke: var(--mint); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.route--glow { stroke-width: 6; opacity: 0.55; }
.tag__box { fill: var(--mint); }
.tag__text { fill: var(--button-ink); font-size: 9px; font-weight: 700; font-family: inherit; letter-spacing: 0.02em; }
.car__beam { opacity: 0.32; }
.car__shadow { fill: rgba(0, 0, 0, 0.5); filter: blur(2px); }
.car__shell { fill: var(--car); }
.car__glass { fill: #2b333b; }
.car__glass--rear { fill: #3a434c; }
.car__roof { fill: #e1e7e9; }
.car__lamp { stroke: #ffffff; stroke-width: 1.4; stroke-linecap: round; }
.car__tail { stroke: #ff5a5a; stroke-width: 1.4; stroke-linecap: round; opacity: 0.4; }

/* ---------------------------------------------------------------- narrow: the plan on top, the facts under it */
@media (max-width: 600px) {
  .where { display: none; }
  .brand { flex: 1; }
  .body { grid-template-columns: 1fr; gap: clamp(8px, 2vh, 14px); }
  .copy { order: 2; }
  .title { display: none; }
  .facts { margin-top: 0; gap: 5px; }
  .fact { padding: 5px 8px; column-gap: 8px; }
  .fact__icon { grid-row: auto; width: 22px; height: 22px; border-radius: 7px; }
  .fact__line { display: none; }
  .fact__data { font-size: 12.5px; }
  .plan { max-height: min(50vh, 260px); }
}
@media (max-width: 600px) and (min-height: 620px) {
  .title { display: block; font-size: clamp(18px, 5.6vw, 24px); margin-bottom: 10px; }
  .fact__line { display: block; grid-column: 2; }
  .fact__icon { grid-row: span 2; }
}
