/* ============================================================
   Aithical Hub — shared site stylesheet
   Used across the public corporate site (home, services, about,
   contact, insights, etc.) plus the existing careers/apply pages.
   Mirrors the typography and colour language of the careers page
   so the public web feels like one product.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg:           #0E0B07;
  --bg-elev:     #161210;
  --ink:          #F4EFE6;
  --ink-soft:    #A19A8E;
  --ink-fade:    rgba(244,239,230,.55);
  --line:         rgba(244,239,230,.10);
  --line-strong: rgba(244,239,230,.18);
  --card:         rgba(255,255,255,.025);
  --ember:        #E05B25;
  --ember-soft:   #F77948;
  --oxblood:      #7E1D1D;
  --cream:        #F4EFE6;
  --indigo:       #6366F1;
  --emerald:      #22C55E;

  --radius-sm:    8px;
  --radius:       12px;
  --radius-lg:    18px;
  --radius-xl:    24px;

  --ease-smooth:  cubic-bezier(.32,.72,.18,1);
  --ease-spring:  cubic-bezier(.34,1.56,.64,1);
  --ease-out:     cubic-bezier(.22,.61,.36,1);

  --font-display: 'Fraunces', 'Playfair Display', 'Times New Roman', Georgia, serif;
  --font-body:    'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'Courier New', monospace;

  --max-w:        1240px;
  --gutter:       28px;
}

* , *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-feature-settings: 'ss01' on, 'cv11' on;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  scroll-behavior: smooth;
}
body { min-height: 100vh; }

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Selection */
::selection { background: rgba(224,91,37,.35); color: #fff; }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: 96px 0;
  position: relative;
}
.section--tight { padding: 64px 0; }
.section--hero  { padding: 120px 0 80px; }
@media (max-width: 768px) {
  .section      { padding: 64px 0; }
  .section--hero{ padding: 96px 0 60px; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ember);
  font-weight: 600;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--ember);
}

.h-display {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 5.2vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.012em;
  margin: 0 0 18px;
}
.h-display em { font-style: italic; color: var(--ember); }

.h-section {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.h-section em { font-style: italic; color: var(--ink-fade); }

.h-card {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 0 0 8px;
}

.lede {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 680px;
  margin: 0 0 32px;
}

.muted { color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.005em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .25s var(--ease-smooth), box-shadow .25s ease, background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ember);
  color: #fff;
}
.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 14px 32px -10px rgba(224,91,37,.50);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: rgba(244,239,230,.05); border-color: var(--ink-fade); }
.btn-link {
  background: transparent;
  color: var(--ember);
  padding: 0;
  border: none;
  font-weight: 600;
}
.btn-link:hover { color: var(--ember-soft); }
.btn-link svg { transition: transform .25s var(--ease-smooth); }
.btn-link:hover svg { transform: translateX(4px); }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  transition: border-color .3s ease, transform .35s var(--ease-smooth), background .25s ease;
}
.card:hover {
  border-color: rgba(224,91,37,.40);
  transform: translateY(-3px);
  background: rgba(224,91,37,.04);
}
.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(224,91,37,.18), rgba(126,29,29,.10));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ember);
  margin-bottom: 18px;
}
.card-arrow {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ember);
  font-size: 13px;
  font-weight: 600;
}
.card-arrow svg { transition: transform .25s var(--ease-smooth); }
.card:hover .card-arrow svg { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14,11,7,.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(244,239,230,.08);
}
.site-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
  padding: 0 var(--gutter);
  max-width: var(--max-w);
  margin: 0 auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  flex-shrink: 0;
  line-height: 1;
  transition: opacity .2s ease;
}
/* Wordmark-only nav brand — the disc/monogram is intentionally absent here
   so the navigation reads as a clean typographic mark. The AH disc still
   appears in the loader, favicon, and product surfaces. */
.brand:hover { opacity: .85; }
/* v5 brand mark — gradient AH monogram (vector, inline SVG).
   The .brand-mark element is now a wrapper for an inline SVG; the styling
   here controls only its sizing. The fill comes from the SVG's gradient.
   Earlier rules used a coloured rounded square with a text 'A' — superseded. */
.brand-mark {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}
/* v5 brand text — wordmark 'AIthical Hub' with the leading 'AI' rendered
   in the sunset-to-violet gradient. The .brand-ai span carries the gradient
   via background-clip; the rest stays in --ink. */
.brand-ai {
  background: linear-gradient(135deg, #F59E0B 0%, #F97316 28%, #EC4899 55%, #8B5CF6 78%, #3B82F6 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  font-weight: 700;
  letter-spacing: -0.015em;
  position: relative;
}
/* Small 4-point sparkle that hovers above-right of the "AI". Matches the brand
   reference image. Scales with the wordmark font-size via em units. */
.brand-ai::after {
  content: '';
  position: absolute;
  top: -0.18em;
  right: -0.42em;
  width: 0.36em;
  height: 0.36em;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M 8 0 L 9.5 6.5 L 16 8 L 9.5 9.5 L 8 16 L 6.5 9.5 L 0 8 L 6.5 6.5 Z' fill='%23ffffff'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}
.brand-text em {
  font-style: normal;            /* drop italic — wordmark reads as one word */
  color: inherit;
  margin-left: 0;
}

/* Primary nav — capsule of inline links */
.nav-primary {
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
}
.nav-links {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: rgba(244,239,230,.025);
  border: 1px solid rgba(244,239,230,.06);
  border-radius: 999px;
}
.nav-link {
  position: relative;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  font-family: inherit;
  letter-spacing: -0.005em;
  transition: color .2s ease, background .2s ease;
}
.nav-link:hover { color: var(--ink); background: rgba(244,239,230,.05); }
.nav-link[aria-current="page"] {
  color: var(--ember);
  background: rgba(224,91,37,.10);
}
.nav-link[aria-expanded="true"] {
  color: var(--ink);
  background: rgba(244,239,230,.06);
}
.nav-link svg.caret {
  width: 10px; height: 10px;
  opacity: .50;
  transition: transform .2s ease, opacity .2s ease;
  margin-top: 1px;
}
.nav-link:hover svg.caret { opacity: .85; }
.nav-link[aria-expanded="true"] svg.caret { transform: rotate(180deg); opacity: 1; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav-cta .btn {
  padding: 8px 16px;
  font-size: 12.5px;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-cta .btn svg { transition: transform .2s ease; }
.nav-cta .btn:hover svg { transform: translateX(3px); }

/* Sign in (admin portal) — sits to the left of Talk to Us as a quieter
   ghost link. Uppercase mono treatment to read as a utility, not a CTA. */
.nav-signin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  transition: color .2s ease, border-color .25s var(--ease-smooth), background .25s ease;
}
.nav-signin:hover,
.nav-signin:focus-visible {
  color: var(--ink);
  border-color: rgba(244,239,230,.12);
  background: rgba(244,239,230,.03);
}
.nav-signin svg {
  color: var(--ink-fade);
  transition: color .2s ease, transform .2s var(--ease-smooth);
}
.nav-signin:hover svg {
  color: var(--ember);
  transform: translateX(2px);
}
/* Hide the Sign in label below 1100px to keep the header from crowding;
   the icon itself stays as a recognizable affordance. Hide entirely on the
   compact mobile breakpoint where the drawer takes over. */
@media (max-width: 1100px) {
  .nav-signin span { display: none; }
  .nav-signin { padding: 7px 9px; }
}

/* Compact-ish breakpoint — let the capsule breathe a bit less when narrow */
@media (max-width: 1180px) {
  .site-header-inner { gap: 16px; }
  .nav-links { gap: 0; padding: 3px; }
  .nav-link { padding: 7px 11px; font-size: 12.5px; }
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}
.nav-toggle svg { width: 18px; height: 18px; margin: 0 auto; }

/* ---------- Mega menu ---------- */
.mega {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(14,11,7,.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 48px -12px rgba(0,0,0,.45);
  display: none;
  z-index: 99;
  padding: 36px 0 40px;
}
.mega.is-open { display: block; animation: megaIn .25s var(--ease-out); }
@keyframes megaIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.mega-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
}
.mega-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ember);
  font-weight: 600;
  margin-bottom: 14px;
}
.mega-headline {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  font-weight: 500;
  margin: 0 0 14px;
}
.mega-blurb {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0 0 18px;
}
.mega-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ember);
}
.mega-cta svg { transition: transform .25s var(--ease-smooth); }
.mega-cta:hover svg { transform: translateX(4px); }

.mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 32px;
}
.mega-grid--2 { grid-template-columns: repeat(2, 1fr); }
.mega-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 9px;
  transition: background .15s ease, transform .25s var(--ease-smooth);
}
.mega-item:hover { background: rgba(244,239,230,.04); transform: translateX(2px); }
.mega-item-icon {
  width: 30px; height: 30px;
  border-radius: 7px;
  background: rgba(224,91,37,.10);
  color: var(--ember);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mega-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 2px;
}
.mega-item-sub {
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* Mega menu — secondary rail (e.g. Insights inside About) */
.mega--has-secondary .mega-inner {
  grid-template-columns: 220px 1fr 240px;
}
@media (max-width: 1100px) {
  .mega--has-secondary .mega-inner { grid-template-columns: 200px 1fr 220px; gap: 32px; }
}
@media (max-width: 920px) {
  .mega--has-secondary .mega-inner { grid-template-columns: 220px 1fr; }
  .mega-secondary { grid-column: 1 / -1; border-left: none; border-top: 1px solid var(--line); padding-top: 24px; padding-left: 0; margin-top: 12px; }
}
.mega-secondary {
  border-left: 1px solid var(--line);
  padding-left: 28px;
}
.mega-secondary-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex; flex-direction: column; gap: 2px;
}
.mega-secondary-list a {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 10px;
  border-radius: 8px;
  transition: background .15s ease, transform .25s var(--ease-smooth);
}
.mega-secondary-list a:hover { background: rgba(244,239,230,.04); transform: translateX(2px); }
.mega-secondary-icon {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: rgba(99,102,241,.10);
  color: var(--indigo);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mega-secondary-icon svg { width: 14px; height: 14px; }
.mega-secondary-title {
  font-size: 13px; font-weight: 600; color: var(--ink); margin: 0 0 2px;
}
.mega-secondary-sub {
  font-size: 11px; color: var(--ink-soft); line-height: 1.4;
}
.mega-secondary-cta {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  color: var(--ember); letter-spacing: .04em;
  border-top: 1px dashed rgba(244,239,230,.10);
  padding-top: 12px;
  width: 100%;
}

/* ---------- Mobile drawer ---------- */
.mobile-drawer {
  position: fixed;
  inset: 0 0 0 0;
  background: rgba(14,11,7,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 200;
  padding: 18px var(--gutter) 80px;
  overflow-y: auto;
  display: none;
}
.mobile-drawer.is-open { display: block; animation: drawerIn .3s var(--ease-out); }
@keyframes drawerIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
.mobile-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 50px; margin-bottom: 18px;
}
.mobile-drawer-close {
  width: 40px; height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink); cursor: pointer; padding: 0;
}
.mobile-drawer details {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.mobile-drawer details summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  user-select: none;
}
.mobile-drawer details summary::-webkit-details-marker { display: none; }
.mobile-drawer details summary svg { transition: transform .25s ease; }
.mobile-drawer details[open] summary svg { transform: rotate(180deg); }
.mobile-drawer-sublist { padding-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.mobile-drawer-sublist a {
  padding: 10px 0; font-size: 14.5px; color: var(--ink-soft);
  border-bottom: 1px dashed transparent;
}
.mobile-drawer-sublist a:hover { color: var(--ink); }
.mobile-drawer .nav-link-mobile {
  display: block;
  padding: 14px 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.mobile-drawer-cta {
  margin-top: 28px;
  display: flex; flex-direction: column; gap: 10px;
}
.mobile-drawer-cta .btn { width: 100%; justify-content: center; }

@media (max-width: 980px) {
  .nav-primary, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

/* ============================================================
   Footer v4 — cinematic with motion identity
   - Strong top boundary (ember hairline + scanner sweep)
   - Columns collapsed by default (eyebrow + count + chevron),
     expand inline on click; hover-open on mouse devices
   - Get-in-touch shows only General + HQ; reveal-more for the rest
   - Parallax watermark, mouse-tracked orbs, magnetic socials
   - IntersectionObserver-driven scroll-in choreography
   ============================================================ */

/* ---------- Top boundary: clear demarcation from page above ---------- */
.footer-top-rail {
  position: relative;
  height: 88px;
  background: linear-gradient(180deg, transparent 0%, rgba(224,91,37,.06) 60%, transparent 100%);
  margin-top: -88px; /* overlap into page above for soft transition */
  pointer-events: none;
  z-index: 1;
}
.footer-top-rail::before {
  /* The hairline itself */
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(224,91,37,.20) 20%,
    rgba(224,91,37,.65) 50%,
    rgba(224,91,37,.20) 80%,
    transparent 100%);
}
.footer-top-rail::after {
  /* Scanner sweep — animates once on scroll-in */
  content: '';
  position: absolute;
  left: -25%; top: calc(50% - 1px);
  width: 25%; height: 3px;
  background: linear-gradient(90deg, transparent, var(--ember), transparent);
  filter: blur(1.5px);
  opacity: 0;
}
.footer-top-rail.is-active::after {
  animation: footerScannerSweep 2.4s var(--ease-smooth) forwards;
}
@keyframes footerScannerSweep {
  0%   { transform: translateX(0);    opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateX(500%); opacity: 0; }
}

/* ---------- Footer container ---------- */
.site-footer {
  position: relative;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(224,91,37,.07), transparent 70%),
    var(--bg);
  padding: 88px 0 28px;
  margin-top: 96px;
  overflow: hidden;
  isolation: isolate;
}
.footer-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.footer-orb {
  position: absolute; border-radius: 50%;
  filter: blur(110px);
  opacity: .50;
  will-change: transform;
  transition: transform .9s var(--ease-smooth);
}
.footer-orb-1 {
  width: 540px; height: 540px;
  left: -160px; top: -60px;
  background: rgba(224,91,37,.18);
  animation: footerOrb 22s ease-in-out infinite;
}
.footer-orb-2 {
  width: 440px; height: 440px;
  right: -130px; top: 30%;
  background: rgba(99,102,241,.14);
  animation: footerOrb 22s ease-in-out infinite -8s;
}
@keyframes footerOrb {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(50px, -28px) scale(1.06); }
}
.footer-grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(244,239,230,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,239,230,.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, black 30%, transparent 80%);
}
.footer-inner { position: relative; z-index: 1; }

/* ---------- Scroll-in choreography ---------- */
.footer-anim {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease-out), transform .9s var(--ease-out);
}
.site-footer.is-revealed .footer-anim { opacity: 1; transform: translateY(0); }
.site-footer.is-revealed .footer-anim:nth-child(2) { transition-delay: 80ms; }
.site-footer.is-revealed .footer-anim:nth-child(3) { transition-delay: 160ms; }
.site-footer.is-revealed .footer-anim:nth-child(4) { transition-delay: 240ms; }
.site-footer.is-revealed .footer-anim:nth-child(5) { transition-delay: 320ms; }

/* ---------- Cap zone: brand + newsletter ---------- */
.footer-cap {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 72px;
  padding-bottom: 64px;
}
.footer-cap::before {
  content: '';
  position: absolute;
  top: 18px; bottom: 90px;
  left: calc(56% - 0.5px);
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(244,239,230,.08) 20%, rgba(244,239,230,.08) 80%, transparent);
}
@media (max-width: 980px) {
  .footer-cap { grid-template-columns: 1fr; gap: 40px; }
  .footer-cap::before { display: none; }
}

.footer-brand-block { display: flex; flex-direction: column; }
.footer-brand { font-size: 18px; align-self: flex-start; }
.footer-statement {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(30px, 3.6vw, 44px); line-height: 1.12;
  letter-spacing: -0.014em;
  margin: 28px 0 18px;
  max-width: 560px;
}
.footer-statement em { font-style: italic; color: var(--ember); }
.footer-tagline {
  margin: 0 0 22px; max-width: 480px;
  color: var(--ink-soft); font-size: 14.5px; line-height: 1.65;
}

/* Brand metadata pills */
.footer-meta-pills {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 8px;
}
.footer-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px;
  background: rgba(244,239,230,.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-soft);
  transition: border-color .25s ease, color .25s ease, transform .25s var(--ease-smooth);
}
.footer-pill:hover {
  border-color: rgba(224,91,37,.35);
  color: var(--ink);
  transform: translateY(-1px);
}
.footer-pill-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 0 rgba(34,197,94,.55);
  animation: pillPulse 2.4s ease-in-out infinite;
}
@keyframes pillPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,.45); }
  50%      { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

/* Newsletter card */
.footer-newsletter {
  background:
    radial-gradient(circle 320px at 100% 0%, rgba(224,91,37,.12), transparent 60%),
    linear-gradient(180deg, rgba(244,239,230,.035), rgba(244,239,230,.015));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.footer-newsletter::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(244,239,230,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,239,230,.025) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 100% 0%, black, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 100% 0%, black, transparent 70%);
  pointer-events: none;
}
.footer-newsletter > * { position: relative; z-index: 1; }
.footer-newsletter-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ember); font-weight: 600;
  margin-bottom: 14px;
}
.footer-newsletter-tag::before {
  content: ''; width: 18px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ember));
}
.footer-newsletter h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(20px, 2.2vw, 24px); line-height: 1.25; letter-spacing: -0.008em;
  margin: 0 0 22px; color: var(--ink);
}
.footer-newsletter-form {
  display: flex; gap: 8px; align-items: stretch;
}
.footer-newsletter-form input {
  flex: 1; min-width: 0;
  padding: 13px 16px;
  background: rgba(14,11,7,.7);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink); font-family: inherit; font-size: 13.5px;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.footer-newsletter-form input::placeholder { color: var(--ink-fade); }
.footer-newsletter-form input:focus {
  outline: none;
  border-color: var(--ember);
  box-shadow: 0 0 0 3px rgba(224,91,37,.18);
}
.footer-newsletter-form button {
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--ember-soft), var(--ember));
  color: #fff; border: 1px solid var(--ember); border-radius: 10px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: transform .2s ease, box-shadow .25s ease;
  white-space: nowrap;
}
.footer-newsletter-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -10px rgba(224,91,37,.6);
}
.footer-newsletter-form button svg { transition: transform .2s ease; }
.footer-newsletter-form button:hover svg { transform: translateX(3px); }
.footer-newsletter-fineprint {
  margin: 14px 0 0; font-size: 11.5px; color: var(--ink-fade);
  display: flex; align-items: center; gap: 8px;
}
.footer-newsletter-fineprint::before {
  content: ''; width: 4px; height: 4px; border-radius: 50%;
  background: rgba(34,197,94,.7); flex-shrink: 0;
}
.footer-newsletter-thanks {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-radius: 10px;
  background: rgba(34,197,94,.10); border: 1px solid rgba(34,197,94,.30);
  color: #22C55E; font-weight: 600; font-size: 14px;
  width: 100%;
}
@media (max-width: 480px) {
  .footer-newsletter { padding: 24px; }
  .footer-newsletter-form { flex-direction: column; }
}

/* ============================================================
   Link grid — collapsed-by-default cinematic columns
   ============================================================ */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  padding: 40px 0 32px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  align-items: start; /* keep columns at their own height; the open one extends down past the row */
}
@media (max-width: 1180px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-col {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.018), rgba(255,255,255,.005));
  overflow: hidden;
  transition: border-color .35s var(--ease-smooth), background .35s var(--ease-smooth), box-shadow .35s var(--ease-smooth);
}
.footer-col::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(224,91,37,.6), transparent);
  transform: scaleX(0);
  transform-origin: 50% 50%;
  transition: transform .45s var(--ease-smooth);
}
.footer-col.is-open {
  border-color: rgba(224,91,37,.28);
  background: linear-gradient(180deg, rgba(224,91,37,.04), rgba(224,91,37,.01));
  box-shadow: 0 14px 38px -22px rgba(224,91,37,.45);
}
.footer-col.is-open::before { transform: scaleX(1); }

/* Header / toggle button */
.footer-col-toggle {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 18px 18px;
  background: transparent; border: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background .25s ease;
}
.footer-col-toggle:hover { background: rgba(244,239,230,.02); }
.footer-col-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ember);
}
.footer-col-eyebrow::after {
  content: ''; flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(224,91,37,.30), transparent);
  min-width: 20px;
}
.footer-col-meta {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  font-family: var(--font-display); font-weight: 500;
  font-size: 17px; color: var(--ink);
  letter-spacing: -0.005em;
}
.footer-col-count {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--ink-fade);
  margin-right: 10px;
  letter-spacing: .04em;
}
.footer-col-chev {
  width: 16px; height: 16px;
  color: var(--ink-fade);
  transition: transform .35s var(--ease-smooth), color .25s ease;
  flex-shrink: 0;
}
.footer-col.is-open .footer-col-chev {
  transform: rotate(180deg);
  color: var(--ember);
}
.footer-col.is-open .footer-col-meta { color: var(--ember); }
.footer-col-toggle:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Body — uses CSS grid 0fr→1fr trick for smooth height transition */
.footer-col-body-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease-smooth);
}
.footer-col.is-open .footer-col-body-wrap { grid-template-rows: 1fr; }
.footer-col-body {
  min-height: 0;
  overflow: hidden;
}
.footer-col-body-inner {
  padding: 0 18px 18px;
  border-top: 1px dashed rgba(244,239,230,.08);
  margin-top: 4px;
  padding-top: 14px;
}

/* Items cascade in when column opens */
.footer-col-body ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
}
.footer-col-body li {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s var(--ease-out), transform .4s var(--ease-out);
}
.footer-col.is-open .footer-col-body li {
  opacity: 1;
  transform: translateY(0);
}
.footer-col.is-open .footer-col-body li:nth-child(1)  { transition-delay: 60ms; }
.footer-col.is-open .footer-col-body li:nth-child(2)  { transition-delay: 95ms; }
.footer-col.is-open .footer-col-body li:nth-child(3)  { transition-delay: 130ms; }
.footer-col.is-open .footer-col-body li:nth-child(4)  { transition-delay: 165ms; }
.footer-col.is-open .footer-col-body li:nth-child(5)  { transition-delay: 200ms; }
.footer-col.is-open .footer-col-body li:nth-child(6)  { transition-delay: 235ms; }
.footer-col.is-open .footer-col-body li:nth-child(7)  { transition-delay: 270ms; }
.footer-col.is-open .footer-col-body li:nth-child(8)  { transition-delay: 305ms; }
.footer-col.is-open .footer-col-body li:nth-child(9)  { transition-delay: 340ms; }
.footer-col.is-open .footer-col-body li:nth-child(10) { transition-delay: 375ms; }

.footer-col-body li a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 0;
  font-size: 13.5px; color: var(--ink-soft);
  transition: color .2s ease, transform .25s var(--ease-smooth), letter-spacing .2s ease;
  position: relative;
}
.footer-col-body li a::before {
  content: ''; width: 0; height: 1px;
  background: var(--ember);
  transition: width .25s var(--ease-smooth);
  align-self: center;
}
.footer-col-body li a:hover {
  color: var(--ember);
  transform: translateX(3px);
}
.footer-col-body li a:hover::before { width: 10px; margin-right: 6px; }

.footer-col-cta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px;
  padding: 0;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ember);
  opacity: 0;
  transition: opacity .35s ease, color .25s ease, transform .25s var(--ease-smooth);
  transition-delay: 0ms;
}
.footer-col.is-open .footer-col-cta {
  opacity: 1;
  transition-delay: 420ms;
}
.footer-col-cta:hover { color: var(--ember-soft); transform: translateX(3px); }
.footer-col-cta svg { transition: transform .2s ease; }
.footer-col-cta:hover svg { transform: translateX(3px); }

/* ============================================================
   Get-in-touch column — minimal default
   ============================================================ */
.footer-col-touch {
  background: linear-gradient(180deg, rgba(224,91,37,.05), rgba(255,255,255,.005));
  border-color: rgba(224,91,37,.18);
}
.footer-col-touch.is-open {
  background: linear-gradient(180deg, rgba(224,91,37,.07), rgba(224,91,37,.015));
  border-color: rgba(224,91,37,.36);
}
/* Touch column inherits the same compact toggle layout as other columns;
   no special override needed. The expanded body shows all 7 contacts.
   Inside the narrow ~184 px column we stack label-over-value so the email
   gets the full content width (avoids horizontal clipping). */
.footer-col-touch .footer-col-body-inner ul.footer-touch-list { display: flex; flex-direction: column; }
.footer-col-touch .footer-col-body-inner ul.footer-touch-list li {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(244,239,230,.06);
}
.footer-col-touch .footer-touch-k {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-fade);
}
.footer-col-touch .footer-touch-list a {
  display: block;
  font-size: 12.5px; color: var(--ink); line-height: 1.35;
  transition: color .2s ease;
  width: 100%;
  /* Email wrap behavior: <wbr> markers in the markup are the preferred
     break points (between local part / @domain / .tld). Fall back to
     anywhere only if even those segments don't fit. */
  overflow-wrap: anywhere;
}
.footer-col-touch .footer-touch-list a::after { display: none; }
.footer-col-touch .footer-touch-list a:hover { color: var(--ember); }
.footer-col-touch .footer-touch-addr {
  font-size: 12.5px; color: var(--ink); line-height: 1.35;
  display: inline-flex; align-items: center; gap: 6px;
  width: 100%;
}

/* Hidden secondary contacts — revealed when opened */
.footer-touch-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
}
.footer-touch-list li {
  display: grid; grid-template-columns: 92px 1fr;
  gap: 14px; align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(244,239,230,.06);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s var(--ease-out), transform .4s var(--ease-out), border-color .25s ease;
}
.footer-col-touch.is-open .footer-touch-list li {
  opacity: 1;
  transform: translateY(0);
}
.footer-col-touch.is-open .footer-touch-list li:nth-child(1) { transition-delay: 80ms; }
.footer-col-touch.is-open .footer-touch-list li:nth-child(2) { transition-delay: 130ms; }
.footer-col-touch.is-open .footer-touch-list li:nth-child(3) { transition-delay: 180ms; }
.footer-col-touch.is-open .footer-touch-list li:nth-child(4) { transition-delay: 230ms; }
.footer-col-touch.is-open .footer-touch-list li:nth-child(5) { transition-delay: 280ms; }
.footer-col-touch.is-open .footer-touch-list li:nth-child(6) { transition-delay: 330ms; }

.footer-touch-list li:hover { border-color: rgba(224,91,37,.25); }
.footer-touch-list li:last-child { border-bottom: none; }
.footer-touch-k {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-fade);
}
.footer-touch-list a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; color: var(--ink);
  transition: color .2s ease;
}
.footer-touch-list a:hover { color: var(--ember); }
.footer-touch-list a::after {
  content: '→'; opacity: 0; transform: translateX(-4px);
  transition: opacity .2s ease, transform .25s var(--ease-smooth);
  font-size: 12px;
}
.footer-touch-list a:hover::after { opacity: 1; transform: translateX(0); }
.footer-touch-addr {
  font-size: 13.5px; color: var(--ink); display: inline-flex; align-items: center; gap: 8px;
}
.footer-touch-addr-pin {
  width: 14px; height: 14px; color: var(--ember); flex-shrink: 0;
}

/* ---------- Editorial signature line ---------- */
.footer-sig {
  display: flex; align-items: center; justify-content: center;
  gap: 22px;
  padding: 56px 0 0;
  text-align: center;
}
.footer-sig-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244,239,230,.18), transparent);
  max-width: 220px;
  transform: scaleX(.2);
  transform-origin: 50% 50%;
  transition: transform 1.1s var(--ease-smooth) .35s;
}
.site-footer.is-revealed .footer-sig-line { transform: scaleX(1); }
.footer-sig-text {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(17px, 1.7vw, 20px); line-height: 1.45;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
  max-width: 700px;
}
.footer-sig-text em { color: var(--ember); font-style: italic; }

/* ---------- Watermark band (parallax) ---------- */
.footer-watermark-zone {
  position: relative;
  margin-top: 28px;
  padding-top: 88px;
  overflow: hidden;
}
.footer-watermark-zone::before {
  content: '';
  position: absolute;
  left: 50%; top: 0;
  transform: translateX(-50%);
  width: 200px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(224,91,37,.45), transparent);
  z-index: 2;
}
.footer-wordmark {
  position: absolute;
  left: 50%; bottom: -28%;
  transform: translateX(-50%) translateY(0);
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(110px, 18vw, 260px);
  line-height: .85;
  letter-spacing: -0.05em;
  white-space: nowrap;
  -webkit-text-stroke: 1.5px rgba(244,239,230,.13);
  color: transparent;
  user-select: none; pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.footer-wordmark em {
  font-style: italic;
  -webkit-text-stroke: 1.5px rgba(224,91,37,.36);
}
@media (max-width: 600px) {
  .footer-wordmark { font-size: clamp(70px, 22vw, 110px); bottom: -18%; }
}

/* ---------- Bottom band ---------- */
.footer-bottom {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 28px 0 8px;
}
@media (max-width: 920px) {
  .footer-bottom { grid-template-columns: 1fr; gap: 16px; text-align: left; }
}

.footer-bottom-left {
  display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--ink-fade);
}
.footer-status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px;
  background: rgba(34,197,94,.07);
  border: 1px solid rgba(34,197,94,.22);
  border-radius: 999px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: #4FB670;
}
.footer-status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 8px rgba(34,197,94,.6);
  animation: pillPulse 2.4s ease-in-out infinite;
}

.footer-meta {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 4px 18px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--ink-fade);
}
.footer-meta a { color: var(--ink-fade); transition: color .2s ease; padding: 2px 0; }
.footer-meta a:hover { color: var(--ember); }
.footer-meta-dot {
  display: inline-block; width: 3px; height: 3px; border-radius: 50%;
  background: rgba(244,239,230,.30);
}

.footer-bottom-right {
  display: inline-flex; align-items: center; gap: 10px;
}
.footer-social {
  display: inline-flex; align-items: center; gap: 8px;
}
.footer-social a {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(244,239,230,.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
  transition: color .2s ease, border-color .25s ease, background .25s ease;
  will-change: transform;
}
.footer-social a svg { width: 14px; height: 14px; transition: transform .2s ease; }
.footer-social a:hover {
  color: var(--ember);
  border-color: rgba(224,91,37,.40);
  background: rgba(224,91,37,.08);
}
.footer-social a:hover svg { transform: scale(1.1); }

/* ---------- Back-to-top (floating) ---------- */
.footer-top-btn {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ember-soft), var(--ember));
  border: 1px solid rgba(244,239,230,.22);
  color: #fff;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .35s var(--ease-smooth), box-shadow .25s ease;
  z-index: 90;
  box-shadow: 0 12px 24px -12px rgba(224,91,37,.55);
}
.footer-top-btn.is-visible {
  opacity: 1; pointer-events: auto;
  transform: translateY(0);
}
.footer-top-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -16px rgba(224,91,37,.7);
}
@media (max-width: 600px) {
  .footer-top-btn { right: 16px; bottom: 16px; width: 40px; height: 40px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .footer-orb, .footer-pill-dot, .footer-status-dot,
  .footer-anim, .footer-sig-line { animation: none !important; transition: none !important; }
  .footer-anim { opacity: 1; transform: none; }
  .footer-sig-line { transform: scaleX(1); }
  .footer-top-rail.is-active::after { animation: none; opacity: 0; }
}
/* ============================================================
   Admin away-timer banner — appears on public pages when an
   admin session is active and the user has navigated away from
   admin.html via "View site". Live 3-minute countdown; clicking
   returns to /admin.html. Goes red+pulsing in the final 30s and
   morphs to "Logged out" + "Sign in" once expired.
   ============================================================ */
.admin-away-banner {
  position: fixed;
  left: 50%; top: 84px;            /* sits clearly below the sticky header */
  transform: translate(-50%, -120%);
  z-index: 95;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 10px 16px;
  background: rgba(20,15,12,.90);
  border: 1px solid rgba(224,91,37,.30);
  border-radius: 999px;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 18px 44px -16px rgba(0,0,0,.6), 0 0 0 1px rgba(224,91,37,.10);
  color: var(--ink);
  text-decoration: none;
  font-size: 12.5px;
  animation: aab-slide-in .6s var(--ease-spring) forwards;
}
@keyframes aab-slide-in {
  from { transform: translate(-50%, -120%); opacity: 0; }
  to   { transform: translate(-50%, 0);     opacity: 1; }
}
.admin-away-banner:hover {
  border-color: rgba(224,91,37,.55);
  background: rgba(20,15,12,.96);
}
.aab-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 12px rgba(224,91,37,.7);
  animation: aab-pulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes aab-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .55; transform: scale(.85); }
}
.aab-text { display: inline-flex; flex-direction: column; gap: 1px; line-height: 1.1; }
.aab-eyebrow {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-fade);
}
.aab-time {
  font-family: var(--font-mono); font-size: 14px; font-weight: 700;
  color: var(--ember); letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.aab-cta {
  margin-left: 4px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink);
  border-left: 1px solid rgba(244,239,230,.10);
  padding-left: 14px;
  transition: color .2s ease;
}
.admin-away-banner:hover .aab-cta { color: var(--ember); }

/* Final 30 seconds — banner goes red and pulses faster */
.admin-away-banner.is-urgent {
  border-color: rgba(220,38,38,.6);
  box-shadow: 0 18px 44px -12px rgba(220,38,38,.45), 0 0 0 1px rgba(220,38,38,.18);
  animation: aab-slide-in .6s var(--ease-spring) forwards, aab-urgent-pulse 1s ease-in-out infinite alternate;
}
.admin-away-banner.is-urgent .aab-time { color: #FCA5A5; }
.admin-away-banner.is-urgent .aab-dot { background: #EF4444; box-shadow: 0 0 14px rgba(239,68,68,.85); }
@keyframes aab-urgent-pulse {
  from { box-shadow: 0 18px 44px -12px rgba(220,38,38,.40), 0 0 0 1px rgba(220,38,38,.18); }
  to   { box-shadow: 0 18px 44px -10px rgba(220,38,38,.65), 0 0 0 2px rgba(220,38,38,.30); }
}

/* Expired state — neutral, signals re-login is required */
.admin-away-banner.is-expired {
  border-color: rgba(244,239,230,.20);
  background: rgba(20,15,12,.95);
  animation: none;
}
.admin-away-banner.is-expired .aab-dot {
  background: var(--ink-fade);
  box-shadow: none;
  animation: none;
}
.admin-away-banner.is-expired .aab-time { color: var(--ink-fade); }

@media (max-width: 600px) {
  .admin-away-banner { left: 12px; right: 12px; top: 78px; transform: translateY(-120%); padding: 9px 12px; gap: 10px; }
  @keyframes aab-slide-in { from { transform: translateY(-120%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
  .aab-cta { padding-left: 10px; font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .admin-away-banner, .aab-dot { animation: none !important; }
  .admin-away-banner { transform: translate(-50%, 0); opacity: 1; }
}

/* ============================================================
   Page side navigation — fixed dot rail + scroll progress + BTT
   - Auto-built from elements tagged [data-nav-section] [data-nav-label]
   - Active-section highlighting via IntersectionObserver
   - Glassmorphism aesthetic, ember active state, hover labels
   - Mobile collapses to a chip at bottom-right
   - All motion respects prefers-reduced-motion
   ============================================================ */
.page-sidenav {
  position: fixed;
  right: 22px; top: 50%;
  transform: translateY(-50%);
  z-index: 80;
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
  padding: 16px 10px;
  background: rgba(20,15,12,.55);
  border: 1px solid rgba(244,239,230,.10);
  border-radius: 999px;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 14px 40px -16px rgba(0,0,0,.65), inset 0 0 0 1px rgba(244,239,230,.04);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease-smooth), transform .4s var(--ease-smooth);
}
.page-sidenav.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.page-sidenav::before {
  /* Vertical progress rail behind the dots */
  content: '';
  position: absolute;
  left: 50%; top: 22px; bottom: 22px;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(244,239,230,.08), rgba(244,239,230,.04));
  z-index: -1;
}
.page-sidenav::after {
  /* Filled progress that grows with scroll position */
  content: '';
  position: absolute;
  left: 50%; top: 22px;
  width: 1px;
  height: var(--page-progress, 0%);
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(224,91,37,.65), rgba(224,91,37,.30));
  z-index: -1;
  transition: height .25s linear;
}

.page-sidenav-dot {
  position: relative;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0;
  cursor: pointer;
  border-radius: 50%;
  color: var(--ink-soft);
  transition: color .25s ease, transform .2s var(--ease-smooth);
}
.page-sidenav-dot::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(244,239,230,.20);
  border: 1px solid rgba(244,239,230,.10);
  transition: background .25s ease, border-color .25s ease, transform .25s var(--ease-smooth), box-shadow .25s ease;
}
.page-sidenav-dot:hover::before {
  background: var(--ink);
  transform: scale(1.2);
}
.page-sidenav-dot.is-active::before {
  background: var(--ember);
  border-color: var(--ember);
  transform: scale(1.35);
  box-shadow: 0 0 0 3px rgba(224,91,37,.20), 0 0 14px rgba(224,91,37,.55);
}

/* Hover label — slides out to the LEFT of the rail */
.page-sidenav-dot-label {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  white-space: nowrap;
  padding: 6px 12px;
  background: rgba(20,15,12,.92);
  border: 1px solid rgba(244,239,230,.12);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .25s var(--ease-smooth);
  box-shadow: 0 8px 24px -10px rgba(0,0,0,.6);
}
.page-sidenav-dot:hover .page-sidenav-dot-label,
.page-sidenav-dot:focus-visible .page-sidenav-dot-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.page-sidenav-dot.is-active .page-sidenav-dot-label {
  color: var(--ember);
}
.page-sidenav-dot:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

/* Mobile / tablet collapse to compact chip */
@media (max-width: 880px) {
  .page-sidenav {
    right: 14px; top: auto; bottom: 80px;
    transform: none;
    flex-direction: row;
    padding: 8px 12px;
    border-radius: 999px;
    gap: 6px;
    max-width: calc(100vw - 28px);
    overflow: hidden;
  }
  .page-sidenav::before, .page-sidenav::after { display: none; }
  .page-sidenav-dot { width: 18px; height: 18px; }
  .page-sidenav-dot::before { width: 6px; height: 6px; }
  .page-sidenav-dot.is-active::before { transform: scale(1.5); }
  .page-sidenav-dot-label { display: none; }
}

/* When the floating side nav and the back-to-top button coexist, give them
   independent positioning so they don't overlap. Side nav already lives at
   bottom: 80px on mobile, BTT at bottom: 16-24px — separate. */
@media (max-width: 600px) {
  .page-sidenav { bottom: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  .page-sidenav, .page-sidenav-dot, .page-sidenav-dot::before, .page-sidenav-dot-label,
  .page-sidenav::after { transition: none !important; }
}

/* ---------- Animation utilities ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.stagger > * { transition-delay: calc(var(--i, 0) * 60ms); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Light-theme override (optional, system-aware) ---------- */
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"], :root:not([data-theme]) {
    /* keep dark by default — site is brand-dark first;
       readers can opt into light theme via [data-theme="light"] */
  }
}

/* ---------- Skip link (a11y) ---------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--ember);
  color: #fff;
  padding: 8px 14px;
  z-index: 9999;
  border-radius: 0 0 8px 0;
  font-size: 13px;
  font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ---------- Focus rings ---------- */
:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 1000;
  max-width: 920px; margin: 0 auto;
  background: rgba(20,15,12,.96);
  border: 1px solid rgba(244,239,230,.14);
  border-radius: 14px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6), 0 12px 28px -8px rgba(224,91,37,.15);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: cookieIn .55s var(--ease-spring);
}
@keyframes cookieIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.cookie-inner { display: flex; gap: 24px; padding: 18px 22px; align-items: center; flex-wrap: wrap; }
.cookie-text { flex: 1; min-width: 280px; }
.cookie-text strong { display: block; font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--ember); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.cookie-text p { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.cookie-text a { color: var(--ember); border-bottom: 1px dashed rgba(224,91,37,.40); }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-actions .btn { padding: 9px 14px; font-size: 12.5px; }
.cookie-prefs { padding: 0 22px 18px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid rgba(244,239,230,.08); margin-top: -2px; }
.cookie-prefs[hidden] { display: none !important; }
.cookie-row { display: flex; align-items: center; gap: 14px; padding: 10px 12px; background: rgba(244,239,230,.025); border: 1px solid var(--line); border-radius: 9px; font-size: 13px; color: var(--ink-soft); }
.cookie-row strong { color: var(--ink); margin-right: 4px; }
.cookie-row input { margin-left: auto; accent-color: var(--ember); width: 18px; height: 18px; }
.cookie-prefs-actions { display: flex; justify-content: flex-end; padding-top: 6px; }
@media (max-width: 600px) {
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; justify-content: center; }
}
