/* =============================================================================
   ThatDeveloperGuy v4 — base.css
   Design tokens, resets, typography. Loaded by every page.
   ============================================================================= */

:root {
  /* Color system — research-backed: navy=trust, gold=luxury+expertise, teal=tech */
  --bg-deep: #060a1c;
  --bg: #0a1024;
  --bg-soft: #0e1733;
  --bg-lift: #131e42;
  --bg-glow: #1a2a5f;

  --ink: #f5f1e6;
  --ink-bright: #ffffff;
  --ink-warm: #d4ccb6;
  --ink-muted: #8a8472;
  --ink-faint: #5d574a;

  --line: #1d2a55;
  --line-bright: #2b3d7a;
  --line-gold: rgba(201, 167, 84, 0.3);

  --gold: #c9a754;
  --gold-bright: #e6c97a;
  --gold-deep: #a08538;
  --gold-glow: rgba(201, 167, 84, 0.15);

  --teal: #3aafa9;
  --crimson: #c0392b;
  --emerald: #27ae60;

  /* Typography */
  --serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* Spacing scale (8pt grid) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px; --s-11: 192px;

  /* Type scale (Perfect 4th — 1.333) */
  --t-xs: 12px; --t-sm: 14px; --t-base: 16px; --t-md: 18px;
  --t-lg: 22px; --t-xl: 28px; --t-2xl: 36px; --t-3xl: 48px;
  --t-4xl: 64px; --t-5xl: 88px; --t-6xl: 120px;

  /* Animation easing — research-backed: cubic curves feel "natural" */
  --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-circ: cubic-bezier(0.85, 0, 0.15, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --d-fast: 200ms;
  --d-base: 400ms;
  --d-slow: 800ms;
  --d-slower: 1200ms;

  /* Effects */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.4);
  --shadow-gold: 0 12px 40px rgba(201, 167, 84, 0.2);

  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 16px; --radius-pill: 999px;

  --container: 1280px;
  --container-narrow: 880px;

  --header-h: 72px;
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg-deep);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 400;
  font-size: var(--t-base);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--d-fast) var(--ease-out-quart);
}
a:hover { color: var(--gold-bright); }

/* Focus styles — accessibility tactic */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Typography */
.t-eyebrow {
  font-family: var(--mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
}
.t-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--gold);
}

h1, .t-display {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 7.5vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
}
h1 em, .t-display em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}

h2, .t-heading {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(28px, 4.5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
}
h2 em, .t-heading em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}

h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.t-lede {
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--ink-warm);
  font-weight: 300;
  max-width: 680px;
}

.t-mono { font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 1.5px; }

/* Skip link — accessibility + UX best practice */
.skip {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--gold);
  color: var(--bg);
  padding: 12px 20px;
  font-weight: 600;
  text-decoration: none;
  z-index: 10000;
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.skip:focus { top: 0; }

/* Container */
.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-5);
}
.wrap-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

/* Reduced motion — accessibility tactic */
@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;
  }
}

/* Selection — small premium polish */
::selection {
  background: var(--gold);
  color: var(--bg);
}

/* Hide cursor when custom cursor active */
body.cursor-active { cursor: none; }
body.cursor-active a, body.cursor-active button { cursor: none; }
