/* ============================================
   WOSDUB — Design System
   "Studio Console" — deep ink + signal amber
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@300;400;500;600&display=swap');

:root {
  /* -- Core palette ------------------------------------------------ */
  /* Ink: deep, slightly-blue charcoals. Studio control room. */
  --ink-1000: #070809;
  --ink-950:  #0c0e12;
  --ink-900:  #12151b;
  --ink-850:  #171b23;
  --ink-800:  #1d222c;
  --ink-700:  #272d39;
  --ink-600:  #363d4b;
  --ink-500:  #4a5263;

  /* Paper: near-white with warmth. Used sparingly / reversed sections. */
  --paper-50:  #f6f3ec;
  --paper-100: #ece8dd;
  --paper-200: #d9d3c2;

  /* Bone: off-white text tones on ink */
  --bone-100: #f3efe6;
  --bone-200: #e0dbce;
  --bone-300: #b8b2a3;
  --bone-400: #8a8577;
  --bone-500: #5c5950;

  /* Signal amber: the single accent. The tally light. */
  --amber-100: #fdecc1;
  --amber-200: #f8d583;
  --amber-300: #f0b94a;
  --amber-400: #e89b1a;   /* primary */
  --amber-500: #c37d0c;
  --amber-600: #8f5a08;

  /* Channel colors: used in M&E / waveform / spectrogram demos */
  --ch-dialog:  #e89b1a;  /* amber — voice */
  --ch-music:   #7c9ce8;  /* cool blue — music */
  --ch-fx:      #d8695e;  /* warm red — effects */
  --ch-ambient: #6fb08a;  /* sage — room tone */

  /* Spectrogram heat ramp */
  --heat-1: #0c0e12;
  --heat-2: #2a1f3a;
  --heat-3: #6b2e4a;
  --heat-4: #c05a2e;
  --heat-5: #f0b94a;
  --heat-6: #fef3d0;

  /* Semantic */
  --bg:           var(--ink-1000);
  --bg-elevated:  var(--ink-900);
  --bg-card:      var(--ink-850);
  --border:       rgba(255,255,255,0.07);
  --border-strong:rgba(255,255,255,0.14);
  --text:         var(--bone-100);
  --text-dim:     var(--bone-300);
  --text-mute:    var(--bone-400);
  --accent:       var(--amber-400);

  /* -- Type -------------------------------------------------------- */
  --f-display: "Geist", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --f-ui:      "Geist", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Scale — editorial, generous */
  --fs-display-xl: clamp(80px, 14vw, 220px);
  --fs-display-l:  clamp(56px, 9vw, 140px);
  --fs-display-m:  clamp(40px, 6vw, 88px);
  --fs-display-s:  clamp(32px, 4.5vw, 64px);
  --fs-h1: 48px;
  --fs-h2: 32px;
  --fs-h3: 22px;
  --fs-body: 17px;
  --fs-small: 14px;
  --fs-micro: 11px;

  /* -- Space ------------------------------------------------------- */
  --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: 144px;
  --s-11: 200px;

  /* -- Radii ------------------------------------------------------- */
  --r-xs: 2px;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-xl: 22px;

  /* -- 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: 620ms;

  /* -- Shadows ----------------------------------------------------- */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.35);
  --shadow-glow: 0 0 0 1px rgba(232,155,26,0.4), 0 0 40px -8px rgba(232,155,26,0.5);

  /* -- Layout ------------------------------------------------------ */
  --container: 1360px;
  --gutter: clamp(20px, 4vw, 56px);
}

/* ============================================
   Reset & base
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-ui);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 400; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, svg, video { display: block; max-width: 100%; }

::selection { background: var(--amber-400); color: var(--ink-1000); }

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

.display-xl { font-family: var(--f-display); font-size: var(--fs-display-xl); line-height: 0.9; letter-spacing: -0.045em; font-weight: 600; }
.display-l  { font-family: var(--f-display); font-size: var(--fs-display-l);  line-height: 0.92; letter-spacing: -0.04em; font-weight: 600; }
.display-m  { font-family: var(--f-display); font-size: var(--fs-display-m);  line-height: 0.96; letter-spacing: -0.035em; font-weight: 600; }
.display-s  { font-family: var(--f-display); font-size: var(--fs-display-s);  line-height: 1.02; letter-spacing: -0.03em; font-weight: 600; }
.italic { font-style: normal; font-weight: 500; color: var(--amber-300); }

.eyebrow {
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
}

.mono { font-family: var(--f-mono); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-300);
  padding: 6px 10px;
  border: 1px solid rgba(240, 185, 74, 0.28);
  border-radius: 2px;
  background: rgba(240, 185, 74, 0.06);
}
.tag .dot {
  width: 6px; height: 6px;
  background: var(--amber-400);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--amber-400);
  animation: tally 1.4s ease-in-out infinite;
}

@keyframes tally {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  font-family: var(--f-ui);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.btn-primary {
  background: var(--amber-400);
  color: var(--ink-1000);
  border-color: var(--amber-400);
}
.btn-primary:hover {
  background: var(--amber-300);
  border-color: var(--amber-300);
}
.btn-primary:active { transform: translateY(1px); }

.btn-ghost {
  background: transparent;
  color: var(--bone-100);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.28);
}

.btn-link {
  padding: 0;
  color: var(--amber-300);
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid transparent;
  border-radius: 0;
}
.btn-link:hover { border-bottom-color: var(--amber-300); }

/* ============================================
   Grain overlay (applied to body via ::after)
   ============================================ */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.25 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.07;
  mix-blend-mode: overlay;
}

/* Thin scanline variant for panels */
.scanlines {
  position: relative;
}
.scanlines::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0) 0px,
    rgba(255,255,255,0) 2px,
    rgba(255,255,255,0.02) 3px,
    rgba(255,255,255,0) 4px
  );
  z-index: 1;
}

/* ============================================
   Marginalia — left-edge label like studio slate
   ============================================ */
.slate {
  position: absolute;
  left: var(--gutter);
  top: var(--s-7);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-mute);
  display: flex;
  gap: 14px;
  align-items: center;
}
.slate::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--text-mute);
  display: inline-block;
}

/* ============================================
   Section base
   ============================================ */
section {
  position: relative;
  padding: var(--s-10) 0;
}

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

/* ============================================
   Scroll reveal
   ============================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 860px) {
  :root { --fs-h1: 36px; --fs-h2: 26px; }
  section { padding: var(--s-9) 0; }
  .slate { position: static; margin-bottom: var(--s-4); }
}
