/* Atlanta's Last Mile (FIFA World Cup 26): builds on project.css.

   The page is walked like the Last Mile. Each section says which zone it belongs to
   (data-zone), and ../home/fifa.js copies the zone you're reading onto <body>, so the page's
   brand colour moves from Orientation blue to Reassurance green to Confirmation red, exactly
   like the wayfinding system it describes. A small marker counts down the distance. */

/* ---------- Theme: the zone colours (sampled from the final presentation) ---------- */
.fifa {
  --ff-blue: #1d77bb;
  --ff-blue-2: #1596cf;
  --ff-green: #138e47;
  --ff-green-2: #0f6b37;
  --ff-red: #d0424c;
  --ff-red-2: #a92a3a;
  --ff-cyan: #00c2db; /* the route maps */
  --ff-ink: #12161c;

  --zone: var(--ff-blue);
  --zone-2: var(--ff-blue-2);
  --color-bg-brand: var(--zone);
  --color-bg-brand-hover: var(--zone-2);
  --color-bg-brand-subtle: #e8f1f9;
  --color-text-brand: #1a6aa8;
  --color-border-brand: var(--zone);
  --color-icon-brand: var(--zone);
  --pj-brand-light: #7fbbe9;
}

.fifa[data-zone="2"] {
  --zone: var(--ff-green);
  --zone-2: var(--ff-green-2);
  --color-bg-brand-subtle: #e7f3eb;
  --color-text-brand: #107a3d;
  --pj-brand-light: #6cc794;
}

.fifa[data-zone="3"],
.fifa[data-zone="arrive"] {
  --zone: var(--ff-red);
  --zone-2: var(--ff-red-2);
  --color-bg-brand-subtle: #fbecee;
  --color-text-brand: #b8333f;
  --pj-brand-light: #f39299;
}

/* Tab panels set their own display, which would otherwise override [hidden]. */
.fifa main [hidden] {
  display: none !important;
}

/* The zone change eases in rather than snapping. */
.fifa .pj-label,
.fifa main em,
.fifa .pj-pitch__impact,
.fifa .pj-bar__num,
.fifa .pj-bar__list span,
.ff-hud,
.ff-hud i {
  transition: color 0.6s ease, background-color 0.6s ease, border-color 0.6s ease;
}

.fifa .pj-pitch__impact,
.fifa .pj-pitch__impact .pj-pitch__tag {
  color: #f9f9f9;
}

/* Chevrons, the system's arrow: a small "»»»" drawn in CSS. */
.ff-hud__chev,
.ff-howto__chev {
  display: inline-flex;
  gap: 2px;
}

.ff-hud__chev i,
.ff-howto__chev i {
  width: 8px;
  height: 12px;
  background: var(--zone);
  clip-path: polygon(0 0, 45% 0, 100% 50%, 45% 100%, 0 100%, 55% 50%);
}

/* ---------- The Last Mile marker ---------- */
.ff-hud {
  position: fixed;
  right: var(--space-2xl);
  bottom: var(--space-2xl);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-lg) var(--space-sm) var(--space-md);
  border: var(--border-width-thin, 1px) solid var(--zone);
  border-radius: var(--radius-full);
  background: rgb(249 249 249 / 0.92);
  backdrop-filter: blur(8px);
  color: var(--color-text-primary);
  font-size: var(--type-caption-size);
  line-height: 1.2;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.6s ease;
}

.ff-hud.is-on {
  opacity: 1;
  transform: none;
}

.ff-hud__chev i {
  animation: ff-march 1.4s ease-in-out infinite;
}

.ff-hud__chev i:nth-child(2) { animation-delay: 0.15s; }
.ff-hud__chev i:nth-child(3) { animation-delay: 0.3s; }

@keyframes ff-march {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.ff-hud__zone {
  font-weight: 600;
  color: var(--color-text-brand);
}

.ff-hud__dist {
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}

.ff-hud__dist b {
  color: var(--color-text-primary);
  font-weight: 600;
}

/* ---------- 00 Overview ---------- */
.ff-overview {
  margin-top: var(--space-5xl);
}

.ff-howto {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-2xl) 0 0;
  color: var(--color-text-secondary);
  font-size: var(--type-body-md-size);
  line-height: var(--type-body-md-line-height);
}

/* ---------- 01 The challenge ---------- */
.ff-scale,
.ff-findings {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: var(--space-2xl);
  margin: 0;
}

.ff-scale > div,
.ff-findings > div {
  padding-top: var(--space-lg);
  border-top: 2px solid var(--zone);
}

.ff-scale dt,
.ff-findings dt {
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: var(--pj-figure);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--color-text-brand);
}

.ff-findings dt {
  font-size: clamp(44px, 4.6vw, 64px);
}

.ff-scale dd,
.ff-findings dd {
  margin: var(--space-md) 0 0;
  color: var(--color-text-secondary);
  font-size: var(--type-body-md-size);
  line-height: var(--type-body-md-line-height);
}

/* Matchday clock */
.ff-clock {
  display: grid;
  gap: var(--space-lg);
  padding: var(--space-4xl);
  border-radius: var(--radius-xl);
  background: var(--ff-ink);
  color: #f2f2f2;
}

.ff-clock .pj-label {
  color: var(--ff-cyan);
}

.ff-clock__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-lg);
}

.ff-clock__time {
  margin: 0;
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: var(--type-h3-size);
  font-variant-numeric: tabular-nums;
}

.ff-clock__time span {
  color: #9aa3ad;
  font-family: var(--font-family-body);
  font-weight: 400;
  font-size: var(--type-body-md-size);
}

/* 200 dots: each one a slice of the crowd out on the street. */
.ff-clock__crowd {
  display: grid;
  grid-template-columns: repeat(40, minmax(0, 1fr));
  gap: 5px;
  margin: var(--space-lg) 0;
}

.ff-clock__crowd i {
  aspect-ratio: 1;
  border-radius: 50%;
  background: #2a313a;
  transition: background-color 0.35s ease, transform 0.35s ease;
}

.ff-clock__crowd i.is-on {
  background: var(--ff-cyan);
  transform: scale(1.08);
}

.ff-clock[data-peak] .ff-clock__crowd i.is-on {
  background: var(--ff-red);
}

.ff-clock__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.ff-clock__range {
  width: 100%;
  accent-color: var(--ff-cyan);
  cursor: pointer;
}

.ff-clock__ticks {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #9aa3ad;
  font-size: var(--type-caption-size);
}

/* Kickoff and the final whistle sit where they fall on the -180…150 minute range. */
.ff-clock__ticks {
  position: relative;
  height: 1.4em;
}

.ff-clock__ticks li {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}

.ff-clock__ticks li:nth-child(1) { left: 0; transform: none; }
.ff-clock__ticks li:nth-child(2) { left: 54.5%; }
.ff-clock__ticks li:nth-child(3) { left: 86.4%; }
.ff-clock__ticks li:nth-child(4) { right: 0; transform: none; }

.ff-clock__read {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-2xl);
  align-items: baseline;
  margin-top: var(--space-lg);
  padding-top: var(--space-2xl);
  border-top: 1px solid #2a313a;
}

.ff-clock__stat {
  margin: 0;
  min-width: 5ch;
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: var(--pj-figure);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ff-cyan);
}

.ff-clock[data-peak] .ff-clock__stat {
  color: #ff7b84;
}

.ff-clock__note {
  margin: 0;
  font-size: var(--type-body-lg-size);
  line-height: var(--type-body-lg-line-height);
}

/* Core tension */
.ff-tension {
  display: grid;
  gap: var(--space-lg);
}

.ff-tension__q {
  margin: 0;
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: clamp(56px, 9vw, 136px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--color-text-brand);
}

/* The ask */
.ff-ask {
  margin: 0;
  padding: var(--space-4xl);
  border-left: 4px solid var(--zone);
  border-radius: var(--radius-lg);
  background: var(--color-bg-brand-subtle);
}

.ff-ask blockquote {
  margin: var(--space-md) 0 var(--space-lg);
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: var(--type-h3-size);
  line-height: var(--type-h3-line-height);
  letter-spacing: -0.01em;
}

.ff-ask figcaption {
  color: var(--color-text-secondary);
  font-size: var(--type-body-md-size);
}

/* ---------- 02 Research ---------- */
.ff-events {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ff-events li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-full);
  font-size: var(--type-body-md-size);
}

.ff-events span {
  color: var(--color-text-brand);
  font-weight: 600;
}

/* Pre-game / post-game */
.ff-phase {
  display: grid;
  gap: var(--space-3xl);
}

.ff-phase__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-2xl);
  flex-wrap: wrap;
}

.ff-switch {
  display: inline-flex;
  padding: var(--space-xs);
  border-radius: var(--radius-full);
  background: var(--color-bg-secondary);
}

.ff-switch button {
  padding: var(--space-sm) var(--space-xl);
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-text-secondary);
  font: inherit;
  font-size: var(--type-body-md-size);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.ff-switch button[aria-selected="true"] {
  background: var(--zone);
  color: #f9f9f9;
}

.ff-phase__panel {
  display: grid;
  gap: var(--space-2xl);
  padding: var(--space-4xl);
  border-radius: var(--radius-xl);
  background: var(--color-bg-brand-subtle);
}

.ff-phase__mood {
  margin: 0;
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: var(--type-h3-size);
  line-height: var(--type-h3-line-height);
  color: var(--color-text-brand);
}

.ff-phase__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4xl);
}

.ff-phase__cols ul {
  margin: var(--space-md) 0 0;
  padding-left: 1.1em;
  font-size: var(--type-body-md-size);
  line-height: var(--type-body-md-line-height);
}

.ff-phase__cols li + li {
  margin-top: var(--space-xs);
}

/* Evaluation matrix */
.ff-metrics {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-5xl);
  align-items: start;
}

.ff-metrics__head {
  position: sticky;
  top: calc(var(--layout-nav-height) + var(--space-6xl));
  display: grid;
  gap: var(--space-lg);
}

.ff-metrics__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ff-metrics__list li {
  display: grid;
  grid-template-columns: 3em minmax(0, 1fr);
  column-gap: var(--space-lg);
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--color-border-default);
}

.ff-metrics__list span {
  grid-row: span 2;
  color: var(--color-text-brand);
  font-weight: 600;
}

.ff-metrics__list h4 {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: var(--type-h4-size);
  line-height: var(--type-h4-line-height);
}

.ff-metrics__list p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--type-body-md-size);
  line-height: var(--type-body-md-line-height);
}

/* ---------- Scrolly: a sticky picture that changes as you read the steps ---------- */
.ff-scrolly {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: var(--space-5xl);
  align-items: start;
}

.ff-scrolly__stage {
  position: sticky;
  top: calc(var(--layout-nav-height) + var(--space-6xl));
  display: grid;
  gap: var(--space-md);
}

.ff-scrolly__frame {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--ff-cyan);
}

.ff-scrolly--zones .ff-scrolly__frame {
  background: #2b6f78;
}

.ff-scrolly__frame img {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.ff-scrolly__frame img.is-on {
  opacity: 1;
}

.ff-scrolly__dots {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ff-scrolly__dots li {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--color-border-default);
  transition: background-color 0.3s ease;
}

.ff-scrolly__dots li.is-past {
  background: var(--zone);
}

.ff-scrolly__steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ff-scrolly__steps > li {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 62vh;
  opacity: 0.3;
  transition: opacity 0.4s ease;
}

.ff-scrolly__steps > li:first-child {
  min-height: 40vh;
  justify-content: start;
}

.ff-scrolly__steps > li.is-on {
  opacity: 1;
}

.ff-scrolly__steps p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--type-body-md-size);
  line-height: var(--type-body-md-line-height);
}

.ff-step__group {
  color: var(--color-text-brand) !important;
  font-size: var(--type-label-size) !important;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ff-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  margin-top: var(--space-sm) !important;
  font-size: var(--type-body-sm-size) !important;
}

.ff-key__dot {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0f3b26;
  color: #f2f2f2;
  font-size: 10px;
  font-weight: 700;
}

.ff-key__dot--h {
  border-radius: 3px;
}

.ff-key__dot--sec {
  border-radius: 4px 4px 50% 50%;
}

.ff-key__dot--gate {
  width: 22px;
  height: 0;
  border-top: 3px dotted #0f3b26;
  border-radius: 0;
  background: none;
}

.ff-why {
  display: grid;
  gap: var(--space-lg);
  margin: var(--space-lg) 0 0;
}

.ff-why > div {
  padding-left: var(--space-lg);
  border-left: 2px solid var(--zone);
}

.ff-why dt {
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: var(--type-h3-size);
  line-height: 1.1;
  color: var(--color-text-brand);
}

.ff-why dd {
  margin: var(--space-xs) 0 0;
  color: var(--color-text-secondary);
  font-size: var(--type-body-sm-size);
  line-height: 1.5;
}

/* Zone steps carry their own colour, whatever zone the page is in. */
.ff-zone--1 { --zc: var(--ff-blue); }
.ff-zone--2 { --zc: var(--ff-green); }
.ff-zone--3 { --zc: var(--ff-red); }

.ff-zone {
  padding-left: var(--space-2xl);
  border-left: 4px solid var(--zc);
}

.ff-zone .ff-step__group {
  color: var(--zc) !important;
}

.ff-zone__mood {
  color: var(--color-text-primary) !important;
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: var(--type-h4-size) !important;
  line-height: var(--type-h4-line-height) !important;
}

.ff-zone__color {
  font-size: var(--type-body-sm-size) !important;
}

/* ---------- 04 On the ground: walks ---------- */
.ff-walks {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* never wider than the screen */
  gap: var(--space-2xl);
}

.ff-walks__tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}

.ff-walks__tabs button {
  display: grid;
  gap: var(--space-2xs);
  padding: var(--space-lg) var(--space-xl);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--color-text-secondary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.ff-walks__tabs strong {
  color: var(--color-text-primary);
  font-family: var(--font-family-display);
  font-size: var(--type-body-lg-size);
  font-weight: 600;
}

.ff-walks__tabs span {
  font-size: var(--type-body-sm-size);
}

.ff-walks__tabs button[aria-selected="true"] {
  border-color: var(--zone);
  background: var(--color-bg-brand-subtle);
}

.ff-walk__track,
.ff-gallery__track {
  display: flex;
  gap: var(--space-2xl);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.ff-walk__track::-webkit-scrollbar,
.ff-gallery__track::-webkit-scrollbar {
  display: none;
}

.ff-walk__track figure,
.ff-gallery__track figure {
  flex: 0 0 min(86%, 1040px);
  margin: 0;
  scroll-snap-align: start;
}

/* The posters are the output, not the story: smaller cards, more of them in view. */
.ff-gallery__track figure {
  flex-basis: min(62%, 760px);
  margin: 0;
  scroll-snap-align: start;
}

.ff-walk__track img,
.ff-gallery__track img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
}

.ff-walk__track figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-xs) var(--space-md);
  margin-top: var(--space-md);
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: var(--type-body-lg-size);
}

.ff-walk__track figcaption span {
  color: var(--color-text-brand);
}

.ff-walk__track figcaption em {
  color: var(--color-text-secondary);
  font-family: var(--font-family-body);
  font-weight: 400;
  font-size: var(--type-body-md-size);
}

.ff-gallery__track figcaption {
  margin-top: var(--space-md);
  color: var(--color-text-secondary);
  font-size: var(--type-body-md-size);
}

.ff-walks__nav,
.ff-gallery__nav {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
}

.ff-gallery {
  display: grid;
  gap: var(--space-lg);
}

.ff-takeaway {
  margin: 0;
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: var(--type-h3-size);
  line-height: var(--type-h3-line-height);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* ---------- 05 Pattern progression: live chevrons ---------- */
.ff-pattern {
  display: grid;
  gap: var(--space-3xl);
}

.ff-pattern__head {
  display: grid;
  gap: var(--space-md);
}

.ff-pattern__tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* A row of chevrons (the system's arrow), repeated and marching toward the stadium.
   --a is the chevron, --b the ground, --s its size and --t one step's duration. */
.ff-tile,
.ff-close__band {
  --a: #1d77bb;
  --b: #1596cf;
  --s: 120px;
  --t: 6s;
  overflow: hidden;
  background: var(--b);
}

.ff-tile::before,
.ff-close__band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--a);
  -webkit-mask: var(--ff-chevron) 0 0 / var(--s) 100% repeat-x;
  mask: var(--ff-chevron) 0 0 / var(--s) 100% repeat-x;
  animation: ff-pull var(--t) linear infinite;
}

.fifa {
  --ff-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpolygon points='0,0 45,0 95,50 45,100 0,100 50,50'/%3E%3C/svg%3E");
}

.ff-tile {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
}

.ff-tile--0 { --a: #8fb0c9; --b: #adc6d9; }
.ff-tile--0::before { animation: none; }
.ff-tile--0 { --s: 180px; }
.ff-tile--1 { --s: 180px; --t: 3s; }
.ff-tile--2 { --a: #0f6b37; --b: #138e47; --s: 110px; --t: 1.6s; }
.ff-tile--3 { --a: #a92a3a; --b: #d0424c; --s: 64px; --t: 0.8s; }

@keyframes ff-pull {
  to {
    -webkit-mask-position: var(--s) 0;
    mask-position: var(--s) 0;
  }
}

.ff-tile span {
  position: absolute;
  left: var(--space-md);
  bottom: var(--space-md);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  background: rgb(18 22 28 / 0.75);
  color: #f2f2f2;
  font-size: var(--type-caption-size);
  font-weight: 500;
}

/* ---------- 06 Guidelines ---------- */
.ff-kinds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2xl);
}

.ff-kinds > div {
  display: grid;
  align-content: start;
  gap: var(--space-md);
  padding: var(--space-3xl);
  border-radius: var(--radius-xl);
  background: var(--color-bg-secondary);
}

.ff-kinds p {
  margin: 0;
  font-size: var(--type-body-md-size);
  line-height: var(--type-body-md-line-height);
}

.ff-kit {
  display: grid;
  gap: var(--space-2xl);
}

.ff-kit .ff-switch {
  justify-self: start;
}

/* The tabs keep the zone colours, so a tab reads as the moment it describes. */
.ff-kit .ff-switch button:nth-child(1)[aria-selected="true"] { background: var(--ff-blue); }
.ff-kit .ff-switch button:nth-child(2)[aria-selected="true"] { background: var(--ff-green); }
.ff-kit .ff-switch button:nth-child(3)[aria-selected="true"] { background: var(--ff-red); }
.ff-kit .ff-switch button:nth-child(4)[aria-selected="true"] { background: var(--ff-ink); }

.ff-kit__panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2xl);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ff-kit__panel--1 { --zc: var(--ff-blue); }
.ff-kit__panel--2 { --zc: var(--ff-green); }
.ff-kit__panel--3 { --zc: var(--ff-red); }
.ff-kit__panel--4 { --zc: var(--ff-ink); }

.ff-kit__panel li {
  display: grid;
  align-content: start;
  gap: var(--space-xs);
  padding: var(--space-3xl);
  border-top: 6px solid var(--zc);
  border-radius: var(--radius-lg);
  background: var(--color-bg-secondary);
}

.ff-kit__panel h4 {
  margin: 0;
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: var(--type-h4-size);
  line-height: var(--type-h4-line-height);
}

.ff-kit__panel p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--type-body-md-size);
  line-height: var(--type-body-md-line-height);
}

.ff-kit__panel .ff-kit__size {
  margin-bottom: var(--space-sm);
  color: var(--zc);
  font-size: var(--type-label-size);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- 07 In the street ---------- */
/* ---------- 07 The walk: a line-drawn street in 3D ----------
   The world is built in ../home/fifa.js from planes placed with translate3d: the road and
   sidewalks lie flat, facades turn to face the street, signs face you. Scrolling moves the
   world toward the camera. Only the signage carries colour. */
.ff-city {
  --ink: #1d2026;
  --paper: #f7f7f5;
}

.ff-city__track {
  position: relative;
  height: 1000vh;
}

.ff-city__mark {
  position: absolute;
  left: 0;
  width: 1px;
  height: 1px;
}

.ff-city__stage {
  position: sticky;
  top: calc(var(--layout-nav-height) + 52px);
  height: calc(100vh - var(--layout-nav-height) - 52px - var(--space-lg));
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--paper);
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.ff-city__view {
  position: absolute;
  inset: 0;
  overflow: hidden;
  perspective: 720px;
  perspective-origin: 50% 40%;
}

/* The horizon. */
.ff-city__view::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 40%;
  height: 2px;
  background: var(--ink);
  opacity: 0.25;
}

.ff-city__world {
  position: absolute;
  left: 50%;
  top: 40%;
  transform-style: preserve-3d;
  will-change: transform;
}

.ff-city__world > * {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  box-sizing: border-box;
}

/* Road and sidewalks, drawn as lines: two curbs and a dashed centre line. */
.ff-c-ground {
  width: 960px;
  background:
    linear-gradient(90deg, transparent 178px, var(--ink) 178px 182px, transparent 182px 778px, var(--ink) 778px 782px, transparent 782px),
    repeating-linear-gradient(180deg, var(--ink) 0 80px, transparent 80px 200px) 477px 0 / 6px 100% no-repeat,
    var(--paper);
}

.ff-c-cross {
  width: 600px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 34px, transparent 34px 72px);
  opacity: 0.85;
}

.ff-c-side {
  height: 4px;
  background: var(--ink);
}

/* Facades: outlined, with a grid of windows. */
.ff-c-bldg {
  border: 3px solid var(--ink);
  background: var(--paper);
}

.ff-c-bldg::before {
  content: "";
  position: absolute;
  inset: 40px 30px 0;
  background:
    linear-gradient(var(--ink) 2px, transparent 2px) 0 0 / 100% var(--wy, 90px),
    linear-gradient(90deg, var(--ink) 2px, transparent 2px) 0 0 / var(--wx, 70px) 100%;
  opacity: 0.55;
}

/* Siya's signage, placed as cut-out images. */
.ff-c-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
}

.ff-c-raised img {
  height: auto;
}

.ff-c-raised i {
  position: absolute;
  width: 8px;
  background: #24272c;
}

.ff-c-scrim {
  border: 3px solid var(--ink);
}

.ff-c-scrim img {
  object-fit: cover;
}

/* A construction fence the scrims hang on: a top rail and posts. */
.ff-c-fence {
  background:
    linear-gradient(var(--ink) 4px, transparent 4px) 0 0 / 100% 100%,
    repeating-linear-gradient(90deg, var(--ink) 0 4px, transparent 4px 120px);
  opacity: 0.7;
}

.ff-c-stadium svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* ---------- What's around you: progress, the caption card and the hint ---------- */
.ff-city__bar {
  position: absolute;
  left: var(--space-2xl);
  right: var(--space-2xl);
  top: var(--space-2xl);
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #1d77bb 0 36.5%, #138e47 36.5% 67.5%, #d0424c 67.5%);
}

.ff-city__dot {
  position: absolute;
  top: 50%;
  left: 0;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 3px solid #1d2026;
  border-radius: 50%;
  background: #f9f9f9;
}

.ff-city__card {
  position: absolute;
  left: var(--space-2xl);
  bottom: var(--space-2xl);
  width: min(380px, calc(100% - var(--space-2xl) * 2));
  padding: var(--space-xl) var(--space-2xl);
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  background: rgb(247 247 245 / 0.94);
}

.ff-city__zone {
  margin: 0 0 var(--space-xs);
  color: var(--color-text-brand);
  font-size: var(--type-label-size);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.6s ease;
}

.ff-city__title {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: var(--type-h4-size);
  line-height: var(--type-h4-line-height);
}

.ff-city__why {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--type-body-md-size);
  line-height: var(--type-body-md-line-height);
}

.ff-city__hint {
  position: absolute;
  right: var(--space-2xl);
  bottom: var(--space-2xl);
  margin: 0;
  padding: var(--space-xs) var(--space-lg);
  border-radius: var(--radius-full);
  background: var(--ink);
  color: #f2f2f2;
  font-size: var(--type-caption-size);
  transition: opacity 0.4s ease;
}

.ff-city.is-walking .ff-city__hint {
  opacity: 0;
}

/* ---------- Closing: arrival ---------- */
.ff-closing {
  margin-top: var(--space-9xl);
}

.ff-close {
  position: relative;
  display: grid;
  place-items: center;
  gap: var(--space-md);
  padding: var(--space-10xl) var(--space-3xl);
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--ff-ink);
  text-align: center;
}

.ff-close__band {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  --a: #a92a3a;
  --b: #d0424c;
  --s: 160px;
  --t: 2s;
}

.ff-close__line {
  position: relative;
  margin: 0;
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #f2f2f2;
  text-wrap: balance;
}

.fifa .ff-close__line em {
  color: #ff8f96;
}

.ff-close__sub {
  position: relative;
  margin: 0;
  color: #c7ccd2;
  font-size: var(--type-body-lg-size);
}

/* ---------- Smaller screens ---------- */
@media (max-width: 1099px) {
  .ff-scrolly,
  .ff-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .ff-metrics__head {
    position: static;
  }

  /* The picture stays pinned at the top while the steps scroll under it. */
  .ff-scrolly__stage {
    top: calc(var(--layout-nav-height) + var(--space-4xl));
    z-index: 2;
    padding: var(--space-md) 0;
    background: var(--color-bg-primary);
  }

  .ff-scrolly__steps > li,
  .ff-scrolly__steps > li:first-child {
    min-height: 46vh;
    justify-content: center;
  }

  .ff-kit__panel {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .ff-scale,
  .ff-findings {
    grid-auto-flow: row;
    grid-template-columns: minmax(0, 1fr);
  }

  .ff-findings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ff-clock,
  .ff-ask,
  .ff-phase__panel {
    padding: var(--space-2xl);
  }

  .ff-clock__crowd {
    grid-template-columns: repeat(20, minmax(0, 1fr));
    gap: 4px;
  }

  .ff-clock__read,
  .ff-phase__cols,
  .ff-kinds,
  .ff-walks__tabs {
    grid-template-columns: minmax(0, 1fr);
  }

  .ff-clock__ticks li:nth-child(2),
  .ff-clock__ticks li:nth-child(3) {
    font-size: 11px;
  }

  .ff-pattern__tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ff-switch--4 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: var(--radius-lg);
  }

  /* A narrower screen sees a narrower street: zoom the world out so both sidewalks stay in view. */
  .ff-city__world {
    scale: 0.6;
  }

  .ff-city__card {
    left: var(--space-md);
    right: var(--space-md);
    bottom: var(--space-md);
    width: auto;
    padding: var(--space-md) var(--space-lg);
  }

  .ff-city__why {
    font-size: var(--type-body-sm-size);
  }

  .ff-city__hint {
    display: none;
  }

  .ff-hud {
    right: var(--space-lg);
    bottom: var(--space-lg);
  }

  .ff-hud__zone {
    display: none;
  }

  .ff-close {
    padding: var(--space-8xl) var(--space-xl);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ff-tile::before,
  .ff-close__band::before,
  .ff-hud__chev i {
    animation: none;
  }

  .ff-scrolly__frame img,
  .ff-scrolly__steps > li,
  .ff-clock__crowd i {
    transition: none;
  }
}
