/* ==========================================================================
   ENDERBY — GLOBAL STYLESHEET · Design System v1.1 · loads on every page
   Order: tokens/base → flow button (component) → navbar/menu (shell) → footer
   Page-specific styles live in home.css / about.css / films.css / contact.css
   ========================================================================== */

/* ==========================================================================
   TOKENS + BASE — Enderby Design System v1.1 · canonical, site-wide
   --------------------------------------------------------------------------
   Load FIRST on every page:
     tokens.css → style.css (navbar/menu) → flow-button.css → page css → footer.css

   This is the single source of truth for tokens. Page stylesheets may keep
   their own :root as a safety net during migration, but values must match
   these. Inter only. 2px max radius. One cobalt moment per viewport.
   ========================================================================== */

/* --- Self-hosted Inter VARIABLE — required by the About values weight
       morph (500→700); static Google Fonts weights cannot animate weight.
       Pair with <link rel="preload" href="assets/fonts/InterVariable.woff2"
       as="font" type="font/woff2" crossorigin> in every page <head>. */
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/InterVariable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/* Metric-matched fallback so text doesn't jump while Inter loads */
@font-face {
  font-family: "Inter-fallback";
  src: local("Arial");
  size-adjust: 107%;
  ascent-override: 90%;
}

/* --- Tokens ---------------------------------------------------------------- */
:root {
  /* Surfaces */
  --surface-dark: #0a0a0b;
  --surface-menu: #070708;          /* full-screen menu — deeper than footer */
  --surface-light: #f7f7f5;
  --surface-raised-dark: #101012;
  --surface-raised-light: #ffffff;

  /* Accent — cobalt only, never hue-shifted */
  --cobalt: #2e6bff;
  --cobalt-bright: #5488ff;
  --cobalt-deep: #1e52e0;

  /* Text */
  --text-on-dark: #f7f7f5;
  --text-on-dark-2: rgba(247, 247, 245, 0.64);
  --text-on-dark-3: rgba(247, 247, 245, 0.4);
  --text-on-light: #0a0a0b;
  --text-on-light-2: rgba(10, 10, 11, 0.64);
  --text-on-light-3: rgba(10, 10, 11, 0.44);

  /* Hairlines */
  --border-on-dark: rgba(247, 247, 245, 0.14);
  --border-on-light: rgba(10, 10, 11, 0.12);

  /* Layout */
  --edge: clamp(1.25rem, 4vw, 5rem);
  --container-max: 1440px;
  --space-section: clamp(5rem, 3.33rem + 7.4vw, 10rem);
  --radius-0: 0;                    /* media is never rounded */

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-quart: cubic-bezier(0.5, 0, 0.75, 0);
  --dur-fast: 200ms;
  --dur-base: 400ms;
  --dur-slow: 800ms;
  --toggle-dur: 800ms;              /* hamburger choreography */

  /* Z-layers */
  --z-header: 100;
  --z-menu: 200;
  --z-transition: 250;              /* page transition layer — Phase 2 */
}

/* --- Reset + base ----------------------------------------------------------- */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: clip; }   /* guards transient transform overflow from reveal pre-states */

::selection { background: var(--cobalt); color: #f7f7f5; }
html { scrollbar-width: thin; scrollbar-color: rgba(10, 10, 11, 0.35) transparent; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: rgba(10, 10, 11, 0.3); border-radius: 0; }
::-webkit-scrollbar-track { background: transparent; }

body {
  font-family: "Inter", "Inter-fallback", system-ui, sans-serif;
  background: var(--surface-light);
  color: var(--text-on-light);
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }
ul { list-style: none; }
h1, h2, h3 { font-weight: 700; }

/* --- Lenis smooth scroll housekeeping ------------------------------------ */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

/* --- LOADER: film gate (z-250, future page-transition layer) ------------- */
/* Display is gated on html.js: no JavaScript means no overlay, ever.       */
.loader { display: none; }

html.js .loader {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 250;
}

/* Repeat visit this session: head script adds .loader-skip before paint */
html.js.loader-skip .loader { display: none; }

.loader__backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(158deg, #0d1015 0%, #16202e 40%, #080a0f 100%);
}

.loader__panel {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  background: var(--surface-dark, #0a0a0b);
}

.loader__panel--top { top: 0; }
.loader__panel--bottom { bottom: 0; }

/* Cobalt seam lines, pinned to each panel's inner edge; at the closed
   state they overlap and read as a single line                            */
.loader__line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  opacity: 0;
  background: linear-gradient(
    90deg,
    rgba(84, 136, 255, 0.9) 0%,
    rgba(46, 107, 255, 0.35) 50%,
    rgba(30, 82, 224, 0.85) 100%
  );
}

.loader__line--top { bottom: 0; }
.loader__line--bottom { top: 0; }

.loader__mark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  opacity: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--text-on-dark, #f7f7f5);
  white-space: nowrap;
  /* optically recenter: letter-spacing adds a trailing gap */
  padding-left: 0.34em;
}

/* page transition */
html.pt-in::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 250;
  background: var(--surface-dark, #0a0a0b);
}
 
.pt {
  position: fixed;
  inset: 0;
  z-index: 250;
  pointer-events: none;
}
 
.pt__panel {
  position: absolute;
  left: 0;
  right: 0;
  height: calc(50% + 1px);
  background: var(--surface-dark, #0a0a0b);
}
 
.pt__panel--top { top: 0; }
.pt__panel--bottom { bottom: 0; }
 
.pt__seam {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  margin-top: -0.5px;
  background: var(--cobalt, #2e6bff);
  box-shadow: 0 0 24px rgba(46, 107, 255, 0.55);
  opacity: 0;
}

/* --- Utilities ---------------------------------------------------------------- */
.u-cobalt { color: var(--cobalt); font-style: normal; }


/* --- Shared DS components ------------------------------------------------- */
.label {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; line-height: 1;
}
.label-sm {
  font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; line-height: 1;
}
.grain {
  position: absolute; inset: 0; opacity: 0.035;
  mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
}
.tint {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 50% at 100% 0%, rgba(46, 107, 255, 0.06) 0%, transparent 60%);
}
.u-visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* FOUC guard partner rule — each page also needs the inline <head> script:
   <script>document.documentElement.classList.add('js');</script> */
html.js [data-reveal] { visibility: hidden; }


/* ==========================================================================
   COMPONENT — FLOW BUTTON (canonical, themed via [data-theme])
   ========================================================================== */

/* ==========================================================================
   FLOW BUTTON — global, single component, themed by [data-theme]
   Enderby Design System v1.1 · Inter only · radius-xs · neutral floods
   --------------------------------------------------------------------------
   Markup (works as <a> or <button>):

   <a class="btn-flow" href="/contact.html">
     <span class="btn-flow__flood" aria-hidden="true"></span>
     <span class="btn-flow__label">
       <span class="btn-flow__text">Start a conversation</span>
       <span class="btn-flow__text btn-flow__text--dup" aria-hidden="true">
         Start a conversation
       </span>
     </span>
   </a>
   ========================================================================== */

.btn-flow {
  /* Semantic vars — dark-surface values by default (footer, menu, dark sections) */
  --flow-ink:          var(--text-on-dark, #f7f7f5);
  --flow-ink-invert:   var(--surface-dark, #0a0a0b);
  --flow-flood:        var(--surface-light, #f7f7f5);   /* dark variant floods WHITE */
  --flow-border:       var(--border-on-dark, rgba(247, 247, 245, 0.14));
  --flow-border-hover: rgba(247, 247, 245, 0.44);
  --flow-tint:         rgba(247, 247, 245, 0.04);       /* slight tint at rest */

  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 16px 32px;
  border: 1px solid var(--flow-border);
  border-radius: 2px;                    /* radius-xs — never rounder */
  background-color: var(--flow-tint);

  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.75rem;                    /* label token */
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--flow-ink);

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color 200ms ease,
    transform 200ms ease;
}

/* Light-surface variant — floods near-black */
[data-theme="light"] .btn-flow {
  --flow-ink:          var(--text-on-light, #0a0a0b);
  --flow-ink-invert:   var(--surface-light, #f7f7f5);
  --flow-flood:        var(--surface-dark, #0a0a0b);
  --flow-border:       var(--border-on-light, rgba(10, 10, 11, 0.12));
  --flow-border-hover: rgba(10, 10, 11, 0.42);
  --flow-tint:         rgba(10, 10, 11, 0.03);
}

/* --- The flood ------------------------------------------------------------
   A 16px circle pinned just outside the bottom-left corner scales up to
   swallow the button over dur-flood (1000ms, expo.out). Neutral flood only —
   never cobalt.                                                              */
.btn-flow__flood {
  position: absolute;
  left: -8px;
  bottom: -8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--flow-flood);
  transform: scale(0);
  transform-origin: center;
  transition: transform 1000ms cubic-bezier(0.16, 1, 0.3, 1); /* ease-out-expo */
  z-index: -1;
  pointer-events: none;
}

/* --- The label swap ---------------------------------------------------------
   Two stacked copies inside a clipped line-box. On hover the resting label
   lifts out as the inverted copy rises in — timed to trail the flood slightly. */
.btn-flow__label {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 2px 0;                        /* keeps descenders unclipped */
}

.btn-flow__text {
  display: block;
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1) 60ms;
}

.btn-flow__text--dup {
  position: absolute;
  inset: 0;
  padding: inherit;
  transform: translateY(115%);
  color: var(--flow-ink-invert);
}

/* --- States -----------------------------------------------------------------
   Hover effects live behind (hover: hover)(pointer: fine) so touch devices
   never get a stuck flood after tap. Keyboard focus always gets the full
   treatment.                                                                  */
@media (hover: hover) and (pointer: fine) {
  .btn-flow:hover {
    border-color: var(--flow-border-hover);
  }

  .btn-flow:hover .btn-flow__flood {
    transform: scale(45);                /* covers up to ~340px-wide buttons */
  }

  .btn-flow:hover .btn-flow__text {
    transform: translateY(-115%);
  }

  .btn-flow:hover .btn-flow__text--dup {
    transform: translateY(0);
  }
}

.btn-flow:focus-visible {
  border-color: var(--flow-border-hover);
}

.btn-flow:focus-visible .btn-flow__flood {
  transform: scale(45);
}

.btn-flow:focus-visible .btn-flow__text {
  transform: translateY(-115%);
}

.btn-flow:focus-visible .btn-flow__text--dup {
  transform: translateY(0);
}

.btn-flow:active {
  transform: scale(0.98);
}

.btn-flow:focus-visible {
  outline: 2px solid var(--cobalt, #2e6bff);
  outline-offset: 3px;
}

/* --- Reduced motion ----------------------------------------------------------
   Flood and label swap collapse into a plain 200ms background/color switch.   */
@media (prefers-reduced-motion: reduce) {
  .btn-flow {
    transition: background-color 200ms ease, color 200ms ease,
                border-color 200ms ease;
  }

  .btn-flow__flood,
  .btn-flow__text--dup {
    display: none;
  }

  .btn-flow__text {
    transition: none;
  }

  .btn-flow:hover .btn-flow__text,
  .btn-flow:focus-visible .btn-flow__text {
    transform: none;
  }

  .btn-flow:hover,
  .btn-flow:focus-visible {
    background-color: var(--flow-flood);
    color: var(--flow-ink-invert);
  }

  .btn-flow:active {
    transform: none;
  }
}


/* ==========================================================================
   SHELL — NAVBAR + FULL-SCREEN MENU
   ========================================================================== */

/* ==========================================================================
   GLOBAL SHELL — navbar + full-screen menu · Enderby Design System v1.1
   --------------------------------------------------------------------------
   Extracted from navbar.html. Tokens live in tokens.css (load it first).
   Behavior lives in js/main.js.
   ========================================================================== */

/* ============================================================
   NAVBAR — logo + hamburger only, on all screens.
   Transparent at top, blurred surface after 80px of scroll.
   ============================================================ */
.site-header{
  position:fixed;
  top:0; left:0; right:0;
  z-index:var(--z-header);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:1.25rem var(--edge);
  transition:background-color var(--dur-fast) ease,
             backdrop-filter var(--dur-fast) ease,
             border-color var(--dur-fast) ease;
  border-bottom:1px solid transparent;
}
.site-header.scrolled{
  background:rgba(247,247,245,0.72);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  border-bottom-color:var(--border-on-light);
}
/* While the menu is open the header rides above the overlay */
.site-header.menu-open{
  z-index:calc(var(--z-menu) + 1);
  background:transparent;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
  border-bottom-color:transparent;
}
.site-header--on-dark .nav-toggle { --bar: var(--text-on-dark); }

.site-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
 
/* Stacked ENDERBY / ENTERTAINMENT lockup needs more height than a
   single-line wordmark — tune these two numbers to taste */
.site-logo__img {
  display: block;
  height: 42px;              /* navbar */
  width: auto;
}
 
.site-logo--footer .site-logo__img {
  height: 56px;              /* footer */
}
 
/* Theme swap: ink logo on light surfaces (default), paper logo on dark */
.site-logo__img--paper { display: none; }
 
[data-theme="dark"] .site-logo__img--ink   { display: none; }
[data-theme="dark"] .site-logo__img--paper { display: block; }
 
.site-header.menu-open .site-logo__img--ink   { display: none; }
.site-header.menu-open .site-logo__img--paper { display: block; }

.site-header--on-dark:not(.menu-open) .site-logo__img--ink   { display: none; }
.site-header--on-dark:not(.menu-open) .site-logo__img--paper { display: block; }

@media (hover: hover) and (pointer: fine) {
  .site-logo { transition: opacity 200ms ease; }
  .site-logo:hover { opacity: 0.75; }
}
 
.site-logo:focus-visible {
  outline: 2px solid var(--cobalt, #2e6bff);
  outline-offset: 4px;
  border-radius: 2px;
}
 
@media (prefers-reduced-motion: reduce) {
  .site-logo { transition: none; }
}
 
/* --- Mobile: the stacked lockup can sit smaller on narrow screens --------- */
 
@media (max-width: 767px) {
  .site-logo__img { height: 32px; }
  .site-logo--footer .site-logo__img { height: 44px; }
}

/* ============================================================
   HAMBURGER TOGGLE — bars converge → retract → redraw as ✕,
   and back. Vanilla CSS, Enderby tokens.
   ============================================================ */
.nav-toggle{
  --bar:var(--text-on-light);
  position:relative;
  width:48px;
  height:48px;
  background:none;
  border:0;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.nav-toggle:focus-visible{
  outline:2px solid var(--cobalt);
  outline-offset:4px;
  border-radius:2px;
}
.menu-open .nav-toggle{--bar:var(--text-on-dark)}

.nav-toggle::before,
.nav-toggle::after{
  content:"";
  position:absolute;
  left:0;
  width:100%;
  height:2px;
  border-radius:2px;
  background:var(--bar);
  transition:background-color var(--dur-fast) ease,
             width var(--dur-fast) ease;
  animation-duration:var(--toggle-dur);
  animation-timing-function:ease;
  animation-fill-mode:both;
}
.nav-toggle::before{top:15px}
.nav-toggle::after{top:31px}

/* Rest-state hover: bottom bar shortens — signals interactivity.
   Only active when no toggle animation classes are applied
   (JS strips .to-o after the close animation finishes). */
.nav-toggle:not(.to-x):not(.to-o):hover::after{width:62%}

.nav-toggle.to-x::before{animation-name:bar-top-to-x}
.nav-toggle.to-x::after {animation-name:bar-bot-to-x}
.nav-toggle.to-o::before{animation-name:bar-top-to-o}
.nav-toggle.to-o::after {animation-name:bar-bot-to-o}

/* Hamburger → ✕ */
@keyframes bar-top-to-x{
  0%   {top:15px; left:0;    width:100%; transform:rotate(0)}
  32%  {top:23px; left:0;    width:100%; transform:rotate(0)}
  52%  {top:23px; left:48px; width:0;    transform:rotate(0)}
  60%  {top:23px; left:24px; width:0;    transform:rotate(45deg)}
  100% {top:23px; left:0;    width:100%; transform:rotate(45deg)}
}
@keyframes bar-bot-to-x{
  0%   {top:31px; left:0;    width:100%; transform:rotate(0)}
  32%  {top:23px; left:0;    width:100%; transform:rotate(0)}
  52%  {top:23px; left:0;    width:0;    transform:rotate(0)}
  60%  {top:23px; left:24px; width:0;    transform:rotate(-45deg)}
  100% {top:23px; left:0;    width:100%; transform:rotate(-45deg)}
}
/* ✕ → hamburger */
@keyframes bar-top-to-o{
  0%   {top:23px; left:0;    width:100%; transform:rotate(45deg)}
  40%  {top:23px; left:24px; width:0;    transform:rotate(45deg)}
  48%  {top:23px; left:0;    width:0;    transform:rotate(0)}
  72%  {top:23px; left:0;    width:100%; transform:rotate(0)}
  100% {top:15px; left:0;    width:100%; transform:rotate(0)}
}
@keyframes bar-bot-to-o{
  0%   {top:23px; left:0;    width:100%; transform:rotate(-45deg)}
  40%  {top:23px; left:24px; width:0;    transform:rotate(-45deg)}
  48%  {top:23px; left:48px; width:0;    transform:rotate(0)}
  72%  {top:23px; left:0;    width:100%; transform:rotate(0)}
  100% {top:31px; left:0;    width:100%; transform:rotate(0)}
}

/* ============================================================
   FULL-SCREEN MENU
   Open:  panel wipes in 400ms → items stagger in 60ms apart.
   Close: items stagger OUT fast (200ms, reverse order) → panel
          wipes away. Asymmetric in/out, driven by .closing + JS.
   ============================================================ */
.menu{
  position:fixed;
  inset:0;
  z-index:var(--z-menu);
  background:var(--surface-menu);
  transform:translateY(-100%);
  transition:transform var(--dur-base) var(--ease-out-expo),
             visibility 0s var(--dur-base);
  visibility:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:6rem var(--edge);
  overflow:hidden;
}
.menu.open{
  transform:translateY(0);
  visibility:visible;
  transition:transform var(--dur-base) var(--ease-out-expo);
}

/* Ambient glows — two slow-drifting cobalt blobs.
   No filter:blur — the radial falloff is the blur. Cheap to paint. */
.menu .glow{
  position:absolute;
  border-radius:50%;
  pointer-events:none;
  will-change:transform;
}
.menu .glow-1{ /* right-center, larger */
  width:60vmax; height:60vmax;
  right:-26vmax; top:10%;
  background:radial-gradient(circle,
    rgba(46,107,255,0.20) 0%,
    rgba(30,82,224,0.09) 40%,
    transparent 68%);
  animation:drift-1 24s ease-in-out infinite alternate;
}
.menu .glow-2{ /* bottom-left, smaller */
  width:44vmax; height:44vmax;
  left:-20vmax; bottom:-18vmax;
  background:radial-gradient(circle,
    rgba(30,82,224,0.16) 0%,
    rgba(46,107,255,0.07) 40%,
    transparent 68%);
  animation:drift-2 30s ease-in-out infinite alternate;
}
@keyframes drift-1{
  from{transform:translate(0,0) scale(1)}
  to  {transform:translate(-6vmax,8vmax) scale(1.12)}
}
@keyframes drift-2{
  from{transform:translate(0,0) scale(1)}
  to  {transform:translate(7vmax,-5vmax) scale(1.08)}
}
/* Static on mobile — same battery rule as the grain */
@media (max-width:768px){
  .menu .glow{animation:none; will-change:auto}
}

/* Film grain — dark takeover surfaces only */
.menu::after{
  content:"";
  position:absolute;
  inset:0;
  opacity:0.035;
  mix-blend-mode:overlay;
  pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- Links column */
.menu-inner{position:relative; width:fit-content}

.menu-links{list-style:none}
.menu-links li{overflow:hidden} /* line mask for reveal + exit */

.menu-link{
  display:flex;
  align-items:center;
  gap:clamp(1.25rem, 3vw, 2.5rem);
  padding:0.35rem 0;
  text-decoration:none;
  transform:translateY(115%);
  transition:transform var(--dur-slow) var(--ease-out-expo);
}
.menu-link .num{
  font-weight:700;
  font-size:clamp(0.9rem, 0.7rem + 0.9vw, 1.5rem);
  letter-spacing:0.02em;
  font-variant-numeric:tabular-nums;
  color:var(--text-on-dark);
  min-width:2.2ch;
  transition:color var(--dur-fast) ease;
}
.menu-link .txt{
  font-weight:700;
  font-size:clamp(2.5rem, 1.67rem + 3.7vw, 5rem);
  line-height:1.02;
  letter-spacing:-0.02em;
  text-transform:uppercase;
  color:var(--text-on-dark);
  overflow:hidden;
}
/* Roll hover: label flips up, cobalt duplicate rolls in beneath */
.menu-link .roll{
  position:relative;
  display:block;
  transition:transform 350ms var(--ease-out-expo);
}
.menu-link .roll::after{
  content:attr(data-text);
  position:absolute;
  top:100%;
  left:0;
  color:var(--cobalt-bright);
}
.menu-link:hover .roll,
.menu-link:focus-visible .roll{transform:translateY(-100%)}

/* Current page: dimmed, no roll — you are here */
.menu-link[aria-current="page"] .txt,
.menu-link[aria-current="page"] .num{color:var(--text-on-dark-3)}
.menu-link[aria-current="page"]:hover .roll,
.menu-link[aria-current="page"]:focus-visible .roll{transform:none}

/* --- Social row */
.menu-social{
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  gap:clamp(1.5rem, 3vw, 2.5rem);
  margin-top:clamp(3rem, 6vh, 4.5rem);
  overflow:hidden;
}
.menu-social a{
  display:inline-block;
  font-weight:700;
  font-size:0.875rem;
  letter-spacing:0.06em;
  text-transform:uppercase;
  text-decoration:none;
  color:var(--text-on-dark);
  transform:translateY(140%);
  transition:transform var(--dur-slow) var(--ease-out-expo),
             color var(--dur-fast) ease;
}
.menu-social a:hover,
.menu-social a:focus-visible{color:var(--cobalt-bright)}

/* --- Staggered reveal: 60ms per item after the 400ms wipe */
.menu.open .menu-link,
.menu.open .menu-social a{transform:translateY(0)}
.menu.open li:nth-child(1) .menu-link{transition-delay:400ms}
.menu.open li:nth-child(2) .menu-link{transition-delay:460ms}
.menu.open li:nth-child(3) .menu-link{transition-delay:520ms}
.menu.open li:nth-child(4) .menu-link{transition-delay:580ms}
.menu.open li:nth-child(5) .menu-link{transition-delay:640ms}
.menu.open .menu-social a{transition-delay:700ms} /* batched: stagger cap is 6 */

/* --- Exit choreography: items out fast + reversed, then wipe.
   .closing is added while .open is still on; JS removes both
   after ~240ms and the panel wipe takes over. */
.menu.open.closing .menu-link{
  transform:translateY(-115%);
  transition:transform 200ms var(--ease-in-quart);
}
.menu.open.closing .menu-social a{
  transform:translateY(-140%);
  transition:transform 200ms var(--ease-in-quart);
  transition-delay:0ms;
}
.menu.open.closing li:nth-child(5) .menu-link{transition-delay:0ms}
.menu.open.closing li:nth-child(4) .menu-link{transition-delay:30ms}
.menu.open.closing li:nth-child(3) .menu-link{transition-delay:60ms}
.menu.open.closing li:nth-child(2) .menu-link{transition-delay:90ms}
.menu.open.closing li:nth-child(1) .menu-link{transition-delay:120ms}
.menu:not(.open) .menu-link,
.menu:not(.open) .menu-social a{transition:none}

/* ============================================================
   Reduced motion — simple fades / instant states
   ============================================================ */
@media (prefers-reduced-motion: reduce){
  .nav-toggle::before,
  .nav-toggle::after{animation:none !important; transition:background-color var(--dur-fast) ease}
  .nav-toggle.is-open::before{top:23px; transform:rotate(45deg)}
  .nav-toggle.is-open::after {top:23px; transform:rotate(-45deg)}
  .menu{
    transform:none;
    opacity:0;
    transition:opacity var(--dur-fast) ease, visibility 0s var(--dur-fast);
  }
  .menu.open{opacity:1; transition:opacity var(--dur-fast) ease}
  .menu-link,
  .menu-social a,
  .menu-link .roll{transform:none !important; transition:none !important}
  .menu .glow{animation:none}
}


/* ==========================================================================
   FOOTER — dark bookend, curtain reveal
   ========================================================================== */
.site-footer {
  position: relative;
  overflow: clip;
  background:
    /* single cobalt moment — ambient glow under the CTA column */
    radial-gradient(
      ellipse 80% 100% at 18% 102%,
      rgba(46, 107, 255, 0.28) 0%,
      rgba(30, 82, 224, 0.10) 42%,
      transparent 70%
    ),
    /* cool slate diagonal, brightest upper-right, sinking to near-black */
    linear-gradient(
      158deg,
      #0d1015 0%,
      #16202e 36%,
      #101724 62%,
      #080a0f 100%
    );
}
 
/* Cobalt hairline top edge — replaces the old wraparound panel border */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(84, 136, 255, 0.85) 0%,
    rgba(46, 107, 255, 0.25) 50%,
    rgba(30, 82, 224, 0.75) 100%
  );
  pointer-events: none;
  z-index: 2;
}
 
/* Film grain — kills gradient banding, adds texture to the dark field.
   Inline SVG turbulence, tiled at natural size, barely-there opacity.     */
.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 1;
}
 
/* Very slow breathe on the glow layer — desktop only, motion-safe.
   Animating background-position is expensive, so we breathe a dedicated
   glow element instead: the ::before/::after slots are taken, so the
   whole background gently shifts via a filter-free opacity pulse on a
   wrapper is overkill — keep it static. If breathing is missed later,
   add a .site-footer__glow div. Static reads calmer at full-bleed scale. */
 
/* --- Inner container --------------------------------------------------------- */
.site-footer__inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-max, 1440px);
  margin-inline: auto;
  padding: clamp(4rem, 3rem + 5vw, 8rem)
           var(--edge, clamp(1.25rem, 4vw, 5rem))
           clamp(2rem, 1.5rem + 2.2vw, 3.5rem);
}
 
/* --- Main grid ------------------------------------------------------------
   Two-column only from 1200px up — below that the info columns get too
   starved and long strings (the email) collide with the nav column.        */
.site-footer__main {
  display: grid;
  gap: clamp(3rem, 2rem + 4vw, 5rem);
}
 
@media (min-width: 1200px) {
  .site-footer__main {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: start;
  }
}
 
/* --- CTA column -------------------------------------------------------------- */
.site-footer__headline {
  margin: 0 0 clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(2.25rem, 1.55rem + 3.1vw, 4.5rem); /* 36 to 72px */
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--text-on-dark, #f7f7f5);
  text-wrap: balance;
}
 
/* Subheading — short supporting line(s) under the headline */
.site-footer__sub {
  margin: 0 0 clamp(2rem, 1.5rem + 2vw, 3rem);
  max-width: 44ch;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(1rem, 0.96rem + 0.19vw, 1.125rem); /* body token */
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-on-dark-2, rgba(247, 247, 245, 0.64));
  text-wrap: pretty;
}
 
/* --- Info columns ------------------------------------------------------------ */
.site-footer__cols {
  display: grid;
  grid-template-columns: minmax(300px, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 1.5rem + 2vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
}
 
.site-footer__eyebrow {
  margin: 0 0 1.5rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.75rem;              /* label token */
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-on-dark-3, rgba(247, 247, 245, 0.4));
}
 
.site-footer__address {
  margin: 0 0 1rem;
  font-style: normal;
  font-size: clamp(1rem, 0.96rem + 0.19vw, 1.125rem); /* body token */
  line-height: 1.6;
  color: var(--text-on-dark-2, rgba(247, 247, 245, 0.64));
}
 
.site-footer__email {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: anywhere; /* long unbreakable string — must never overflow */
  color: var(--text-on-dark-2, rgba(247, 247, 245, 0.64));
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: left 100%;
  background-size: 0% 1px;
  transition: background-size 200ms ease, color 200ms ease;
}
 
.site-footer__email:hover,
.site-footer__email:focus-visible {
  color: var(--cobalt-bright, #5488ff);
  background-size: 100% 1px;
}
 
/* Socials — 44px chips speaking the button's motion language: hairline
   border, radius-xs, and a clipped icon swap on hover (resting icon lifts
   out, inverted copy rises in as the chip floods white).                    */
.site-footer__socials {
  display: flex;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
 
.social-chip {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-on-dark, rgba(247, 247, 245, 0.14));
  border-radius: 2px;
  background-color: rgba(247, 247, 245, 0.03);
  color: var(--text-on-dark-2, rgba(247, 247, 245, 0.64));
  transition: background-color 300ms ease, border-color 300ms ease;
}
 
.social-chip__icon {
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
  transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1);
}
 
.social-chip__icon--dup {
  transform: translateY(250%); /* must fully clear the 44px chip — at 135%
                                  the tips showed through the translucent bg */
  color: var(--surface-dark, #0a0a0b);
}
 
@media (hover: hover) and (pointer: fine) {
  .social-chip:hover {
    background-color: var(--surface-light, #f7f7f5);
    border-color: var(--surface-light, #f7f7f5);
  }
 
  .social-chip:hover .social-chip__icon {
    transform: translateY(-250%);
  }
 
  .social-chip:hover .social-chip__icon--dup {
    transform: translateY(0);
  }
}
 
.social-chip:focus-visible {
  outline: 2px solid var(--cobalt, #2e6bff);
  outline-offset: 3px;
  background-color: var(--surface-light, #f7f7f5);
  border-color: var(--surface-light, #f7f7f5);
}
 
.social-chip:focus-visible .social-chip__icon {
  transform: translateY(-250%);
}
 
.social-chip:focus-visible .social-chip__icon--dup {
  transform: translateY(0);
}
 
@media (prefers-reduced-motion: reduce) {
  .social-chip__icon {
    transition: none;
  }
 
  .social-chip__icon--dup {
    display: none;
  }
 
  .social-chip:hover .social-chip__icon,
  .social-chip:focus-visible .social-chip__icon {
    transform: none;
    color: var(--surface-dark, #0a0a0b);
  }
}
 
/* Company nav */
.site-footer__nav {
  display: grid;
  gap: 1.125rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
 
.site-footer__nav a {
  display: inline-block;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-on-dark, #f7f7f5);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: left 100%;
  background-size: 0% 1px;
  transition: background-size 200ms ease, color 200ms ease;
}
 
.site-footer__nav a:hover,
.site-footer__nav a:focus-visible {
  color: var(--cobalt-bright, #5488ff);
  background-size: 100% 1px;
}
 
/* --- Legal row ---------------------------------------------------------------- */
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-top: clamp(3rem, 2rem + 4vw, 5.5rem);
  padding-top: clamp(1.5rem, 1rem + 1.5vw, 2rem);
  border-top: 1px solid var(--border-on-dark, rgba(247, 247, 245, 0.14));
}
 
.site-footer__legal p,
.site-footer__legal a {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-on-dark-3, rgba(247, 247, 245, 0.4));
}
 
.site-footer__legal a {
  text-decoration: none;
  transition: color 200ms ease;
}
 
.site-footer__legal a:hover,
.site-footer__legal a:focus-visible {
  color: var(--cobalt-bright, #5488ff);
}
 
/* --- Mobile -------------------------------------------------------------------- */
@media (max-width: 639px) {
  .site-footer__cols {
    grid-template-columns: 1fr;
  }
 
  .site-footer__legal {
    flex-direction: column;
    align-items: flex-start;
  }
}
 
/* ==========================================================================
   CURTAIN REVEAL — opt-in (unchanged behavior)
   The footer sits fixed beneath the page; scrolling to the end lifts the
   page away to uncover it.
 
   To enable:
   1. Add class "site-footer--curtain" to the <footer>.
   2. Wrap all page content ABOVE the footer in <main class="page-content">
      (or add the class to your existing <main>).
   3. Load footer-enhancements.js — it keeps --footer-h in sync.
 
   z-index: page-content sits at 1, footer at 0 — both below header (100)
   and menu overlay (200) per the system's layer scale.
   ========================================================================== */
.site-footer--curtain {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 0;
}
 
.page-content {
  position: relative;
  z-index: 1;
  background-color: var(--surface-light, #f7f7f5);
  margin-bottom: var(--footer-h, 0px);
  /* Soft shadow at the lifting edge sells the depth */
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.45);
}
