/* ============================================================================
   JAVVY LABS — sections.css
   Per-section markup styling for the "Invisible Premium" B × C build. Matches
   the real DOM in index.html. The page breathes dark → light → dark via
   [data-surface]. One accent (iris), one easing curve, motion <= 0.2s and
   functional only. Reveals ENHANCE an already-visible default — never gate
   content. (ART-DIRECTION §5; COPY §1–§7)
   ============================================================================ */

/* shared lead width: subhead/standfirst max ~60ch, hero lead tighter */
.section__lead { max-width: 60ch; }

/* reveal default state — VISIBLE (motion adds a from-state via JS only) */
[data-split], [data-clip], [data-draw] { opacity: 1; }

/* ============================================================================
   (1) HERO — "The control surface" · DARK
   Full-viewport iris field: a live WebGL shader (iris-shader.js) over a CSS
   iris gradient, left scrim keeping the centred type razor-crisp.
   ============================================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: clip;
  /* trimmed top breathing + bottom pad so the whole hero — scroll cue included —
     seats inside a standard laptop fold (was overflowing ~34px at 1024x768). */
  padding-block: calc(var(--header-h) + var(--space-lg)) var(--space-xl);
}
.hero__body { max-width: 62ch; }
@media (min-width: 64rem) {
  .hero__body { max-width: 54ch; }
}

.hero__eyebrow { margin-bottom: var(--space-md); }

.hero h1 {
  max-width: 24ch;
  margin-bottom: var(--space-md);
}

/* the living accent word — its width fits the CURRENT word and eases between
   words (measured + set in hero-cycle.js) so the comma that follows always hugs
   the word. (Was reserved to the longest word "scale", which left "run␣␣," with a
   gap that read like a typo.) One word visible at a time; SR copy stays "…run…". */
.word {
  color: var(--accent);
  position: relative;
  display: inline-grid;
  vertical-align: baseline;
  overflow: hidden;
  transition: width 0.45s var(--ease);
}
.word__cur, .word__nxt { grid-area: 1 / 1; white-space: nowrap; will-change: transform; color: var(--accent); }
.word__nxt { opacity: 0; }
.word__underline {
  position: absolute; left: 0; right: 0; bottom: 0.02em; height: 2px;
  background: var(--accent); transform-origin: left center; transform: scaleX(1); border-radius: 2px;
}
@media (max-width: 30rem) { .word__underline { height: 1.5px; } }
/* no-JS / reduced-motion: static "run" with the underline fully drawn */
html.reduced .word__nxt, .no-js .word__nxt { opacity: 0 !important; }
html.reduced .word__underline, .no-js .word__underline { transform: scaleX(1) !important; }

.hero__lead {
  max-width: var(--measure-lead);
  margin-top: var(--space-md);
}

.hero__cta {
  margin-top: var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* the ONE live-data line — bordered strip, mono, the signature readout */
.live {
  margin-top: var(--space-xl);
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55em;
  padding: 0.7em 1em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklch, var(--surface-1) 60%, transparent);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-mono);
  color: var(--text-low);
  max-width: 100%;
}
.live__label { color: var(--text-mid); letter-spacing: var(--ls-label); }
.live__sep { color: var(--text-low); opacity: 0.6; }
.live__value { color: var(--text-hi); }
.live .pip { animation: none; }

/* scroll cue — kept in normal flow at EVERY width. (It used to go
   position:absolute at >=64rem, but its containing block is .section__inner, not
   .hero, so "pin to hero bottom" actually pinned it to the bottom of the content
   block — landing it on top of the live readout. In flow it can never collide.) */
.hero__cue {
  margin-top: var(--space-xl);
  color: var(--text-low);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  font-size: var(--fs-label);
}

/* hero atmospheric backdrop — the art-directed "Liquid Iris" smoke render,
   ANIMATED in-house: js/hero-variants/iris-shader.js advects it as a WebGL
   texture (billow + slow cinematic push-in). The still image below paints
   instantly (LCP) and is the no-JS / no-WebGL / reduced-motion fallback; the
   canvas fades in on top when ready. Left scrim keeps the headline crisp. */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: clip;
  background: var(--surface-0);
}
/* the smoke STILL — instant paint (LCP) + the no-WebGL / reduced-motion fallback.
   The canvas above advects this exact render, so the fade-in is seamless. */
.hero__bg::before {
  content: "";
  position: absolute;
  inset: -9% -9% -9% 0;
  z-index: 0;
  background-image: url("/assets/hero/liquid-iris.jpg");
  background-image: image-set(
    url("/assets/hero/liquid-iris.webp") type("image/webp"),
    url("/assets/hero/liquid-iris.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: right center;
  filter: saturate(0.82) brightness(0.9) contrast(1.02);
  transform: translate3d(0, 0, 0) scale(1.06);
  animation: heroDrift 42s ease-in-out infinite;
  will-change: transform;
}
/* the live WebGL field — above the gradient, below the scrim; fades in on ready */
.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}
.hero__canvas.is-ready { opacity: 1; }
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(100deg, var(--surface-0) 0%, var(--surface-0) 27%,
      color-mix(in oklch, var(--surface-0) 55%, transparent) 52%, transparent 80%),
    linear-gradient(to top, var(--surface-0) 0%, transparent 34%);
}
@keyframes heroDrift {
  0%   { transform: translate3d(0%, 0%, 0) scale(1.06); }
  25%  { transform: translate3d(-1.6%, -1%, 0) scale(1.1); }
  50%  { transform: translate3d(-3.2%, -2.6%, 0) scale(1.14); }
  75%  { transform: translate3d(-1.2%, -1.8%, 0) scale(1.1); }
  100% { transform: translate3d(0%, 0%, 0) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__bg::before { animation: none; transform: none; inset: 0; }
}
/* content sits above the backdrop; the hairline grid is redundant here now */
.hero > .shell { position: relative; z-index: 2; }
.hero > .section__grid { display: none; }

/* ============================================================================
   (2) WHAT WE DELIVER — "Three plates" · DARK
   A calm 3-column grid (stacks < md). Expressive, NOT a flat identical wall:
   each column carries a scope micro-label, promise, bullets, and a proof line.
   ============================================================================ */
.deliver__rule { margin-block: var(--space-xl) 0; }

.deliver__grid {
  margin-top: var(--space-xl);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
@media (min-width: 48rem) {
  .deliver__grid { grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.5rem); }
}

.plate {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur-micro) var(--ease),
              background var(--dur-micro) var(--ease);
}
.plate:hover, .plate:focus-within,
.plate.is-settled {
  border-color: var(--accent);
  background: color-mix(in oklch, var(--surface-1) 86%, var(--accent-dim));
}
.plate__scope {
  color: var(--text-low);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  font-size: var(--fs-label);
}
.plate h3 { color: var(--text-hi); }
.plate__promise {
  color: var(--text-hi);
  font-weight: 500;
  font-size: var(--fs-lead);
  line-height: 1.35;
  text-wrap: balance;
}
.plate__list {
  display: flex;
  flex-direction: column;
  gap: 0.7em;
  color: var(--text-mid);
  font-size: var(--fs-body);
}
.plate__list li {
  position: relative;
  padding-inline-start: 1.3em;
}
.plate__list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0.62em;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0.28em 0 0.28em 0.4em;
  border-color: transparent transparent transparent var(--accent);
}
.plate__proof {
  margin-top: auto;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--line);
  color: var(--text-low);
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.plate__proof::before {
  content: "";
  width: 0.45em; height: 0.45em;
  border-radius: 50%;
  background: var(--success);
  flex: none;
}

/* ============================================================================
   (3) WORK — "The gallery" (the centerpiece) · LIGHT
   The quiet-luxe beat: cool paper, vast whitespace, the REAL screenshots big.
   Three large editorial rows alternating image-left / image-right at >= lg.
   ============================================================================ */
.work__rows {
  margin-top: var(--space-2xl);
  display: flex;
  flex-direction: column;
  gap: clamp(3.5rem, 7vw, 7rem);
}

.work-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
}
@media (min-width: 64rem) {
  .work-row {
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(2rem, 4vw, 4rem);
  }
  /* alternate sides — image on the right for the reverse rows */
  .work-row--reverse .work-row__art { order: 2; }
  .work-row--reverse .work-row__text { order: 1; }
}

.work-row__art {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
  transition: border-color var(--dur-micro) var(--ease);
}
.work-row__art picture { display: block; }
.work-row__art img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.work-row:hover .work-row__art,
.work-row:focus-within .work-row__art { border-color: var(--accent); }

.work-row__text { display: flex; flex-direction: column; gap: var(--space-sm); }
.work-row__text .kicker { margin-bottom: 0; }
.work-row__text h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
  color: var(--text-hi);
}
.work-row__desc {
  color: var(--text-mid);
  max-width: 52ch;
  font-size: var(--fs-body);
}
.work-row__live {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-label);
  color: var(--success);
  text-transform: uppercase;
}
.work-row__visit {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-top: var(--space-2xs);
  padding: 0.6em 1em;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-mono);
  color: var(--text-hi);
  transition: border-color var(--dur-micro) var(--ease),
              color var(--dur-micro) var(--ease),
              background var(--dur-micro) var(--ease);
}
.work-row__visit:hover, .work-row__visit:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.work-row__visit span { transition: transform var(--dur-micro) var(--ease); }
.work-row__visit:hover span, .work-row__visit:focus-visible span { transform: translate(2px, -2px); }

.work__closing {
  margin-top: clamp(3rem, 6vw, 5rem);
  text-align: center;
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  color: var(--text-mid);
  max-width: 60ch;
  margin-inline: auto;
  text-wrap: balance;
}

/* ============================================================================
   (4) WHY US · DARK
   A standfirst + four differentiators as a calm 2×2 grid of bordered blocks
   (NOT icon cards). One key word per block in --accent.
   ============================================================================ */
.why__rule { margin-block: var(--space-xl) 0; }

.why__grid {
  margin-top: var(--space-xl);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
@media (min-width: 48rem) {
  .why__grid { grid-template-columns: 1fr 1fr; gap: clamp(1.25rem, 2.5vw, 2rem); }
}

.why-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  transition: border-color var(--dur-micro) var(--ease),
              background var(--dur-micro) var(--ease);
}
.why-block:hover, .why-block:focus-within,
.why-block.is-settled {
  border-color: var(--accent);
  background: color-mix(in oklch, var(--surface-1) 86%, var(--accent-dim));
}
.why-block__lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-h3);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-hi);
  text-wrap: balance;
}
.why-block p { color: var(--text-mid); max-width: 50ch; }

/* ============================================================================
   (5) PROCESS · DARK
   A genuine 4-step sequence (numbering EARNED). A single vertical hairline runs
   down the left; each step's mono number sets in --accent and a hairline draws
   on as it enters. "Ship it, then run it" is the emphasised differentiator.
   ============================================================================ */
.steps {
  position: relative;
  margin-top: var(--space-2xl);
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 5vw, 4rem);
  padding-inline-start: 2.6rem;
}
@media (min-width: 48rem) { .steps { padding-inline-start: 3.4rem; } }

/* the continuous vertical hairline */
.steps__line {
  position: absolute;
  inset-block: 0.5rem;
  inset-inline-start: 0.85rem;
  width: 1px;
  background: var(--line-strong);
}
@media (min-width: 48rem) { .steps__line { inset-inline-start: 1.2rem; } }

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}
/* node on the line */
.step__num {
  position: absolute;
  inset-inline-start: -2.6rem;
  inset-block-start: 0;
  display: inline-grid;
  place-items: center;
  width: 1.7rem; height: 1.7rem;
  border-radius: 50%;
  background: var(--surface-0);
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0;
  color: var(--text-low);
  transition: color var(--dur-micro) var(--ease),
              border-color var(--dur-micro) var(--ease);
}
@media (min-width: 48rem) { .step__num { inset-inline-start: -3.4rem; } }

/* the short hairline that draws on toward the step (default fully drawn) */
.step__draw {
  position: absolute;
  inset-inline-start: -1.75rem;
  inset-block-start: 0.85rem;
  width: 1.3rem;
  height: 1px;
  background: var(--line-strong);
  transform: scaleX(1);
  transform-origin: left center;
}
@media (min-width: 48rem) { .step__draw { inset-inline-start: -2.2rem; width: 1.5rem; } }

.step.is-set .step__num { color: var(--accent); border-color: var(--accent); }
.step.is-set .step__draw { background: var(--accent); }

.step__body h3 { color: var(--text-hi); margin-bottom: 0.2em; }
.step__body p { color: var(--text-mid); max-width: 52ch; }

/* the Run step stays accented — the emphasised differentiator */
.step--run .step__num { color: var(--accent); border-color: var(--accent); }
.step--run .step__draw { background: var(--accent); }
.step--run .step__body h3 { color: var(--text-hi); }

/* ============================================================================
   (6) THE FACE + CONTACT — "Talk to us" · LIGHT
   Second quiet-luxe beat. Two-column split: partner block + book-a-call form.
   ============================================================================ */
.contact__grid {
  margin-top: var(--space-2xl);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}
@media (min-width: 60rem) {
  .contact__grid {
    grid-template-columns: 1fr 1.05fr;
    column-gap: 0;                /* spacing carried by each column's padding around the spine */
    align-items: stretch;        /* both columns share height — kills the floating short column */
  }
  .partner { padding-inline-end: clamp(2rem, 4vw, 4rem); }
}

/* --- the partner block: the human voice leads, identity signs beneath --- */
.partner {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.partner__kicker { margin-bottom: var(--space-xs); }

/* the voice — a confident pull-quote (no side-stripe) */
.partner__quote {
  margin: 0;
  max-width: 30ch;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-lead);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text-hi);
  text-wrap: pretty;
}

/* identity as a signature under the voice — keeps the placeholder name quiet */
.partner__attrib {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}
.partner__name {
  font-weight: 600;
  font-size: var(--fs-body);
  letter-spacing: -0.005em;
  color: var(--text-hi);
}
.partner__name::before { content: "— "; color: var(--text-low); }
.partner__title {
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-mono);
  text-transform: none;
  color: var(--text-low);
}

/* the direct line — pinned to the column bottom so it aligns with the form's submit */
.partner__direct {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55em;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--line);
}
.partner__direct-label {
  margin-bottom: 0.2rem;
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-low);
}
.partner__direct a {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  color: var(--text-hi);
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-mono);
  transition: color var(--dur-micro) var(--ease);
}
.partner__direct a:hover, .partner__direct a:focus-visible { color: var(--accent); }

/* --- book-a-call form: borderless on the light surface (no card) --- */
.lead-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
@media (min-width: 60rem) {
  /* a 1px structural spine between the two halves (neutral hairline, not a colour accent) */
  .lead-form {
    padding-inline-start: clamp(2rem, 4vw, 4rem);
    border-inline-start: 1px solid var(--line);
  }
}
.lead-form__kicker { margin-bottom: var(--space-xs); }

.field { display: flex; flex-direction: column; gap: 0.4em; }
.field label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-low);
}
.field__opt { text-transform: none; letter-spacing: var(--ls-mono); color: var(--text-low); }
.field input,
.field textarea,
.field select {
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--line-strong);
  border-radius: 0;
  padding: 0.6em 0.1em;
  color: var(--text-hi);
  font-size: var(--fs-body);
  transition: border-color var(--dur-micro) var(--ease),
              box-shadow var(--dur-micro) var(--ease);
}
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-mid) 50%),
                    linear-gradient(135deg, var(--text-mid) 50%, transparent 50%);
  background-position: calc(100% - 0.7em) 1.05em, calc(100% - 0.35em) 1.05em;
  background-size: 0.35em 0.35em, 0.35em 0.35em;
  background-repeat: no-repeat;
  padding-inline-end: 2em;
}
.field input:hover,
.field textarea:hover,
.field select:hover { border-bottom-color: var(--text-mid); }
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  outline: none;
  border-bottom-color: var(--accent);
  box-shadow: 0 1.5px 0 0 var(--accent);
}
.field textarea { resize: vertical; min-height: 4.5em; }
.field__hint, .field__error {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-mono);
  line-height: 1.4;
}
.field__hint { color: var(--text-low); }
.field__error { color: var(--accent); }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] { border-bottom-color: var(--accent); }

.lead-form__submit { margin-top: var(--space-2xs); align-self: flex-start; }
.lead-form__reassure {
  color: var(--text-low);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-mono);
  line-height: 1.5;
  max-width: 52ch;
}

/* success / error stamp — masked-line reveal of the stamp (no spark theatre) */
.form-success {
  display: flex;
  align-items: flex-start;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-mono);
  line-height: 1.5;
  color: var(--success);
}
.form-success .tick { margin-top: 0.35em; }
/* "Got it." — the bold set-apart stamp (COPY §6) */
.form-success__stamp { font-weight: 500; color: var(--text-hi); }
.form-success[data-state="error"] { color: var(--accent); }
.form-success[data-state="error"] .tick {
  border-color: transparent transparent transparent var(--accent);
}
/* empty live region: kept in the a11y tree so it can announce, but collapsed. */
.form-success.is-empty { opacity: 0; height: 0; overflow: hidden; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .form-success:not(.is-empty) {
    animation: stamp-in var(--dur-enter) var(--ease) both;
  }
  @keyframes stamp-in {
    from { opacity: 0; transform: translateY(0.4em); }
    to   { opacity: 1; transform: none; }
  }
}
.lead-form.is-sent .lead-form__submit,
.lead-form.is-sent .lead-form__reassure { display: none; }

/* ============================================================================
   RESPONSIVE FINE-TUNING (hand-checked 360 / 768 / 1280 / 1920)
   ============================================================================ */
@media (max-width: 30rem) {
  /* keep the live readout at the readable mono floor (~12.5px), not below */
  .live { font-size: var(--fs-mono); padding: 0.65em 0.8em; }
  .work-row__text h3 { font-size: var(--fs-h3); }
}

/* comfortable tap targets for the primary conversion exits on touch widths */
@media (max-width: 48rem) {
  .work-row__visit { min-height: 44px; padding-block: 0.85em; }
  .partner__direct a,
  .colophon__col a { min-height: 44px; }
  /* let the pull-quote share the column measure so the partner block reads as one
     left edge on narrow screens (photo + quote align) */
  .partner__quote { max-width: 100%; }
}
