/* ============================================================
   BYQ 3.0b · OPENING ACT (byq-b.html)
   algarve-hero-1 -> .ab-hero, algarve-intro-text-1 -> .ab-intro + .ab-works,
   algarve-value-features-1 -> .ab-how. Orb tokens from byq.css (Switzer
   display, Geist Mono labels, one accent) + the Algarve surface layer:
   rounded radii, frosted glass, soft glow (Orb_Aerospace-DESIGN.md §4).
   The light act (hero + field) hands off to the dark act at "How"; the
   rest of the page is 3.0 with the same radius pass applied (bottom).
   ============================================================ */

:root {
  /* Algarve layer */
  --canvas: #F8F7F3;
  --r-sm: .3vw;
  --r: 1.11vw;
  --r-lg: 1.67vw;
  --r-btn: 2.22vw;
  --r-full: 100vw;
  --glass-bg: rgba(0, 0, 0, .32);
  --glass-glow: inset 0 0 24px 0 rgba(248, 247, 243, .08), inset 0 6px 12px 0 rgba(248, 247, 243, .16);
  --card-glow: 0 1px 3px 0 rgba(248, 247, 243, .04), 0 2px 30px 0 rgba(0, 0, 0, .08);
  --pill-bg: rgba(25, 24, 24, .08);
  --pill-line: rgba(25, 24, 24, .16);
  --pill-glow: 0 -1px rgba(247, 247, 242, .16), 0 1px rgba(247, 247, 242, .08);
  /* light-act hairlines */
  --line-l: rgba(18, 18, 17, .14);
  --line-l2: rgba(18, 18, 17, .3);
  --dim-l: rgba(18, 18, 17, .62);
}
@media (max-width: 767px) {
  :root { --r-sm: .7vw; --r: 4.27vw; --r-lg: 5.33vw; --r-btn: 8.53vw; }
}

/* ---------- light act wrapper ---------- */
.ab-light { background: var(--canvas); color: var(--lightink); }
.ab-light ::selection { background: var(--acc); color: #0B0B0A; }

/* nav over the light act (kelvin dock, inverted) */
.bq-nav__logo img { transition: filter .4s var(--ease-k); }
.bq-nav.is-light .bq-nav__links a, .bq-nav.is-light .bq-nav__link { color: var(--dim-l); }
.bq-nav.is-light .bq-nav__links a:hover, .bq-nav.is-light .bq-nav__link:hover { color: var(--lightink); }
.bq-nav.is-light .bq-nav__logo img { filter: invert(1); }
.bq-nav.is-light .bq-btn--ghost { color: var(--lightink); box-shadow: inset 0 0 0 1px var(--line-l2); }
.bq-nav.is-light .bq-btn--ghost:hover { color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); }
.bq-nav.is-light.is-scrolled .bq-nav__dock { background: rgba(248, 247, 243, .84); border-color: var(--line-l); }

/* ---------- 1 · hero (algarve-hero-1) ---------- */
.ab-hero { position: relative; }
.ab-hero__text {
  display: flex; flex-direction: column; gap: .8vw;
  padding: calc(var(--pad) + 76px) var(--pad) 2.2vw;
}
.ab-hero__top { display: flex; justify-content: space-between; align-items: flex-end; perspective: 1000px; }
.ab-hero__word {
  font-family: var(--sans); font-weight: 700; text-transform: uppercase;
  font-size: 10.2vw; line-height: .9; letter-spacing: -.035em; color: var(--lightink);
  transform-origin: 50% 100%; backface-visibility: hidden; will-change: transform;
}
.ab-echo { display: flex; flex-direction: column; gap: 1vw; margin-left: -.4vw; }
.ab-echo__row { overflow: clip; line-height: 0; }
.ab-echo__row.is-1 { height: 2vw; }
.ab-echo__row.is-2 { height: 4vw; }
.ab-echo__row.is-3 { height: 6vw; }
.ab-echo__word {
  display: block; margin: 0; font-family: var(--sans); font-weight: 700; text-transform: uppercase;
  font-size: 15vw; line-height: .8; letter-spacing: -.04em; color: var(--lightink);
  white-space: nowrap; will-change: transform;
}
.ab-hero__meta {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  margin-top: 4.4vw; font-size: clamp(15px, 1.3vw, 21px); line-height: 1.35;
}
.ab-hero__stats { max-width: 39vw; display: flex; flex-direction: column; gap: 2px; }
.ab-hero__stats li { display: flex; gap: 12px; align-items: baseline; }
.ab-hero__stats li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); flex: none;
  transform: translateY(-2px);
}
.ab-hero__desc { max-width: 31vw; text-align: right; color: var(--lightink); }

.ab-grid-sec { position: relative; height: 320vh; }
.ab-grid-sec__pin { position: sticky; top: 0; height: 100vh; padding: 2vw; overflow: hidden; }
.ab-grid {
  position: relative; width: 100%; height: 100%; display: grid;
  grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 1vw; perspective: 2000px;
}
.ab-tile {
  margin: 0; position: relative; overflow: hidden; background: #e4e2dc; border-radius: var(--r);
  backface-visibility: hidden; will-change: transform, opacity;
}
.ab-tile img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); display: block; }
.ab-tile.is-tl { transform-origin: 0 0; }
.ab-tile.is-t { transform-origin: 50% 0; }
.ab-tile.is-tr { transform-origin: 100% 0; }
.ab-tile.is-l { transform-origin: 0 50%; }
.ab-tile.is-r { transform-origin: 100% 50%; }
.ab-tile.is-bl { transform-origin: 0 100%; }
.ab-tile.is-b { transform-origin: 50% 100%; }
.ab-tile.is-br { transform-origin: 100% 100%; }
.ab-grid__gap { grid-column: span 3; }
.ab-film {
  position: absolute; inset: 0; margin: auto; z-index: 2;
  width: calc(60% - .4vw); height: calc(33.333% - .667vw);
  overflow: hidden; background: var(--panel); border-radius: var(--r);
  transform-origin: 50% 50%; will-change: transform;
}
.ab-film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* on desktop the JS moves the label and the pill into this stage-level layer, which tracks the
   film's VISIBLE corners while it grows (the film outgrows the stage sideways at cover scale) */
.ab-film__ui-layer { position: absolute; z-index: 3; pointer-events: none; }
.ab-film__ui-layer .ab-film__btn { pointer-events: auto; }
.ab-film__label {
  position: absolute; left: 20px; top: 18px; display: flex; gap: 10px; align-items: center;
  color: var(--ink);
}
.ab-film__label i { width: 6px; height: 6px; border-radius: 50%; background: var(--held); }
.ab-film__label .bq-label { color: rgba(241, 241, 237, .8); }
.ab-film__btn {
  position: absolute; left: 20px; bottom: 18px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: #F7F7F2; background: var(--pill-bg); border: 1px solid var(--pill-line); border-radius: 24px;
  padding: 8px 12px; cursor: pointer; box-shadow: var(--pill-glow);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background .2s, color .2s, border-color .2s;
}
.ab-film__btn.is-paused { color: #191818; background: #F7F7F2; border-color: rgba(25, 24, 24, .16); }
.ab-film__btn:hover { border-color: var(--acc); color: var(--acc); }
.ab-film__btn.is-paused:hover { color: #191818; border-color: var(--acc); }

/* ---------- 2 · field (algarve-intro-text-1) ---------- */
.ab-intro { position: relative; }
.ab-intro__track { height: 220vh; }
.ab-intro__stage {
  position: sticky; top: 0; height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: var(--pad);
}
.ab-intro__copy {
  max-width: 56vw; margin: 0; text-align: center; text-wrap: balance;
  font-weight: 600; font-size: clamp(24px, 2.6vw, 44px); line-height: 1.1; letter-spacing: -.03em; color: var(--lightink);
}
.ab-intro__copy .w { display: inline-block; }
.ab-intro__copy em { font-style: normal; color: var(--acc); }

.ab-works { position: relative; }
.ab-works__track { height: 300vh; }
.ab-works__stage {
  position: sticky; top: 0; height: 100vh; padding: var(--pad);
  display: flex; flex-direction: column; justify-content: center;
}
.ab-works__heads { display: flex; justify-content: space-between; align-items: center; }
.ab-works__head {
  margin: 0; font-family: var(--sans); font-weight: 700; text-transform: uppercase;
  font-size: clamp(20px, 2vw, 32px); letter-spacing: -.02em; line-height: 1.1; color: var(--lightink);
}
.ab-works__head.is-left { transform-origin: 100% 50%; }
.ab-works__head.is-right { transform-origin: 0 50%; }
.ab-works__deck { position: absolute; inset: 0; margin: auto; width: 23vw; height: 58vh; max-height: 640px; }
.ab-work {
  position: absolute; inset: 0; display: block; overflow: hidden; background: #fff; color: var(--ink);
  border-radius: var(--r); box-shadow: var(--card-glow); will-change: transform;
}
.ab-work img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%);
  border-radius: var(--r-sm); transition: transform .9s var(--ease-k);
}
.ab-work:hover img { transform: scale(1.04); }
.ab-work.is-1 { z-index: 1; }
.ab-work.is-2 { z-index: 3; }
.ab-work.is-3 { z-index: 2; }
.ab-work__cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 8.33vw 20px 1.67vw; text-align: center;
  background: linear-gradient(0deg, #000, rgba(0, 0, 0, 0));
  display: flex; flex-direction: column; gap: .28vw;
}
.ab-work__cap h3 { margin: 0; font-weight: 700; text-transform: uppercase; letter-spacing: -.02em; font-size: clamp(18px, 1.9vw, 30px); line-height: 1; }
.ab-work__cap span { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(241, 241, 237, .72); }
.ab-pill { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; }
.ab-pill__in {
  display: block; opacity: 0; transform: scale(.6); transform-origin: 0 0;
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--canvas);
  background: var(--glass-bg); border-radius: var(--r-full); padding: .56vw .83vw; white-space: nowrap;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: opacity .3s var(--ease-k), transform .45s var(--spring);
}
.ab-pill__in.is-on { opacity: 1; transform: scale(1); }

/* ---------- 3 · how (algarve-value-features-1, dark act begins) ---------- */
.ab-how { position: relative; background: var(--bg); color: var(--ink); }
.ab-how__head { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--pad); }
.ab-how__lines { display: flex; flex-direction: column; align-items: center; text-align: center; transform-origin: 50% 50%; }
.ab-how__line {
  margin: 0; overflow: hidden; padding: 0 .06em;
  font-weight: 700; text-transform: uppercase; font-size: clamp(36px, 7vw, 120px); line-height: 1.04; letter-spacing: -.035em;
}
.ab-how__line span { display: inline-block; will-change: transform; }
.ab-how__line em { font-style: normal; color: var(--acc); }
.ab-cards { display: flex; flex-direction: column; gap: 2.22vw; padding: 0 var(--pad) 8.33vw; }
.ab-card {
  position: sticky; top: calc(1.39vw * (var(--i) + 1)); height: 90vh; min-height: 560px;
  padding: 4.44vw; background: var(--panel); color: var(--ink); overflow: hidden; border-radius: var(--r-lg);
  display: flex; flex-direction: column; justify-content: space-between;
  transform-origin: 50% 0; will-change: transform, filter;
}
.ab-card__bg { position: absolute; inset: 0; z-index: 0; }
.ab-card__bg img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); filter: saturate(.55); }
.ab-card__veil { position: absolute; inset: 0; background: rgba(11, 11, 10, .7); }
.ab-card__top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.ab-card__title, .ab-card__num {
  margin: 0; font-family: var(--sans); font-weight: 700; text-transform: uppercase;
  font-size: clamp(40px, 7.2vw, 118px); line-height: .95; letter-spacing: -.035em;
}
.ab-card__num { color: var(--acc); }
.ab-card__bottom { position: relative; z-index: 2; max-width: 39vw; display: flex; flex-direction: column; gap: 1.1vw; }
.ab-card__sub { margin: 0; font-weight: 600; font-size: clamp(22px, 2.5vw, 40px); line-height: 1.08; letter-spacing: -.025em; }
.ab-card__bottom .bq-lead { color: rgba(241, 241, 237, .78); }
.ab-card .bq-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ab-card .bq-chips span {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  padding: 7px 12px; border-radius: var(--r-full); background: var(--glass-bg);
  box-shadow: inset 0 0 0 1px rgba(248, 247, 243, .16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.ab-card__float {
  position: absolute; z-index: 2; right: 10%; bottom: 10%;
  width: 27vw; max-width: 490px; height: 50vh; max-height: 600px; padding: 2.22vw;
  background: var(--glass-bg); border-radius: var(--r-lg); box-shadow: var(--glass-glow);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; transform: rotate(6deg);
}
.ab-card__float.is-l { transform: rotate(-7deg); }
.ab-card__frame { position: relative; width: 100%; height: 100%; overflow: hidden; background: #000; border-radius: var(--r); }
.ab-card__frame img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); display: block; }
.ab-card__frame .bq-label { position: absolute; left: 14px; bottom: 12px; color: var(--ink); }

/* ---------- 3.0b radius pass on the inherited 3.0 components ---------- */
body.byq-b .bq-nav__dock { border-radius: var(--r-lg); }
body.byq-b .bq-btn { border-radius: var(--r-btn); }
body.byq-b .bq-card { border-radius: var(--r-lg); box-shadow: var(--card-glow); }
body.byq-b .bq-stack__media { border-radius: var(--r); overflow: hidden; }
body.byq-b .bq-readout { border-radius: calc(var(--r) * .6); }
body.byq-b .bq-chips span { border-radius: var(--r-full); }
body.byq-b .bq-ba__cell { border-radius: var(--r); }
body.byq-b .bq-rail { border-radius: var(--r-lg); }

/* ---------- responsive ---------- */
@media (max-width: 991px) {
  .ab-card { max-height: 34rem; min-height: 0; }
  .ab-card__float { height: 50%; }
}
@media (max-width: 767px) {
  .ab-hero__text { padding-top: 104px; gap: 2vw; }
  .ab-echo { gap: 1.5vw; }
  .ab-hero__meta { flex-direction: column; margin-top: 8vw; gap: 18px; font-size: 15px; }
  .ab-hero__stats, .ab-hero__desc { max-width: none; text-align: left; }
  .ab-grid-sec { height: auto; }
  .ab-grid-sec__pin { position: relative; height: auto; padding: 3vw; }
  .ab-grid { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 44vw; gap: 2vw; perspective: none; }
  .ab-grid__gap { display: none; }
  .ab-film { position: relative; inset: auto; margin: 0; width: auto; height: auto; grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .ab-film__ui-layer { display: none; }
  .ab-tile { transform: none !important; opacity: 1 !important; }
  .ab-intro__track { height: auto; }
  .ab-intro__stage { position: relative; height: auto; padding: 88px var(--pad); }
  .ab-intro__copy { max-width: none; }
  .ab-works__track { height: auto; }
  .ab-works__stage { position: relative; height: auto; }
  .ab-works__heads { display: none; }
  .ab-works__deck { position: relative; inset: auto; margin: 0; width: auto; height: auto; max-height: none; display: flex; flex-direction: column; gap: 14px; }
  .ab-work { position: relative; height: 64vw; transform: none !important; }
  .ab-work__cap { opacity: 1 !important; transform: none !important; padding: 21.32vw 20px 5.33vw; }
  .ab-pill__in { padding: 2.13vw; }
  .ab-how__head { min-height: 0; padding: 88px var(--pad) 40px; }
  .ab-cards { gap: 14px; padding-bottom: 64px; }
  .ab-card { position: relative; top: auto; height: auto; max-height: none; padding: 22px; gap: 28px; transform: none !important; filter: none !important; }
  .ab-card__bottom { max-width: none; }
  .ab-card__float { position: relative; right: auto; bottom: auto; width: 100%; max-width: none; height: 56vw; max-height: none; padding: 12px; transform: none; }
}

/* ---------- reduced motion: static fallbacks ---------- */
@media (prefers-reduced-motion: reduce) {
  .ab-grid-sec { height: 100vh; }
  .ab-intro__track, .ab-works__track { height: auto; }
  .ab-intro__stage, .ab-works__stage { position: relative; height: auto; padding: 120px var(--pad); }
  .ab-works__deck { position: relative; inset: auto; margin: 0 auto; }
  .ab-work.is-1 { transform: translateX(-110%) rotate(-7deg); }
  .ab-work.is-3 { transform: translateX(110%) rotate(7deg); }
  .ab-pill__in { transition: none; }
}

/* ---------- statement · the thesis, centered on the dark act (2026-10-19) ---------- */
.ab-statement { position: relative; background: var(--bg); color: var(--ink); }
.ab-statement__inner { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--pad); }
.ab-statement__lines { margin: 0; display: flex; flex-direction: column; align-items: center; text-align: center; font-family: var(--sans); }
.ab-statement__line {
  display: block; overflow: hidden; padding: 0 .06em;
  font-weight: 700; text-transform: uppercase; font-size: clamp(26px, 5vw, 76px); line-height: 1.02; letter-spacing: -.035em;
}
.ab-statement__line span { display: inline-block; will-change: transform; }
.ab-statement__line em { font-style: normal; color: var(--acc); }
@media (max-width: 767px) {
  .ab-statement__inner { min-height: 0; padding: 96px var(--pad); }
  .ab-statement__line { font-size: clamp(26px, 8vw, 40px); line-height: 1.06; }
}

/* ============================================================
   HEADLINE FACE · wide-tracked Montserrat caps (David, 2026-11-18, from the "LOCK IN" reference:
   small, airy, letter-spaced caps with room around them). Switzer stays for reading text, Geist
   Mono for labels. scan/hero.js reads these three tokens for the hero sentence relief.
   Letter-spacing trails the last glyph, so centred lines get padding-left = the tracking.
   Revert = delete this block, the Montserrat family in the font link, and hero.js FACE/FW/TRACK.
   ============================================================ */
:root {
  --display: 'Montserrat', 'Switzer Variable', Arial, sans-serif;
  --display-w: 500;
  --track-display: .11em;   /* halved from .22em (David, 2026-11-23) */
}
body.byq-b :is(.sc-hl, .ab-works__head, .ab-work__cap h3, .ab-statement__line, .bq-h1, .bq-h2, .bq-h3) {
  font-family: var(--display); font-weight: var(--display-w); letter-spacing: var(--track-display);
}
/* hero sentence (DOM lines over the relief + the no-WebGL fallback) */
body.byq-b .hx-embed .hud-lines .ln.is-locked,
body.byq-b .hx-embed .sc-sent span {
  font-family: var(--display); font-weight: var(--display-w); letter-spacing: var(--track-display);
  padding-left: var(--track-display);
}
body.byq-b .hx-embed .sc-sent span { line-height: 1.35; }
/* scan captions */
body.byq-b .sc-h .sc-hl, body.byq-b .sc-h[data-cap] .sc-hl {
  max-width: 24em; font-size: clamp(17px, 1.75vw, 28px); line-height: 1.32; text-wrap: balance;
}
/* in the field */
body.byq-b .ab-works__head { font-size: clamp(13px, 1.25vw, 20px); }
body.byq-b .ab-work__cap h3 { font-size: clamp(13px, 1.15vw, 18px); line-height: 1.3; padding-left: var(--track-display); }
/* statement: the reference's staging, small centred lines in a lot of black */
body.byq-b .ab-statement__line {
  font-size: clamp(15px, 2vw, 32px); line-height: 1.6;
  padding: 0 .06em 0 calc(.06em + var(--track-display));
}
/* closer + wordmark */
body.byq-b .bq-footer__mid .bq-h1 { max-width: 15em; font-size: clamp(20px, 2.4vw, 38px); line-height: 1.3; }
body.byq-b .bq-footer__word {
  font-family: var(--display); font-weight: var(--display-w);
  font-size: 8.55vw; line-height: 1; letter-spacing: .15em;   /* halved from .3em; size refit so the glyphs span the wrap edge to edge */
}
@media (max-width: 767px) {
  body.byq-b .ab-statement__line { font-size: clamp(12px, 3.6vw, 17px); line-height: 1.7; }
  body.byq-b .sc-h .sc-hl, body.byq-b .sc-h[data-cap] .sc-hl { font-size: clamp(15px, 4.4vw, 20px); }
}
