/* ════════════════════════════════════════════════════
   BASE — Reset · Variables · Typography
   css/base.css
   ════════════════════════════════════════════════════ */

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

/* ── Design Tokens ── */
:root {
  /* Colors */
  --color-ink: #0A0A0A;
  --color-paper: #F5F2ED;
  --color-cream: #EDE8DF;
  --color-gold: #C9A84C;
  --color-gold-light: #E8C97A;
  --color-rust: #B84A2E;
  --color-rust-dark: #8F3621;
  --color-slate: #1C1F26;
  --color-slate-light: #2A2D35;
  --color-muted: #6B6B6B;
  --color-border: rgba(201, 168, 76, 0.18);
  --color-border-strong: rgba(201, 168, 76, 0.4);
  --color-white: #FAFAF8;

  /* Surfaces */
  --surface-glass: rgba(10, 10, 10, 0.72);
  --surface-card: rgba(245, 242, 237, 0.025);
  --surface-card-hover: rgba(201, 168, 76, 0.05);

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'DM Mono', 'SF Mono', Menlo, monospace;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 5rem;
  --space-4xl: 7rem;

  /* Layout */
  --container-max: 1280px;
  --container-narrow: 1100px;
  --nav-height: 76px;

  /* Effects */
  --radius-sm: 2px;
  --radius-md: 4px;
  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.35);
  --shadow-gold: 0 12px 40px rgba(201, 168, 76, 0.25);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-ease: 0.25s ease;
}

/* ── Typography Base ── */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  background: var(--color-ink);
  color: var(--color-paper);
  overflow-x: hidden;
  cursor: none;
  position: relative;
}

/* Hide cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
  body {
    cursor: auto;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

p {
  font-family: var(--font-body);
  line-height: 1.75;
}

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

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

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

/* ── Selection ── */
::selection {
  background: var(--color-gold);
  color: var(--color-ink);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-ink);
}
::-webkit-scrollbar-thumb {
  background: var(--color-slate-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold);
}

/* ── Noise overlay (atmosphere) ── */
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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
  z-index: 1;
}

/* ── Container ── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-2xl);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* ── Section base ── */
.section {
  padding: var(--space-4xl) var(--space-2xl);
  position: relative;
  z-index: 2;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.section-label::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--color-gold);
}

.section-label--center {
  justify-content: center;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

.section-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--color-gold);
}

.section-title--center {
  text-align: center;
}

/* ── Skip link (a11y) ── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-gold);
  color: var(--color-ink);
  padding: 8px 16px;
  font-weight: 700;
  z-index: 9999;
}
.skip-link:focus {
  top: 0;
}
