/* ==========================================================================
   Esspry LLC — base.css
   Design tokens, reset, typography, shared background layers
   ========================================================================== */

:root {
  --bg: #010101;
  --bg-soft: #0a0a0a;
  --surface: #111317;
  --surface-2: #16181d;
  --border: rgba(55, 65, 81, 0.5);
  --border-soft: rgba(55, 65, 81, 0.3);

  --text: #ffffff;
  --text-muted: #d1d5db;
  --text-dim: #9ca3af;

  --accent: #2C5C88;
  --accent-hover: #3a7aad;
  --accent-soft: rgba(44, 92, 136, 0.14);
  --success: #22c55e;

  --radius: 0.5rem;
  --radius-lg: 1rem;
  --max-width: 80rem;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* Layout helpers ---------------------------------------------------------- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 2.5rem; }
.section { position: relative; z-index: 2; padding: 7rem 0; }
.eyebrow {
  font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 1rem; display: block;
}
.section-title { font-size: clamp(1.875rem, 4vw, 3rem); font-weight: 700; line-height: 1.15; }
.section-lead { color: var(--text-muted); font-size: 1.0625rem; max-width: 40rem; margin-top: 1rem; }

/* Shared background: scroll video + particles ----------------------------- */
#scroll-video-container {
  position: fixed; inset: 0; top: -20%; z-index: -10; background: var(--bg-soft);
}
#scroll-video-container canvas,
#scroll-video-container video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
#scroll-video-container .overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.25); }

/* Static gradient background for inner pages */
.page-bg {
  position: fixed; inset: 0; z-index: -10; background: var(--bg);
}
.page-bg::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60rem 40rem at 80% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(50rem 40rem at 0% 100%, rgba(44, 92, 136, 0.10), transparent 60%);
}

#particles-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}

@media (max-width: 768px) {
  .container { padding: 0 1.5rem; }
  .section { padding: 4.5rem 0; }
}

/* Accessibility ----------------------------------------------------------- */
.skip-link {
  position: absolute; left: 1rem; top: 0.5rem; z-index: 100;
  background: var(--accent); color: #fff; padding: 0.6rem 1rem; border-radius: var(--radius);
  font-size: 0.85rem; transform: translateY(-150%); transition: transform 0.2s;
}
.skip-link:focus { transform: translateY(0); outline: 2px solid #fff; }

:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  #hero .bounce-arrow svg { animation: none; }
  #closing .inner { opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* Performance: promote heavy fixed layers to their own GPU compositor layer
   so scrolling/painting over them stays smooth. */
#scroll-video-container, #scroll-video-container canvas, #particles-canvas, .page-bg {
  transform: translateZ(0);
  backface-visibility: hidden;
}
#scroll-video-container, .page-bg { contain: paint; }
