/* ==========================================================================
   UQ | The Unstoppable Quotient — landing page
   Desktop sizes are expressed in "design pixels" (--s) taken from the
   1920px-wide comp, so the layout scales proportionally down to tablet.
   Phones get their own layout below 700px.
   ========================================================================== */

:root {
  --red: #e72c25;
  --yellow: #fffa45;
  --gold: #fded00;
  --teal: #00fdd6;
  --black: #000;
  --white: #fff;

  --f-sans: "neulis-sans", sans-serif;
  --f-grot: "neue-haas-grotesk-display", "Neue Haas Grotesk Display Pro", "Inter Tight", "Helvetica Neue", Arial, sans-serif;

  /* 1 design pixel (comp is 1920 wide); never larger than 1px */
  --s: min(1px, calc(100vw / 1920));
  /* extra gutter on screens wider than the comp so content stays on the 1920 grid */
  --edge: max(0px, calc((100vw - 1920px) / 2));
  --indent: calc(var(--edge) + max(24px, calc(193 * var(--s))));
  --tag-x: calc(var(--edge) + max(16px, calc(98 * var(--s))));
  --header-h: max(56px, calc(87 * var(--s)));

  --ease-out: cubic-bezier(.16, .84, .3, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html.menu-open { overflow: hidden; }
/* hiding the scrollbar would widen the page: pad for it so nothing shifts (main.js sets --sbw) */
html.menu-open body { padding-right: var(--sbw, 0px); }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
@supports (overflow-x: clip) {
  body { overflow-x: clip; }
}

img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
button, input, textarea { font: inherit; color: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: 12px; z-index: 100;
  padding: 10px 16px; background: var(--gold); color: var(--black);
  font-weight: 900; text-transform: uppercase; text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

.line { display: block; white-space: nowrap; } /* keep the comp's line breaks */
.t-white { color: var(--white); }
.t-red { color: var(--red); }
.t-yellow { color: var(--yellow); }

.icon { width: 1em; height: 1em; flex: none; }

/* ---------- Shared type ---------- */
/* all headlines: Neulis Sans Black */
.display,
.hero__title, .what__title, .stand__title, .how__title,
.score__title, .section-title, .philly__title {
  font-family: var(--f-sans);
  font-weight: 900;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: max(26px, calc(34 * var(--s)));
  padding: 0 max(10px, calc(14 * var(--s)));
  margin-left: calc(var(--tag-x) - var(--indent));
  border: 2px solid currentColor;
  border-radius: 999px;
  font: 500 max(12px, calc(18 * var(--s))) / 1 var(--f-sans);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--white);
}

.section-title {
  font-size: max(34px, calc(95 * var(--s)));
  line-height: .958;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: background-color .25s, transform .25s var(--ease-out), box-shadow .25s;
}
.btn .icon { transition: transform .3s var(--ease-out); }
.btn:hover .icon, .btn:focus-visible .icon { transform: translate(12%, -12%); }
.btn:active { transform: translateY(1px); }

.btn--cta {
  gap: max(16px, calc(37 * var(--s)));
  min-height: 52px;
  height: calc(112 * var(--s));
  padding: 0 max(14px, calc(31 * var(--s))) 0 max(14px, calc(26 * var(--s)));
  background: var(--gold);
  color: var(--black);
  border: max(3px, calc(5 * var(--s))) solid var(--teal);
  border-radius: max(10px, calc(17 * var(--s)));
  font: 900 max(15px, calc(33.9 * var(--s))) / 1 var(--f-sans);
}
.btn--cta .icon { font-size: max(24px, calc(57 * var(--s))); }
/* shared by every big yellow button (hero, Philly, Send) */
.btn--cta:hover,
.btn--philly:hover { background: var(--yellow); box-shadow: 0 0 0 max(3px, calc(5 * var(--s))) rgba(0, 253, 214, .35); }

/* ==========================================================================
   Header + menu
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(16px, calc(26 * var(--s))) 0 max(16px, calc(21 * var(--s)));
  background: rgba(0, 0, 0, .3);
  transition: background-color .35s, -webkit-backdrop-filter .35s, backdrop-filter .35s;
}
.site-header.is-scrolled {
  background: rgba(0, 0, 0, .82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
html.menu-open .site-header { right: var(--sbw, 0px); background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }

.site-header__logo { display: block; color: var(--white); }
.site-header__logo svg { width: max(46px, calc(91 * var(--s))); height: auto; fill: currentColor; }
.site-header__wordmark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(150px, calc(453 * var(--s)));
  transform: translate(-50%, -50%);
  pointer-events: none;
}
html.menu-open .site-header__wordmark { opacity: 0; }

.menu-toggle {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: max(34px, calc(64 * var(--s)));
  height: max(21px, calc(36 * var(--s)));
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.menu-toggle::after { content: ""; position: absolute; inset: -10px; } /* larger hit area */
.menu-toggle__bar {
  display: block;
  height: max(4px, calc(8.5 * var(--s)));
  background: var(--gold);
  transform-origin: center;
  transition: transform .35s var(--ease-out), opacity .2s;
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar { background: var(--black); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) { transform: translateY(calc(max(21px, calc(36 * var(--s))) / 2 - max(4px, calc(8.5 * var(--s))) / 2)) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(4) { transform: translateY(calc(max(4px, calc(8.5 * var(--s))) / 2 - max(21px, calc(36 * var(--s))) / 2)) rotate(-45deg); }

.site-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  padding: calc(var(--header-h) + 32px) var(--indent) 64px;
  background: var(--red);
  color: var(--black);
  overflow-y: auto;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease-out);
}
.site-menu[hidden] { display: none; }
.site-menu.is-open { clip-path: inset(0); }
.site-menu__list a {
  display: inline-block;
  font: 900 clamp(34px, min(6.2vw, 10vh), 110px) / 1.02 var(--f-sans); /* fits short windows too */
  text-transform: uppercase;
  text-decoration: none;
  transition: color .2s, transform .3s var(--ease-out);
}
.site-menu__list a:hover, .site-menu__list a:focus-visible { color: var(--white); transform: translateX(10px); }
.site-menu__report {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
  font: 500 max(14px, calc(22 * var(--s))) / 1 var(--f-sans);
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
}
.site-menu__report .icon { font-size: 1.1em; }

/* ==========================================================================
   1. Hero
   ========================================================================== */
.hero {
  position: relative;
  height: calc(1240 * var(--s));
  min-height: 480px;
  background: var(--black);
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: 0;
  will-change: transform;
}
/* the still (1920x1240, the hero's own size) fills the hero; its bottom is already black */
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}
.hero__video {
  /* the footage is wider than the hero (1920x1098), so it's fitted to the width rather
     than scaled up to fill the height; its bottom fades into the hero's black */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 1920 / 1098;
  object-fit: cover;
  object-position: 50% 0;
  -webkit-mask-image: linear-gradient(#000 78%, transparent);
  mask-image: linear-gradient(#000 78%, transparent);
}
.hero__inner {
  position: absolute;
  left: 0;
  right: 0;
  /* keep the headline above the fold on short desktop viewports */
  bottom: max(calc(214 * var(--s)), calc(1240 * var(--s) - 100svh + 40px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 0 calc(var(--edge) + max(24px, calc(187 * var(--s)))) 0 var(--indent);
}
.hero__title {
  position: relative;
  z-index: 0;
  font-size: max(28px, calc(95.7 * var(--s)));
  line-height: .975;
  color: var(--white);
}
/* horizontal motion-blur ghost of the headline (from the comp) */
.hero__title::before {
  content: "";
  position: absolute;
  z-index: -1;
  /* the comp's motion-blur layer: 1224x256 at a 95.7px headline, starting 321px left
     of the type, top and bottom on the headline's ink (Neulis' cap top sits .166em
     into the line box at this line-height) */
  left: -3.354em;
  top: .166em;
  width: 12.79em;
  height: 2.675em;
  background: url("../img/hero-ghost.png") 0 0 / 100% 100% no-repeat;
  background-image: image-set(url("../img/hero-ghost.webp") type("image/webp"), url("../img/hero-ghost.png") type("image/png"));
  opacity: .5;
  pointer-events: none;
}
.hero__cta { flex: none; }

/* entrance */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__title .line { animation: from-left 1.2s var(--ease-out) both; }
  .js .hero__title .line:nth-child(2) { animation-delay: .12s; }
  .js .hero__title .line:nth-child(3) { animation-delay: .24s; }
  .js .hero__title::before { animation: streak 1.4s var(--ease-out) .1s both; }
  .js .hero__cta { animation: from-right 1.1s var(--ease-out) .45s both; }
  .js .hero__media { animation: settle 1.8s var(--ease-out) both; }
}
@keyframes streak { from { opacity: 0; transform: translateX(-18%); } }
@keyframes from-left { from { opacity: 0; transform: translateX(-1.6em); } }
@keyframes from-right { from { opacity: 0; transform: translateX(min(160px, 12vw)); } }
@keyframes settle { from { transform: scale(1.06); } }

/* ==========================================================================
   2. What is it?
   ========================================================================== */
.what {
  position: relative;
  background: var(--red);
  color: var(--black);
  padding: calc(139 * var(--s)) var(--indent) calc(160 * var(--s));
}
.what__title {
  margin-top: calc(60 * var(--s));
  margin-left: calc(3 * var(--s));
  font-size: max(36px, min(calc(171 * var(--s)), calc((100vw - 2 * var(--indent)) / 8.9)));
  line-height: .96;
}
.what__body {
  max-width: calc(1100 * var(--s));
  margin-top: calc(52 * var(--s));
  font: 300 max(16px, calc(26 * var(--s))) / 1.423 var(--f-grot);
  letter-spacing: .04em;
}

/* ==========================================================================
   3. Know where you stand
   ========================================================================== */
.stand {
  position: relative;
  display: grid;
  grid-template-columns: calc(var(--edge) + 933 * var(--s)) 1fr;
  padding-top: calc(108 * var(--s));
  background: var(--black);
  overflow: hidden; /* the photo and headline parallax (main.js); keep them inside the section */
}
.stand__media {
  grid-area: 1 / 2;
  justify-self: end;
  width: calc(987 * var(--s));
  will-change: transform;
}
.stand__media img { width: 100%; }
/* one tile per arch (built by main.js): each shows its slice of the same photo */
.stand__media.has-tiles { position: relative; }
.stand__media.has-tiles img { visibility: hidden; }
.arch-tiles { position: absolute; inset: 0; }
.arch-tile {
  --tw: 187.5; /* arch 183.5 x 215.7 plus a 2px bleed each side, in image pixels (987 x 1352) */
  --th: 219.7;
  position: absolute;
  left: calc(var(--x) / 987 * 100%);
  top: calc(var(--y) / 1352 * 100%);
  width: calc(var(--tw) / 987 * 100%);
  height: calc(var(--th) / 1352 * 100%);
  overflow: hidden;
}
/* exact arch-shaped window (the PSD's arch path), so the shape holds while the photo zooms inside */
.arch-tile {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-5.73 -5.73 537.30 629.39' preserveAspectRatio='none'%3E%3Cpath d=%22M525.839 7.816L525.839 369.367C525.839 518.035 420.174 617.928 262.926 617.928C105.678 617.928 0 517.012 0 366.83L0 7.816C0 3.507 3.495 0 7.817 0L518.022 0C522.345 0 525.839 3.507 525.839 7.816Z%22/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-5.73 -5.73 537.30 629.39' preserveAspectRatio='none'%3E%3Cpath d=%22M525.839 7.816L525.839 369.367C525.839 518.035 420.174 617.928 262.926 617.928C105.678 617.928 0 517.012 0 366.83L0 7.816C0 3.507 3.495 0 7.817 0L518.022 0C522.345 0 525.839 3.507 525.839 7.816Z%22/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.arch-tile--n {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-5.73 -5.73 537.30 629.39' preserveAspectRatio='none'%3E%3Cpath transform=%22matrix%281 0 0 -1 0 617.928%29%22 d=%22M525.839 7.816L525.839 369.367C525.839 518.035 420.174 617.928 262.926 617.928C105.678 617.928 0 517.012 0 366.83L0 7.816C0 3.507 3.495 0 7.817 0L518.022 0C522.345 0 525.839 3.507 525.839 7.816Z%22/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-5.73 -5.73 537.30 629.39' preserveAspectRatio='none'%3E%3Cpath transform=%22matrix%281 0 0 -1 0 617.928%29%22 d=%22M525.839 7.816L525.839 369.367C525.839 518.035 420.174 617.928 262.926 617.928C105.678 617.928 0 517.012 0 366.83L0 7.816C0 3.507 3.495 0 7.817 0L518.022 0C522.345 0 525.839 3.507 525.839 7.816Z%22/%3E%3C/svg%3E");
}
.arch-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/city-arches.jpg") no-repeat;
  background-image: image-set(url("../img/city-arches.webp") type("image/webp"), url("../img/city-arches.jpg") type("image/jpeg"));
  background-size: calc(987 / var(--tw) * 100%) calc(1352 / var(--th) * 100%);
  background-position: calc(var(--x) / (987 - var(--tw)) * 100%) calc(var(--y) / (1352 - var(--th)) * 100%);
}
.stand__title {
  grid-area: 1 / 1 / 2 / 3;
  align-self: start;
  z-index: 1;
  margin: calc(394 * var(--s)) 0 0 calc(var(--edge) + 172 * var(--s));
  font-size: max(30px, calc(103 * var(--s)));
  line-height: 1.02;
  color: var(--white);
  text-shadow: 0 0 calc(70 * var(--s)) rgba(1, 2, 1, .65), 0 0 calc(24 * var(--s)) rgba(1, 2, 1, .35);
  pointer-events: none;
  will-change: transform;
}

/* ==========================================================================
   4. How it works
   ========================================================================== */
.how {
  position: relative;
  background: var(--black);
  color: var(--white);
}
.how__intro { padding: calc(4 * var(--s)) var(--indent) 0; }
.how__title {
  margin-top: calc(90 * var(--s));
  font-size: max(30px, calc(95 * var(--s)));
  line-height: .958;
}
.how__body {
  max-width: calc(860 * var(--s));
  margin-top: calc(40 * var(--s));
  font: 300 max(16px, calc(26 * var(--s))) / 1.423 var(--f-sans);
  letter-spacing: .04em;
}

.equation {
  margin-top: calc(52 * var(--s));
  overflow: hidden;
}
/* pinned scroll scene (main.js sets .is-scene, the pin offset and the container
   height): the stack sticks while each band's layer slides up over the one before.
   Every band after the first gets a colour block running to the bottom of the
   screen, so a layer covers the previous one completely as it arrives. */
.eq-scene { position: relative; }
.eq-scene.is-scene .eq-row:not(:first-child)::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 100vh;
  height: 100lvh;
  background: inherit;
  pointer-events: none;
}
.eq-scene.is-scene .eq-row--total { overflow: visible; }
/* in the scene, UQ and its line ride on the yellow section's top edge: the real
   ones are hidden and a copy of the band (made by main.js, aria-hidden) sits just
   above the yellow, laid out exactly like the band and clipped at the yellow's
   edge so the Q's tail stays tucked under it */
.eq-scene.is-scene .eq-row--total > .eq-word,
.eq-scene.is-scene .eq-row--total > .eq-q { opacity: 0; } /* still read by screen readers */
.score > .uq-rider {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  background: none;
  pointer-events: none;
}
.score > .uq-rider[hidden] { display: none; }
.score > .uq-rider .eq-word svg { translate: none !important; transition: none !important; }
.eq-scene.is-scene .equation {
  position: sticky;
  top: var(--eq-pin, var(--header-h));
  overflow: visible;
  overflow-x: clip; /* bands travel in from below the stack */
}
.eq-row {
  position: relative;
  height: calc(219 * var(--s));
}
.eq-row--dark { background: var(--black); color: var(--red); }
.eq-row--red { background: var(--red); color: var(--black); }
.eq-row--total { overflow: hidden; }

.eq-word {
  position: absolute;
  left: calc(var(--edge) + 171 * var(--s));
  bottom: 0;
  width: calc(1000 * var(--s));
  line-height: 0;
  padding-top: 2%; /* headroom above the caps: the box doubles as the reveal mask */
  overflow: hidden;
}
.eq-word svg { width: 100%; height: auto; overflow: visible; }
.eq-word text {
  font-family: var(--f-sans);
  font-weight: 900;
  font-style: normal;
  font-size: 120px; /* SVG user units: 120/1000 of the word box */
  fill: currentColor;
}
/* UQ lock-up sits on the edge with the Q tail tucked under the next section */
.eq-word--logo {
  width: calc(276 * var(--s));
  bottom: calc(-14 * var(--s));
}
.eq-word--logo svg { fill: currentColor; }

.eq-q {
  position: absolute;
  left: calc(var(--edge) + 1231 * var(--s));
  top: 52%;
  max-width: max(220px, calc(520 * var(--s)));
  font: 400 max(15px, calc(26 * var(--s))) / 1.2 var(--f-sans);
  letter-spacing: .04em;
}
.eq-op {
  position: absolute;
  z-index: 2;
  left: calc(var(--edge) + 1020 * var(--s));
  bottom: 0;
  width: max(18px, calc(48 * var(--s)));
  height: max(18px, calc(48 * var(--s)));
  fill: var(--white);
  translate: -50% 50%; /* centred on the band edge; `scale`/`rotate` stay free for the drop-in */
}
.eq-op--equals {
  width: max(17px, calc(44 * var(--s)));
  height: max(11px, calc(29 * var(--s)));
}

/* ==========================================================================
   5. Get your score
   ========================================================================== */
.score {
  position: relative;
  z-index: 1; /* slides up over the equation's last layer */
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, calc(520 * var(--s)));
  column-gap: calc(140 * var(--s));
  padding: calc(280 * var(--s)) calc(var(--edge) + 150 * var(--s)) calc(310 * var(--s)) calc(var(--indent) - 3 * var(--s));
  background: var(--yellow);
  color: var(--black);
}
.score__title {
  font-size: max(40px, calc(129.75 * var(--s)));
  line-height: .94;
}
.score__aside { padding-top: calc(16 * var(--s)); }
.score__body {
  max-width: 30em;
  font: 300 max(16px, calc(26 * var(--s))) / 1.423 var(--f-grot);
  letter-spacing: .04em;
}
.score-form { margin-top: calc(124 * var(--s)); }
.score-form__label {
  display: block;
  margin-bottom: 8px;
  font: 900 max(16px, calc(28 * var(--s))) / 1 var(--f-sans);
  text-transform: uppercase;
}
.score-form__row {
  display: flex;
  align-items: center;
  gap: max(12px, calc(18 * var(--s)));
}
.score-form__input {
  width: calc(335 * var(--s));
  min-width: 0;
  flex: 0 1 auto;
  min-height: 46px;
  height: calc(69 * var(--s));
  padding: 0 max(14px, calc(24 * var(--s)));
  background: transparent;
  border: max(2px, calc(3 * var(--s))) solid var(--teal);
  border-radius: max(10px, calc(15 * var(--s)));
  font: 400 max(15px, calc(21 * var(--s))) / 1 var(--f-sans);
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--black);
  transition: border-color .2s, background-color .2s;
}
.score-form__input::placeholder { color: var(--black); opacity: 1; }
.score-form__input:focus { outline: none; background: rgba(255, 255, 255, .45); border-color: var(--black); }
.score-form__input[aria-invalid="true"] { border-color: var(--red); }
.score-form__submit {
  flex: none;
  display: grid;
  place-items: center;
  width: max(40px, calc(59 * var(--s)));
  height: max(40px, calc(59 * var(--s)));
  padding: 0;
  background: none;
  border: 0;
  color: var(--black);
  cursor: pointer;
}
.score-form__submit .icon {
  width: 100%;
  height: 100%;
  transform: rotate(90deg);
  transition: transform .3s var(--ease-out);
}
.score-form__submit:hover .icon, .score-form__submit:focus-visible .icon { transform: rotate(90deg) translate(14%, -14%); }

.form-status {
  min-height: 1.4em;
  margin-top: 12px;
  font: 500 max(14px, calc(18 * var(--s))) / 1.4 var(--f-sans);
}
.form-status:empty { min-height: 0; margin: 0; }
.form-status.is-error { color: var(--red); }
.score .form-status.is-error { color: #b0130d; }
/* "Sending…" is for screen readers; on screen the button's arrow spins instead */
.form-status.is-busy {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ==========================================================================
   6. Philly Top 20
   Back to front: skyline + teal arches (fixed layer; the arches parallax via
   main.js), the "UQ Top 20" panel, the skyscraper cut-out (fixed layer), then
   the headline panel. Fixed layers are clipped to the section by clip-path.
   Every layer is laid out on the same 16:9 "scene" sized like object-fit:
   cover, so the tower cut-out always sits exactly on the photo's tower.
   ========================================================================== */
.philly {
  --fx: .5; /* horizontal focus of the cover crop */
  --cover-w: max(100%, calc(100vh * 16 / 9));
  position: relative;
  z-index: 2; /* above the FAQ sticker art, which parallaxes "behind" its neighbours */
  background: var(--black);
  clip-path: inset(0);
}
@supports (height: 100lvh) {
  .philly { --cover-w: max(100%, calc(100lvh * 16 / 9)); }
}
.philly__layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  overflow: hidden;
  pointer-events: none;
}
html.menu-open .philly__layer { width: calc(100% - var(--sbw, 0px)); }
.philly__layer--back { z-index: 0; }
.philly__panel--top20 { z-index: 1; }
.philly__layer--front { z-index: 2; }
.philly__panel--cta { z-index: 3; }

.philly__scene,
.philly__stage {
  position: absolute;
  top: 50%;
  left: calc((100% - var(--cover-w)) * var(--fx));
  width: var(--cover-w);
  aspect-ratio: 16 / 9;
  transform: translateY(-50%);
}
.philly__photo,
.philly__photo img {
  display: block;
  width: 100%;
  height: 100%;
}
.philly__arches {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto; /* 1920x1157: the arch artwork, which runs a little below the frame */
  will-change: transform;
}
.philly__tower {
  position: absolute;
  top: 0;
  left: 62.7604%;
  width: 20.625%;
  height: 100%;
}

.philly__panel {
  position: relative;
  overflow: hidden;
  min-height: max(56.25vw, 100vh);
}
@supports (height: 100lvh) {
  .philly__panel { min-height: max(56.25vw, 100lvh); }
}
.philly__badge {
  position: absolute;
  left: 25.4688%; /* 489 / 1920 */
  top: 12.5926%;  /* 136 / 1080 */
  width: 42.5521%; /* 817 / 1920 */
}
.philly__badge img { width: 100%; }
/* soft shade behind the headline (baked into the comp frame); travels with the type */
.philly__panel--cta .philly__stage::before {
  content: "";
  position: absolute;
  left: 22%;
  top: 23%;
  width: 49.6%;
  height: 58.8%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .32), rgba(0, 0, 0, .18) 55%, rgba(0, 0, 0, 0));
  pointer-events: none;
}
.philly__content {
  position: absolute;
  left: 30.6%;
  top: 39.3%;
}
.philly__title {
  font-size: max(30px, calc(95 * var(--s))); /* longest line matches the comp's width */
  line-height: .96;
  text-transform: uppercase;
  color: var(--white);
}
.btn--philly {
  gap: max(16px, calc(34 * var(--s)));
  min-height: 52px;
  height: calc(111 * var(--s));
  margin: calc(34 * var(--s)) 0 0 calc(440 * var(--s));
  padding: 0 max(14px, calc(24 * var(--s))) 0 max(14px, calc(27 * var(--s)));
  background: var(--gold);
  color: var(--black);
  border: max(3px, calc(5 * var(--s))) solid var(--teal);
  border-radius: max(10px, calc(18 * var(--s)));
  font: 900 max(15px, calc(35 * var(--s))) / 1 var(--f-sans); /* matches the other yellow buttons */
}
.btn--philly .icon { font-size: max(24px, calc(56 * var(--s))); }

/* ==========================================================================
   7. FAQs + Contact
   ========================================================================== */
.fine-print {
  position: relative;
  padding: calc(160 * var(--s)) 0 calc(200 * var(--s)) var(--indent);
  background: var(--black);
  color: var(--white);
}
/* the U/Q art parallaxes against the type (see main.js). It moves slower than
   the page, so it reads as further back: it slides out from under the Philly
   section and back under the footer (both have z-index 2). */
.fine-print__art {
  position: absolute;
  z-index: 1;
  right: 0;
  top: calc(314 * var(--s));
  width: calc(780 * var(--s));
}
.fine-print__art img { width: 100%; will-change: transform; }

.faq, .contact {
  position: relative;
  max-width: calc(var(--edge) + 1140 * var(--s) - var(--indent) - 32px);
}
.faq .section-title, .contact .section-title { margin-top: calc(106 * var(--s)); }

.faq__list { margin-top: calc(80 * var(--s)); }
.faq__item + .faq__item { margin-top: max(18px, calc(37 * var(--s))); }
.faq__q button {
  display: flex;
  align-items: center;
  gap: max(10px, calc(12 * var(--s)));
  padding: 4px 0;
  background: none;
  border: 0;
  color: var(--gold);
  font: 500 max(15px, calc(24 * var(--s))) / 1.2 var(--f-sans);
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: color .2s;
}
.faq__q button:hover { color: var(--yellow); }
.faq__q .icon {
  width: max(14px, calc(22 * var(--s)));
  height: max(14px, calc(22 * var(--s)));
  color: var(--white);
  transition: transform .35s var(--ease-out);
}
.faq__q button[aria-expanded="true"] .icon { transform: rotate(90deg); }
.faq__a {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows .4s var(--ease-out);
}
.js .faq__item:not(.is-open) .faq__a { grid-template-rows: 0fr; }
.faq__a > div { overflow: hidden; }
.faq__a p {
  max-width: max(320px, calc(706 * var(--s)));
  padding: max(8px, calc(14 * var(--s))) 0 0 max(24px, calc(34 * var(--s)));
  font: 300 max(15px, calc(18 * var(--s))) / 1.25 var(--f-sans);
}

.contact { margin-top: calc(263 * var(--s)); }
.contact__body {
  max-width: calc(760 * var(--s) + 60px);
  margin-top: calc(48 * var(--s));
  font: 300 max(16px, calc(24 * var(--s))) / 1.54 var(--f-sans);
  letter-spacing: .04em;
}

.contact-form {
  max-width: max(320px, calc(720 * var(--s)));
  margin-top: calc(176 * var(--s));
}
.field + .field { margin-top: max(18px, calc(28 * var(--s))); }
.field label {
  display: block;
  margin-bottom: max(8px, calc(18 * var(--s)));
  font: 300 max(15px, calc(24 * var(--s))) / 1 var(--f-sans);
  text-transform: uppercase;
  color: var(--yellow);
}
.field input, .field textarea {
  display: block;
  width: 100%;
  min-height: 46px;
  height: calc(67 * var(--s));
  padding: 10px max(12px, calc(18 * var(--s)));
  background: transparent;
  border: 1px solid var(--white);
  border-radius: 0;
  font: 400 max(16px, calc(22 * var(--s))) / 1.3 var(--f-sans);
  color: var(--white);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { height: calc(142 * var(--s)); min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}
.field [aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn--send {
  margin-top: max(24px, calc(40 * var(--s)));
  height: calc(86 * var(--s));
  font-size: max(15px, calc(28 * var(--s)));
}
.btn--send .icon { font-size: max(22px, calc(40 * var(--s))); }
.btn--send[disabled] { opacity: .6; cursor: progress; }
.btn.is-busy { opacity: 1; cursor: progress; }
.btn.is-busy .icon { animation: spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .btn.is-busy .icon { animation-duration: 2s; } }
@keyframes spin { to { transform: rotate(360deg); } }
.contact-form .form-status.is-ok { color: var(--teal); }

/* ==========================================================================
   Report download modal
   ========================================================================== */
html.modal-open { overflow: hidden; }
html.modal-open body { padding-right: var(--sbw, 0px); }
.report-modal {
  width: min(940px, calc(100vw - 48px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  background: var(--black);
  color: var(--white);
  border: 0;
  border-top: 8px solid var(--red);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.report-modal::backdrop {
  background: rgba(0, 0, 0, .72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
@media (prefers-reduced-motion: no-preference) {
  .report-modal[open] { animation: modal-in .45s var(--ease-out); }
  .report-modal[open]::backdrop { animation: backdrop-in .3s ease-out; }
}
@keyframes modal-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes backdrop-in { from { opacity: 0; } }
.report-modal__inner { position: relative; padding: 48px 56px 44px; }
.report-modal .tag { margin-left: 0; }
.report-modal__title {
  margin-top: 22px;
  font: 900 clamp(34px, 5.6vw, 58px) / .96 var(--f-sans);
  text-transform: uppercase;
}
/* name / company / email side by side on wider screens */
.report-form__fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.report-form__fields .field + .field { margin-top: 0; }
.report-modal__intro {
  margin: 14px 0 26px;
  font: 300 17px / 1.5 var(--f-sans);
  letter-spacing: .03em;
}
.report-form .field input { height: 52px; }
.report-form__submit,
.report-modal__done .btn { height: 60px; gap: 20px; margin-top: 30px; font-size: 17px; }
.report-modal .btn .icon { font-size: 26px; } /* the hero CTA's arrow is sized for a much bigger button */
.report-modal__done .btn { margin-top: 4px; }
.report-modal__done[hidden], .report-form[hidden] { display: none; }
.report-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--white);
  cursor: pointer;
  transition: color .2s, transform .3s var(--ease-out);
}
.report-modal__close svg { width: 24px; height: 24px; }
.report-modal__close:hover, .report-modal__close:focus-visible { color: var(--yellow); transform: rotate(90deg); }
.report-form .form-status.is-error { color: var(--yellow); }
@media (max-width: 760px) {
  .report-modal__inner { padding: 32px 20px 24px; }
  .report-form__fields { grid-template-columns: 1fr; gap: 18px; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  position: relative;
  padding-top: calc(71 * var(--s));
  z-index: 2;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(180deg, #000 0%, #000 11%, #e72c25 108%);
}
.site-footer__logo {
  width: max(130px, calc(257 * var(--s)));
  margin: 0 auto;
}
.site-footer__links {
  display: flex;
  justify-content: center;
  gap: max(28px, calc(205 * var(--s)));
  margin-top: calc(188 * var(--s));
  padding-left: calc(80 * var(--s));
}
.site-footer__links a {
  font: 300 max(15px, calc(36.6 * var(--s))) / 1 var(--f-sans);
  text-transform: uppercase;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 4px;
  transition: background-size .35s var(--ease-out);
}
.site-footer__links a:hover, .site-footer__links a:focus-visible { background-size: 100% 1px; }
.site-footer__onward {
  width: 100%;
  height: auto;
  margin-top: calc(118 * var(--s));
  overflow: hidden;
}
.site-footer__onward text {
  font-family: var(--f-grot);
  font-weight: 900;
  font-size: 425.7px;
  fill: var(--black);
}

/* ==========================================================================
   Scroll reveals (only when JS is running)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(48px);
    transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }

  /* arch grid: each arch opens like a shade, top to bottom, in a cascade down
     the grid (--n = 0..1 order); inside, the city settles from a bright,
     zoomed-in exposure, like its lights coming on */
  .js [data-reveal="arches"] { opacity: 1; transform: none; }
  .js .arch-tile {
    clip-path: inset(0 0 100% 0);
    transition: clip-path 1.5s cubic-bezier(.7, 0, .2, 1) calc(var(--n) * 1.8s);
  }
  .js .arch-tile::before {
    transform: scale(1.28) translateY(-6%);
    filter: brightness(1.55) saturate(.55);
    transition:
      transform 2.6s cubic-bezier(.16, .84, .3, 1) calc(var(--n) * 1.8s),
      filter 2s ease-out calc(var(--n) * 1.8s + .2s);
  }
  .js .arch-tiles.is-in .arch-tile { clip-path: inset(0); }
  .js .arch-tiles.is-in .arch-tile::before { transform: none; filter: none; }

  /* equation rows: each word rises out of the band edge it sits on (its own
     box is the mask), and the + / = drops in from the foreground. In the pinned
     scene a band's word rises as it lands, and the sign on the seam above it
     drops when it lands (.op-in, set by main.js). */
  .js [data-reveal="row"] { opacity: 1; transform: none; }
  .js .eq-row .eq-word svg {
    translate: 0 105%;
    transition: translate 1.1s var(--ease-out) var(--d, 0ms);
  }
  .js .eq-row.is-in .eq-word svg { translate: none; }
  .js .eq-row .eq-op {
    opacity: 0;
    scale: 1.7;
    rotate: -8deg;
    filter: blur(3px);
    transition:
      opacity .3s ease-out,
      scale .65s cubic-bezier(.3, 1.25, .5, 1),
      rotate .65s var(--ease-out),
      filter .35s ease-out;
    transition-delay: calc(var(--d, 0ms) + .5s);
  }
  .js .eq-scene:not(.is-scene) .eq-row.is-in .eq-op,
  .js .eq-scene.is-scene .eq-row.op-in .eq-op { opacity: 1; scale: 1; rotate: 0deg; filter: none; }
  .js .eq-scene.is-scene .eq-op { transition-delay: .05s; }
  .js .eq-scene.is-scene .eq-row:not(:first-child) .eq-word svg { transition-delay: 0s; }
  /* in the scene, ENRICHMENT, EDGE and UQ (and their questions) arrive on the next
     layer, so they're shown whole; EMPATHY rises as the section enters */
  .js .eq-scene.is-scene .eq-row:not(:first-child) .eq-word svg { translate: none; transition: none; }
  /* the questions are locked to their strips too: shown whole, no line-by-line rise */
  .js .eq-scene.is-scene .eq-row:not(:first-child) .eq-q .w__i { transform: none; transition: none; }

  /* line-by-line type: main.js wraps each word in .w > .w__i and sets
     --i (its line) on the word and --d (cascade offset) on the block.
     The mask's padding/negative margin give descenders and tight tracking
     room without changing the layout. */
  .js [data-lines] .w {
    display: inline-block;
    vertical-align: top;
    overflow: hidden;
    padding: .1em .06em .2em;
    margin: -.1em -.06em -.2em;
  }
  .js [data-lines] .w__i {
    display: inline-block;
    transform: translateY(calc(100% + .45em)); /* fully below the mask, incl. its padding and tall glyphs */
    transition: transform 1s var(--ease-out);
    transition-delay: calc(var(--d, 0ms) + var(--i, 0) * 90ms);
  }
  .js [data-lines].is-in .w__i { transform: none; }
  /* softer variant for type with a big text-shadow (a mask would clip it) */
  .js [data-lines="fade"] .w { overflow: visible; }
  .js [data-lines="fade"] .w__i {
    opacity: 0;
    transform: translateY(.45em);
    transition-property: transform, opacity;
  }
  .js [data-lines="fade"].is-in .w__i { opacity: 1; transform: none; }

  /* reset instantly when scrolled back off-screen, so it can play again */
  .no-anim, .no-anim *, .no-anim *::before { transition: none !important; }
}

/* ==========================================================================
   Tablet tweaks
   ========================================================================== */
@media (max-width: 1100px) {
  .fine-print__art { width: calc(680 * var(--s)); }

  .score { display: block; }
  .score__aside { max-width: 560px; margin-top: 48px; padding-top: 0; }
  .score-form__input { width: 320px; }
}

/* ==========================================================================
   Phones
   ========================================================================== */
@media (max-width: 699px) {
  :root {
    --indent: 20px;
    --tag-x: 20px;
    --header-h: 56px;
  }

  /* hero */
  .hero { height: min(100svh, 190vw); min-height: 560px; }
  /* phones: the portrait cut fills the hero */
  .hero__media img, .hero__video {
    inset: 0;
    height: 100%;
    aspect-ratio: auto;
    object-position: 50% 0;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .hero__inner {
    bottom: 36px;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 0 20px;
  }
  .hero__title { font-size: calc((100vw - 40px) / 11.2); }
  .btn--cta { height: 64px; font-size: 16px; gap: 22px; }
  .btn--cta .icon { font-size: 28px; }

  /* what is it */
  .what { padding: 56px 20px 64px; }
  .what__title { margin: 32px 0 0; font-size: calc((100vw - 40px) / 9.4); }
  .what__body { max-width: none; margin-top: 28px; font-size: 17px; }

  /* stand */
  .stand { display: block; padding-top: 32px; }
  .stand__media { width: 84%; margin-left: auto; }
  .stand__title {
    position: relative;
    margin: -40% 20px 0;
    font-size: min(36px, 8.6vw);
  }
  .stand__title .line { white-space: normal; }

  /* how */
  .how__intro { padding-top: 64px; }
  .how__title { margin-top: 28px; font-size: 34px; }
  .how .line { display: inline; white-space: normal; }
  .how__body { max-width: none; margin-top: 20px; font-size: 17px; }
  .equation { margin-top: 48px; }
  .eq-row {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: auto;
    min-height: 150px;
    padding: 22px 20px 0;
  }
  .eq-q {
    order: -1;
    position: static;
    max-width: 78%;
    font-size: 15px;
    transform: none;
    margin-bottom: 18px;
  }
  .eq-word {
    position: relative;
    left: auto;
    bottom: auto;
    width: calc((100vw - 40px) / 6.6 * 1000 / 120);
    margin-top: auto;
  }
  .eq-word--logo { width: 30vw; margin-bottom: -2.4vw; }
  .eq-op { left: auto; right: 20px; translate: 0 50%; width: 26px; height: 26px; }
  .eq-op--equals { width: 24px; height: 16px; }

  /* score */
  .score { display: block; padding: 96px 20px 104px; }
  .score__title { font-size: calc((100vw - 40px) / 7.4); }
  .score__aside { margin-top: 32px; padding: 0; }
  .score__body { font-size: 17px; }
  .score-form { margin-top: 36px; }
  .score-form__input { flex: 1 1 auto; width: auto; }

  /* faq + contact */
  .fine-print { display: flex; flex-direction: column; padding: 64px 20px 72px; }
  .faq, .contact { max-width: none; }
  .faq { order: 1; }
  .fine-print__art {
    order: 2;
    position: relative;
    top: auto;
    width: 62%;
    height: 92vw;
    margin: 56px -20px 0 auto;
    overflow: hidden;
  }
  .contact { order: 3; margin-top: 48px; }
  .faq .section-title, .contact .section-title { margin-top: 28px; font-size: min(36px, 9.4vw); }
  .section-title .line { white-space: normal; }
  .faq__list { margin-top: 36px; }
  .contact__body { max-width: none; margin-top: 20px; font-size: 17px; }
  .contact-form { margin-top: 36px; max-width: none; }

  /* footer */
  .site-footer { padding-top: 48px; }
  .site-footer__links { flex-direction: column; gap: 22px; margin-top: 48px; padding: 0; }
  .site-footer__links a { font-size: 18px; }
  .site-footer__onward { margin-top: 56px; }
}

/* Philly on phones and portrait tablets: centred badge, headline at the bottom */
@media (max-width: 699px), (orientation: portrait) and (max-width: 1100px) {
  .philly { --fx: .55; } /* tower at the right edge, so only the Q tail and the 0 tuck behind it */
  .philly__arches { left: 25%; } /* slide the arches right so the staircase (right three columns) is in the narrow crop */
  .philly__panel { display: flex; align-items: center; justify-content: center; }
  .philly__panel--top20 .philly__stage,
  .philly__panel--cta .philly__stage {
    position: static;
    width: 100%;
    aspect-ratio: auto;
    transform: none;
  }
  .philly__badge { position: static; display: block; width: min(84%, 620px); margin: 0 auto; }
  .philly__panel--cta .philly__stage::before {
    left: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    height: 75%;
    background: linear-gradient(to top, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
  }
  .philly__content { left: var(--indent); right: var(--indent); top: auto; bottom: 40px; }
  .philly__title { font-size: min(calc((100vw - 40px) / 6.4), 96px); }
  .btn--philly { height: 64px; margin: 24px 0 0; font-size: 17px; }
  .btn--philly .icon { font-size: 30px; }
}

@media (max-width: 380px) {
  .site-header__wordmark { width: 132px; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  /* no fixed layers or parallax: each panel shows the comp's own still frame */
  .philly { clip-path: none; }
  .philly__layer { display: none; }
  .philly__panel { background: 50% 50% / cover no-repeat; }
  .philly__panel--top20 {
    background-image: url("../img/philly-still-top20.jpg?v=5");
    background-image: image-set(url("../img/philly-still-top20.webp?v=5") type("image/webp"), url("../img/philly-still-top20.jpg?v=5") type("image/jpeg"));
  }
  .philly__panel--top20 .philly__badge { visibility: hidden; } /* already in the still */
  .philly__panel--cta {
    background-image: url("../img/philly-still.jpg?v=2");
    background-image: image-set(url("../img/philly-still.webp?v=2") type("image/webp"), url("../img/philly-still.jpg?v=2") type("image/jpeg"));
  }
}
@media (prefers-reduced-motion: reduce) and (max-width: 699px), (prefers-reduced-motion: reduce) and (orientation: portrait) and (max-width: 1100px) {
  .philly__panel { background-position: 62% 50%; }
  /* the Top 20 still would crop the letters on a narrow screen: plain skyline + the letters instead */
  .philly__panel--top20 {
    background-image: url("../img/philly-still.jpg?v=2");
    background-image: image-set(url("../img/philly-still.webp?v=2") type("image/webp"), url("../img/philly-still.jpg?v=2") type("image/jpeg"));
  }
  .philly__panel--top20 .philly__badge { visibility: visible; }
}
