/*
  State of Innovation — report page (local design review).

  Mobile values come straight from the 402px Figma frame (326:9). The desktop end of
  each scale is a proposed interpretation at 1728px. Between them, sizes interpolate
  linearly (clamp), and layouts change where the content needs it (container queries),
  not at a single device breakpoint.
*/

@font-face { font-family: "ABC Diatype"; src: url("/assets/fonts/ABCDiatype-Thin.woff2") format("woff2"); font-weight: 100; font-display: swap; }
@font-face { font-family: "ABC Diatype"; src: url("/assets/fonts/ABCDiatype-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "ABC Diatype"; src: url("/assets/fonts/ABCDiatype-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "ABC Diatype"; src: url("/assets/fonts/ABCDiatype-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "ABC Diatype"; src: url("/assets/fonts/ABCDiatype-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --black: #000;
  --card: #141414;
  --heading: #f5f6f2;
  --muted: #a5a5a5;
  --white-50: rgb(255 255 255 / 0.5);
  --white-40: rgb(255 255 255 / 0.4);
  --up: #31bb4d;
  --down: #fea32c;
  --glass-tint: rgb(1 122 219 / 0.3);

  /* 402px → 1728px scales: value = intercept + slope·vw */
  --gutter: clamp(16px, 1.45px + 3.62vw, 64px);
  --section-y: 120px;
  --title: clamp(40px, 23.4px + 5.128vw, 104px);
  --h2: clamp(28px, 24.7px + 1.81vw, 56px);
  --body: clamp(16px, 15.4px + 0.151vw, 18px);
  --stat: clamp(44px, 35.9px + 3.02vw, 88px);
  --card-title: clamp(16px, 14.8px + 0.302vw, 20px);
  --card-text: clamp(12px, 11.1px + 0.226vw, 15px);
  --card-pad: clamp(20px, 16.4px + 0.905vw, 32px);
  --content-max: 1600px;
}

* { box-sizing: border-box; }
html { background: var(--black); }
body {
  margin: 0;
  background: var(--black);
  color: #fff;
  font-family: "ABC Diatype", "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  font-size: var(--body);
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { display: block; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Figma trims body text boxes to cap height (Diatype cap = 0.70em, centred). */
.trim { margin-block: calc((0.7em - 1lh) / 2); }

.wrap { width: 100%; max-width: var(--content-max); margin-inline: auto; container-type: inline-size; }
.section { padding: var(--section-y) var(--gutter); background: var(--black); }
:where(.section) h2 { margin: 0; }
.section h2 {
  font-size: var(--h2);
  font-weight: 500;
  line-height: 1.156;          /* 37px at 32px */
  letter-spacing: -0.01em;
  color: var(--heading);
}
:where(.section) p { margin: 0; }
.prose { max-width: 560px; line-height: 1; }

/* ---------- Ribbon art (shared by hero + footer) ---------- */
.has-ribbon { position: relative; overflow: hidden; isolation: isolate; }
.ribbon {
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  bottom: 0;
  aspect-ratio: 16 / 9;        /* desktop: full width, bottom-anchored (as the countdown) */
  pointer-events: none;
}
.ribbon img,
.ribbon video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
}
.ribbon video { opacity: 0; transition: opacity 0.6s ease; }
.ribbon video.is-visible { opacity: 1; }
@media (max-aspect-ratio: 5/8) {
  /* Phone-shaped screens: the 402×874 composition the Figma uses, scaled with width,
     bottom-anchored. Wider screens (incl. portrait tablets) use the full 16:9 art. */
  .ribbon { aspect-ratio: 402 / 874; }
}

/* ---------- Glass (WebGL lens drawn by report-glass.js) ---------- */
.glass { position: relative; }
.glass > canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: inherit; pointer-events: none;
}
.glass { background: rgb(0 0 0 / 0.55); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16); }
.glass-pending .glass { background: var(--glass-tint); box-shadow: none; }
.glass.is-glass { background: transparent; box-shadow: none; }

/* ---------- Hero ---------- */
.hero {
  min-height: max(620px, 88svh);      /* 770 of 874 on the Figma phone */
  display: flex;
  flex-direction: column;
  padding: 24px var(--gutter) clamp(32px, 22.3px + 2.41vw, 64px);
}
.hero-inner { container-type: inline-size; flex: 1; display: flex; flex-direction: column; width: 100%; max-width: var(--content-max); margin-inline: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mini-logos { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: clamp(20.6px, 18.5px + 0.53vw, 28px); }
.mini-logos a { display: block; }
.mini-logos img { width: auto; }
.mini-logos .l-geekdom  { height: clamp(25px, 23.1px + 0.47vw, 31px); }
.mini-logos .l-port     { height: clamp(32px, 29.6px + 0.6vw, 40px); }
.mini-logos .l-techbloc { height: clamp(31px, 28.7px + 0.58vw, 39px); }
.mini-logos .l-velocity { height: clamp(36px, 33.3px + 0.68vw, 45px); }

.motion-toggle {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.motion-toggle svg { position: relative; width: 24px; height: 24px; }
.motion-toggle .icon-play { display: none; }
.motion-toggle[data-state="paused"] .icon-play { display: block; }
.motion-toggle[data-state="paused"] .icon-pause { display: none; }

.space-a { flex: 160 1 0; min-height: 40px; }
.space-b { flex: 244 1 0; min-height: 48px; }

.title {
  margin: 0;
  font-size: var(--title);
  font-weight: 400;
  line-height: 0.9;            /* 39px at 44px */
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.title > span:not(.sr-only) { display: block; }
.title .year { font-weight: 100; color: var(--muted); }
.subtitle { margin-top: 16px; max-width: clamp(294px, 196px + 24.4vw, 520px); font-size: clamp(16px, 13.6px + 0.6vw, 24px); line-height: 1; }

/* ---------- Download form (hero + footer) ---------- */
.download { width: min(100%, 440px); }
.download-title { margin: 0 0 13px; font-weight: 300; line-height: 0.99; }
/* Figma 326:337: first + last name side by side above the email field, 13px apart. */
.download-fields { display: flex; flex-direction: column; gap: 13px; }
.name-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 13px; }
.field {
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 12px;
}
.field:focus-within { outline: 2px solid #fff; outline-offset: 3px; }
/* Invalid / missing email: red outline instead of a message. */
.field:has(input[aria-invalid="true"]) { outline: 2px solid #ff4d4f; outline-offset: 3px; }
.field svg { position: relative; flex: none; width: 24px; height: 24px; }
.field input {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  font-weight: 400;
  color: #fff;
  outline: none;
}
.field input::placeholder { color: var(--white-40); opacity: 1; }
.field button {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #000;
  cursor: pointer;
}
.field button:focus-visible { outline-offset: 2px; }
.field button[aria-busy="true"] svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Messages sit on a dark chip so they stay readable over any frame of the ribbon. */
.download-msg {
  display: none;
  margin-top: 10px;
  width: fit-content;
  max-width: 100%;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.72);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
}
.download-msg:not(:empty) { display: block; }
/* Error text is announced, not shown (the field outline turns red instead). */
.download-msg.is-error { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.download-msg.is-error::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--down); vertical-align: 1px; }
.download-msg a { font-weight: 500; }
.download.is-done .field { display: none; }

/* ---------- Presented by ---------- */
.consortium .eyebrow { margin-bottom: 12px; color: rgb(255 255 255 / 0.75); }
.consortium .logos-strip { margin-top: 44px; }

/* ---------- Logo strips (consortium + sponsors) ----------
   They scroll as a slow marquee only when they don't fit (report.js decides). */
.strip {
  margin-inline: calc(-1 * var(--gutter));
  overflow: hidden;
}
.strip-track {
  list-style: none;
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--strip-gap, 44px);
  width: max-content;
  padding-inline: var(--gutter);
}
.strip.is-marquee .strip-track {
  padding-inline: 0;
  animation: marquee var(--marquee-dur, 40s) linear infinite;
}
@keyframes marquee { to { transform: translateX(calc(-1 * var(--marquee-shift, 50%))); } }
.motion-paused .strip.is-marquee .strip-track { animation-play-state: paused; }
.strip img { flex: none; width: auto; }
.partner-logos { --strip-gap: 44px; }
.partner-logos img { height: calc(var(--h) * 1.8); }
.partner-logos a { display: block; border-radius: 4px; }
.partner-logos a img { transition: transform 0.25s ease-out; }
.partner-logos a:hover img { transform: scale(1.04); }

/* Cursor: a soft white circle everywhere (mouse devices only). ~24px normally, 72px over
   anything clickable. report.js moves it and moves it into the modal when that's open. */
.cursor-dot {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.22);
  pointer-events: none;
  opacity: 0;
  transform: translate3d(var(--x, -100px), var(--y, -100px), 0) scale(0.33);
  transition: opacity 0.2s ease, transform 0.2s ease-out, background-color 0.2s ease;
}
.cursor-dot.is-on { opacity: 1; }
/* Over clickables the dot keeps its size and turns transparent blue. */
.cursor-dot.is-hover { background: rgb(1 122 219 / 0.6); }
@media (hover: hover) and (pointer: fine) {
  html.has-cursor, html.has-cursor * { cursor: none !important; }
}
.sponsor-logos { --strip-gap: clamp(44px, 36px + 2vw, 72px); }
.sponsor-logos img { height: var(--h); }

/* ---------- Quote ---------- */
.quote { background: var(--black); }
/* Mobile: 32px between a section headline and its body copy. */
.quote figure { margin-top: 32px; }
.quote blockquote { margin: 0; }
.quote blockquote .prose { margin-top: 0; font-size: clamp(16px, 13.6px + 0.6vw, 24px); }
.quote h2 > span:not(.sr-only) { display: block; }
.quote figcaption { margin-top: 24px; }

/* ---------- Inside the Report ---------- */
/* Background band ("Midwave", Figma 326:495). Section content sits above it (z 1); the
   band (z 0) paints over the section backgrounds, so it can bleed into the sections
   above and below without being cut off, but never covers any content.
   Size: 1480px wide on a 402px phone as in Figma, growing to 115vw on wide screens.
   Position: the band (28.5–91.5% of the image height, centre 60%) sits a little above
   the centre of the stat cards (Figma: 0.08 × image height above), via --stats-mid. */
.section > .wrap { position: relative; z-index: 1; }
.inside { position: relative; overflow-x: clip; }
.midwave {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: var(--stats-mid, 62%);
  width: max(1480px, 115vw);
  transform: translate(-50%, -68%);
  pointer-events: none;
}
.midwave img { width: 100%; height: auto; }
.inside .intro { margin-top: 32px; color: rgb(255 255 255 / 0.75); }
.stats {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 24px;
}
.stat {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: var(--card-pad);
  border-radius: 2px;
  background: var(--card);
}
.stat-value { order: 1; margin: 0; font-size: var(--stat); font-weight: 500; line-height: 0.917; letter-spacing: -0.02em; }
.stat-value.trim { margin-block: calc((0.7em - 1lh) / 2); }
/* Equal-width figures + a locked width: the reveal never moves the layout. */
.stat-count { display: inline-block; white-space: nowrap; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.stat-meta {
  order: 2;
  margin: 16px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--white-50);
}
.stat-meta .change { display: inline-flex; align-items: center; gap: 3px; }
.stat-meta .change svg { width: 10px; height: 10px; }
.change.up { color: var(--up); }
.change.down { color: var(--down); }
/* Screen readers get the title first; visually it sits at the foot of the card (Figma). */
.stat h3 { order: 3; margin: auto 0 0; padding-top: 60px; font-size: var(--card-title); font-weight: 700; line-height: 1.37; letter-spacing: -0.01em; }
.stat-body { order: 4; }
.stat-desc { margin: 4px 0 0; color: rgb(255 255 255 / 0.75); max-width: 34em; font-size: var(--card-text); font-weight: 400; line-height: 1.37; letter-spacing: -0.01em; }

/* ---------- greater:SATX ---------- */
.greater .badge {
  position: relative;
  width: clamp(167px, 125px + 10.4vw, 300px);
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 50%;
  background: url("/report/assets/greater-circle.png") center / cover;
  display: grid;
  place-items: center;
}
.greater .badge img { width: 52.7%; height: auto; }
.greater h2 { margin-top: 24px; }
.greater .prose { margin-top: 32px; color: rgb(255 255 255 / 0.75); }

/* ---------- Sponsors ---------- */
.sponsors .strip { margin-top: 44px; }

/* ---------- Footer ---------- */
.closing {
  min-height: clamp(429px, 389px + 9.88vw, 600px);
  display: flex;
  align-items: flex-end;
  padding: 32px var(--gutter) clamp(32px, 22.3px + 2.41vw, 64px);
}
.closing .wrap { container-type: normal; }
/* The closing section (which owns the floating download field) sits above all page
   content, so the floating field is always in front. */
.closing { z-index: 2; }
/* Figma 326:653: the report title, then the download form below it, at the bottom left. */
.closing { padding-block: clamp(32px, 22.3px + 2.41vw, 64px); }
.closing-title { margin-bottom: clamp(35px, 30px + 1.2vw, 56px); }
/* With the full-width 16:9 art, the section is at least as tall as the video frame,
   so the ribbon is never cut off at the top. */
@media (min-aspect-ratio: 5/8) {
  .closing { min-height: max(clamp(429px, 389px + 9.88vw, 600px), 56.25vw); }
}

/* Floating download shortcut: an email-style bar centred 16px above the bottom of the
   screen, shown between the hero form and the footer form (report.js toggles is-shown).
   Tapping it goes to the footer form. Backdrop glass, so the page shows through it. */
.float-dl {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(440px, calc(100vw - 2 * var(--gutter)));
  transform: translateX(-50%);
  border: 0;
  color: #fff;
  text-align: left;
  cursor: pointer;
  background: var(--glass-tint);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  backdrop-filter: blur(16px) saturate(1.6);
  box-shadow: inset 1px 1px 0 rgb(255 255 255 / 0.35), inset -1px -1px 0 rgb(255 255 255 / 0.12);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}
.float-dl.is-shown { opacity: 1; visibility: visible; }
.float-dl:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.float-dl-text { flex: 1; min-width: 0; font-weight: 400; color: var(--white-40); }
.float-dl-go {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  color: #000;
}

/* ---------- Two-column layouts once there's room for them ---------- */
@container (min-width: 880px) {
  .split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: end; }
  .consortium .split > .heading { grid-column: 1 / span 5; }
  .consortium .split > .logos-strip { grid-column: 7 / -1; margin-top: 0; align-self: start; }
  .consortium .strip { margin-inline: 0; }
  .consortium .strip:not(.is-marquee) .strip-track { padding-inline: 0; margin-left: auto; }
  /* Scale the partner logos with their half-width column so they always fit (no marquee).
     (50cqw − 144px) ÷ 275px = scale at which the four logos plus gaps fill the column. */
  .partner-logos img { height: clamp(calc(var(--h) * 1.05), calc((50cqw - 144px) * var(--r)), calc(var(--h) * 1.8)); }

  .quote .split > h2 { grid-column: 1 / span 6; align-self: start; }
  .quote .split > figure { grid-column: 8 / -1; margin-top: 0; }

  .inside .split > h2 { grid-column: 1 / span 6; }
  .inside .split > .intro { grid-column: 8 / -1; margin-top: 0; }

  .greater .split { align-items: center; }
  .greater .split > .badge { grid-column: 1 / span 4; margin: 0; }
  .greater .split > .text { grid-column: 6 / span 6; }
  .greater h2 { margin-top: 0; }
  .greater .prose { margin-top: 24px; }

  .prose, .subtitle, .stat-desc { line-height: 1.25; }
}
@container (min-width: 840px) {
  /* Three across; a shared row grid keeps numbers, titles and descriptions aligned. */
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto 1fr auto auto; margin-top: clamp(24px, 4vw, 64px); }
  .stat { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; min-height: clamp(220px, 22vw, 360px); }
  .stat-value { grid-row: 1; }
  .stat-meta { grid-row: 2; align-self: start; }
  .stat h3 { grid-row: 4; margin-top: 0; }
  .stat-body { grid-row: 5; }
}

@media (min-aspect-ratio: 1/1) and (min-width: 768px) {
  /* Desktop: the hero fills the screen, like the countdown composition. */
  .hero { min-height: max(640px, 100svh); }
}

/* Mobile: Figma's left-aligned stack. The greater badge is centred as drawn. */
.figure-reset { margin: 0; }


/* ---------- Details modal (opens after the email step) ---------- */
.details {
  width: min(480px, calc(100vw - 2 * var(--gutter)));
  max-width: none;
  max-height: calc(100svh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  overflow: visible;
}
.details::backdrop {
  background: rgb(0 0 0 / 0.72);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}
.details-panel {
  position: relative;
  max-height: calc(100svh - 32px);
  overflow: auto;
  border-radius: 28px;
  padding: clamp(24px, 20px + 1vw, 36px);
}
.details-panel > :not(canvas) { position: relative; }
.details[open] .details-panel { animation: details-in 0.5s ease-out backwards; }  
@keyframes details-in { from { opacity: 0; transform: translateY(12px); filter: blur(10px); } }
.details-title { margin: 0 48px 0 0; font-size: clamp(28px, 24.7px + 0.81vw, 36px); font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; color: var(--heading); }
.details-sub { margin: 12px 0 0; font-size: 16px; line-height: 1.25; color: rgb(255 255 255 / 0.75); }
.details-submit {
  height: 48px;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-weight: 500;
  cursor: pointer;
}
.details-submit svg { width: 24px; height: 24px; }
.details-done { display: flex; flex-direction: column; gap: 0; outline: none; }
.details-done .details-submit { margin-top: 28px; }
.details-close {
  position: absolute !important;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.08);
  color: #fff;
  cursor: pointer;
}
.details-close svg { width: 22px; height: 22px; }
html.modal-open { overflow: hidden; }
.details [hidden] { display: none; }

/* ---------- Blur In (blur-in.js): ONONC Blur In Text values ---------- */
.blur-in-pending [data-blur-in],
.blur-in-pending [data-blur-in-block],
.blur-in-pending [data-blur-in-items] { visibility: hidden; }
.bi-word,
.bi-block,
.bi-item,
.stat-meta.meta-wait {
  opacity: 0;
  transform: translateY(12px);
  filter: blur(10px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out, filter 0.5s ease-out;
}
.bi-word { display: inline-block; }
.bi-in .bi-word,
.bi-in .bi-item,
.bi-block.bi-in,
/* End states use filter: none (not blur(0)): Safari keeps a filtered element as a cached,
   low-resolution layer, which made logos inside the moving marquee look soft. */
.stat-meta.meta-wait.meta-in { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  .ribbon video { transition: none; }
  .cursor-dot { transition: opacity 0.2s ease; }
  .partner-logos a img { transition: none; }
  .details[open] .details-panel { animation: none; }
  .float-dl { transition: none; }
  .strip { overflow-x: auto; }
  .strip-track { animation: none !important; }
  .field button[aria-busy="true"] svg { animation: none; }
}
