/* ==========================================================================
   REVIFY — base.css
   Design tokens, reset, typography
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
:root {
  /* surfaces */
  --bg:            #0A0A0A;        /* matte black, never #000 */
  --bg-raised:    #121212;
  --bg-elevated:  #181818;
  --bg-inset:     #0e0e0e;

  /* ink */
  --gold:         #C9A961;         /* champagne */
  --gold-soft:    #d9bd7b;
  --gold-deep:    #8a7542;
  --gold-faint:   rgba(201, 169, 97, 0.08);

  /* text */
  --text:         #F4F0E8;         /* warm off-white */
  --text-mute:    #8B8B8B;         /* warm gray */
  --text-faint:   #5a5a5a;
  --text-label:   #6b6561;

  /* lines */
  --line:         rgba(244, 240, 232, 0.06);
  --line-strong:  rgba(244, 240, 232, 0.14);
  --line-gold:    rgba(201, 169, 97, 0.18);

  /* sizing */
  --max:          1280px;
  --gutter:       clamp(1.25rem, 4vw, 2.5rem);
  --nav-h:        4.5rem;

  /* type */
  --font-display: "Fraunces", "Cormorant Garamond", "Times New Roman", serif;
  --font-body:    "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* motion */
  --ease:         cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:      cubic-bezier(0.7, 0, 0.84, 0);
  --dur:          520ms;
  --dur-slow:     900ms;

  /* radii */
  --r-xs: 2px;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.005em;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--gold); color: #000; }

/* Visible focus ring — keyboard only */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--gold);
  color: #0A0A0A;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: var(--r-sm);
  transform: translateY(-120%);
  transition: transform 220ms var(--ease);
  z-index: 1000;
}

.skip-link:focus {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Typography — Fraunces display with italic emphasis, Geist body
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin: 0;
  color: var(--text);
  /* Fraunces axes: lean into the SOFT axis for warmth */
  font-variation-settings: "SOFT" 100, "opsz" 144, "wght" 300;
}

h1 {
  font-size: clamp(2.75rem, 7.5vw, 6.25rem);
  letter-spacing: -0.035em;
  line-height: 0.98;
}

h2 {
  font-size: clamp(2rem, 4.6vw, 3.75rem);
  letter-spacing: -0.03em;
  line-height: 1.02;
}

h3 {
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-weight: 400;
}

h4 {
  font-size: 1.125rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
  font-weight: 500;
  font-family: var(--font-body);
}

em, i, .i {
  font-style: italic;
  font-variation-settings: "SOFT" 100, "opsz" 144, "wght" 300;
  color: var(--gold-soft);
}

h1 em, h2 em, h3 em {
  color: var(--gold);
  font-weight: 300;
}

p {
  margin: 0 0 1em;
  color: var(--text-mute);
  max-width: 62ch;
}

.lede {
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  line-height: 1.45;
  color: var(--text);
  max-width: 54ch;
  font-weight: 300;
  letter-spacing: -0.01em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-label);
  font-weight: 400;
}

.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

.eyebrow--centered {
  justify-content: center;
}

small, .small {
  font-size: 0.8125rem;
  color: var(--text-mute);
  letter-spacing: 0;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.825rem;
  letter-spacing: 0.01em;
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.container--wide { max-width: 1480px; }
.container--narrow { max-width: 880px; }

section {
  position: relative;
  padding: clamp(4rem, 9vw, 8rem) 0;
}

.section--tight { padding: clamp(3rem, 5vw, 4.5rem) 0; }

.divider {
  height: 1px;
  background: var(--line);
  width: 100%;
  margin: 0;
}

.hr-gold {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-gold), transparent);
  border: 0;
  margin: 2.5rem 0;
}

/* --------------------------------------------------------------------------
   Atmospheric overlays — film grain + radial gold glow
   -------------------------------------------------------------------------- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.15 0 0 0 0 0.12 0 0 0 0 0.08 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

@media (prefers-reduced-motion: reduce) {
  .grain { display: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  z-index: 0;
}

.glow--gold {
  background: radial-gradient(circle, rgba(201, 169, 97, 0.22) 0%, transparent 70%);
}

.glow--warm {
  background: radial-gradient(circle, rgba(201, 169, 97, 0.12) 0%, transparent 70%);
}

/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.text-gold { color: var(--gold); }
.text-mute { color: var(--text-mute); }
.text-faint { color: var(--text-faint); }

.stack-xs > * + * { margin-top: 0.5rem; }
.stack-sm > * + * { margin-top: 0.875rem; }
.stack-md > * + * { margin-top: 1.5rem; }
.stack-lg > * + * { margin-top: 2.25rem; }
.stack-xl > * + * { margin-top: 3rem; }
