/* ═══════════════════════════════════════════════════════════════
   App shell — header, tabs, view port, view switching.
   Kiosk model retained: body does not scroll, views do.
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--base);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--t-300);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: var(--lh-tight);
  margin: 0;
}
p  { margin: 0; }
ul { margin: 0; }
a  { color: inherit; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--ink); color: var(--base); }

::-webkit-scrollbar { height: 8px; width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-16); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-30); }
* { scrollbar-width: thin; scrollbar-color: var(--ink-16) transparent; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: var(--base);
  padding: 10px 16px; font-size: var(--t-200); font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ── Header ──────────────────────────────────────────────────── */

header.top {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  height: var(--headerH);
  display: flex; align-items: stretch; gap: clamp(12px, 2vw, 32px);
  padding: 0 var(--gutter);
  background: var(--base);
  border-bottom: 1px solid var(--line);
}

.lockup {
  display: flex; align-items: center; gap: clamp(10px, 1vw, 16px);
  background: none; border: 0; padding: 0; flex: none;
}
.lockup__bcg    { height: clamp(15px, 1.5vh, 20px); width: auto; display: block; }
.lockup__client { height: clamp(17px, 1.7vh, 23px); width: auto; display: block; }

/* Lockup sizing and variant switching now live in topbar.css — the bar
   is always white, so the black mark is always the correct one. */

.lockup__x {
  font-size: var(--t-200); color: var(--grey-2); line-height: 1;
  font-weight: 400;
}

.fac-badge {
  display: flex; align-items: center; gap: 7px; flex: none;
  font-size: var(--t-050); letter-spacing: var(--tr-wide);
  text-transform: uppercase; color: var(--stone);
}
.fac-badge .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink);
  animation: facpulse 2.2s ease-in-out infinite;
}
@keyframes facpulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

nav.tabs {
  display: flex; align-items: stretch; gap: 0;
  flex: 1 1 auto; min-width: 0; justify-content: flex-end;
  overflow-x: auto; scrollbar-width: none;
}
nav.tabs::-webkit-scrollbar { display: none; }

nav.tabs button {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 0 clamp(10px, 1.1vw, 18px);
  font-size: var(--t-100); font-weight: 600;
  letter-spacing: var(--tr-mid);
  color: var(--stone); white-space: nowrap;
  transition: color var(--d-micro) var(--ease),
              border-color var(--d-micro) var(--ease);
}
nav.tabs button .n {
  font-family: var(--font-display);
  font-size: var(--t-050); font-weight: 800;
  letter-spacing: var(--tr-wide); color: var(--grey-2);
  transition: color var(--d-micro) var(--ease);
}
nav.tabs button:hover { color: var(--ink); }
nav.tabs button[aria-current="true"] {
  color: var(--ink); border-bottom-color: var(--ink);
}
nav.tabs button[aria-current="true"] .n { color: var(--ink); }

.meta-strip {
  flex: none; align-self: center; text-align: right;
  font-size: var(--t-050); line-height: 1.35;
  letter-spacing: var(--tr-wide); text-transform: uppercase;
  color: var(--stone);
}

/* ── View port ───────────────────────────────────────────────── */

.view-port {
  position: fixed;
  top: var(--headerH); right: 0; bottom: 0; left: 0;
}

.view {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--d-view) var(--ease);
}
.view.active { opacity: 1; visibility: visible; pointer-events: auto; }

.view-inner {
  max-width: var(--measure);
  margin: 0 auto;
  /* Chrome diet, 23 Sep — see topbar.css --headerH. The bottom value
     was sized for a scrolling page; nothing here scrolls vertically,
     so it was pure dead air under the fold-critical content. */
  padding: clamp(14px, 2vh, 28px) var(--gutter) clamp(16px, 2.2vh, 32px);
}

/* ── Entrance ────────────────────────────────────────────────── */

.rise {
  opacity: 0; transform: translateY(14px);
  transition: opacity var(--d-enter) var(--ease-out),
              transform var(--d-enter) var(--ease-out);
}
.view.active .rise { opacity: 1; transform: none; }
.view.active .rise.d1 { transition-delay: .06s; }
.view.active .rise.d2 { transition-delay: .12s; }
.view.active .rise.d3 { transition-delay: .18s; }
.view.active .rise.d4 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1; transform: none; }
  .fac-badge .dot { animation: none; }
}

/* ── Shared type patterns ────────────────────────────────────── */

.eyebrow {
  font-size: var(--t-075); font-weight: 700;
  letter-spacing: var(--tr-wide); text-transform: uppercase;
  color: var(--stone);
}

.rule-h { height: 1px; background: var(--line); border: 0; margin: 0; }

.spec-num {
  font-family: var(--font-display);
  font-weight: 800; font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}

/* ── Header at narrow widths ─────────────────────────────────── */

@media (max-width: 1180px) {
  .meta-strip { display: none; }
}
@media (max-width: 1024px) {
  .lockup .client .for { display: none; }
  .fac-badge .lbl { display: none; }
  nav.tabs button { padding: 0 10px; }
  nav.tabs button .n { display: none; }
}
