/* =========================================================
   Sudarshan Media — Design Tokens
   Import this file first, then layer component styles on top.
   ========================================================= */

/* ----- Fonts -----
   Instrument Serif and Inter are bundled locally (see ./fonts/).
   JetBrains Mono is still loaded from Google Fonts — swap to a local file if needed. */
@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/InstrumentSerif-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/InstrumentSerif-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-VariableFont_opsz_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-Italic-VariableFont_opsz_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
/* JetBrains Mono removed — using system monospace stack (eliminates render-blocking Google Fonts request) */

:root {
  /* ===== COLOR ===== */
  --bg: #0A0E1A;
  --bg-raised: #0F1424;
  --bg-deep: #05070E;
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-strong: rgba(255, 255, 255, 0.06);

  --fg-1: #F4F3EE;
  --fg-2: #A5AAB8;
  --fg-3: #6B7184;

  --accent: #8A7BFF;          /* soft violet — THE accent */
  --accent-soft: #B3A8FF;
  --accent-deep: #6A58E6;
  --accent-glow: rgba(138, 123, 255, 0.35);
  --accent-tint: rgba(138, 123, 255, 0.08);

  --aurora-violet: rgba(124, 107, 255, 0.22);
  --aurora-cyan:   rgba(88, 166, 255, 0.14);
  --aurora-deep:   rgba(60, 40, 140, 0.25);

  --line: rgba(244, 243, 238, 0.08);
  --line-strong: rgba(244, 243, 238, 0.14);

  --success: #7DD3A3;
  --danger:  #F4766E;

  /* ===== TYPE FAMILIES ===== */
  --font-display: 'Instrument Serif', 'Times New Roman', serif;
  --font-body: 'Inter', 'Helvetica Neue', system-ui, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;

  /* ===== TYPE SIZES ===== */
  --fs-display: clamp(56px, 10vw, 128px);
  --fs-h1:      clamp(44px, 6vw, 80px);
  --fs-h2:      clamp(28px, 3vw, 44px);
  --fs-h3:      22px;
  --fs-body:    17px;
  --fs-body-sm: 14px;
  --fs-eyebrow: 12px;
  --fs-mono:    13px;

  /* ===== TRACKING ===== */
  --tr-display: -0.03em;
  --tr-heading: -0.02em;
  --tr-body:    -0.005em;
  --tr-eyebrow: 0.22em;
  --tr-wordmark: 0.22em;

  /* ===== LINE-HEIGHT ===== */
  --lh-display: 1.02;
  --lh-heading: 1.1;
  --lh-body:    1.65;
  --lh-tight:   1.2;

  /* ===== SPACING (4px base) ===== */
  --s-0: 0;
  --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;

  /* ===== RADII ===== */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 9999px;

  /* ===== SHADOWS (glow + inner highlight, not drop shadows) ===== */
  --glow-accent: 0 0 40px var(--accent-glow);
  --glow-accent-lg: 0 0 80px var(--accent-glow);
  --highlight-top: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --elev: 0 24px 60px -20px rgba(0, 0, 0, 0.6);

  /* ===== MOTION ===== */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 180ms;
  --dur: 320ms;
  --dur-slow: 520ms;
  --dur-drift: 40s;

  /* ===== LAYOUT ===== */
  --maxw: 1200px;
  --maxw-narrow: 880px;
  --gutter: 24px;

  /* ===== GLASS ===== */
  --blur: 24px;
  --blur-strong: 40px;
}

/* ===========================================================
   Base elements — semantic defaults. Apply by using the tag,
   or use the utility classes (.h1, .eyebrow, .mono, etc.)
   =========================================================== */

html {
  background: var(--bg);
  color: var(--fg-1);
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--tr-body);
  color: var(--fg-1);
  background: var(--bg);
  margin: 0;
}

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-h1);
  line-height: var(--lh-heading);
  letter-spacing: var(--tr-display);
  color: var(--fg-1);
}

h2, .h2 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-h2);
  line-height: var(--lh-heading);
  letter-spacing: var(--tr-heading);
  color: var(--fg-1);
}

h3, .h3 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-h3);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--fg-1);
}

p { color: var(--fg-2); margin: 0; }

a {
  color: var(--accent-soft);
  text-decoration: none;
  text-underline-offset: 4px;
  transition: opacity var(--dur) var(--ease-out);
}
a:hover { opacity: 0.85; text-decoration: underline; }

small { font-size: var(--fs-body-sm); color: var(--fg-3); }

code, .mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0;
}

/* Display headline — use sparingly, once per page */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--tr-display);
  color: var(--fg-1);
}

/* Italic serif — pair with .accent for the signature emphasis */
.display em, .h1 em, .display i, .h1 i { font-style: italic; }

/* Accent emphasis (use inside a headline) */
.accent { color: var(--accent); }
.accent-soft { color: var(--accent-soft); }

/* Eyebrow / category label */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--tr-eyebrow);
  color: var(--fg-3);
  display: inline-block;
}

/* Wordmark */
.wordmark {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: var(--tr-wordmark);
  color: var(--fg-1);
}

/* Muted / secondary body */
.muted { color: var(--fg-2); }
.faint { color: var(--fg-3); }

/* Hairline */
.hr {
  height: 1px;
  width: 100%;
  background: linear-gradient(to right, transparent, var(--line-strong), transparent);
  border: 0;
}

/* ::selection */
::selection { background: var(--accent); color: #0A0E1A; }

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Reduced motion — honor system preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
