/* ============================================
   Lenis Smooth Scroll
   ============================================ */

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;
}

/* ============================================
   Font Face Declarations
   ============================================ */

/* DM Mono */
@font-face {
  font-family: 'DM Mono';
  src: url('/fonts/dm-mono/DMMono-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Mono';
  src: url('/fonts/dm-mono/DMMono-LightItalic.woff2') format('woff2');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'DM Mono';
  src: url('/fonts/dm-mono/DMMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Mono';
  src: url('/fonts/dm-mono/DMMono-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'DM Mono';
  src: url('/fonts/dm-mono/DMMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Mono';
  src: url('/fonts/dm-mono/DMMono-MediumItalic.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

/* Gambarino */
@font-face {
  font-family: 'Gambarino';
  src: url('/fonts/gambarino/Gambarino-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Lato */
@font-face {
  font-family: 'Lato';
  src: url('/fonts/lato/Lato-Thin.woff2') format('woff2');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lato';
  src: url('/fonts/lato/Lato-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lato';
  src: url('/fonts/lato/Lato-LightItalic.woff2') format('woff2');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Lato';
  src: url('/fonts/lato/Lato-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lato';
  src: url('/fonts/lato/Lato-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Lato';
  src: url('/fonts/lato/Lato-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lato';
  src: url('/fonts/lato/Lato-BoldItalic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Lato';
  src: url('/fonts/lato/Lato-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lato';
  src: url('/fonts/lato/Lato-BlackItalic.woff2') format('woff2');
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

/* ============================================
   Custom Properties
   ============================================ */

:root {
  --font-display: '42dot Sans', 'Helvetica Neue', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --font-serif: 'Gambarino', Georgia, serif;
  --font-sans: '42dot Sans', 'Helvetica Neue', sans-serif;

  --color-bg: #fafafa;
  --color-text: #1a1a1a;
  --color-text-muted: #6b6b6b;
  --color-accent: #2D87E4;
  --color-accent-light: #4796EC;
  --color-navy: #17497E;
  --color-ink: #14314F;
  --color-border: #e5e5e5;

  --sidebar-width: 50%;
  --divider-width: 3px;
  --page-padding: 0;
  --page-gutter: clamp(1.25rem, 4vw, 2.5rem);
}

/* ============================================
   Reset & Base
   ============================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Forces a root blending context so Safari handles mix-blend-mode correctly
     on position:fixed WebGL elements. isolation:isolate does NOT create a
     containing block, so it doesn't break fixed positioning. */
  isolation: isolate;
}

/* Hide Safari native video controls (play overlay, AirPlay, PiP).
   All videos on this site are decorative / background videos. */
video::-webkit-media-controls,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-start-playback-button {
  display: none !important;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  background-color: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

a:hover {
  opacity: 0.7;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================
   Utility Classes
   ============================================ */

.font-display {
  font-family: var(--font-display);
  font-weight: 300;
}

.font-mono {
  font-family: var(--font-mono);
}

.font-serif {
  font-family: var(--font-serif);
}

.font-sans {
  font-family: var(--font-sans);
}

/* ---- Split text masks (see composables/useSplitText.ts) ----
   Each line/char gets its own overflow clip. The padding + negative margin
   pair widens the clip below the baseline so descenders survive at rest,
   which is why the reveal tweens travel 135% rather than 100%. */
.split-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.16em;
  margin-bottom: -0.16em;
}

.split-line-inner {
  display: block;
  will-change: transform;
}

.split-char {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.16em;
  margin-bottom: -0.16em;
}

.split-char--space {
  overflow: visible;
}

.split-char-inner {
  display: block;
  will-change: transform;
}
