/* ========================================
   HOMEPAGE (/) — marketing sections, the badge cards, team and the
   logo easter egg. Loaded on / only, after /style.css.
   ======================================== */

/* ---- "Your account has been deleted" (js/homepage.js): a one-shot
   full-bleed notice strip under the topbar, content on the page frame ---- */

.hp-deleted {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem var(--frame-pad);
  background: var(--bg-1);
  border-block: 1px solid var(--line);
}

.hp-deleted__icon,
.hp-deleted__close svg {
  width: 1.15em;
  height: 1.15em;
}

.hp-deleted__icon {
  flex: none;
  margin-top: 0.2rem;
  color: var(--teal);
}

.hp-deleted__body {
  flex: 1;
}

.hp-deleted__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.hp-deleted__text {
  margin-top: 0.15rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-dim);
}

.hp-deleted__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: -0.4rem -0.5rem -0.4rem 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  color: var(--ink-dim);
  cursor: pointer;
}

.hp-deleted__close:hover {
  border-color: var(--line);
  color: var(--ink);
}

/* ---- Badge component: the site's one recurring physical object ---- */

.badge {
  --badge-accent: var(--teal);
  position: relative;
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.7);
}

.badge__stripe {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.1rem;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}

.badge__stripe-logo {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex: none;
}

.badge__stripe-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.09em;
  color: var(--ink-dim);
}

.badge__photo {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 11;
  background:
    radial-gradient(circle, rgba(237, 238, 236, 0.05) 1px, transparent 1px) 0 0 / 14px 14px,
    var(--bg-0);
  border-bottom: 1px solid var(--line);
  color: var(--ink-faint);
}

/* Team portraits are square (1:1) files in a square window, so cover never
   re-crops them — the file is exactly what the card shows. The hero and
   success badges keep the default 16/11 photo area. */
.badge__photo--portrait {
  aspect-ratio: 1 / 1;
}

.badge__photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge__fields {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem 1.1rem;
}

.badge__field dt {
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.badge__field dd {
  margin-top: 0.15rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  /* 100-char names and companies wrap instead of clipping at the card edge. */
  overflow-wrap: anywhere;
}

.badge__field dd.is-accent {
  color: var(--badge-accent);
}

/* Priority hierarchy: the first field is always the headline identity
   value (Name / Holder), so it carries more visual weight than the rows
   below it, regardless of which badge instance is rendering. */
.badge__field:first-child dd {
  font-size: 1.125rem;
  font-weight: 700;
}

.badge__barcode {
  height: 22px;
  margin: 0 1.1rem 1.1rem;
  border-radius: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--ink-faint) 0px, var(--ink-faint) 2px,
    transparent 2px, transparent 3px,
    var(--ink-faint) 3px, var(--ink-faint) 4px,
    transparent 4px, transparent 7px,
    var(--ink-faint) 7px, var(--ink-faint) 8px,
    transparent 8px, transparent 10px
  );
  opacity: 0.55;
}

/* ---- Hero ----
   Styles moved to /css/hero.css for the ASCII canvas hero.
   Legacy badge-wrap classes removed (badge card retired from hero). */

/* ---- Homepage Events ---- */

.hp-events {
  padding: 6vh var(--frame-pad) 2vh;
}

.hp-events__inner {
  margin: 0 auto;
}

.hp-events__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.25rem;
}

.hp-events__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

.hp-events__all {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  transition: opacity 160ms ease;
}

.hp-events__all:hover { opacity: 0.75; }

.hp-events__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 860px) {
  .hp-events__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .hp-events__grid { grid-template-columns: 1fr; }
  .hp-events { padding: 4vh var(--frame-pad) 1vh; }
}

/* ---- About ---- */

.about {
  position: relative;
  background: var(--bg-1);
  padding: 12vh 6vw;
}

.about__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 380px) 1px 1fr;
  column-gap: 4rem;
  align-items: start;
}

.about__heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.about__heading-accent {
  color: var(--teal);
}

.about__divider {
  align-self: stretch;
  width: 1px;
  background: var(--line);
}

.about__body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 0.3rem;
}

.about__body p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.7;
  max-width: 60ch;
  color: var(--ink-dim);
}

.about__body p:first-child {
  color: var(--ink);
}

.about__body p.about__punch {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* ---- The gap: apprentices vs everyone else, measured ---- */

.gap {
  grid-column: 1 / -1;
  margin-top: 3.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.gap__kicker {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* Stat column left, the "so we build this" story right. The bars plot the
   source's own figures (78.2 vs 84, the positive responses) — a founder
   call: the numbers shown match the NSS table, and the footnote carries
   the derived 36% claim.
   The columns mirror the triptych grid above (heading | divider | body),
   so the stat card sits flush under the heading and the story prose lines
   up exactly with the lede at every width. */
.gap__columns {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: minmax(220px, 380px) 1px minmax(0, 1fr);
  column-gap: 4rem;
  row-gap: 2.5rem;
  align-items: start;
}

.gap__stat {
  grid-column: 1;
}

.gap__story {
  grid-column: 3;
  max-width: 62ch;
}

@media (max-width: 860px) {
  .gap__columns {
    grid-template-columns: 1fr;
    max-width: 62ch;
  }

  .gap__stat,
  .gap__story {
    grid-column: auto;
  }
}

/* One voice for the story column, in the same ink as the section's opening
   paragraph — this column carries the argument, so it doesn't whisper.
   Emphasis comes from weight; teal is reserved for the single brand
   payoff line, and grey stays with the secondary text (kicker, caption,
   sources). */
.gap__story p {
  font-size: 1.0625rem; /* same size as .about__body p — one prose voice */
  line-height: 1.7;
  color: var(--ink);
}

.gap__story p + p {
  margin-top: 1.5rem;
}

.gap__story strong {
  font-weight: 600;
}

.gap__story .about__segue strong {
  color: var(--teal);
}

.gap__headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 3.6vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.gap__num {
  color: var(--ink-dim);
}

.gap__num--us {
  color: var(--teal);
}

.gap__vs {
  font-size: 0.5em;
  font-weight: 500;
  color: var(--ink-faint);
}

.gap__reading {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  max-width: 44ch;
  color: var(--ink-dim);
}

.gap__bars {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gap__track {
  height: 8px;
  border-radius: 4px;
  background: var(--bg-2);
  overflow: hidden;
}

.gap__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ink-faint);
  transform-origin: left;
}

.gap__fill--us {
  background: var(--teal);
}

/* Scaled to 30% max so the 21.8 vs 16 gap looks dramatic */
.gap__fill--w73 { width: 73%; }
.gap__fill--w53 { width: 53%; }

/* The section's one authored moment: the bars draw themselves as the
   numbers land, so the shortfall is watched, not read. */
.js .gap__stat .gap__fill {
  transform: scaleX(0);
  transition: transform 1100ms cubic-bezier(0.16, 1, 0.3, 1) 350ms;
}

.js .gap__stat.is-visible .gap__fill {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  .js .gap__stat .gap__fill {
    transform: none;
    transition: none;
  }
}

.gap__stat > .stats__source {
  margin-top: 0.875rem;
  margin-left: 0;
}

.stats__source {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.stats__source:hover {
  color: var(--teal);
}

/* ---- Journey: roadmap beyond the first event ---- */

.journey {
  background: var(--bg-1);
  padding: 4vh 6vw 12vh;
}

.journey__inner {
  max-width: 900px;
  margin: 0 auto;
}

.journey__heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.journey__heading-accent {
  color: var(--teal);
}

.journey__lede {
  margin-top: 1rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  max-width: 52ch;
  color: var(--ink-dim);
}

/* ---- The manifest ----
   THESIS: perks are not marketing cards, they are what the badge admits you
   to. Refuses the six-identical-cards grid.
   OWN-WORLD: the site's badge grammar — hairline manifest rows, stroke icons,
   and one badge-family reader card (stripe, field label, barcode) in teal on
   the dark greys.
   STORY: the visitor runs a finger down the manifest; each perk they touch is
   scanned into the reader and read in full, so they leave knowing exactly
   what membership hands them.
   FIRST VIEWPORT (of the section): heading, six-row manifest left, reader
   card right already displaying perk one; nothing hidden by default.
   FORM: split manifest + reader; the scan sweep is the section's one
   authored motion. Local extension — no seed. */

.manifest {
  margin-top: 2.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  column-gap: 3.5rem;
  align-items: start;
}

.manifest__list {
  list-style: none;
  border-top: 1px solid var(--line);
}

.manifest__row {
  border-bottom: 1px solid var(--line);
}

.manifest__title {
  margin: 0;
  font-size: inherit;
}

.manifest__btn {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  width: 100%;
  padding: 1.05rem 0.75rem;
  background: none;
  border: 0;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink-dim);
  text-align: left;
  cursor: pointer;
  transition: color 200ms ease, background-color 200ms ease;
}

.manifest__btn:hover {
  color: var(--ink);
  background-color: var(--bg-2);
}

.manifest__btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
  color: var(--ink);
}

.manifest__row.is-active .manifest__btn {
  color: var(--ink);
}

/* The "scanned" lamp at the row's end: off until the reader has this perk. */
.manifest__btn::after {
  content: '';
  flex: none;
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--control-line);
  background: transparent;
  transition: background-color 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}

.manifest__row.is-active .manifest__btn::after {
  border-color: var(--teal);
  background: var(--teal);
  box-shadow: 0 0 10px 1px var(--teal-dim);
}

.manifest__icon {
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--ink-faint);
  transition: color 250ms ease;
}

.manifest__row.is-active .manifest__icon,
.manifest__btn:hover .manifest__icon {
  color: var(--teal);
}

/* Body copy lives in the list for screen readers and narrow screens; on a
   wide screen with JS running, the reader card is its visual home. Range
   syntax keeps this an exact complement of the collapse query below. */
@media (width >= 861px) {
  .js .manifest__body {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

.manifest__body {
  padding: 0 0.75rem 1.15rem calc(0.75rem + 26px + 1.1rem);
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 58ch;
  color: var(--ink-dim);
}

/* ---- The reader card ---- */

.manifest__reader {
  position: sticky;
  top: 6rem;
  transition-delay: 200ms;
}

/* Without JS nothing can drive the reader, so the list carries the copy. */
html:not(.js) .manifest {
  grid-template-columns: 1fr;
}

html:not(.js) .manifest__reader {
  display: none;
}

.manifest__card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-2);
  box-shadow: 0 26px 50px -30px rgba(0, 0, 0, 0.75);
}

.manifest__card-stripe {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.25rem;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
}

.manifest__card-logo {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex: none;
}

.manifest__card-stripe-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.09em;
  color: var(--ink-dim);
}

.manifest__card-readout {
  padding: 1.4rem 1.25rem 1.2rem;
  /* Sized to the longest perk (the network one) at the reader's width, so
     scanning between perks never grows the card mid-sweep. */
  min-height: 17.5rem;
}

.manifest__card-label {
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  /* ink-dim, not ink-faint: faint misses AA (4.46:1) on the card's bg-2. */
  color: var(--ink-dim);
}

.manifest__card-title {
  margin-top: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.manifest__card-text {
  margin-top: 0.85rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink-dim);
}

.manifest__card-barcode {
  height: 22px;
  margin: 0 1.25rem 1.2rem;
  border-radius: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--ink-faint) 0px, var(--ink-faint) 2px,
    transparent 2px, transparent 3px,
    var(--ink-faint) 3px, var(--ink-faint) 4px,
    transparent 4px, transparent 7px,
    var(--ink-faint) 7px, var(--ink-faint) 8px,
    transparent 8px, transparent 10px
  );
  opacity: 0.55;
}

/* The scan: a faint teal read-head sweeps the card as the new perk settles
   in. Quiet on purpose — it runs on every hover, so it must read as
   feedback, not spectacle. */
.manifest__card-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(69, 216, 197, 0.05) 43%,
    rgba(69, 216, 197, 0.2) 50%,
    rgba(69, 216, 197, 0.05) 57%,
    transparent 100%
  );
  transform: translateY(-105%);
}

.manifest__card.is-scanning .manifest__card-scan {
  animation: manifest-scan 500ms cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.manifest__card.is-scanning .manifest__card-readout {
  animation: manifest-print 400ms cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes manifest-scan {
  0% { transform: translateY(-105%); opacity: 1; }
  75% { opacity: 1; }
  100% { transform: translateY(105%); opacity: 0; }
}

@keyframes manifest-print {
  from { opacity: 0.55; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .manifest__card-scan {
    display: none;
  }

  .manifest__card.is-scanning .manifest__card-readout {
    animation: none;
  }
}

@media (width < 861px) {
  .manifest {
    grid-template-columns: 1fr;
  }

  .manifest__reader {
    display: none;
  }
}

.journey__closer {
  margin-top: 2.5rem;
  font-size: 1.0625rem;
  color: var(--ink);
}

.manifest__list > .manifest__row:nth-child(2) { transition-delay: 70ms; }
.manifest__list > .manifest__row:nth-child(3) { transition-delay: 140ms; }
.manifest__list > .manifest__row:nth-child(4) { transition-delay: 210ms; }
.manifest__list > .manifest__row:nth-child(5) { transition-delay: 280ms; }
.manifest__list > .manifest__row:nth-child(6) { transition-delay: 350ms; }

.team__inner {
  max-width: 1180px;
  margin: 0 auto;
}

.team__heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.team__heading-accent {
  color: var(--teal);
}

.team__lede {
  margin-top: 1rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  max-width: 52ch;
  color: var(--ink-dim);
}

.team__grid {
  margin-top: 4.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3.5rem;
  perspective: 1200px;
}

.team__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.75rem;
  perspective: 1400px;
}

/* ---- Two-sided badge: turns over to reveal the member ---- */

.badge-flip {
  width: 100%;
  max-width: 300px;
  /* Fill the grid row so both member cards match the taller one's height
     (role text wraps to a different line count per member). */
  flex: 1;
  transform-style: preserve-3d;
  transition: transform 550ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* While the pointer drives it, the card must track instantly, not lag. */
.badge-flip.is-tilting {
  transition: none;
}

.badge-flip__inner {
  display: grid;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1100ms cubic-bezier(0.2, 0.8, 0.25, 1);
}

/* Without JS the front is simply face-up; JS turns it away, then back. */
.js .badge-flip__inner {
  transform: rotateY(180deg);
}

.js .team__card.is-visible .badge-flip__inner {
  transform: rotateY(0deg);
}

.team__grid > .team__card:nth-child(2) .badge-flip__inner {
  transition-delay: 150ms;
}

.team__grid > .team__card:nth-child(3) .badge-flip__inner {
  transition-delay: 300ms;
}

.team__grid > .team__card:nth-child(4) .badge-flip__inner {
  transition-delay: 450ms;
}

.badge-flip__face {
  grid-area: 1 / 1;
  display: flex;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.badge-flip__face--back {
  transform: rotateY(180deg);
}

.badge-flip__face > .badge {
  max-width: none;
  height: 100%;
  transition: box-shadow 300ms ease;
}

.badge-flip:hover .badge {
  box-shadow: 0 34px 62px -30px rgba(0, 0, 0, 0.9);
}

/* Metallic sheen: a subtle silvery light band that tracks the pointer,
   like brushed steel or a laminated ID card catching light as it tilts.
   Low-alpha cool-white stops blended with `screen` keep it understated
   against the dark card face. Pointer-driven only, so it rides the same
   tilt effect's guard clauses (no touch, no reduced motion). */
.badge-flip__face > .badge::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(214, 226, 230, 0.05) 42%,
    rgba(228, 238, 242, 0.12) 49%,
    rgba(236, 244, 248, 0.14) 51%,
    rgba(228, 238, 242, 0.12) 53%,
    rgba(214, 226, 230, 0.05) 60%,
    transparent 72%
  );
  background-size: 220% 220%;
  background-position: var(--shine-x, 50%) var(--shine-y, 50%);
  opacity: 0;
  transition: opacity 250ms ease;
  mix-blend-mode: screen;
  pointer-events: none;
}

.badge-flip.is-tilting .badge-flip__face > .badge::after {
  opacity: 1;
}

.badge--back {
  justify-content: flex-start;
}

.badge__magstripe {
  height: 52px;
  margin-top: 1.4rem;
  background: linear-gradient(180deg, #0B0C0C 0%, #171919 55%, #0E0F0F 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.badge__backnote {
  padding: 1.4rem 1.1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.badge__backnote p {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ink-faint);
}

.badge__backnote-title {
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* Both faces pin the barcode to the bottom edge, so a stretched (shorter-
   content) card absorbs the slack above the barcode, not below it. */
.badge-flip__face .badge__barcode {
  margin-top: auto;
}

.team__grid > .js-reveal--card:nth-child(2) {
  transition-delay: 150ms;
}

.team__grid > .js-reveal--card:nth-child(3) {
  transition-delay: 300ms;
}

.team__grid > .js-reveal--card:nth-child(4) {
  transition-delay: 450ms;
}

/* ---- CTA band ---- */

.cta {
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  padding: 12vh 6vw 14vh;
  text-align: center;
}

.cta__inner {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.cta__heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.cta__text {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-dim);
  max-width: 44ch;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

/* ---- Connect: WhatsApp / LinkedIn ---- */

.connect {
  padding: 10vh 6vw 12vh;
  text-align: center;
}

.connect__inner {
  /* Wide enough for the three contact cards to sit in one row. */
  max-width: 900px;
  margin: 0 auto;
}

.connect__heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.connect__heading-accent {
  color: var(--teal);
}

.connect__lede {
  margin-top: 0.75rem;
  font-size: 1.0625rem;
  color: var(--ink-dim);
}

/* One row of three, always: the cards shrink together rather than wrapping
   into a 2+1 arrangement, and below 860px they stack as a single column. */
.connect__links {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.connect__link {
  flex: 1 1 0;
  max-width: 280px;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--control-line);
  border-radius: 12px;
  background: var(--bg-2);
  text-decoration: none;
}

@media (max-width: 860px) {
  .connect__links {
    flex-direction: column;
    align-items: center;
  }

  .connect__link {
    flex: none;
    width: 100%;
  }
}

/* .js-reveal--card's own transition shorthand outranks a single-class rule
   here (two classes vs. one), so the hover transition has to be merged into
   an equally-specific override instead of declared separately. */
.js .connect__link.js-reveal--card {
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1), border-color 160ms ease, background-color 160ms ease;
}

/* Hover-gated so a tap on touch devices doesn't leave the card stuck in
   its hover state after returning from the new tab. */
@media (hover: hover) {
  .connect__link:hover {
    border-color: var(--line-hover);
    background: var(--teal-dim);
  }
}

.connect__link-icon {
  display: block;
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  margin: 0 auto 0.75rem;
  color: var(--ink);
  transition: color 160ms ease;
}

/* The LinkedIn mark fills its viewBox edge to edge while the WhatsApp glyph
   is circular, so squares read optically larger; inset it to balance. */
.connect__link-icon--linkedin {
  padding: 1px;
}

@media (hover: hover) {
  .connect__link:hover .connect__link-icon {
    color: var(--teal);
  }
}

.connect__link:focus-visible .connect__link-icon {
  color: var(--teal);
}

.connect__link-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
}

.connect__link-note {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.875rem;
  color: var(--ink-dim);
}

.connect__links > .connect__link:nth-child(2) {
  transition-delay: 90ms;
}

/* ---- Below this width the fixed-ish columns stop being readable ---- */

@media (max-width: 1100px) {
  .about__inner {
    grid-template-columns: 1fr;
    row-gap: 2rem;
  }

  .about__divider {
    display: none;
  }

  .team__grid {
    gap: 3rem;
  }
}

/* ---- Below this width, nav and CTA buttons need dedicated tuning ---- */

@media (max-width: 600px) {

  /* Indent shrinks so the row bodies keep a readable measure at 320px. */
  .manifest__body {
    padding-left: 2rem;
  }

  .cta__actions {
    align-self: stretch;
    flex-direction: column;
    align-items: stretch;
  }

  .cta__actions .btn {
    justify-content: center;
    text-align: center;
  }
}

/* Under ~700px only one team column ever fits, so pinning the grid to one
   column is a no-op except at <=320px, where the 300px track minimum was
   overflowing the padded container. */
@media (max-width: 700px) {
  .team__grid {
    grid-template-columns: 1fr;
  }
}

/* Above the tablet breakpoint there's room for all four member cards on
   one row — swap the auto-fit track for a fixed 4-up grid instead of
   letting the 4th wrap to its own line. */
@media (min-width: 1101px) {
  .team__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }

  .badge-flip {
    max-width: none;
  }
}

/* Below the manifest collapse the reader card is gone and each row shows
   its own copy, so the row buttons have nothing to drive: drop the button
   affordances (cursor, hover tint, scanned lamp, active highlight). */
@media (width < 861px) {
  .manifest__btn {
    cursor: default;
  }

  .manifest__btn::after {
    display: none;
  }

  .manifest__btn:hover {
    background-color: transparent;
  }

  .manifest__btn:hover,
  .manifest__row.is-active .manifest__btn {
    color: var(--ink-dim);
  }

  .manifest__row.is-active .manifest__icon,
  .manifest__btn:hover .manifest__icon {
    color: var(--ink-faint);
  }

  /* Keyboard focus still brightens the row like it does for rows 2-6. */
  .manifest__row.is-active .manifest__btn:focus-visible {
    color: var(--ink);
  }
}

/* Legacy fallbacks for the two range-syntax manifest queries: Safari and
   iOS before 16.4 drop range syntax entirely, which left old phones with
   the two-column desktop manifest crushing the list at 320px. Identical
   rules over identical ranges, so modern browsers render no differently. */
@media (max-width: 860px) {
  .manifest {
    grid-template-columns: 1fr;
  }

  .manifest__reader {
    display: none;
  }
}

@media (min-width: 861px) {
  .js .manifest__body {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Touch devices: lift the smallest tap targets to a usable height without
   moving anything for mouse/trackpad users. */
@media (pointer: coarse) {

  .stats__source {
    font-size: 0.8125rem;
    position: relative;
    padding: 0.7rem 0.25rem;
    margin: -0.7rem -0.25rem; /* hit area grows; the line box does not */
  }

  .gap__stat > .stats__source {
    margin-top: 0.175rem; /* keeps the visual 0.875rem offset under the bars */
    margin-left: -0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {

  .badge-flip,
  .badge-flip__inner,
  .badge-flip__face > .badge {
    transition: none;
  }

  .js .badge-flip__inner,
  .js .team__card.is-visible .badge-flip__inner {
    transform: none;
  }
}

/* ========================================
   EASTER EGG — Terminal dropdown + Snake overlay
   ======================================== */

/* ---- Logo bounce on click ---- */
@keyframes egg-bounce {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-6px); }
  50%  { transform: translateY(0); }
  70%  { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}
.egg-bounce {
  animation: egg-bounce 0.35s ease;
}

/* ---- Terminal dropdown ---- */
.egg-term {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 0;
  width: 320px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  z-index: 100;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.egg-term.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.egg-term__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}

.egg-term__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.egg-term__dot--red    { background: #FF5F57; }
.egg-term__dot--yellow { background: #FEBC2E; }
.egg-term__dot--green  { background: #28C840; }

.egg-term__title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--ink-faint);
}

.egg-term__body {
  padding: 10px 12px;
  max-height: 200px;
  overflow-y: auto;
}

.egg-term__line {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
}

.egg-term__line--dim  { color: var(--ink-faint); }
.egg-term__line--teal { color: var(--teal); }
.egg-term__line--echo { color: var(--ink-dim); }

.egg-term__prompt {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.egg-term__caret {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--teal);
  flex: none;
  animation: egg-blink 1s step-end infinite;
}

@keyframes egg-blink { 50% { opacity: 0; } }

.egg-term__input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink);
  caret-color: var(--teal);
}

/* ---- Snake running (html.ah-snake, set by js/easter-egg.js) ----
   The hero is the play field: its text fades out, the canvas loses its
   bottom fade, and nothing else on the page can cover or extend past it.
   css/member-home.css restores the full-viewport hero for members. */
.hero__content { transition: opacity 0.3s; }
html.ah-snake .hero__content { opacity: 0; }
html.ah-snake .hero__content,
html.ah-snake .hero__content > * { pointer-events: none; }
html.ah-snake .hero__ascii-canvas { -webkit-mask-image: none; mask-image: none; }
html.ah-snake .egg-msg { visibility: visible; transition: opacity 0.15s ease; }
html.ah-snake main > :not(#hero),
html.ah-snake .footer,
html.ah-snake .sticky-cta { display: none; }

/* ---- Snake HUD (floating bar at bottom) ---- */
.egg-hud {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(19, 20, 20, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.6rem 1.5rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  pointer-events: none;
  opacity: 0;
  /* After the fade-out, visibility:hidden takes it out of paint and hit-testing */
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

html.ah-snake .egg-hud.is-active { opacity: 1; visibility: visible; transition: opacity 0.3s ease; }

.egg-hud__title {
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

.egg-hud__score {
  font-weight: 700;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}

.egg-hud__best {
  font-weight: 600;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

/* ---- Snake centre message (PRESS ANY KEY / GAME OVER) ---- */
.egg-msg {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 50;
  text-align: center;
  font-family: var(--font-mono);
  background: rgba(19, 20, 20, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 2rem 3rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  pointer-events: none;
  visibility: hidden; /* only while the snake runs; hidden after the fade on exit */
  transition: opacity 0.15s ease, visibility 0s linear 0.15s;
}

.egg-msg:empty { opacity: 0 !important; }
.egg-msg:has(.egg-lb) { pointer-events: auto; padding: 0; background: none; border: none; backdrop-filter: none; }

.egg-msg__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.egg-msg__sub {
  font-size: 0.8125rem;
  color: var(--ink-dim);
  margin-top: 0.5rem;
}

.egg-msg__hint {
  font-size: 0.6875rem;
  color: var(--ink-faint);
  margin-top: 1rem;
}

.egg-msg__high {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--teal);
  margin-top: 0.75rem;
}

/* ---- Snake leaderboard (terminal-style overlay) ---- */
.egg-lb {
  width: min(380px, 85vw);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  text-align: left;
}
.egg-lb__bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.egg-lb__dot { width: 10px; height: 10px; border-radius: 50%; }
.egg-lb__dot--r { background: #FF5F57; }
.egg-lb__dot--y { background: #FEBC2E; }
.egg-lb__dot--g { background: #28C840; }
.egg-lb__bar-title {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 0.6875rem;
  color: var(--ink-faint); letter-spacing: 0.03em;
}
.egg-lb__body { padding: 1rem 1rem 0.75rem; }
.egg-lb__head { text-align: center; padding-bottom: 0.8rem; margin-bottom: 0.8rem; border-bottom: 1px solid var(--line); }

/* Podium */
.egg-lb__podium { display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.egg-lb__pod { display: flex; flex-direction: column; align-items: center; }
.egg-lb__pod-avi { width: 28px; height: 28px; margin-bottom: 2px; }
.egg-lb__pod-avi svg { width: 28px; height: 28px; }
.egg-lb__pod-avi--lg { width: 34px; height: 34px; }
.egg-lb__pod-avi--lg svg { width: 34px; height: 34px; }
.egg-lb__pod-name {
  font-family: var(--font-mono); font-size: 0.55rem; color: var(--ink-faint);
  max-width: 68px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 2px;
}
.egg-lb__pod-bar {
  width: 68px; border-radius: 3px 3px 0 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700;
}
.egg-lb__pod-pos { font-size: 0.5rem; opacity: 0.5; letter-spacing: 0.05em; }
.egg-lb__pod-pts { font-size: 0.85rem; }
.egg-lb__pod--1 .egg-lb__pod-bar { height: 60px; background: rgba(247,183,49,0.08); border: 1px solid rgba(247,183,49,0.2); border-bottom: none; color: #F7B731; }
.egg-lb__pod--2 .egg-lb__pod-bar { height: 44px; background: rgba(119,140,163,0.06); border: 1px solid rgba(119,140,163,0.15); border-bottom: none; color: #778CA3; }
.egg-lb__pod--3 .egg-lb__pod-bar { height: 33px; background: rgba(205,127,50,0.06); border: 1px solid rgba(205,127,50,0.15); border-bottom: none; color: #CD7F32; }
.egg-lb__floor { height: 1px; background: var(--line); margin-bottom: 0.6rem; }

/* List */
.egg-lb__list {
  max-height: 156px; overflow-y: auto; margin-bottom: 0.6rem;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.egg-lb__list::-webkit-scrollbar { width: 3px; }
.egg-lb__list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
.egg-lb__row {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.25rem 0; font-family: var(--font-mono); font-size: 0.72rem;
}
.egg-lb__row + .egg-lb__row { border-top: 1px solid rgba(51,54,54,0.4); }
.egg-lb__row--you { background: rgba(69,216,197,0.04); margin: 0 -0.25rem; padding-left: 0.25rem; padding-right: 0.25rem; border-radius: 3px; }
.egg-lb__rank { width: 1.4rem; text-align: right; color: var(--ink-faint); font-weight: 600; font-size: 0.65rem; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.egg-lb__avi { width: 16px; height: 16px; flex-shrink: 0; }
.egg-lb__avi svg { width: 16px; height: 16px; }
.egg-lb__name { flex: 1; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.egg-lb__row--you .egg-lb__name { color: var(--ink); }
.egg-lb__you { font-size: 0.5rem; color: var(--teal); opacity: 0.7; }
.egg-lb__val { font-weight: 700; color: var(--teal); font-size: 0.72rem; flex-shrink: 0; font-variant-numeric: tabular-nums; min-width: 2rem; text-align: right; }

/* Footer */
.egg-lb__foot {
  padding-top: 0.5rem; border-top: 1px solid var(--line);
  display: flex; justify-content: center; gap: 1.2rem;
  font-family: var(--font-mono); font-size: 0.6875rem; color: var(--ink-faint);
}
.egg-lb__pod-avi--empty {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px dashed var(--line);
  opacity: 0.3;
}
.egg-lb__kbd {
  display: inline-block; padding: 0.1em 0.35em;
  font-size: 0.6rem; font-weight: 600; color: var(--ink-dim);
  background: var(--bg-2); border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 3px; margin-right: 0.2rem; line-height: 1;
}
