/* Knight CTO — critical above-the-fold CSS.
   Loaded synchronously before paint. Contains ONLY what's needed to
   render the first viewport correctly (nav + hero on desktop, mobile
   pager hero on phones). Everything else lives in _shared.css and is
   loaded async via preload+onload to keep the critical request chain
   short. Keep this file under ~3KB. */

:root {
  --ink: #0E0E10;
  --ink-2: #14141a;
  --line: #2a2a30;
  --line-soft: #1f1f25;
  --cream: #F2EBD9;
  --cream-dim: #c8c1b1;
  --muted: #8b857a;
  --brass: #C9A16A;
  --brass-dim: #8c6f47;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--cream);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--brass); font-weight: 400; }

/* Hide elements that are mobile-only by default; the mobile media query
   re-enables them. Prevents flash of mobile UI on desktop. */
.mobile-content,
.mp-hamburger,
.mp-menu { display: none; }

/* ── Desktop NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 24px 48px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  align-items: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(14,14,16,0.65);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--cream);
}
.brand svg { width: 26px; height: 26px; }

/* ── Desktop HERO (LCP candidate on desktop) ── */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 25% 0%;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14,14,16,0.35) 0%, rgba(14,14,16,0.65) 55%, var(--ink) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 48px;
  max-width: 1280px;
  margin: 0 auto;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 500;
}
.hero h1, .hero-h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 1.02;
  color: var(--cream);
  letter-spacing: -0.01em;
  margin-top: 24px;
}

/* ── MOBILE: hide desktop hero/nav, show pager (LCP candidate on mobile) ── */
@media (max-width: 900px) {
  body:has(.mobile-content) {
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
  }
  body:has(.mobile-content) .nav,
  body:has(.mobile-content) .hero,
  body:has(.mobile-content) > footer,
  body:has(.mobile-content) > main:not(.mobile-content) { display: none !important; }

  .mobile-content {
    display: flex !important;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
  .mp {
    flex: 0 0 100vw;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: var(--ink);
    padding: 88px 26px 64px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
  }
  .mp-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
  }
  .mp-eyebrow { display: flex; align-items: center; gap: 12px; }
  .mp-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brass);
    font-weight: 500;
  }
  .mp-line { width: 32px; height: 1px; background: var(--brass); }
  .mp-h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    font-size: clamp(36px, 9vw, 52px);
    line-height: 1.05;
    color: var(--cream);
    letter-spacing: -0.005em;
  }
}
