/* ============================================================
   FONTS — Source Code Pro (headings/eyebrows), self-hosted
   Only Regular(400) + Medium(500) faces exist → never use >500
   to avoid the browser synthesising a faux-bold weight.
============================================================ */
@font-face {
  font-family: 'Source Code Pro';
  src: url('../fonts/SourceCodePro-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Code Pro';
  src: url('../fonts/SourceCodePro-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* overflow-x must live on html only — setting it on body makes body a
   separate scroll container and breaks window.scrollTo / Lenis. */
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-body);
  line-height: 1.65;
}
/* Lenis smooth-scroll hooks */
html.lenis, html.lenis body { height: auto; }
/* Scope to .lenis (not .lenis-smooth): this Lenis build only adds the `lenis`
   class, so the stock `.lenis-smooth` override never lands and html keeps
   scroll-behavior:smooth — which fights Lenis's per-frame scroll writes and
   makes programmatic + wheel scrolling lag/break. */
.lenis { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

h1, h2, h3, h4, h5 { font-family: 'Source Code Pro', monospace; font-weight: 500; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: 'DM Sans', sans-serif; background: none; border: none; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* ============================================================
   CUSTOM CURSOR
============================================================ */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .25s, height .25s, opacity .25s;
  mix-blend-mode: difference;
  opacity: 0;
}
.cursor.visible { opacity: 1; }
.cursor.big { width: 40px; height: 40px; }

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 600;
  border: none;
  transition: all .2s ease;
  letter-spacing: .02em;
  white-space: nowrap;
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
}
.btn-ghost:hover { color: var(--text-primary); border-color: rgba(255,255,255,.2); }
.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 700;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(245,230,66,.2); }
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,.18);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline-accent:hover { background: rgba(245,230,66,.08); transform: translateY(-1px); }
.btn-lg { padding: 15px 36px; font-size: 1rem; }

/* Typewriter label (hero CTA) — caret blinks; min-width avoids button
   width jitter as characters type/erase. */
.tw { display: inline-block; }
.tw-caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  background: currentColor;
  vertical-align: -0.12em;
  animation: twBlink 1.05s steps(1) infinite;
}
.tw-caret--idle { opacity: .9; }
@keyframes twBlink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* ============================================================
   LAYOUT HELPERS
============================================================ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}
.section { padding: var(--space-section) 0; }
.section-label {
  display: block;
  font-family: 'Source Code Pro', monospace;
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-title {
  font-size: var(--text-h2);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 14px;
}
.section-sub {
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.75;
}

/* ============================================================
   PLACEHOLDERS — logo + media (intentionally empty slots)
============================================================ */
.logo-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 132px;
  height: 36px;
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 8px;
  color: var(--text-muted);
  font-family: 'Source Code Pro', monospace;
  font-size: .68rem;
  letter-spacing: .22em;
  background: rgba(255,255,255,.015);
  user-select: none;
}
.logo-slot--footer { width: 150px; height: 44px; }

.media-placeholder {
  position: relative;
  width: 100%;
  height: 300px;
  border: 1px dashed rgba(255,255,255,.14);
  border-radius: 14px;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 12px, transparent 12px 24px),
    var(--bg-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
}
.media-placeholder svg { opacity: .5; }
.media-placeholder span {
  font-family: 'Source Code Pro', monospace;
  font-size: var(--text-label);
  letter-spacing: .2em;
  text-transform: uppercase;
}

/* ============================================================
   SCROLL REVEALS (IntersectionObserver driven)
============================================================ */
.will-reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.will-reveal.revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .will-reveal { opacity: 1; transform: none; }
}
