/* ============================================================
   lk-exp-2 — Lyrikai Style Library
   Mono-meets-magazine: warm newsprint, vermillion accent, Fraunces serif.
   Promoted from shed/exp-2/ prototype — 2026-05-03.
   lk-styles · Suttle Media LLC · 2026

   Distinctive features:
   - Per-section theme switching via .theme-dark / .theme-light classes
   - Density modifiers via [data-density="compact|comfy|spacious"]
   - Reduced-motion respect via [data-motion="off"]

   Font <link> tags required in <head> before this stylesheet:
   <link rel="preconnect" href="https://fonts.googleapis.com" />
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
   <link href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=Inter+Tight:ital,wght@0,300..700;1,300..700&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet" />
   ============================================================ */

:root {
  /* ---- Background ---- */
  --lk-bg:           #ffffff;   /* white paper (changed from warm newsprint #f4f1ea per Shawn 2026-05-03) */
  --lk-bg-surface:   #f7f7f7;   /* subtle off-white for layered cards/surfaces */
  --lk-bg-subtle:    #efefef;

  /* ---- Border ---- */
  --lk-border:       rgba(14, 13, 11, 0.14);
  --lk-border-strong: rgba(14, 13, 11, 0.32);
  --lk-border-dim:   rgba(14, 13, 11, 0.08);

  /* ---- Text ---- */
  --lk-text:         #0e0d0b;
  --lk-text-strong:  #2a2722;
  --lk-text-sub:     #6a655c;
  --lk-text-mute:    #6a655c;
  --lk-text-head:    #0e0d0b;

  /* ---- Accent — hot vermillion ---- */
  --lk-accent:       #ff4a1c;
  --lk-accent-ink:   #fffaf6;
  --lk-accent-soft:  rgba(255, 74, 28, 0.10);

  /* ---- Aliases (compatibility with editorial naming) ---- */
  --lk-ink:          #0e0d0b;
  --lk-paper:        #ffffff;

  /* ---- Typography ---- */
  --lk-font-serif:   "Fraunces", "GT Sectra", "Tiempos Headline", Georgia, serif;
  --lk-font-sans:    "Inter Tight", "Söhne", ui-sans-serif, system-ui, sans-serif;
  --lk-font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* ---- Spacing rhythm ---- */
  --lk-gap:          24px;
  --lk-gap-lg:       48px;
  --lk-gap-xl:       96px;
  --lk-pad:          clamp(20px, 4vw, 56px);

  /* ---- Layout ---- */
  --lk-radius:       2px;
  --lk-radius-lg:    4px;
  --lk-radius-pill:  999px;
  --lk-maxw:         1480px;
  --lk-leading:      1.55;
}

[data-theme="dark"] {
  /* ---- Background ---- */
  --lk-bg:           #0a0a0c;     /* night */
  --lk-bg-surface:   #131317;
  --lk-bg-subtle:    #1c1c22;

  /* ---- Border ---- */
  --lk-border:       rgba(236, 232, 223, 0.14);
  --lk-border-strong: rgba(236, 232, 223, 0.34);
  --lk-border-dim:   rgba(236, 232, 223, 0.08);

  /* ---- Text ---- */
  --lk-text:         #ece8df;     /* bone */
  --lk-text-strong:  #ece8df;
  --lk-text-sub:     #8a857b;     /* bone-mute */
  --lk-text-mute:    #8a857b;
  --lk-text-head:    #ece8df;

  /* ---- Aliases ---- */
  --lk-ink:          #ece8df;
  --lk-paper:        #0a0a0c;
}

/* ---- Density modifiers (override default rhythm + leading) ---- */
[data-density="compact"]  { --lk-gap: 16px; --lk-gap-lg: 32px; --lk-gap-xl: 64px;  --lk-leading: 1.45; }
[data-density="comfy"]    { --lk-gap: 28px; --lk-gap-lg: 56px; --lk-gap-xl: 112px; --lk-leading: 1.6;  }
[data-density="spacious"] { --lk-gap: 36px; --lk-gap-lg: 72px; --lk-gap-xl: 144px; --lk-leading: 1.75; }

/* ---- Reduced motion ---- */
[data-motion="off"] *,
[data-motion="off"] *::before,
[data-motion="off"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

/* ============================================================
   Base
   ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--lk-font-sans);
  font-size: 16px;
  line-height: var(--lk-leading);
  color: var(--lk-text);
  background: var(--lk-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

/* ============================================================
   Per-section theme classes (exp-2 distinctive feature)
   Allow a single page to alternate between dark and light blocks.
   ============================================================ */
.theme-dark {
  background: #0a0a0c;
  color: #ece8df;
  --lk-bg:            #0a0a0c;
  --lk-bg-surface:    #131317;
  --lk-text:          #ece8df;
  --lk-text-strong:   #ece8df;
  --lk-text-sub:      #8a857b;
  --lk-text-mute:     #8a857b;
  --lk-border:        rgba(236, 232, 223, 0.14);
  --lk-border-strong: rgba(236, 232, 223, 0.34);
}
.theme-light {
  background: #ffffff;
  color: #0e0d0b;
  --lk-bg:            #ffffff;
  --lk-bg-surface:    #f7f7f7;
  --lk-text:          #0e0d0b;
  --lk-text-strong:   #2a2722;
  --lk-text-sub:      #6a655c;
  --lk-text-mute:     #6a655c;
  --lk-border:        rgba(14, 13, 11, 0.14);
  --lk-border-strong: rgba(14, 13, 11, 0.32);
}

/* ============================================================
   Type helpers
   ============================================================ */
.serif  { font-family: var(--lk-font-serif); font-weight: 400; letter-spacing: -0.01em; }
.mono   { font-family: var(--lk-font-mono); font-feature-settings: "ss01" 1; }

.kicker {
  font-family: var(--lk-font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lk-accent);
}
.eyebrow {
  font-family: var(--lk-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lk-text-mute);
}
.deck {
  font-family: var(--lk-font-serif);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.4;
  color: var(--lk-text-strong);
  font-weight: 400;
  font-style: italic;
}
.h1-display {
  font-family: var(--lk-font-serif);
  font-weight: 400;
  font-size: clamp(48px, 8vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.035em;
}
.h2-display {
  font-family: var(--lk-font-serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.025em;
}
.h3-display {
  font-family: var(--lk-font-serif);
  font-weight: 400;
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.018em;
}

/* ============================================================
   Layout primitives
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--lk-maxw);
  margin: 0 auto;
  padding-left: var(--lk-pad);
  padding-right: var(--lk-pad);
}
.rule {
  height: 1px;
  background: var(--lk-border);
  border: 0;
  margin: 0;
}
.rule-strong {
  height: 1px;
  background: var(--lk-border-strong);
  border: 0;
  margin: 0;
}

/* ============================================================
   Buttons + chips
   ============================================================ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--lk-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 9px;
  border: 1px solid var(--lk-border-strong);
  border-radius: var(--lk-radius-pill);
  color: var(--lk-text);
  background: transparent;
  white-space: nowrap;
}
.chip.is-accent {
  background: var(--lk-accent);
  color: var(--lk-accent-ink);
  border-color: var(--lk-accent);
}
.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: var(--lk-radius-pill);
  background: var(--lk-accent);
}
.chip .dot.live {
  animation: pulse 1.4s ease-in-out infinite;
}

.btn-link {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--lk-font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--lk-text);
  text-decoration: none;
  border-bottom: 1px solid var(--lk-text);
  padding-bottom: 2px;
}
.btn-link::after {
  content: "→";
  transition: transform 0.25s ease;
}
.btn-link:hover::after {
  transform: translateX(4px);
}

/* ============================================================
   Animations
   ============================================================ */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.85); }
}
@keyframes scroll-x {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes blink {
  50% { opacity: 0; }
}
@keyframes draw {
  to { stroke-dashoffset: 0; }
}
@keyframes float-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes orbit {
  to { transform: rotate(360deg); }
}

/* ============================================================
   Utilities
   ============================================================ */
.tabular { font-variant-numeric: tabular-nums; }
.caret::after {
  content: "▍";
  display: inline-block;
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
  color: var(--lk-accent);
}
.noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}
