/* ═══════════════════════════════════════════════════════════════
   IronSpark Studios — Production CSS
   Brand: #32592e · #101011 · #f9f9f4 · #e07832 · #404d87
   ═══════════════════════════════════════════════════════════════ */

/* ── RESET ──────────────────────────────────────────────────── */
/*
  FILE GUIDE: foundation-nav.css

  What this controls:
  - Global reset, brand tokens, body/page theme variables, typography defaults.
  - Shared buttons, desktop navigation, page transition curtain, and layout container.

  How to change it:
  - Change brand colors in the :root/body theme token area near the top.
  - Change global nav behavior in the NAV section, not in page files.
  - Change reusable button behavior in the BUTTONS section.

  Be careful:
  - This file affects every page. Prefer page files for one-off visual changes.
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img  { display: block; max-width: 100%; }
a    { color: inherit; text-decoration: none; }
button { font: inherit; border: none; background: none; }
sup  { font-size: .55em; vertical-align: super; }

/* Hide scrollbar everywhere */
html, body { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }

@font-face {
  font-family: 'BrandonGrotesqueIS';
  src: url('/Assets/Fonts/BrandonGrotesque-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'NeutraTextIS';
  src: url('/Assets/Fonts/NeutraText-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --cream:   #f9f9f4;
  --ink:     #101011;
  --theme:   #af5b23;
  --theme-rgb: 224, 120, 50;
  --site-dark-bg: #633520;
  --site-dark-bg-strong: #663215;
  --accent-orange: #af5b23;
  --accent-orange-rgb: 224, 120, 50;
  --accent-blue: #404d87;
  --accent-blue-rgb: 64, 77, 135;
  --orange:  var(--theme);
  --border:  rgba(16,16,17,.12);
  --border-hvy: #101011;
  --disp:    'BrandonGrotesqueIS', 'Helvetica Neue', Arial, sans-serif;
  --body:    'NeutraTextIS', 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
  --tracking-tight: -0.05em;
  --ease:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --viewport-height: 100vh;
}

@supports (height: 100svh) {
  :root {
    --viewport-height: 100svh;
  }
}

@supports (height: 100dvh) {
  :root {
    --viewport-height: 100dvh;
  }
}

body[data-site-theme="animation"],
html[data-site-theme="animation"] {
  --theme: #d1574e;
  --theme-rgb: 223, 147, 141;
  --accent-orange: #db6f67;
  --accent-orange-rgb: 223, 147, 141;
  --site-dark-bg: #722f29;
  --site-dark-bg-strong: #833d38;
}

body[data-site-theme="games"],
html[data-site-theme="games"] {
  --theme: #6dbb5d;
  --theme-rgb: 152, 199, 143;
  --accent-orange: #69b659;
  --accent-orange-rgb: 152, 199, 143;
  --site-dark-bg: #315c32;
  --site-dark-bg-strong: #3f7941;
}

body[data-site-theme="interactive"],
html[data-site-theme="interactive"] {
  --theme: #73a3e2;
  --theme-rgb: 159, 188, 227;
  --accent-orange: #719dd6;
  --accent-orange-rgb: 159, 188, 227;
  --site-dark-bg: #3b557e;
  --site-dark-bg-strong: #496896;
}

body.animation-page {
  --theme: #d1574e;
  --theme-rgb: 209, 87, 78;
  --accent-orange: #d1574e;
  --accent-orange-rgb: 209, 87, 78;
  --site-dark-bg: #722f29;
  --site-dark-bg-strong: #833d38;
}

html:has(body.animation-page) {
  --theme: #d1574e;
  --theme-rgb: 209, 87, 78;
  --accent-orange: #d1574e;
  --accent-orange-rgb: 209, 87, 78;
  --site-dark-bg: #722f29;
  --site-dark-bg-strong: #833d38;
  background: #d1574e;
}

body.games-page {
  --theme: #6dbb5d;
  --theme-rgb: 109, 187, 93;
  --accent-orange: #6dbb5d;
  --accent-orange-rgb: 109, 187, 93;
  --site-dark-bg: #315c32;
  --site-dark-bg-strong: #3f7941;
}

html:has(body.games-page) {
  --theme: #6dbb5d;
  --theme-rgb: 109, 187, 93;
  --accent-orange: #6dbb5d;
  --accent-orange-rgb: 109, 187, 93;
  --site-dark-bg: #315c32;
  --site-dark-bg-strong: #3f7941;
  background: #6dbb5d;
}

body.healthcare-page {
  --theme: #1f3f66;
  --theme-rgb: 31, 63, 102;
  --accent-orange: #315f91;
  --accent-orange-rgb: 49, 95, 145;
  --site-dark-bg: #10243d;
  --site-dark-bg-strong: #17385d;
}

html:has(body.healthcare-page) {
  --theme: #1f3f66;
  --theme-rgb: 31, 63, 102;
  --accent-orange: #315f91;
  --accent-orange-rgb: 49, 95, 145;
  --site-dark-bg: #10243d;
  --site-dark-bg-strong: #17385d;
  background: #1f3f66;
}

body.interactive-page {
  --theme: #73a3e2;
  --theme-rgb: 115, 163, 226;
  --accent-orange: #73a3e2;
  --accent-orange-rgb: 115, 163, 226;
  --site-dark-bg: #3b557e;
  --site-dark-bg-strong: #496896;
}

body[data-site-theme="healthcare"],
html[data-site-theme="healthcare"] {
  --theme: #1f3f66;
  --theme-rgb: 31, 63, 102;
  --accent-orange: #315f91;
  --accent-orange-rgb: 49, 95, 145;
  --site-dark-bg: #10243d;
  --site-dark-bg-strong: #17385d;
}

html:has(body.interactive-page) {
  --theme: #73a3e2;
  --theme-rgb: 115, 163, 226;
  --accent-orange: #73a3e2;
  --accent-orange-rgb: 115, 163, 226;
  --site-dark-bg: #3b557e;
  --site-dark-bg-strong: #496896;
  background: #73a3e2;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 300;
  letter-spacing: .01em;
  min-height: var(--viewport-height);
  overflow-x: hidden;
}

html:has(body.home-page),
body.home-page {
  background: var(--theme);
}

html:has(body.games-page),
body.games-page {
  background: #6dbb5d;
}

html {
  background: var(--theme);
}

#page {
  position: relative;
  z-index: auto;
  min-height: var(--viewport-height);
}

body.home-page #page {
  margin: 0;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}

#themePulse,
#themePulseNav {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--theme-reveal-bg, var(--site-dark-bg));
  clip-path: circle(0 at var(--theme-reveal-x, 50%) var(--theme-reveal-y, 50%));
}

#themePulse {
  z-index: 1;
}

#themePulseNav {
  z-index: 0;
  background: var(--theme-reveal-bg, var(--theme));
}

#themePulse.is-active,
#themePulseNav.is-active {
  animation: theme-mask-reveal 3.4s cubic-bezier(0.18, 0.82, 0.16, 1) forwards;
}

@keyframes theme-mask-reveal {
  from {
    clip-path: circle(0 at var(--theme-reveal-x, 50%) var(--theme-reveal-y, 50%));
  }
  to {
    clip-path: circle(150vmax at var(--theme-reveal-x, 50%) var(--theme-reveal-y, 50%));
  }
}

html,
body.home-page .nav,
body.home-page .footer,
body.home-page .divisions,
body.home-page .division {
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease), color .35s var(--ease);
}

/* ── PAGE TRANSITION CURTAIN ────────────────────────────────── */
#curtain {
  position: fixed; inset: 0; z-index: 8000;
  pointer-events: none;
  overflow: hidden;
  display: grid;
  place-items: center;
  /* sits behind nav (z:500 is nav but curtain is below cursor z:9999) */
}

#curtain.is-revealed {
  display: none;
}

.curtain__layer {
  position: absolute; inset: 0;
  will-change: transform;
  transform: translateY(0);
}
.curtain__layer--1 {
  background: var(--curtain-layer-1, #101011);
  z-index: 4;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.curtain__layer--2 { background: var(--curtain-layer-2, #262019); z-index: 3; }
.curtain__layer--3 { background: var(--curtain-layer-3, #af5b23); z-index: 2; }
.curtain__layer--4 { background: var(--curtain-layer-4, #f9f9f4); z-index: 1; }
.curtain__logo-wrap {
  position: relative;
  z-index: 1;
  overflow: hidden;
  will-change: transform;
  transform-style: preserve-3d;
}
.curtain__logo {
  width: clamp(220px, 30vw, 420px);
  height: auto;
  display: block;
  will-change: transform;
}
/* While navigating away, block clicks */
body.is-leaving #curtain { pointer-events: all; }

@media (max-width: 640px) {
  .curtain__logo {
    width: min(86vw, 340px);
  }
}

/* ── LAYOUT ─────────────────────────────────────────────────── */
.container { width: min(1300px, 100% - 3rem); margin-inline: auto; }

/* ── TYPOGRAPHY ─────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  font-family: var(--disp);
  font-weight: 700;
  font-size: .65rem; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(29,29,29,.45);
}
em { font-style: italic; color: var(--orange); }

.divisions__title,
.division__label,
.manifesto__text,
.page-hero__hl,
.stat-row__num,
.cap-item__num,
.cap-item__title,
.work-card__marquee-inner span,
.work-card__id,
.work-card__title,
.cta-section__hl,
.service-layout__hl,
.nav__mobile-links li a,
.section-sub-hl,
.work-card__title,
.svc-title,
.svc-row__num,
.svc-row__title,
.svc-quote,
.exp-hero__headline h1,
.exp-statement__headline,
.exp-index__title,
.exp-index__num,
.exp-index__meta strong,
.exp-preview__content strong,
.exp-band span,
.exp-proof__title,
.exp-proof__label,
.exp-proof__card h3,
.exp-proof__quote,
.exp-close__copy h2 {
  font-family: var(--disp);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}

.btn,
.nav__links a,
.hero__sub-inner,
.hero__view-work,
.division__tags,
.division__cta,
.manifesto__link,
.link-arrow,
.link-sm,
.footer__col h4,
.work-card__tags,
.form-group label,
.wf-btn,
.division-pill,
.nav__mobile-note,
.contact-form label,
.exp-hero__eyebrow,
.exp-statement__kicker,
.exp-preview__content span,
.exp-close__mail {
  font-family: var(--disp);
  font-weight: 700;
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .9rem 1.75rem; font-size: .78rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  border-radius: 2px;
  position: relative; overflow: hidden;
  transition: color .45s var(--ease), border-color .45s var(--ease);
}
/* Arrow clip wrapper — injected by initButtonAnimations() */
.btn__icon-wrap {
  display: inline-flex; overflow: hidden;
  position: relative;
}
.btn__icon-wrap svg { display: block; }

.btn--spark  { background: var(--ink); color: var(--cream); border: 2px solid var(--ink); }
.btn--spark:hover  { background: var(--theme); border-color: var(--theme); }

.btn--ghost  { background: transparent; color: var(--ink); border: 2px solid var(--border-hvy); }
.btn--ghost::before {
  content: ''; position: absolute; inset: 0;
  background: var(--ink);
  transform: translateX(-101%);
  transition: transform .55s var(--ease);
}
.btn--ghost:hover::before  { transform: translateX(0); }
.btn--ghost:hover  { color: var(--cream); }

.btn--outline-light { background: transparent; color: var(--cream); border: 2px solid rgba(247,242,233,.4); }
.btn--outline-light::before {
  content: ''; position: absolute; inset: 0;
  background: var(--cream);
  transform: translateX(-101%);
  transition: transform .55s var(--ease);
}
.btn--outline-light:hover::before { transform: translateX(0); }
.btn--outline-light:hover { color: var(--ink); border-color: var(--cream); }

/* Orange CTA — ink wipes over from the left, text stays cream throughout */
.btn--orange {
  background: linear-gradient(to right, var(--ink) 50%, var(--accent-orange) 50%);
  background-size: 205% 100%;
  background-position: 100% 0;
  color: var(--cream);
  border: 2px solid var(--accent-orange);
  transition: background-position .65s var(--ease), border-color .5s var(--ease), color .45s var(--ease);
}
.btn--orange:hover {
  background-position: 0 0;
  border-color: var(--ink);
}

.btn--orange::after {
  content: '';
  display: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--theme-reveal-bg, var(--accent-orange));
  clip-path: circle(0 at var(--theme-reveal-x, 50%) var(--theme-reveal-y, 50%));
}

.btn--orange.is-theme-revealing::after {
  display: block;
  animation: theme-mask-reveal 3.4s cubic-bezier(0.18, 0.82, 0.16, 1) forwards;
}

.btn--orange > span,
.btn--orange svg,
.btn--orange .btn__icon-wrap {
  position: relative;
  z-index: 1;
}

.btn--lg { padding: 1.1rem 2.5rem; font-size: .875rem; }

/* ── NAV ─────────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 1000;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.1rem clamp(1.5rem, 4vw, 3rem);
  will-change: transform;
  overflow: visible;
  isolation: isolate;
  transition: transform .45s var(--ease), color .35s var(--ease);
}

.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--theme);
  box-shadow: 0 1px 0 var(--border);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform .45s var(--ease), opacity .3s var(--ease);
}

.nav__logo,
.nav__links,
.nav__cta,
.nav__burger {
  position: relative;
  z-index: 1;
}
/* Burger is always in DOM but only participates in layout on mobile */
.nav__burger {
  display: none;
}

/* On pages WITH a hero, JS sets translateY(-100%) before animating in.
   On all other pages the nav is immediately visible. */
body.has-hero .nav {
  transform: translateY(-100%);
}

body.has-hero .nav::before {
  transform: translateY(-100%);
  opacity: 0;
}

/* ── Inner pages: nav always has a frosted cream bar so it reads
   over BOTH light sections AND dark (.about-dark) sections ── */
body.inner-page .nav {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.inner-page .nav::before {
  transform: translateY(0);
  opacity: 1;
}

/* Hero pages: frosted bar once user has scrolled */
body.has-hero .nav.scrolled {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.has-hero .nav.scrolled::before {
  transform: translateY(0);
  opacity: 1;
}
/* When scrolled on hero pages, flip links back to ink */
body.has-hero .nav.scrolled .nav__links a { color: #fff; }
body.has-hero .nav.scrolled .btn--spark {
  border-color: rgba(255,255,255,.45); color: #fff !important;
}
body.has-hero .nav.scrolled .btn--spark::before { background: var(--accent-orange); }
body.has-hero .nav.scrolled .btn--spark:hover { color: #fff !important; }

.nav__logo {
  display: flex;
  align-items: center;
  min-height: 58px;
}

.nav__logo img {
  height: clamp(52px, 4.6vw, 58px);
  width: auto;
}

body.has-hero .nav__logo {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}

body.has-hero .nav.scrolled .nav__logo {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav__links a {
  font-size: .8rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink); transition: opacity .2s, color .2s;
  position: relative;
}
body.has-hero .nav__links a { color: #fff; }
body.inner-page .nav__links a { color: #fff; }

/* Dim all links when any is hovered, restore the one being hovered */
.nav__links:hover a         { opacity: .4; }
.nav__links:hover a:hover   { opacity: 1; }

.nav__links a::after {
  content: ''; position: absolute; bottom: -3px; left: 0; right: 0;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: center;
  transition: transform .35s var(--ease);
}
.nav__links a:hover::after,
.nav__links a[aria-current]::after { transform: scaleX(1); transform-origin: center; }
.nav__links a[aria-current] { opacity: 1; }

.nav__links .nav__link--animation:hover,
.nav__links .nav__link--animation:focus-visible {
  color: #d1574e;
}

.nav__links .nav__link--games:hover,
.nav__links .nav__link--games:focus-visible {
  color: #6dbb5d;
}

.nav__links .nav__link--interactive:hover,
.nav__links .nav__link--interactive:focus-visible {
  color: #73a3e2;
}

.nav__links .nav__link--healthcare:hover,
.nav__links .nav__link--healthcare:focus-visible {
  color: #315f91;
}

body.inner-page .nav__links .nav__link--animation:hover,
body.inner-page .nav__links .nav__link--animation:focus-visible,
body.inner-page .nav__links .nav__link--games:hover,
body.inner-page .nav__links .nav__link--games:focus-visible,
body.inner-page .nav__links .nav__link--healthcare:hover,
body.inner-page .nav__links .nav__link--healthcare:focus-visible,
body.inner-page .nav__links .nav__link--interactive:hover,
body.inner-page .nav__links .nav__link--interactive:focus-visible {
  color: #fff;
}

.nav__cta { display: flex; align-items: center; gap: 1rem; }
.btn--spark {
  font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid rgba(29,29,29,.35); color: var(--ink) !important;
  padding: .65rem 1.3rem; display: inline-flex; align-items: center; gap: .5rem;
  position: relative; overflow: hidden;
  transition: color .45s var(--ease), border-color .35s var(--ease);
  background: none;
}
.btn--spark::before {
  content: ''; position: absolute; inset: 0;
  background: var(--ink);
  transform: translateX(-101%);
  transition: transform .55s var(--ease);
}
.btn--spark:hover::before { transform: translateX(0); }
.btn--spark:hover { color: var(--cream) !important; border-color: var(--ink); opacity: 1; }
.btn--spark span, .btn--spark svg, .btn__icon-wrap { position: relative; z-index: 1; }
.btn--spark svg { width: 11px; height: 11px; }

body.has-hero .btn--spark { border-color: rgba(255,255,255,.5); color: #fff !important; }
body.has-hero .btn--spark::before { background: var(--cream); }
body.has-hero .btn--spark:hover { color: var(--ink) !important; border-color: var(--cream); }
body.inner-page .btn--spark { border-color: rgba(255,255,255,.45); color: #fff !important; }
body.inner-page .btn--spark::before { background: var(--ink); }
body.inner-page .btn--spark:hover { color: #fff !important; }

.nav__links { display: flex; align-items: center; gap: 2.5rem; list-style: none; justify-content: center; }
.nav__cta   { display: flex; align-items: center; gap: 1rem; justify-content: flex-end; }
/* ════════════════════════════════════════════════════════
   HOMEPAGE SECTIONS
════════════════════════════════════════════════════════ */
