/* ==========================================================================
   btools.ai — design system
   Ported from the shipped BidBrief web app (web 2.2.0) per
   BIDBRIEF_DESIGN_SYSTEM_HANDOFF.md, Option B: keep the brass/gold brand and
   adopt BidBrief's *structure* (atmosphere → scrims → glass → motion). The
   parent brand stays the neutral, premium frame; BidBrief blue reads as a
   product inside it. An ice-blue site was tried on 2026-08-11 and rejected —
   gold is the client's settled preference. Do not re-theme without asking.

   Zero dependencies. No framework, no CDN, no build step, no external requests
   at all — the fonts are self-hosted (see section 0).
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. FONTS — self-hosted, deliberately.
   These were originally pulled from Fontshare's API at runtime. That was
   dropped after the API returned a "temporarily restricted" stub instead of
   the stylesheet during testing, which silently fell the whole site back to
   system fonts with no error anywhere. A brand's typography should not be a
   third party's uptime problem. Self-hosting also removes a DNS lookup + two
   round-trips, and lets the CSP drop its font-src exception entirely.

   Clash Display and Satoshi are by the Indian Type Foundry, released free for
   personal and commercial use under the ITF Free Font License, which permits
   self-hosting. Files: assets/fonts/*.woff2 (107 KB total, all five weights).
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Clash Display';
  src: url('/assets/fonts/clash-display-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Clash Display';
  src: url('/assets/fonts/clash-display-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('/assets/fonts/satoshi-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('/assets/fonts/satoshi-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('/assets/fonts/satoshi-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* --------------------------------------------------------------------------
   1. TOKENS
   The palette exists exactly once. Re-theming is this block and nothing else.
   -------------------------------------------------------------------------- */
:root {
  --space-deep:   #050609;   /* page ground — near-black                    */
  --space-warm:   #12100A;   /* atmosphere lift — warm, never a blue lift    */
  --surface-tint: #2A2312;   /* surface tint — warm, very low chroma         */
  --glow-mid:     #C9A227;   /* mid-glow: the brass                          */
  --accent:       #ECC766;   /* the accent: links, icons, active states      */

  --success: #4ADE80;
  --warn:    #F5A524;
  --danger:  #F26D6D;

  /* Glass fills run ~25% weaker than BidBrief's: white glass over near-black
     reads brighter than the same fill over navy, and at 0.08 it goes milky. */
  --glass-fill:   rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.11);
  /* The stroke carries the gold. A white hairline on near-black reads as a
     grey outline; gold at low alpha keeps the "lit edge" quality. */
  --glass-stroke: rgba(236, 199, 102, 0.16);

  --text-primary:   #F7F6F2;  /* warm off-white — never pure #FFF */
  --text-secondary: rgba(247, 246, 242, 0.66);
  --text-tertiary:  rgba(247, 246, 242, 0.42);

  --radius-card: 18px;
  --radius-hub:  20px;
  --radius-pill: 999px;

  --font:         'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Clash Display', var(--font);

  /* The content column caps here even on a 4K display. Full-bleed text
     destroys the "suspended object" illusion the atmosphere creates. */
  --measure: 1080px;
  --measure-narrow: 720px;

  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  min-height: 100%;
  background: var(--space-deep);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:focus-visible,
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

::selection { background: rgba(236, 199, 102, 0.28); color: #fff; }

/* Skip link — keyboard users shouldn't tab through the whole nav every page. */
.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 4000;
  padding: 10px 18px; border-radius: var(--radius-pill);
  background: var(--space-warm); border: 1px solid var(--glass-stroke);
  color: var(--text-primary); font-size: 14px; font-weight: 600;
}
.skip-link:focus { top: 16px; }

/* --------------------------------------------------------------------------
   3. THE ATMOSPHERE LAYER
   One light source behind everything. Every page floats over it and it drifts
   on scroll, so movement down the page reads as parallax, not as a page swap.
   This is the single highest-value thing carried over from BidBrief.
   -------------------------------------------------------------------------- */
.atmos {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  --drift: 0;
  --orb-size: min(100vw, 760px);
  /* The light source sits OFF the text column, high and to the right. Centring
     it put the glowing core directly behind the wordmark, which cost the ".ai"
     its contrast — the same collision this project already hit once before
     (see memory/debug_history.md). Composition, not brightness, is the fix:
     move the bright thing out of the type's way and let the halo do the work. */
  --orb-x: calc(74% - var(--drift) * 10vw);
  --orb-y: 20vh;
  background: radial-gradient(circle at 62% 14%, var(--space-warm) 0%, var(--space-deep) 78%);
}
.atmos > * { position: absolute; transition: left .45s ease, transform .45s ease, top .45s ease; }

.atmos-stars { left: 0; top: 0; width: 100%; height: 100%; opacity: .55; }

/* The bloom. This is the light source everything else is lit by. */
.atmos-halo {
  width: calc(var(--orb-size) * 1.3); height: calc(var(--orb-size) * 1.3);
  left: var(--orb-x); top: var(--orb-y); transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--glow-mid);
  filter: blur(70px); opacity: .22;
  animation: breathe-slow 3.4s ease-in-out infinite;
}

/* The core of the aperture — a glowing body, lit from upper-left.
   Kept small and low-opacity on purpose: it is a light SOURCE, not a subject.
   At full strength it competes with the wordmark instead of lighting it. */
.atmos-core {
  width: calc(var(--orb-size) * .30); height: calc(var(--orb-size) * .30);
  left: var(--orb-x); top: var(--orb-y); transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at calc(36% - var(--drift) * 8%) 28%,
    #fff6df 3%, var(--accent) 26%, var(--glow-mid) 54%, #3A2E0F 78%, #0B0904 100%);
  box-shadow: 0 0 60px rgba(201, 162, 39, .32),
              inset 2px 2px 0 -1px rgba(236, 199, 102, .9);   /* the rim light */
  opacity: .3;
  animation: breathe-slow 3.4s ease-in-out infinite;
}

/* Specular highlight — this is what sells it as a sphere rather than a circle. */
.atmos-gleam {
  width: calc(var(--orb-size) * .16); height: calc(var(--orb-size) * .11);
  left: calc(var(--orb-x) - var(--orb-size) * .06 - var(--drift) * 18px);
  top: calc(var(--orb-y) - var(--orb-size) * .07);
  transform: translate(-50%, -50%);
  border-radius: 50%; filter: blur(14px);
  background: radial-gradient(circle, rgba(255, 255, 255, .45) 0%, transparent 70%);
}

/* The aperture blades, as the orbital ring. -14deg is the signature angle —
   it reads as depth instead of as a flat badge. */
.atmos-ring {
  width: calc(var(--orb-size) * 1.5); height: calc(var(--orb-size) * .44);
  left: var(--orb-x); top: calc(var(--orb-y) + var(--orb-size) * .06);
  transform: translate(-50%, -50%) rotate(-14deg);
  border-radius: 50%; opacity: .5;
  border: 1.6px solid rgba(236, 199, 102, .34);
  box-shadow: 0 0 18px rgba(236, 199, 102, .14);
}
.atmos-ring.is-inner {
  width: calc(var(--orb-size) * 1.05); height: calc(var(--orb-size) * .3);
  opacity: .3;
  transform: translate(-50%, -50%) rotate(-14deg);
}

.atmos-moon {
  width: 22px; height: 22px; border-radius: 50%; opacity: .7;
  left: calc(84% + var(--drift) * 12px); top: 68vh;
  background: radial-gradient(circle at 35% 30%,
    rgba(255, 255, 255, .55) 0%, rgba(201, 162, 39, .3) 45%, transparent 75%);
}

/* SCRIMS — the answer to "background still not dim enough".
   Guarantee a contrast floor where the text is, instead of dimming the whole
   artwork globally. Note the asymmetry: gentle at top (headlines live there),
   heavy at the bottom (dense content lives there). */
.atmos-scrim-top {
  inset: 0 0 auto 0; height: 30vh; width: 100%;
  background: linear-gradient(to bottom, rgba(5, 6, 9, .55), transparent);
}
.atmos-scrim-bottom {
  inset: auto 0 0 0; height: 58vh; width: 100%;
  background: linear-gradient(to bottom, transparent, rgba(5, 6, 9, .82));
}

/* --------------------------------------------------------------------------
   4. LAYOUT
   -------------------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--measure); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--measure-narrow); }

.section { padding: clamp(64px, 9vw, 128px) 0; position: relative; }
/* Capped in rem, NOT in ch. `ch` resolves against this block's own 16px font,
   so a 46ch cap here squeezes a 50px display headline into a ~370px column.
   The 46ch measure belongs on the paragraphs themselves (.lede/.body-text). */
.section-head { max-width: 46rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.is-centered { margin-left: auto; margin-right: auto; text-align: center; }

/* The minmax floor has to be high enough that auto-fit actually lands on the
   column count the class name promises at our --measure width, otherwise a
   4-item "grid-2" reflows to 3 + 1 and leaves an orphan row. */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

@media (max-width: 520px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   5. TYPOGRAPHY
   Hierarchy comes from opacity, not from a fourth colour. Three tiers only.
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.5px; }

/* Headlines carry an accent-hued text-shadow. Cheapest single move that
   makes type feel lit BY the scene rather than pasted on top of it. */
.h-hero {
  font-size: clamp(38px, 6vw, 76px);
  text-shadow: 0 0 18px rgba(201, 162, 39, .55);
}
.h-section {
  font-size: clamp(30px, 4.2vw, 50px);
  text-shadow: 0 0 16px rgba(201, 162, 39, .40);
}
.h-card { font-size: 19px; font-weight: 600; letter-spacing: -0.2px; }

.eyebrow {
  display: block; margin-bottom: 12px;
  font-family: var(--font);
  font-size: 11px; font-weight: 700; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--text-tertiary);
}
.eyebrow.is-accent { color: var(--glow-mid); }

.lede {
  margin-top: 18px;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-secondary);
  max-width: 46ch;              /* the measure — never wider */
}
/* A lede written as beats rather than as a paragraph: one sentence per block,
   with air between them, so each lands on its own before the next arrives.
   The measure stays at 46ch — a long beat is still allowed to wrap, and the
   spacing is what tells a deliberate break apart from a wrapped one. Without
   that gap the sentences run together into a ragged block and the breaks read
   as an accident. */
.lede.is-beats > span { display: block; text-wrap: pretty; }   /* no one-word last lines */
.lede.is-beats > span + span { margin-top: .55em; }

.body-text { color: var(--text-secondary); max-width: 46ch; }
.body-text + .body-text { margin-top: 14px; }
.muted { color: var(--text-tertiary); }
.accent-text { color: var(--accent); }

/* --------------------------------------------------------------------------
   6. SURFACES — the glass card
   Three things make this read as glass and not a grey box. Drop any one and
   the effect collapses: (1) saturate() pulling colour through from the
   atmosphere, (2) the two-layer background, (3) the gradient lit rim.
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  padding: 24px;
  border-radius: var(--radius-card);
  background:
    linear-gradient(rgba(42, 35, 18, 0.20), rgba(42, 35, 18, 0.20)),
    var(--glass-fill);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-stroke);
  box-shadow: 0 10px 16px rgba(5, 6, 9, 0.60),
              0 4px 24px rgba(201, 162, 39, 0.10);
}
/* The lit top edge. Done as a masked overlay because border-image kills
   border-radius (design system trap #3). */
.card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, .30), rgba(255, 255, 255, .05), rgba(201, 162, 39, .28));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-secondary); font-size: 15px; }

.card-icon {
  width: 42px; height: 42px; margin-bottom: 16px;
  border-radius: 50%; display: grid; place-items: center;
  color: var(--accent);
  background: rgba(42, 35, 18, .6);
  border: 1px solid rgba(236, 199, 102, .35);
}
.card-icon svg { width: 20px; height: 20px; }

/* --------------------------------------------------------------------------
   7. BUTTONS
   Pill radius everywhere; scale(.97) on press everywhere. The press-scale is
   disproportionately responsible for the thing feeling native — and it is free.
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border: 0; border-radius: var(--radius-pill);
  font: 600 15px/1.2 var(--font); cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; }

/* Primary — exactly one per view, never two. */
.btn-glow {
  color: #1A1405;
  background: linear-gradient(135deg, #F5DFA0, var(--accent) 45%, var(--glow-mid));
  border: 1px solid rgba(255, 255, 255, .35);
  box-shadow: 0 6px 18px rgba(201, 162, 39, .40);
}
.btn-glow:hover { box-shadow: 0 8px 30px rgba(201, 162, 39, .62); }

.btn-ghost {
  color: var(--accent);
  background: var(--glass-fill);
  border: 1px solid rgba(236, 199, 102, .35);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.btn-ghost:hover { background: var(--glass-strong); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn-row.is-centered { justify-content: center; }

/* --------------------------------------------------------------------------
   8. THE HUB ROW — the menu, solved.
   Replaces the old bare Clash Display reveal menu. The client rejected that
   twice ("menu font still sucks"); the real problem was that floating text has
   no *material*, so it cannot carry hierarchy or a hover state. Give it a
   surface and the typeface stops carrying weight it was never able to carry.
   -------------------------------------------------------------------------- */
.hub { display: grid; gap: 12px; width: 100%; max-width: 560px; }

.hub-btn {
  display: flex; align-items: center; gap: 16px;
  width: 100%; text-align: left;
  padding: 18px; border-radius: var(--radius-hub);
  color: var(--text-primary); cursor: pointer;
  background:
    linear-gradient(rgba(42, 35, 18, .24), rgba(42, 35, 18, .24)),
    var(--glass-fill);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(236, 199, 102, .30);
  box-shadow: 0 9px 14px rgba(5, 6, 9, .6);
  transition: scale .28s cubic-bezier(.16,1,.3,1), border-color .25s ease,
              box-shadow .25s ease, background .25s ease;
}
/* Hover EXPANDS the row rather than just lifting it.
   Note this uses the independent `scale` property, not `transform: scale()`.
   The hero rows run an infinite float animation on `translate`, and an
   animation always beats a plain declaration for the same property — even a
   paused one, which still applies its computed value. Keeping hover on `scale`
   and the float on `translate` means the two compose instead of fighting, so a
   row can drift and expand under the cursor at the same time. */
.hub-btn:hover {
  scale: 1.03;
  border-color: rgba(236, 199, 102, .62);
  background:
    linear-gradient(rgba(42, 35, 18, .34), rgba(42, 35, 18, .34)),
    var(--glass-strong);
  box-shadow: 0 18px 34px rgba(5, 6, 9, .72), 0 0 30px rgba(236, 199, 102, .30);
}
.hub-btn:hover .hub-chevron { color: var(--accent); translate: 3px 0; }
.hub-chevron { transition: translate .2s ease, color .2s ease; }
.hub-btn:active { scale: .99; }

.hub-icon {
  flex: 0 0 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--accent);
  background: rgba(42, 35, 18, .6);
  border: 1px solid rgba(236, 199, 102, .45);
}
.hub-icon svg { width: 19px; height: 19px; }
.hub-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hub-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -0.2px; line-height: 1.2; }
.hub-sub   { font-size: 12.5px; color: var(--text-secondary); line-height: 1.4; }
.hub-chevron { margin-left: auto; color: var(--text-tertiary); flex-shrink: 0; }
.hub-chevron svg { width: 18px; height: 18px; }

/* The flagship earns distinction through glow, not a different colour.
   (Colour means state, never decoration.) Deliberately a box-shadow-only pulse:
   the hero rows already own `transform` for their float, and two animations
   competing for the same property means the last one silently wins. */
.hub-btn.is-primary {
  border-color: rgba(236, 199, 102, .60);
  box-shadow: 0 9px 20px rgba(5, 6, 9, .6), 0 0 26px rgba(236, 199, 102, .40);
  animation: glow-pulse 3.6s ease-in-out infinite;
}
/* Deliberately NOT paused on hover. Pausing here also froze this row's float
   (they share the shorthand), so the flagship sat still while the other four
   kept drifting — and inconsistent motion reads worse than either option.
   The rows expand *while* they move, which is the intended feel. */

/* --------------------------------------------------------------------------
   9. HEADER / NAV (persistent, all pages)
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2500;
  padding: 14px 0;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
  background: rgba(5, 6, 9, .72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: rgba(236, 199, 102, .12);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text-primary); }
.brand-mark { width: 30px; height: 30px; flex-shrink: 0; }
.brand-text {
  font-family: var(--font-display); font-weight: 600;
  font-size: 20px; letter-spacing: -0.4px; line-height: 1;
}
.brand-text .dot-ai { color: var(--accent); }

/* The operating entity, kept quietly visible beside the mark on every page.
   Same register as the footer fine print — present, never competing with the
   brand it sits next to. `margin-right: auto` is what holds the layout: the
   header is space-between, so without it a third child would spread across the
   bar instead of hugging the wordmark. */
.brand-entity {
  margin-left: 13px;
  margin-right: auto;
  padding-left: 13px;
  border-left: 1px solid rgba(236, 199, 102, .18);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .9px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  white-space: nowrap;
  line-height: 1;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 14px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  transition: color .18s ease, background .18s ease;
}
.nav a:hover { color: var(--text-primary); background: var(--glass-fill); }
.nav a.is-current { color: var(--accent); background: var(--glass-fill); }

.nav-cta { margin-left: 8px; padding: 9px 18px !important; font-size: 14px; }

/* Mobile: a persistent floating capsule. Always visible, thumb-reachable, no
   awake/asleep state to get stuck in — this removes the touch bug class
   entirely rather than fixing the instance. */
.tabbar { display: none; }

/* --------------------------------------------------------------------------
   10. HERO
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 120px 24px 80px; text-align: center;
}
.lockup {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(12px, 2vw, 24px);
  animation: materialize 3.2s cubic-bezier(.16, 1, .3, 1) both;
}
.lockup-mark { width: clamp(56px, 7vw, 92px); height: clamp(56px, 7vw, 92px); flex-shrink: 0; }
.wordmark {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(46px, 9vw, 104px);
  letter-spacing: -0.03em; line-height: 1; white-space: nowrap;
  text-shadow: 0 0 30px rgba(201, 162, 39, .45);
}
.wordmark .dot-ai { color: var(--accent); }

/* Parent-company attribution, sized to sit under the wordmark as part of the
   lockup rather than as a line of copy. Deliberately quiet: tertiary text,
   tracked out, roughly a third the tagline's size — it should read the way an
   imprint reads on a book jacket, present but never competing with the mark. */
.hero-byline {
  margin: 14px auto 0;
  font-size: clamp(10.5px, 1vw, 12px);
  font-weight: 500;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  animation: rise 1.4s ease-out .56s both;
}
.hero-byline .byline-name { color: var(--text-secondary); }

.hero-tagline {
  /* Wide enough that the whole line fits on one row at desktop sizes; `ch`
     resolves against this element's own ~21px font, so 34ch was far too tight
     and orphaned "you." onto its own line. */
  margin: 22px auto 0; max-width: 40rem;
  font-size: clamp(16px, 1.9vw, 21px); color: var(--text-secondary);
  animation: rise 1.4s ease-out .9s both;
}
.hero-hub { margin: clamp(40px, 6vw, 64px) auto 0; }

/* THE CASCADE.
   Two animations, listed in order, on one element:

   1. `hub-arrive` — the entrance. Slow (3.8s) and widely staggered (0.8s apart)
      so each row resolves out of blur on its own beat instead of the group
      snapping in. Ends with `forwards` fill holding the settled state.
   2. `hub-float`  — the idle. Starts only after that row has arrived, then
      drifts it a few pixels and breathes its opacity forever.

   Both animate `translate` (never `transform`), leaving the `scale` property
   free for the hover rule above — so a row can drift and expand at once.
   `hub-float` keeps the default `fill-mode: none`: with `both` it would
   back-fill during its delay and stomp the entrance before it ever played.
   Per-row float durations are deliberately mismatched (7.4/8.6/9.3/8.1/7.9s)
   so the rows never resynchronise into a chorus line. */
.hero-hub .hub-btn {
  opacity: 0;                       /* pre-entrance state, before fill applies */
  animation:
    hub-arrive 3.8s cubic-bezier(.16, 1, .3, 1) forwards,
    hub-float 8s ease-in-out infinite;
}
.hero-hub .hub-btn:nth-child(1) { animation-delay: 1.1s, 4.9s; animation-duration: 3.8s, 7.4s; }
.hero-hub .hub-btn:nth-child(2) { animation-delay: 1.9s, 5.7s; animation-duration: 3.8s, 8.6s; }
.hero-hub .hub-btn:nth-child(3) { animation-delay: 2.7s, 6.5s; animation-duration: 3.8s, 9.3s; }
.hero-hub .hub-btn:nth-child(4) { animation-delay: 3.5s, 7.3s; animation-duration: 3.8s, 8.1s; }
.hero-hub .hub-btn:nth-child(5) { animation-delay: 4.3s, 8.1s; animation-duration: 3.8s, 7.9s; }

.scroll-hint {
  margin-top: 48px; color: var(--text-tertiary); font-size: 12px;
  letter-spacing: 1.4px; text-transform: uppercase;
  animation: rise 1.8s ease-out 8.1s both;  /* after the last row settles */
}

/* Compact hero for interior pages */
.page-hero { padding: clamp(140px, 18vh, 200px) 0 clamp(40px, 6vw, 72px); }
.page-hero .h-hero { max-width: 18ch; }
.page-hero .lede { animation: rise 1.2s ease-out .2s both; }

/* --------------------------------------------------------------------------
   11. CONTENT PRIMITIVES
   -------------------------------------------------------------------------- */

/* Pain-point stat — the BidBrief funnel opener */
.stat-row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat { padding: 22px; border-radius: var(--radius-card); background: var(--glass-fill); border: 1px solid var(--glass-stroke); }
.stat-num {
  font-family: var(--font-display); font-size: clamp(30px, 4vw, 44px); font-weight: 600;
  color: var(--accent); line-height: 1; text-shadow: 0 0 20px rgba(201, 162, 39, .45);
}
.stat-label { margin-top: 8px; font-size: 13.5px; color: var(--text-secondary); }

/* Numbered step list */
.steps { counter-reset: step; display: grid; gap: 16px; }
.step { display: flex; gap: 18px; align-items: flex-start; }
.step::before {
  counter-increment: step; content: counter(step);
  flex: 0 0 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 14px; font-weight: 600;
  color: var(--accent); background: rgba(42, 35, 18, .6);
  border: 1px solid rgba(236, 199, 102, .4);
}
.step-body h3 { font-size: 17px; margin-bottom: 4px; }
.step-body p { color: var(--text-secondary); font-size: 15px; max-width: 52ch; }

/* Capability chips — the stack, stated plainly */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip {
  padding: 7px 14px; border-radius: var(--radius-pill);
  font-size: 13px; color: var(--text-secondary);
  background: var(--glass-fill); border: 1px solid rgba(236, 199, 102, .18);
}

/* Definition-style rows for the anonymized product/experience list */
.dl { display: grid; gap: 2px; }
.dl-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 20px; padding: 22px 0;
  border-top: 1px solid rgba(236, 199, 102, .12);
}
.dl-row:last-child { border-bottom: 1px solid rgba(236, 199, 102, .12); }
.dl-term { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.dl-term .dl-status {
  display: inline-block; margin-left: 10px; vertical-align: middle;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-family: var(--font); font-size: 10.5px; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase;
}
.dl-status.is-live { color: var(--success); background: rgba(74, 222, 128, .12); border: 1px solid rgba(74, 222, 128, .3); }
.dl-status.is-build { color: var(--warn); background: rgba(245, 165, 36, .12); border: 1px solid rgba(245, 165, 36, .3); }
.dl-desc { color: var(--text-secondary); font-size: 15px; }
.dl-stack { margin-top: 8px; font-size: 12.5px; color: var(--text-tertiary); }

/* Pull quote / callout */
.callout {
  padding: 26px 28px; border-radius: var(--radius-card);
  border-left: 2px solid var(--glow-mid);
  background: linear-gradient(90deg, rgba(201, 162, 39, .10), transparent 70%);
}
.callout p { font-family: var(--font-display); font-size: clamp(18px, 2.2vw, 24px); font-weight: 500; line-height: 1.35; }
/* A two-beat pull quote needs the pause. Run together on one line the second
   sentence reads as a qualifier; given its own line it lands as the point. */
.callout p + p { margin-top: .75em; }

/* Contact method rows */
.contact-list { display: grid; gap: 12px; margin-top: 28px; }
.contact-item {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  border-radius: var(--radius-hub);
  background: var(--glass-fill); border: 1px solid var(--glass-stroke);
  transition: border-color .2s ease, background .2s ease, transform .16s ease;
}
a.contact-item:hover { border-color: rgba(236, 199, 102, .5); background: var(--glass-strong); transform: translateY(-2px); }
.contact-label { display: block; font-size: 12px; color: var(--text-tertiary); letter-spacing: .6px; text-transform: uppercase; }
.contact-value { display: block; font-family: var(--font-display); font-size: 17px; font-weight: 500; color: var(--text-primary); word-break: break-word; }

/* --------------------------------------------------------------------------
   12. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  padding: 56px 0 40px;
  border-top: 1px solid rgba(236, 199, 102, .12);
  background: rgba(5, 6, 9, .5);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.footer-top { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; margin-bottom: 36px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-nav a { font-size: 14px; color: var(--text-secondary); }
.footer-nav a:hover { color: var(--accent); }
/* The parent company reads a half-step brighter than the rest of the fine
   print — enough to register as a name rather than boilerplate, not enough to
   compete with the brand it sits under. */
.footer-parent { color: var(--text-secondary); }

/* Corporate-structure note. Centred fine print, set apart from the body copy
   so it reads as a colophon rather than as an argument the page is making. */
.entity-note {
  max-width: 52ch;
  margin: 0 auto clamp(36px, 5vw, 56px);
  padding-top: 26px;
  border-top: 1px solid rgba(236, 199, 102, .12);
  text-align: center;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-tertiary);
}

.footer-fine {
  padding-top: 24px; border-top: 1px solid rgba(236, 199, 102, .10);
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  font-size: 12.5px; color: var(--text-tertiary);
}

/* --------------------------------------------------------------------------
   13. MOTION
   Five animations, total. That constraint is the point — the whole site moves
   in one vocabulary. Timings copied exactly from the shipped app.
   -------------------------------------------------------------------------- */
@keyframes breathe {
  0%, 100% { transform: scale(1);     box-shadow: 0 9px 20px rgba(5, 6, 9,.6), 0 0 14px rgba(201, 162, 39,.28); }
  50%      { transform: scale(1.015); box-shadow: 0 9px 20px rgba(5, 6, 9,.6), 0 0 30px rgba(201, 162, 39,.62); }
}
@keyframes breathe-slow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -50%) scale(1.02); }
}
/* Hero nav rows: the entrance, then the endless drift.
   Both stay on `translate`/`opacity`/`filter` so the `scale` property is left
   free for hover. Blur starts explicit — `filter: none` cannot be animated. */
@keyframes hub-arrive {
  from { opacity: 0; translate: 0 26px; filter: blur(16px); }
  to   { opacity: 1; translate: 0 0;    filter: blur(0px); }
}
@keyframes hub-float {
  0%, 100% { translate: 0 0;     opacity: 1; }
  50%      { translate: 0 -6px;  opacity: .82; }
}
/* The reduced-motion entrance: the cascade with the motion taken out. */
@keyframes hub-fade-in { from { opacity: 0; } to { opacity: 1; } }
/* Glow-only pulse for the flagship row — touches no geometry property, so it
   composes with both the float and the hover expand. */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 9px 20px rgba(5, 6, 9, .6), 0 0 22px rgba(236, 199, 102, .30); }
  50%      { box-shadow: 0 9px 20px rgba(5, 6, 9, .6), 0 0 38px rgba(236, 199, 102, .66); }
}

@keyframes rise       { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade-scale { from { opacity: 0; transform: scale(.94); }       to { opacity: 1; transform: none; } }
@keyframes materialize {
  from { opacity: 0; filter: blur(18px); transform: scale(.96); }
  to   { opacity: 1; filter: blur(0px);  transform: scale(1); }
}

/* Scroll-reveal, wired by the IntersectionObserver in btools.js. */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 1.2s ease-out, transform 1.2s cubic-bezier(.16,1,.3,1); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .14s; }
.reveal:nth-child(3) { transition-delay: .28s; }
.reveal:nth-child(4) { transition-delay: .42s; }
.reveal:nth-child(5) { transition-delay: .56s; }
.reveal:nth-child(6) { transition-delay: .70s; }

/* --------------------------------------------------------------------------
   14. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .dl-row { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 720px) {
  /* Desktop nav gives way to the persistent capsule. */
  .nav { display: none; }
  .site-header { padding: 12px 0; }
  /* Entity mark shrinks rather than disappearing — it should stay visible. */
  .brand-entity { margin-left: 10px; padding-left: 10px; font-size: 9.5px; letter-spacing: .6px; }

  .tabbar {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: 12px;
    z-index: 2500; display: flex; gap: 2px; padding: 5px;
    width: min(520px, calc(100% - 32px));
    border-radius: var(--radius-pill);
    background: rgba(12, 10, 6, .82);
    border: 1px solid var(--glass-stroke);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 4px; border-radius: var(--radius-pill);
    font-size: 10.5px; font-weight: 600; color: var(--text-tertiary);
    transition: color .18s ease, background .18s ease;
  }
  .tabbar a svg { width: 17px; height: 17px; }
  .tabbar a.is-current { color: var(--accent); background: rgba(236, 199, 102, .10); }

  body { padding-bottom: 88px; }   /* clear the capsule */
  .scroll-hint { display: none; }  /* a pointer affordance; meaningless on touch */
  .hero { min-height: auto; padding: 120px 20px 40px; }
  .hub { max-width: 100%; }
  .footer-top { flex-direction: column; gap: 24px; }
}

@media (max-width: 400px) {
  /* Below this the entity name and the wordmark start colliding. The footer
     and the hero byline both still carry it, so nothing is lost by dropping it. */
  .brand-entity { display: none; }
}

@media (max-width: 460px) {
  .lockup { flex-direction: column; gap: 14px; }
  .hub-btn { padding: 15px; gap: 13px; }
  .hub-icon { flex-basis: 38px; height: 38px; }
  .wrap { padding: 0 18px; }
}

/* --------------------------------------------------------------------------
   15. REDUCED MOTION
   Not optional politeness. A page where everything breathes is genuinely
   unusable for some visitors, and this costs four lines.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }

  /* The hero rows are opacity:0 by default and rely on an animation to appear,
     so the blanket rule above would leave them invisible. Rather than pinning
     them on — which lands as a hard pop — give them an opacity-only entrance:
     no travel, no blur, no endless float. What triggers vestibular symptoms is
     movement, scale and parallax; a cross-fade is not that. So the page still
     arrives in sequence instead of appearing fully formed.

     NOTE (Windows): this branch is not rare. Settings > Accessibility > Visual
     effects > Animation effects, and the "Adjust for best performance" preset,
     both set SPI_GETCLIENTAREAANIMATION=0, which every Chromium browser reports
     as prefers-reduced-motion: reduce. A large share of desktop visitors land
     here without ever having asked for it. */
  .hero-hub .hub-btn {
    opacity: 0;
    translate: none !important;
    filter: none !important;
    animation: hub-fade-in 1800ms ease-out forwards !important;
  }
  .hero-hub .hub-btn:nth-child(1) { animation-delay: 240ms !important; }
  .hero-hub .hub-btn:nth-child(2) { animation-delay: 520ms !important; }
  .hero-hub .hub-btn:nth-child(3) { animation-delay: 800ms !important; }
  .hero-hub .hub-btn:nth-child(4) { animation-delay: 1080ms !important; }
  .hero-hub .hub-btn:nth-child(5) { animation-delay: 1360ms !important; }
  .scroll-hint { animation: hub-fade-in 1800ms ease-out 2200ms forwards !important; opacity: 0; }

  .atmos > * { transition: none; }
  .hub-btn.is-primary { transform: none; }
}

/* --------------------------------------------------------------------------
   16. PRINT
   -------------------------------------------------------------------------- */
@media print {
  .atmos, .site-header, .tabbar, .scroll-hint { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .hub-btn { border: 1px solid #ccc; box-shadow: none; background: none; }
}
