/* ==========================================================================
   RIDDIM — Redesign foundation
   Ink, paper, gold. Restrained editorial music system.
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --ink-950: #08080a;
  --ink-900: #0c0c0f;
  --ink-850: #101014;
  --ink-800: #151519;
  --ink-750: #1c1c22;

  --paper: #f4f1e9;
  --paper-dim: #d3cfc4;
  --muted: #a29e94;
  --muted-2: #8c887f;

  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --line-3: rgba(255, 255, 255, 0.2);

  --gold: #e2b04a;
  --gold-2: #f1c972;
  --gold-ink: #191307;
  --gold-soft: rgba(226, 176, 74, 0.09);
  --gold-line: rgba(226, 176, 74, 0.3);

  --success: #7cc59b;
  --danger: #e0857b;

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-full: 999px;

  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 30px rgba(0, 0, 0, 0.28);
  --shadow-2: 0 28px 80px rgba(0, 0, 0, 0.55);
  --shadow-3: 0 40px 120px rgba(0, 0, 0, 0.65);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-1: 160ms;
  --dur-2: 240ms;
  --dur-3: 420ms;

  --max: 1240px;
  --gutter: clamp(18px, 4vw, 40px);
  --header-h: 72px;
  --player-h: 86px;

  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* 2. Reset + base ---------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  min-height: 100vh;
  padding-bottom: calc(var(--player-h) + 8px);
  background: var(--ink-950);
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 520px at 50% -12%, rgba(226, 176, 74, 0.07), transparent 62%),
    radial-gradient(900px 600px at 100% 0%, rgba(255, 255, 255, 0.025), transparent 55%);
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

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

ul, ol { padding: 0; list-style: none; }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.15; }

p { text-wrap: pretty; }

::selection {
  background: var(--gold);
  color: var(--gold-ink);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-950); }
::-webkit-scrollbar-thumb {
  background: var(--ink-750);
  border: 2px solid var(--ink-950);
  border-radius: var(--r-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-800); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 3. Typography ------------------------------------------------------------ */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.022em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold);
}

.eyebrow--plain::before { display: none; }

.lede {
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.62;
  max-width: 58ch;
}

.muted { color: var(--muted); }
.dim { color: var(--muted-2); }
.gold {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.gold:hover { text-decoration-color: transparent; }

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* 4. Layout ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(48px, 7vw, 88px); }
.section--tight { padding-block: clamp(32px, 4vw, 52px); }
.section + .section { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(22px, 3vw, 38px);
}

.section-head__title {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
}

.section-head__sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  max-width: 62ch;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--dur-1) var(--ease);
}

.section-link:hover { color: var(--gold); }
.section-link svg { transition: transform var(--dur-2) var(--ease); }
.section-link:hover svg { transform: translateX(3px); }

hr.rule {
  height: 1px;
  border: 0;
  background: var(--line);
}

/* 5. Utilities ------------------------------------------------------------- */
.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;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform var(--dur-2) var(--ease);
}

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

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 24px; height: 24px; }
.icon--fill { fill: currentColor; stroke: none; }

[hidden] { display: none !important; }

.is-sr {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Reveal on scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
