/* ============================================================
   RUNOUT FILMS — Design System
   Tokens, Reset, Typography, Spacing, Utilities
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* --- Fontshare (Satoshi Variable) --- */
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@1,2,3,4,5,6,7,8,9,100,200,300,400,500,600,700,800,900&display=swap');

/* ============================================================
   1. CSS Custom Properties (Design Tokens)
   ============================================================ */
:root {
  color-scheme: dark;
  /* --- Brand Colors --- */
  --color-bg-primary: #0a0a0a;
  --color-bg-elevated: #141414;
  --color-bg-surface: #1a1a1a;
  --color-bg-overlay: rgba(10, 10, 10, 0.95);
  --color-accent: #FFDE05;
  --color-accent-hover: #ffe94d;
  --color-accent-dim: rgba(255, 222, 5, 0.15);
  --color-text-primary: #F5F3EE;
  --color-text-secondary: #8a8a8a;
  --color-text-tertiary: #555555;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(255, 255, 255, 0.15);
  --color-error: #ff4444;
  --color-success: #44cc66;

  /* --- Typography --- */
  --font-display: 'Satoshi', 'Montserrat', sans-serif;
  --font-body: 'Montserrat', Arial, sans-serif;

  /* --- Type Scale (fluid with clamp) --- */
  --text-hero: clamp(2.6rem, 5vw, 5rem);
  --text-h1: clamp(2rem, 4vw, 3.75rem);
  --text-h2: clamp(1.6rem, 3vw, 2.6rem);
  --text-h3: clamp(1.25rem, 2vw, 1.75rem);
  --text-h4: clamp(1.05rem, 1.4vw, 1.3rem);
  --text-body-lg: clamp(1rem, 1.15vw, 1.1rem);
  --text-body: clamp(0.9rem, 1vw, 1rem);
  --text-small: clamp(0.78rem, 0.85vw, 0.85rem);
  --text-xs: clamp(0.68rem, 0.72vw, 0.75rem);
  --text-nav-link: clamp(2rem, 3.5vw, 3.5rem);

  /* --- Line Heights --- */
  --leading-tight: 1.05;
  --leading-snug: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  /* --- Letter Spacing --- */
  --tracking-tight: -0.03em;
  --tracking-normal: 0;
  --tracking-wide: 0.05em;
  --tracking-wider: 0.1em;
  --tracking-widest: 0.2em;

  /* --- Spacing Scale (8px base) --- */
  --space-1: 0.25rem;
  /* 4px */
  --space-2: 0.5rem;
  /* 8px */
  --space-3: 0.75rem;
  /* 12px */
  --space-4: 1rem;
  /* 16px */
  --space-5: 1.5rem;
  /* 24px */
  --space-6: 2rem;
  /* 32px */
  --space-7: 2.5rem;
  /* 40px */
  --space-8: 3rem;
  /* 48px */
  --space-10: 4rem;
  /* 64px */
  --space-12: 5rem;
  /* 80px */
  --space-16: 7rem;
  /* 112px */
  --space-20: 9rem;
  /* 144px */
  --space-section: clamp(5rem, 10vh, 10rem);

  /* --- Layout --- */
  --container-max: 1400px;
  --container-narrow: 900px;
  --container-padding: clamp(1.25rem, 4vw, 3rem);
  --nav-height: 90px;
  --nav-height-compact: 64px;

  /* --- Transitions & Easing --- */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.35s;
  --duration-normal: 0.6s;
  --duration-slow: 0.9s;
  --duration-slower: 1.2s;

  /* --- Borders & Radius --- */
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --radius-full: 0px;

  /* --- Z-Index Scale --- */
  --z-base: 1;
  --z-nav: 100;
  --z-overlay: 200;
  --z-cursor: 300;
  --z-transition: 900;
  --z-preloader: 9999;
}

/* ============================================================
   2. CSS Reset (Modern Normalize)
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Prevent scroll when nav overlay or modal is open */
body.no-scroll {
  overflow: hidden;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Hide native cursor globally so custom cursor handles all states */
*,
*::before,
*::after,
html,
body,
a,
button,
input,
textarea,
select,
label,
[role="button"] {
  cursor: none !important;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

select {
  color-scheme: dark;
}

option {
  background-color: var(--color-bg-surface, #1a1a1a);
  color: var(--color-text-primary, #F5F3EE);
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ============================================================
   3. Typography Utilities
   ============================================================ */
.text-hero {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-hero);
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.text-h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-h1);
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.text-h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-h2);
  line-height: var(--leading-snug);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.text-h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-h3);
  line-height: var(--leading-snug);
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

.text-h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-h4);
  line-height: var(--leading-snug);
  letter-spacing: 0;
  text-transform: uppercase;
}

.text-body-lg {
  font-size: var(--text-body-lg);
  line-height: var(--leading-relaxed);
}

.text-body {
  font-size: var(--text-body);
  line-height: var(--leading-normal);
}

.text-small {
  font-size: var(--text-small);
  line-height: var(--leading-normal);
}

.text-xs {
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.text-accent {
  color: var(--color-accent);
}

.text-secondary {
  color: var(--color-text-secondary);
}

.text-tertiary {
  color: var(--color-text-tertiary);
}

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

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

.italic {
  font-style: italic;
}

/* ============================================================
   4. Layout Utilities
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
  position: relative;
}

.section--full {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ============================================================
   5. Selection & Scrollbar
   ============================================================ */
::selection {
  background-color: var(--color-accent);
  color: var(--color-bg-primary);
}

::-webkit-scrollbar {
  display: none;
}

/* ============================================================
   6. Focus Styles (Accessibility)
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* ============================================================
   7. Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   8. Placeholder / Media Utilities
   ============================================================ */



/* Aspect ratio containers */
.aspect-video {
  aspect-ratio: 16 / 9;
}

.aspect-square {
  aspect-ratio: 1 / 1;
}

.aspect-poster {
  aspect-ratio: 2 / 3;
}

.aspect-portrait {
  aspect-ratio: 3 / 4;
}

.aspect-wide {
  aspect-ratio: 21 / 9;
}

/* ============================================================
   9. Screen Reader Only
   ============================================================ */
.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;
}

/* ============================================================
   10. 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;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}