/* site.css — shell, type scale, layout primitives.
   Every value routes through a token in tokens.css. Never add a raw hex here. */

@font-face { font-family: 'FS Albert Pro'; src: url('../fonts/FSAlbertPro-Thin.ttf') format('truetype');      font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: 'FS Albert Pro'; src: url('../fonts/FSAlbertPro-Light.ttf') format('truetype');     font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'FS Albert Pro'; src: url('../fonts/FSAlbertPro.ttf') format('truetype');           font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'FS Albert Pro'; src: url('../fonts/FSAlbertPro-Bold.ttf') format('truetype');      font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'FS Albert Pro'; src: url('../fonts/FSAlbertPro-ExtraBold.ttf') format('truetype'); font-weight: 800; font-style: normal; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--gradient-canvas);
  color: var(--fg-primary);
  font-family: var(--font-sans);
  font-size: var(--size-body-lg);
  line-height: var(--line-default);
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent-500); outline-offset: 3px; border-radius: var(--radius-xs); }
.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;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
}

/* ── Signature: the Studio's own icon rail, carried onto the marketing site ── */
.rail {
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  width: var(--rail-width);
  display: flex; flex-direction: column; align-items: stretch;
  padding: var(--space-4) 0;
  background: var(--gradient-rail);
  box-shadow: var(--shadow-rail);
  transition: width var(--duration-slow) var(--easing-out);
  overflow: hidden;
}
.rail:hover, .rail:focus-within { width: var(--rail-width-expand); }
.rail__brand { display: flex; align-items: center; gap: var(--space-3); padding: 0 0 var(--space-5) 40px; }
.rail__mark { height: 30px; width: auto; flex: 0 0 auto; }
.rail__word {
  font-family: var(--font-brand); font-size: var(--size-body-lg); color: var(--fg-on-dark);
  white-space: nowrap; opacity: 0;
  transition: opacity var(--duration-base) var(--easing-out);
}
.rail:hover .rail__word, .rail:focus-within .rail__word { opacity: 1; }
.rail__word b { font-weight: 800; }
.rail__word span { font-weight: 300; color: var(--fg-on-dark-muted); }

.rail__nav { display: flex; flex-direction: column; gap: var(--space-1); }
.rail__link {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) 0 var(--space-3) 42px;
  color: var(--fg-on-dark-muted); text-decoration: none;
  border-left: 3px solid transparent;
  transition: background var(--duration-fast) var(--easing-out), color var(--duration-fast) var(--easing-out);
}
.rail__link:hover { color: var(--fg-on-dark); background: color-mix(in srgb, var(--accent-500) 12%, transparent); }
.rail__link[aria-current="page"] { color: var(--fg-on-dark); border-left-color: var(--accent-500); background: color-mix(in srgb, var(--accent-500) 16%, transparent); }
.rail__link > svg { flex: 0 0 auto; }
.rail__label {
  font-size: var(--size-caption); white-space: nowrap; opacity: 0; min-width: 0;
  transition: opacity var(--duration-base) var(--easing-out);
}
.rail:hover .rail__label, .rail:focus-within .rail__label { opacity: 1; }
.rail__spacer { flex: 1 1 auto; }

.shell { margin-left: var(--rail-width); min-height: 100vh; display: flex; flex-direction: column; }
.shell__main { flex: 1 1 auto; }
.wrap { width: min(1160px, calc(100% - var(--space-8) * 2)); margin-inline: auto; }

.foot { background: var(--gradient-rail); color: var(--fg-on-dark-muted); padding: var(--space-10) 0 var(--space-6); }
.foot a { color: var(--fg-on-dark); }

@media (max-width: 860px) {
  .rail {
    inset: auto 0 0 0; width: 100%; height: auto; flex-direction: row;
    padding: 0; overflow-x: auto;
  }
  .rail:hover, .rail:focus-within { width: 100%; }
  .rail__brand, .rail__spacer { display: none; }
  .rail__nav { flex-direction: row; gap: 0; width: 100%; }
  .rail__link { flex-direction: column; gap: var(--space-1); padding: var(--space-3) var(--space-2); border-left: 0; border-top: 3px solid transparent; flex: 1 1 0; }
  .rail__link[aria-current="page"] { border-left-color: transparent; border-top-color: var(--accent-500); }
  .rail__label { opacity: 1; font-size: var(--size-micro); }
  .shell { margin-left: 0; padding-bottom: 72px; }
}

/* ── Display type: one family pushed to its weight extremes ── */
.display {
  font-size: var(--size-hero);
  font-weight: 200;
  line-height: var(--line-tight);
  letter-spacing: var(--tracking-hero);
  margin: 0;
}
.display em { font-style: normal; font-weight: 800; }
.section-title { font-size: var(--size-section); font-weight: 200; letter-spacing: var(--tracking-hero); line-height: 1.08; margin: 0; }
.section-title em { font-style: normal; font-weight: 800; }
.eyebrow {
  font-size: var(--size-caption); font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--fg-tertiary); margin: 0 0 var(--space-3);
}
.lede { font-size: var(--size-body-lg); color: var(--fg-secondary); max-width: 62ch; margin: var(--space-4) 0 0; }

/* ── Dot-grid canvas — the Flow builder's surface as page texture ── */
.dotgrid {
  background-image: radial-gradient(var(--dot-grid-dot) 1px, transparent 1px);
  background-size: var(--dot-grid-size) var(--dot-grid-size);
}

/* ── Reveal ──
   Scoped to .js-reveal, which reveal.js sets on <html> only after it has
   established it can also REMOVE the hidden state. If the script fails to
   load, throws, or the observer never fires, content is simply visible.
   A decorative animation must never be able to hide content permanently. */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--duration-slow) var(--easing-out), transform var(--duration-slow) var(--easing-out);
}
.js-reveal [data-reveal].is-revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal [data-reveal] { opacity: 1; transform: none; }
}

/* ── Surfaces: depth from surface tokens and hairlines, not shadows ── */
.card {
  background: var(--surface-3);
  border: 0.5px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill); border: 0.5px solid transparent;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  transition: transform var(--duration-fast) var(--easing-out), background var(--duration-fast) var(--easing-out);
}
.btn--primary { background: var(--gradient-accent); color: var(--fg-on-dark); }
.btn--primary:hover { transform: translateY(-1px); }
.btn--ghost { background: transparent; border-color: var(--border-card); color: var(--fg-primary); }
.btn--ghost:hover { background: var(--accent-100); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.chip {
  font: inherit; font-size: var(--size-caption); cursor: pointer;
  padding: var(--space-2) var(--space-4);
  border: 0.5px solid var(--border-card); border-radius: var(--radius-pill);
  background: var(--surface-3); color: var(--fg-secondary);
  transition: background var(--duration-fast) var(--easing-out), border-color var(--duration-fast) var(--easing-out);
}
.chip:hover { background: var(--accent-100); }
.chip[aria-pressed="true"] { background: var(--accent-100); border-color: var(--accent-300); color: var(--fg-primary); font-weight: 700; }

.section { padding: var(--space-20) 0; }
.section + .section { padding-top: 0; }

/* ── Lightbox ── */
.lb {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center; gap: var(--space-4);
  padding: var(--space-6);
  background: color-mix(in srgb, var(--warm-1000) 88%, transparent);
}
.lb[hidden] { display: none; }
.lb__stage { margin: 0; max-width: min(1200px, 88vw); }
.lb__img {
  max-height: 78vh; width: auto; margin-inline: auto;
  border-radius: var(--radius-lg); border: 0.5px solid var(--border-card);
  box-shadow: var(--shadow-modal);
}
.lb__cap { margin-top: var(--space-4); text-align: center; color: var(--fg-on-dark); font-size: var(--size-body); }
.lb__close { position: absolute; top: var(--space-5); right: var(--space-5); }
.lb__close, .lb__nav {
  display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto;
  border-radius: var(--radius-pill); border: 0.5px solid var(--border-card);
  background: var(--surface-3); color: var(--fg-primary); cursor: pointer;
}
.lb__close:hover, .lb__nav:hover { background: var(--accent-100); }
body.is-locked { overflow: hidden; }

@media (max-width: 720px) {
  .lb { gap: var(--space-2); padding: var(--space-4); }
  .lb__stage { max-width: 100%; }
  .lb__close, .lb__nav { width: 40px; height: 40px; }
}
