/* ============================================================
   ZAMBOL CREATIVES — main.css
   Global design tokens, resets, layout system
   Reference: thekeenfolks.com
   ============================================================ */

/* ── Google Fonts Import ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@1,400;1,500&display=swap');

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  /* Colors */
  --color-dark:    #161616;
  --color-white:   #ffffff;
  --color-accent:  #1f6a5b;
  --color-grey:    #acacac;
  --color-divider: #e8e8e8;
  --color-glass-bg: rgba(22, 22, 22, 0.65);
  --color-glass-border: rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif:   'Playfair Display', Georgia, serif;

  /* Type scale — fluid with clamp() */
  --text-display:  clamp(52px, 7.5vw, 88px);
  --text-hero-sub: clamp(18px, 2vw, 24px);
  --text-heading:  clamp(36px, 4.5vw, 56px);
  --text-h3:       clamp(22px, 2.5vw, 30px);
  --text-body:     16px;
  --text-small:    14px;
  --text-label:    11px;

  /* Spacing */
  --section-v: clamp(80px, 10vw, 140px);
  --container-max: 1240px;
  --container-pad: clamp(24px, 5vw, 60px);

  /* Animation */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
  --transition-fast: 0.25s var(--ease-out-expo);
  --transition-med:  0.45s var(--ease-in-out-quart);
}

/* ── Global Reset ────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* CRITICAL: Lenis handles smooth scroll — never use CSS smooth scroll */
html {
  scroll-behavior: auto !important;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

/* Lenis adds these classes — do not override */
html.lenis { 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-scrolling iframe { pointer-events: none; }

body {
  background-color: var(--color-dark);
  color: var(--color-white);
  font-family: var(--font-primary);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.6;
  cursor: none; /* Custom cursor replaces system cursor */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

button {
  background: none;
  border: none;
  cursor: none;
  font-family: inherit;
}

/* ── Layout System ───────────────────────────────────────── */
.section {
  position: relative;
  padding: var(--section-v) 0;
}

.section--dark {
  background-color: var(--color-dark);
  color: var(--color-white);
}

.section--white {
  background-color: var(--color-white);
  color: var(--color-dark);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  width: 100%;
}

/* Full bleed container for hero/video sections */
.container--full {
  width: 100%;
  padding: 0;
}

/* Two-column grid — KF's primary layout */
.grid-two {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: start;
}

.grid-two--equal {
  grid-template-columns: 1fr 1fr;
}

/* Four column stat grid */
.grid-four {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background-color: var(--color-divider);
}

/* Flex utilities */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }

/* ── Section Divider — Plus/Cross SVG ───────────────────── */
/* Matches KF exactly */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
}

.divider--sm { padding: 30px 0; }

/* ── Typography ──────────────────────────────────────────── */
.heading-display {
  font-family: var(--font-primary);
  font-size: var(--text-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.heading-section {
  font-family: var(--font-primary);
  font-size: var(--text-heading);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.heading-h3 {
  font-family: var(--font-primary);
  font-size: var(--text-h3);
  font-weight: 400;
  line-height: 1.25;
}

/* Playfair italic accent — replaces KF's Reckless Neue */
.text-italic-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.text-label {
  font-size: var(--text-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  line-height: 1;
}

.text-small { font-size: var(--text-small); }
.text-muted { color: var(--color-grey); }
.text-accent { color: var(--color-accent); }

/* Reveal-type: initial state — GSAP overrides opacity */
.reveal-type { display: block; }
.reveal-type .word { display: inline-block; overflow: hidden; }
.reveal-type .char { display: inline-block; opacity: 0.08; will-change: opacity; }

/* ── Utility ─────────────────────────────────────────────── */
.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;
}

.hidden { display: none !important; }
.no-scroll { overflow: hidden; }

/* ── Mobile Optimization (Global Overrides) ─────────────── */
@media (max-width: 768px) {
  /* Force all inline and utility grids to 1 column */
  [style*="grid-template-columns"],
  .grid-two,
  .grid-two--equal,
  .grid-four,
  .portfolio-grid,
  .footer__top {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  /* Adjust hero padding on small screens */
  .page-hero {
    padding-top: 120px;
    min-height: auto;
  }
  
  /* Make mobile menu links slightly smaller to prevent wrapping */
  .mobile-menu a {
    font-size: clamp(24px, 8vw, 36px);
  }
  
  /* Adjust stat block sizes */
  .stat-block {
    padding: 24px;
    border-right: none;
    border-bottom: 1px solid var(--color-divider);
  }
}
