/* ════════════════════════════════════════════
   JONATHAN WADSACK — SHARED STYLESHEET
   Covers: reset, variables, cursor, noise,
   nav (desktop + mobile), footer, buttons,
   animations, reveal, shared utilities
════════════════════════════════════════════ */

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

/* ── VARIABLES ── */
:root {
  --black:   #0a0a0a;
  --ink:     #111111;
  --surface: #161616;
  --muted:   #2a2a2a;
  --border:  #242424;
  --dim:     #666666;
  --mid:     #999999;
  --light:   #cccccc;
  --cream:   #f0ead6;
  --cream2:  #e8dfc8;
  --white:   #ffffff;
  --gap: clamp(48px, 8vw, 120px);
  --page-pad: clamp(20px, 5vw, 48px);
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--light);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

/* ── CUSTOM CURSOR (desktop only) ── */
.cursor {
  position: fixed;
  width: 10px; height: 10px;
  background: var(--cream);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .2s, height .2s, background .2s, opacity .2s;
  mix-blend-mode: difference;
}
.cursor.expand  { width: 40px; height: 40px; background: var(--cream2); }
.cursor.hidden  { opacity: 0; }

@media (hover: none) {
  /* Touch devices — hide custom cursor, restore default */
  .cursor { display: none; }
  body { cursor: auto; }
}

/* ── NOISE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 1000;
}

/* ── NAV — DESKTOP ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 300;
  padding: 24px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: border-color .4s, background .4s, padding .4s;
}
nav.scrolled {
  background: rgba(10,10,10,0.96);
  backdrop-filter: blur(12px);
  border-color: var(--border);
  padding: 16px 48px;
}
.nav-logo {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--cream);
  text-decoration: none;
  text-transform: uppercase;
  position: relative;
  z-index: 301;
}
.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}
.nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  transition: color .2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--cream);
  transition: width .3s;
}
.nav-links a:hover        { color: var(--cream); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active        { color: var(--cream); }
.nav-links a.active::after { width: 100%; }

/* ── HAMBURGER BUTTON ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px; height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  position: relative;
  z-index: 301;
}
.nav-hamburger span {
  display: block;
  width: 100%; height: 1px;
  background: var(--cream);
  transition: transform .3s, opacity .3s;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── MOBILE NAV DRAWER ── */
.nav-drawer {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.98);
  backdrop-filter: blur(16px);
  z-index: 299;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.nav-drawer.open {
  opacity: 1;
  pointer-events: all;
}
.nav-drawer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.nav-drawer ul a {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(28px, 7vw, 42px);
  color: var(--mid);
  text-decoration: none;
  font-style: italic;
  transition: color .2s;
  display: block;
  padding: 8px 24px;
}
.nav-drawer ul a:hover,
.nav-drawer ul a.active { color: var(--cream); }

/* ── BUTTONS ── */
.btn-primary {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--cream);
  padding: 14px 28px;
  text-decoration: none;
  border: 1px solid var(--cream);
  transition: background .2s, color .2s;
  cursor: pointer;
  display: inline-block;
}
.btn-primary:hover { background: transparent; color: var(--cream); }
.btn-ghost {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
  background: transparent;
  padding: 14px 28px;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: color .2s, border-color .2s;
  cursor: pointer;
  display: inline-block;
}
.btn-ghost:hover { color: var(--cream); border-color: var(--cream); }

/* ── SECTION HEADER ── */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 48px;
}
.section-num {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--cream);
  opacity: 0.6;
  flex-shrink: 0;
}
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(28px, 4vw, 52px);
  color: var(--white);
  line-height: 1.1;
}
.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 24px;
}

/* ── PAGE HEADER (inner pages) ── */
.page-header {
  padding: 140px var(--page-pad) 64px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-header-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 20% 50%, black 20%, transparent 75%);
  opacity: 0.3;
}
.page-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeUp .8s .1s forwards;
  position: relative;
  z-index: 1;
}
.page-eyebrow::before {
  content: '';
  display: inline-block;
  width: 32px; height: 1px;
  background: var(--cream);
}
.page-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(40px, 6vw, 80px);
  color: var(--white);
  line-height: 1.0;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp .8s .2s forwards;
  position: relative;
  z-index: 1;
}
.page-title em { font-style: italic; color: var(--cream); }
.page-subtitle {
  font-size: 15px;
  color: var(--dim);
  max-width: 480px;
  opacity: 0;
  animation: fadeUp .8s .3s forwards;
  position: relative;
  z-index: 1;
}

/* ── FOOTER ── */
footer {
  padding: 32px var(--page-pad);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-name {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--dim);
  text-transform: uppercase;
}
.footer-nav {
  display: flex;
  gap: 32px;
  list-style: none;
  flex-wrap: wrap;
}
.footer-nav a {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  transition: color .2s;
}
.footer-nav a:hover { color: var(--cream); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scanline {
  0%   { left: -100%; }
  100% { left: 100%; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ════════════════════════════════════════════
   MOBILE STYLES — max-width: 768px
════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Nav */
  nav { padding: 20px 24px; }
  nav.scrolled { padding: 14px 24px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-drawer { display: flex; }

  /* Page header */
  .page-header { padding: 110px 24px 48px; }

  /* Section header */
  .section-header { margin-bottom: 32px; }
  .section-line { display: none; }

  /* Footer */
  footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px;
    gap: 20px;
  }
  .footer-nav { gap: 20px; }

  /* Buttons */
  .btn-primary, .btn-ghost {
    padding: 14px 20px;
    font-size: 11px;
    width: 100%;
    text-align: center;
  }
}

/* ── SHARED NAV JS HOOK ── */
/* Applied by shared nav script in each page */
