/* Gen5Bridges — hand-written stylesheet (no framework)
   Brand: deep ink surface + gold accent + warm paper.
   One memorable device: the five-arch "bridge" motif (five generations, one team). */

:root {
  --ink: hsl(220 20% 12%);
  --ink-raise: hsl(220 18% 16%);
  --ink-line: hsl(40 20% 92% / 0.1);
  --ink-text: hsl(40 20% 92%);
  --ink-text-dim: hsl(40 15% 75%);
  --paper: hsl(45 33% 96%);
  --paper-card: hsl(45 40% 99%);
  --graphite: hsl(220 9% 33%);
  --graphite-dim: hsl(220 7% 42%);
  --line: hsl(45 12% 82%);
  --gold: hsl(47 99% 60%);
  --gold-deep: hsl(40 95% 47%);
  /* Text-safe amber for paper: 5.3:1 on --paper — passes small-text AA
     (kickers at 12px) as well as large display text. */
  --gold-text: hsl(32 85% 32%);
  --radius: 14px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Motion: strong curves. The built-in `ease` reads sluggish — entries use a
     fast-start ease-out so the page answers immediately (apple-design §1). */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-head {
    background: hsl(220 20% 12% / 0.97);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-optical-sizing: auto;
  background: var(--paper);
  color: var(--graphite);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }

/* ---------- header: one floating frosted pill — logo + language ---------- */
.site-head {
  position: fixed;
  top: 18px;
  /* centered pill without translateX: left/right 0 + auto margins keeps the
     shrink-to-fit budget at the full viewport width (left:50% would cap it at
     half, squashing the logo on phones) */
  left: 0;
  right: 0;
  margin-inline: auto;
  /* a proper bar, not a tight capsule: a fixed span with the logo and the
     language switcher spread end to end */
  width: min(600px, calc(100vw - 32px));
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 10px 7px 20px;
  border-radius: 999px;
  background: hsl(220 20% 12% / 0.72);
  border: 1px solid hsl(40 20% 92% / 0.14);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: 0 10px 30px hsl(220 25% 8% / 0.35);
  animation: pill-drop 0.7s var(--ease-out) 0.1s backwards;
  transition: padding 0.4s var(--ease-out), background 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out), border-color 0.4s var(--ease-out),
    backdrop-filter 0.4s var(--ease-out), transform 0.4s var(--ease-out),
    opacity 0.35s var(--ease-out);
}
.site-head:hover { transform: translateY(-1px); border-color: hsl(40 20% 92% / 0.26); }

/* scroll-reactive states (classes toggled by app.js) */
.site-head.scrolled {
  padding: 4px 8px 4px 16px;
  background: hsl(220 20% 12% / 0.92);
  backdrop-filter: blur(26px) saturate(1.8);
  -webkit-backdrop-filter: blur(26px) saturate(1.8);
  box-shadow: 0 14px 40px hsl(220 25% 8% / 0.5);
  border-color: hsl(40 20% 92% / 0.22);
}
.site-head.scrolled .logo img { height: 24px; }
/* hides while scrolling down, returns on scroll up — app.js never applies it
   under prefers-reduced-motion */
.site-head.bar-hidden {
  transform: translateY(calc(-100% - 36px));
  opacity: 0;
  pointer-events: none;
}
@keyframes pill-drop {
  from { opacity: 0; transform: translateY(-18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.logo { display: inline-flex; align-items: center; }
.logo img { height: 30px; width: auto; transition: height 0.4s var(--ease-out); }

.lang {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
}
@media (max-width: 640px) {
  .site-head { top: 12px; gap: 10px; padding: 6px 6px 6px 14px; }
  .logo img { height: 24px; }
}
/* tiny phones: tighten so logo + language never overflow the fixed span */
@media (max-width: 360px) {
  .site-head { gap: 8px; padding: 5px 5px 5px 12px; }
  .logo img { height: 20px; }
  .site-head.scrolled .logo img { height: 18px; }
  .lang { padding: 3px; }
  .lang button { padding: 7px 9px; }
}
.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  color: hsl(40 20% 92% / 0.7);
  font: 600 12px/1 var(--font);
  letter-spacing: 0.08em;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.14s var(--ease-out), background 0.14s var(--ease-out), transform 0.12s var(--ease-out);
}
.lang button:active { transform: scale(0.95); }
.lang button:hover { color: hsl(40 20% 92%); }
.lang button[aria-pressed="true"] { background: var(--gold); color: hsl(220 20% 15%); }

/* ---------- shared section furniture ---------- */
section { padding: 104px 0; }
@media (max-width: 700px) { section { padding: 72px 0; } }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.kicker svg { width: 14px; height: 14px; flex: none; }

h1, h2 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; margin: 0 0 20px; text-wrap: balance; }
/* display type leads tighter and tracks tighter than body — size-specific, not one value everywhere */
h1 { font-size: clamp(34px, 5.6vw, 60px); line-height: 1.06; letter-spacing: -0.025em; }
h2 { font-size: clamp(28px, 4vw, 44px); }
/* Emphasis is solid gold — same brand accent, no gradient-clip text. */
.hl { color: var(--gold-text); }
.on-dark .hl, .hero .hl { color: var(--gold); }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--graphite-dim); max-width: 640px; }

.on-dark { color: var(--ink-text); } /* background comes from [data-void] */
.on-dark .lede { color: var(--ink-text-dim); }
.on-dark .kicker { color: var(--gold); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: var(--ink);
  color: var(--ink-text);
  overflow: hidden;
  padding: 140px 0 96px;
}

/* ---------- the void: ONE continuous vgpu surface behind every dark section ----------
   A single fixed layer holds the render, so dark sections are windows onto the
   same void — no seams where one section's background ends and the next begins.
   Each dark section sits on an ink scrim: 0.6 ink + 0.4 render is the mix
   measured to keep body and gold text at >= 4.5:1 against the brightest ember
   in any exported frame. The hero shows it at full strength. */
.void {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background-color: var(--ink);
}
.void-bg, .void-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.void-bg {
  background: url("hero-fallback.webp") left top / cover no-repeat;
  transform: scale(1.06);
  animation: void-drift 52s var(--ease-in-out) infinite alternate;
  transition: opacity 0.7s var(--ease-out);
}
/* once the shader is painting, the exported frame has done its job */
.void.void-live > .void-bg { opacity: 0; }

main { position: relative; z-index: 1; }
/* Only dark sections are windows onto the void; the light sections paint
   their own paper over it, so the effect never bleeds into them. */
main > section:not([data-void]) { background-color: var(--paper); }
[data-void] { position: relative; background-color: hsl(220 20% 12% / 0.6); }
.hero { background-color: transparent; }

/* slow enough to read as breathing, not as movement (≈0.02 Hz) */
@keyframes void-drift {
  from { transform: translate3d(0, 0, 0) scale(1.06); }
  to   { transform: translate3d(-2.5%, -1.5%, 0) scale(1.13); }
}

.hero .wrap { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: hsl(47 99% 60% / 0.12);
  border: 1px solid hsl(47 99% 60% / 0.3);
  color: var(--gold);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  margin-bottom: 32px;
  transition: background 0.2s, border-color 0.2s, transform 0.14s var(--ease-out);
}
.hero-badge:active { transform: scale(0.97); }
.hero-badge:hover { background: hsl(47 99% 60% / 0.2); border-color: hsl(47 99% 60% / 0.55); }
.hero-badge svg { width: 13px; height: 13px; flex: none; }

.hero h1 { color: hsl(40 25% 95%); max-width: 900px; margin-bottom: 24px; }
.hero .lede { color: hsl(40 15% 78%); margin: 0 auto 40px; }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

.btn {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.16s var(--ease-out), box-shadow 0.2s var(--ease-out),
              border-color 0.2s, background 0.2s, color 0.2s;
}
.btn-gold {
  background: linear-gradient(160deg, var(--gold), hsl(43 97% 54%));
  color: hsl(220 20% 15%);
  box-shadow: 0 10px 24px hsl(220 30% 5% / 0.45);
}
.btn-gold:hover { box-shadow: 0 14px 30px hsl(220 30% 5% / 0.55); }
.btn-ghost {
  border: 1px solid hsl(40 20% 92% / 0.25);
  color: hsl(40 20% 92%);
}
.btn-ghost:hover { border-color: hsl(47 99% 60% / 0.6); }
/* The lift is a fine-pointer flourish only — touch devices otherwise keep a stuck hover. */
@media (hover: hover) and (pointer: fine) {
  .btn-gold:hover, .btn-ghost:hover { transform: translateY(-2px); }
}
/* Feedback starts on pointer-down, not on release. Kept after the hover rule so
   :active wins while both match. */
.btn:active { transform: scale(0.97); }

/* generations: one rounded card per generation — the original treatment */
.generations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 64px;
  width: min(760px, 100%);
}
.gen {
  padding: 9px 17px;
  border-radius: 999px;
  background: hsl(40 20% 92% / 0.05);
  border: 1px solid hsl(40 20% 92% / 0.14);
  color: hsl(40 20% 92% / 0.72);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

/* ---------- challenge cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }

.card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: hsl(47 99% 60% / 0.55);
  box-shadow: 0 10px 30px hsl(220 20% 20% / 0.14);
}
.card .icon {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: hsl(47 99% 60% / 0.14);
  color: var(--gold-text);
  margin-bottom: 18px;
}
.card .icon svg { width: 22px; height: 22px; }
.card h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--graphite-dim); font-size: 15px; }

/* ---------- solution ---------- */
.solution-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 860px) { .solution-grid { grid-template-columns: 1fr; gap: 40px; } }

.steps { list-style: none; margin: 0; padding: 0; }
.steps li {
  position: relative;
  padding: 18px 20px 18px 52px;
  font-size: 16.5px;
  color: var(--ink-text);
  border-bottom: 1px solid var(--ink-line);
}
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: "";
  position: absolute;
  left: 20px; top: 50%;
  width: 10px; height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--gold);
}
.steps li::after {
  content: "";
  position: absolute;
  left: 24px; top: calc(50% + 5px);
  bottom: -18px;
  width: 1px;
  background: hsl(47 99% 60% / 0.3);
}
.steps li:last-child::after { display: none; }

/* ---------- impact ---------- */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 56px;
}
@media (max-width: 860px) { .impact-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .impact-grid { grid-template-columns: 1fr; } }

.impact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  font-size: 15.5px;
  font-weight: 500;
}
.impact-item .icon {
  flex: none;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: hsl(47 99% 60% / 0.16);
  color: var(--gold-text);
}
.impact-item .icon svg { width: 16px; height: 16px; }

/* ---------- team ---------- */
.team-photo {
  margin: 48px auto 0;
  max-width: 880px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--ink-line);
  box-shadow: 0 24px 60px hsl(220 20% 5% / 0.5);
}
.members {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}
.member {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: hsl(40 20% 92% / 0.06);
  border: 1px solid var(--ink-line);
  font-size: 14px;
  color: hsl(40 20% 92% / 0.85);
}
.member strong { font-weight: 600; }
.member .gen-tag { color: var(--gold); font-weight: 600; }
.member .dot { color: hsl(40 20% 92% / 0.35); }

/* ---------- media ---------- */
.video {
  max-width: 840px;
  margin: 48px auto 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid hsl(47 99% 60% / 0.25);
  box-shadow: 0 24px 60px hsl(220 20% 5% / 0.35);
  aspect-ratio: 16 / 9;
  background: #000;
}
.video iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- clients ---------- */
.case {
  max-width: 880px;
  margin: 48px auto 0;
  display: flex;
  gap: 32px;
  align-items: center;
  /* frosted material: the void drifts underneath the card */
  background: hsl(220 20% 12% / 0.55);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  border: 1px solid hsl(40 20% 92% / 0.16);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: 0 24px 60px hsl(220 30% 5% / 0.35);
}
@media (prefers-reduced-transparency: reduce) {
  .case { background: hsl(220 20% 12% / 0.97); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (max-width: 720px) { .case { flex-direction: column; text-align: center; padding: 28px; } }

.uab-mark {
  flex: none;
  width: 190px;
  display: grid;
  place-items: center;
  padding: 24px;
  border-radius: 12px;
  background: hsl(40 20% 92% / 0.08);
  border: 1px solid var(--ink-line);
}
/* knockout so the real mark reads on the dark frosted surface */
.uab-mark img {
  width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.case-tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: hsl(47 99% 60% / 0.14);
  border: 1px solid hsl(47 99% 60% / 0.3);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.case h3 { margin: 0 0 10px; font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -0.01em; }
.case p { margin: 0; color: var(--ink-text-dim); font-size: 16px; }
.case p strong { color: var(--ink-text); }

/* ---------- cta ---------- */
.cta { position: relative; overflow: hidden; text-align: center; }
.cta .wrap { position: relative; }

.cta-list {
  list-style: none;
  margin: 0 auto 36px;
  padding: 0;
  max-width: 560px;
  text-align: left;
  display: grid;
  gap: 12px;
}
.cta-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 16px;
  color: var(--ink-text-dim);
}
.cta-list svg { flex: none; width: 18px; height: 18px; margin-top: 4px; color: var(--gold); }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 36px; }
.chip {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--ink-line);
  background: hsl(40 20% 92% / 0.05);
  color: hsl(40 20% 92% / 0.75);
}
.chip.gold {
  background: hsl(47 99% 60% / 0.14);
  border-color: hsl(47 99% 60% / 0.32);
  color: var(--gold);
}

.contact-lines { margin-top: 28px; display: grid; gap: 4px; font-size: 14px; color: hsl(40 20% 92% / 0.55); }
.contact-lines a { color: hsl(40 20% 92% / 0.75); text-decoration: none; border-bottom: 1px solid hsl(47 99% 60% / 0.35); }
.contact-lines a:hover { color: var(--gold); }

/* ---------- scroll reveal ---------- */
/* The hidden state only exists while JS is driving it (.js-reveal on <html>):
   no JS, reduced motion, or a broken observer all leave content visible. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.js-reveal .reveal.revealed {
  opacity: 1;
  transform: none;
}
/* hero: one authored entrance — badge, headline, lede, actions, bridge */
.hero .wrap > *:nth-child(2) { transition-delay: 0.07s; }
.hero .wrap > *:nth-child(3) { transition-delay: 0.14s; }
.hero .wrap > *:nth-child(4) { transition-delay: 0.21s; }
.hero .wrap > *:nth-child(5) { transition-delay: 0.28s; }

/* groups cascade item after item instead of the whole block popping at once */
.js-reveal .cards.reveal > *,
.js-reveal .impact-grid.reveal > *,
.js-reveal .steps.reveal > *,
.js-reveal .members.reveal > *,
.js-reveal .cta-list.reveal > *,
.js-reveal .generations.reveal > *,
.js-reveal .chips.reveal > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.js-reveal .cards.reveal.revealed > *,
.js-reveal .impact-grid.reveal.revealed > *,
.js-reveal .steps.reveal.revealed > *,
.js-reveal .members.reveal.revealed > *,
.js-reveal .cta-list.reveal.revealed > *,
.js-reveal .generations.reveal.revealed > *,
.js-reveal .chips.reveal.revealed > * {
  opacity: 1;
  transform: none;
}
:is(.cards, .impact-grid, .steps, .members, .cta-list, .generations, .chips).reveal > *:nth-child(2) { transition-delay: 0.06s; }
:is(.cards, .impact-grid, .steps, .members, .cta-list, .generations, .chips).reveal > *:nth-child(3) { transition-delay: 0.12s; }
:is(.cards, .impact-grid, .steps, .members, .cta-list, .generations, .chips).reveal > *:nth-child(4) { transition-delay: 0.18s; }
:is(.cards, .impact-grid, .steps, .members, .cta-list, .generations, .chips).reveal > *:nth-child(5) { transition-delay: 0.24s; }
:is(.cards, .impact-grid, .steps, .members, .cta-list, .generations, .chips).reveal > *:nth-child(6) { transition-delay: 0.3s; }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--ink-line);
  padding: 48px 0 40px;
  text-align: center;
  color: hsl(40 20% 92% / 0.6);
  font-size: 14px;
}
.follow { margin: 0 0 18px; font-weight: 600; color: hsl(40 20% 92% / 0.85); font-size: 15px; }
.socials { display: flex; justify-content: center; gap: 14px; margin-bottom: 26px; }
.socials a {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: hsl(47 99% 60% / 0.12);
  border: 1px solid hsl(47 99% 60% / 0.3);
  color: var(--gold);
  transition: background 0.2s, color 0.2s, transform 0.14s var(--ease-out);
}
.socials a:active { transform: scale(0.92); }
.socials a:hover { background: var(--gold); color: hsl(220 20% 15%); }
.socials svg { width: 20px; height: 20px; }

.foot-links { display: flex; justify-content: center; gap: 8px; align-items: center; margin-bottom: 14px; }
.foot-links a {
  color: hsl(40 20% 92% / 0.75);
  text-decoration: none;
  border-bottom: 1px solid hsl(47 99% 60% / 0.35);
  transition: color 0.15s;
}
.foot-links a:hover { color: var(--gold); }
.foot-links .sep { color: hsl(40 20% 92% / 0.3); }

.copyright { color: hsl(40 20% 92% / 0.4); font-size: 13px; margin: 0; }
