@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('../assets/fonts/CabinetGrotesk-Variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Sora';
  src: url('../assets/fonts/Sora-Variable.woff2') format('woff2-variations');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Sora';
  src: url('../assets/fonts/Sora-VariableItalic.woff2') format('woff2-variations');
  font-weight: 100 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --page-gutter: clamp(1.5rem, 4vw, 3.5rem);

  /* Brand */
  --brand: #1dcf96;
  --brand-light: #96cdbc;
  --brand-dark: #066446;
  --secondary: #cda196;
  --secondary-hot: #cf421d;
  --secondary-dark: #641806;

  /* Neutrals */
  --white: #ffffff;
  --smoke: #f5f5f5;
  --gray: #838383;
  --void: #1a1a1a;
  --abyss: #0a0a0a;

  /* Light theme */
  --bg: var(--smoke);
  --bg-elevated: var(--white);
  --text: var(--abyss);
  --text-soft: #555555;
  --text-muted: #777777;
  --text-inverse: var(--white);
  --border: rgba(10, 10, 10, 0.08);
  --surface: rgba(255, 255, 255, 0.6);
  --footer-bg: var(--smoke);
  --footer-text: var(--text-soft);
  --footer-color: var(--text);
  --footer-letter: var(--brand);
  --footer-logo-fill:var(--brand);
  --footer-grid: rgba(10, 10, 10, 0.04);
  --logo-letter: var(--void);
  --metal-light: #ffffff;
  --metal-mid: #d0d0d0;
  --metal-shadow: rgba(0, 0, 0, 0.12);
  --metal-text: var(--abyss);
  --metal-text-shadow: rgba(255, 255, 255, 0.35);
  --client-logo-filter: grayscale(100%) opacity(0.5) brightness(0.2);
  --client-logo-filter-hover: grayscale(100%) opacity(0.95) brightness(0);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--abyss);
    --bg-elevated: var(--void);
    --text: var(--white);
    --text-soft: #b0b0b0;
    --text-muted: #888888;
    --text-inverse: var(--abyss);
    --border: rgba(255, 255, 255, 0.08);
    --surface: rgba(26, 26, 26, 0.6);
    --footer-bg: #050505;
    --footer-text: rgba(255, 255, 255, 0.55);
    --footer-color: var(--text-inverse);
    --footer-letter: var(--brand);
    --footer-logo-fill: var(--brand-dark);
    --logo-letter: var(--white);
    --metal-light: #4a4a4a;
    --metal-mid: #2a2a2a;
    --metal-shadow: rgba(0, 0, 0, 0.4);
    --metal-text: var(--white);
    --metal-text-shadow: rgba(0, 0, 0, 0.35);
    --client-logo-filter: grayscale(100%) brightness(2.5) opacity(0.55);
    --client-logo-filter-hover: grayscale(100%) brightness(3.5) opacity(0.95);
  }
}

html[data-theme="light"] {
  --bg: var(--smoke);
  --bg-elevated: var(--white);
  --text: var(--abyss);
  --text-soft: #555555;
  --text-muted: #777777;
  --text-inverse: var(--white);
  --border: rgba(10, 10, 10, 0.08);
  --surface: rgba(255, 255, 255, 0.6);
  --footer-bg: var(--smoke);
  --footer-text: var(--text-soft);
  --footer-color: var(--text);
  --footer-letter: var(--brand);
  --footer-logo-fill: var(--brand);
  --footer-grid: rgba(10, 10, 10, 0.04);
  --logo-letter: var(--void);
  --metal-light: #ffffff;
  --metal-mid: #d0d0d0;
  --metal-shadow: rgba(0, 0, 0, 0.12);
  --metal-text: var(--abyss);
  --metal-text-shadow: rgba(255, 255, 255, 0.35);
  --client-logo-filter: grayscale(100%) opacity(0.5) brightness(0.2);
  --client-logo-filter-hover: grayscale(100%) opacity(0.95) brightness(0);
}

html[data-theme="dark"] {
  --bg: var(--abyss);
  --bg-elevated: var(--void);
  --text: var(--white);
  --text-soft: #b0b0b0;
  --text-muted: #888888;
  --text-inverse: var(--abyss);
  --border: rgba(255, 255, 255, 0.08);
  --surface: rgba(26, 26, 26, 0.6);
  --footer-bg: #050505;
  --footer-text: rgba(255, 255, 255, 0.55);
  --footer-color: var(--text-inverse);
  --footer-letter: var(--brand);
  --footer-logo-fill: var(--brand-dark);
  --footer-grid: rgba(255, 255, 255, 0.03);
  --logo-letter: var(--white);
  --metal-light: #4a4a4a;
  --metal-mid: #2a2a2a;
  --metal-shadow: rgba(0, 0, 0, 0.4);
  --metal-text: var(--white);
  --metal-text-shadow: rgba(0, 0, 0, 0.35);
  --client-logo-filter: grayscale(100%) brightness(2.5) opacity(0.55);
  --client-logo-filter-hover: grayscale(100%) brightness(3.5) opacity(0.95);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}

html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  font-family: 'Sora', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  /* Only transition color — background is handled by the theme overlay for performance */
  transition: color 0.4s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

.logo__letter {
  fill: var(--logo-letter);
  transition: fill 0.5s ease;
}

.heading-display {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.92;
  text-transform: uppercase;
}

.text-body {
  font-family: 'Sora', sans-serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-rendering: optimizeLegibility;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ─── GPU-smooth theme transition overlay ─── */
/* A ::before pseudo fades out using opacity — a cheap GPU composite    */
/* operation instead of repainting background-color across many layers. */
html.theme-transitioning::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  opacity: 1;
  animation: theme-fade 0.42s ease forwards;
  pointer-events: none;
}

@keyframes theme-fade {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}
