/* Home page effects: shader hero, pinned court flood, feature grid. Loads after wireframe.css. */

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

:root {
  --fx-ink: #0b0d0c;
}

/* ------------------------------------------------------------------ Hero */
.fx-hero {
  position: relative;
  min-height: max(680px, 100svh);
  display: flex;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(120% 90% at 30% 20%, #1a201d 0%, var(--fx-ink) 60%);
  color: var(--white);
}
.fx-shader {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 0;
  transition: opacity 1.4s var(--ease-out-expo);
}
.fx-shader[data-ready] { opacity: 1; }
.fx-hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(70% 60% at 20% 30%, rgb(0 0 0 / 0.55), transparent 70%),
    linear-gradient(180deg, transparent 70%, #000 100%);
}
.fx-hero__inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  padding-block: clamp(112px, 13vh, 150px) clamp(170px, 17vw, 250px);
}
.fx-hero__row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(32px, 5vw, 80px);
}
.fx-hero__h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 6.2vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
  color: var(--white);
}
.fx-hero__h1 .tu-line { padding-bottom: 0.2em; margin-bottom: -0.2em; }
.fx-hero__sub {
  font-family: var(--font-text);
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.5;
  color: rgb(255 255 255 / 0.82);
  max-width: 34ch;
  padding-bottom: 0.4em;
}

@media (max-width: 900px) {
  .fx-hero__row { grid-template-columns: minmax(0, 1fr); align-items: start; }
}
/* ----------------------------------------------------------------- Flood */
.fx-flood {
  --draw: 0;
  --fill: 0;
  --type: 0;
  --court-w: min(84vw, 1180px);
  --line: var(--green-500);
  position: relative;
  height: 320vh;
  margin-top: calc(-1 * clamp(96px, 11vw, 160px));
  background: #000;
  transition: background 0.5s var(--ease-out-expo);
}
.fx-flood[data-full] { background: var(--green-500); }
.fx-flood[data-ink] { --line: rgb(11 13 12 / 0.22); }
.fx-flood__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
/* Green disc that starts as the centre circle (30 of the 424 viewBox units) and grows past the screen corners */
.fx-flood__fill {
  position: absolute;
  inset: 0;
  background: var(--green-500);
  --cr: calc(var(--court-w) * 30 / 424);
  clip-path: circle(calc(var(--cr) + (80vmax - var(--cr)) * var(--fill)) at 50% 50%);
  opacity: min(1, calc(var(--fill) * 12));
}
.fx-court {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--court-w);
  max-width: none;
  height: auto;
  translate: -50% -50%;
  overflow: visible;
}
.fx-court path {
  fill: none;
  stroke: var(--line);
  stroke-width: 0.6;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - clamp(0, var(--draw) * 1.6 - var(--k) * 0.1, 1));
  transition: stroke 0.4s var(--ease-out-expo);
}
.fx-court circle { fill: var(--line); opacity: var(--draw); transition: fill 0.4s var(--ease-out-expo); }

.fx-flood__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
  padding-inline: var(--gutter);
  text-align: center;
  color: var(--fx-ink);
}
.fx-flood__big {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 7.4vw, 124px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.fx-flood__line {
  --on: clamp(0, calc(var(--type) - var(--i)), 1);
  display: block;
  opacity: var(--on);
  transform: translateY(calc((1 - var(--on)) * 0.45em));
}
.fx-flood__sub {
  max-width: 44ch;
  font-family: var(--font-text);
  font-size: var(--fs-body-l);
  line-height: 1.5;
  color: rgb(11 13 12 / 0.78);
}

/* Portrait screens: stand the court on its end so it fills the height */
@media (max-width: 767px) {
  .fx-flood { --court-w: min(76svh, 190vw); }
  .fx-court { rotate: 90deg; }
}

/* ------------------------------------------------------------- Blueprint */
.fx-bp {
  background: var(--surface-primary);
  color: var(--text-primary);
  padding-block: clamp(64px, 9vw, 128px);
}
[data-theme="dark"] .fx-bp { background: #111413; }
.fx-bp__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--wf-col-gap);
}
.fx-bp__head { grid-column: 1 / -1; padding-bottom: clamp(16px, 2.4vw, 40px); }
.fx-bp__intro { grid-column: span 2; align-self: end; padding-bottom: var(--space-6); }
.fx-bp__item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-5);
  border-top: var(--border-width) solid var(--border-default);
}
.fx-bp__card--half { grid-column: span 2; }
.fx-bp__media { grid-column: span 2; grid-row: span 2; height: 100%; min-height: 320px; border: var(--border-width) solid var(--border-default); }
.fx-bp__media > img { object-position: 50% 78%; }
.fx-bp__h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 6vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.fx-bp__lead { font-size: clamp(20px, 1.8vw, 26px); line-height: 1.35; max-width: 30ch; }
.fx-bp__title { font-size: 20px; font-weight: 500; }
.fx-bp__body { font-family: var(--font-text); font-size: var(--fs-body-s); line-height: 1.55; color: var(--text-secondary); text-align: left; }

/* Mini ladder built from the product's table and form-guide components */
.fx-ladder { padding: 0; overflow: hidden; gap: 0; }
.fx-ladder__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
}
.fx-ladder__name { font-weight: var(--weight-semibold); }
.fx-ladder__round { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
.fx-ladder .tu-table th,
.fx-ladder .tu-table .num { font-family: var(--font-mono); }
.fx-ladder .tu-table th,
.fx-ladder .tu-table td { padding-inline: var(--space-3); }
.fx-ladder .tu-table th:first-child,
.fx-ladder .tu-table td:first-child { padding-left: var(--space-5); }
.fx-ladder .tu-table th:last-child,
.fx-ladder .tu-table td:last-child { padding-right: var(--space-5); }
.fx-ladder .tu-form span { font-family: var(--font-mono); }

@media (max-width: 900px) {
  .fx-bp__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fx-bp__media { grid-row: auto; }
}
@media (max-width: 560px) {
  .fx-bp__grid { grid-template-columns: minmax(0, 1fr); }
  .fx-bp__intro, .fx-bp__card--half, .fx-bp__media { grid-column: auto; }
  .fx-bp__media { aspect-ratio: 4 / 3; min-height: 0; }
  .fx-ladder .tu-table th,
  .fx-ladder .tu-table td { padding-inline: 6px; font-size: 13px; }
  .fx-ladder .tu-form span:nth-child(-n + 2),
  .fx-ladder .col-d { display: none; }
}
