/* Weinstein/ICDAR 2027 — Shared Design Tokens */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@10..48,400;10..48,500;10..48,600;10..48,700;10..48,800&family=Inter:wght@300;400;500;600;700;800;900&family=Caveat+Brush&family=Permanent+Marker&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* "bordeaux-*" var names retained for compatibility — values are now midnight blue per 2027 flyer */
  --bordeaux-900: oklch(0.16 0.04 230);   /* deep teal-midnight from flyer bg */
  --bordeaux-800: oklch(0.20 0.05 230);
  --bordeaux-700: oklch(0.28 0.07 230);
  --bordeaux-600: oklch(0.36 0.08 230);
  --bordeaux-500: oklch(0.48 0.10 230);
  --bordeaux-100: oklch(0.94 0.015 230);
  --bordeaux-50:  oklch(0.97 0.008 230);

  /* Coral / wireframe accent — matches heart's main body */
  --coral:        oklch(0.78 0.13 55);    /* warm wireframe orange */
  --coral-ink:    oklch(0.62 0.16 50);
  --coral-soft:   oklch(0.95 0.03 55);

  /* Heart-vein accents */
  --vein-red:     oklch(0.55 0.20 25);    /* aorta / red wireframe */
  --vein-blue:    oklch(0.50 0.18 265);   /* vena cava / blue wireframe */
  --bokeh-blue:   oklch(0.60 0.10 230);   /* bokeh teal-blue glow */

  /* Neutrals — slightly cooler, harmonize with teal-blue */
  --paper:        oklch(0.985 0.003 230);
  --paper-2:      oklch(0.965 0.005 230);
  --paper-3:      oklch(0.93 0.008 230);
  --ink:          oklch(0.16 0.020 230);
  --ink-2:        oklch(0.32 0.018 230);
  --ink-3:        oklch(0.50 0.014 230);
  --line:         oklch(0.86 0.010 230);
  --line-2:       oklch(0.78 0.012 230);

  /* Accent — defaults to coral (matches flyer) */
  --accent:       var(--coral-ink);
  --accent-ink:   var(--bordeaux-900);
  --accent-soft:  var(--coral-soft);

  /* Typography — bold sans-serif system to match flyer */
  --font-display: 'Bricolage Grotesque', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body:    'Bricolage Grotesque', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
  --font-script:  'Permanent Marker', 'Caveat Brush', cursive;

  /* Spacing rhythm */
  --gutter: 32px;
  --section-y: 96px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Common type */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.eyebrow-accent { color: var(--accent); }

.display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 0.95;
  color: var(--ink);
}

.script-year {
  font-family: var(--font-script);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
  display: inline-block;
  transform: rotate(-6deg) skewX(-4deg);
  line-height: 1;
}

.body-serif {
  font-family: var(--font-display);
  font-weight: 400;
}

/* Decorative SVG patterns */
.grid-bg {
  background-image:
    linear-gradient(to right, color-mix(in oklch, var(--ink) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklch, var(--ink) 6%, transparent) 1px, transparent 1px);
  background-size: 80px 80px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}
.btn-accent:hover { background: var(--accent-ink); border-color: var(--accent-ink); }

.placeholder-img {
  background:
    repeating-linear-gradient(
      135deg,
      color-mix(in oklch, var(--ink) 4%, transparent) 0px,
      color-mix(in oklch, var(--ink) 4%, transparent) 1px,
      transparent 1px,
      transparent 10px
    ),
    var(--paper-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
  padding: 20px;
}

/* Accent variants applied via [data-accent] on root */
[data-accent="bordeaux"] { --accent: oklch(0.55 0.14 45);  --accent-ink: oklch(0.40 0.16 40);  --accent-soft: oklch(0.95 0.03 50);  }   /* coral (default — matches flyer) */
[data-accent="claret"]   { --accent: oklch(0.42 0.16 14);  --accent-ink: oklch(0.30 0.12 14);  --accent-soft: oklch(0.94 0.025 14); }   /* deep red */
[data-accent="ink"]      { --accent: oklch(0.55 0.18 265); --accent-ink: oklch(0.40 0.20 265); --accent-soft: oklch(0.94 0.025 265); }  /* electric blue */
[data-accent="forest"]   { --accent: oklch(0.38 0.08 155); --accent-ink: oklch(0.26 0.06 155); --accent-soft: oklch(0.94 0.02 155); }
[data-accent="copper"]   { --accent: oklch(0.50 0.12 50);  --accent-ink: oklch(0.35 0.10 50);  --accent-soft: oklch(0.94 0.02 50); }

/* Dark surface text color variants — midnight background stays fixed; text color varies via --on-dark */
:root { --on-dark: oklch(0.985 0.004 80); }
[data-darktext="paper"]    { --on-dark: oklch(0.985 0.004 80); }
[data-darktext="cream"]    { --on-dark: oklch(0.94 0.025 75); }
[data-darktext="rose"]     { --on-dark: oklch(0.90 0.05 50); }   /* coral — matches flyer */
[data-darktext="gold"]     { --on-dark: oklch(0.88 0.08 85); }
[data-darktext="muted"]    { --on-dark: oklch(0.78 0.04 240); }  /* dusty blue */

/* Dark section text overrides — make all descendants adopt --on-dark unless they have an
   explicit color set. .display has hard-coded color: var(--ink), so we override here. */
section[style*="bordeaux-900"],
footer[style*="bordeaux-900"],
div[style*="bordeaux-900"] {
  color: var(--on-dark);
}
section[style*="bordeaux-900"] .display,
section[style*="bordeaux-900"] h1,
section[style*="bordeaux-900"] h2,
section[style*="bordeaux-900"] h3,
section[style*="bordeaux-900"] p,
section[style*="bordeaux-900"] li,
section[style*="bordeaux-900"] span:not([style*="color"]),
section[style*="bordeaux-900"] div:not([style*="color"]),
footer[style*="bordeaux-900"] .display,
footer[style*="bordeaux-900"] h1,
footer[style*="bordeaux-900"] h2,
footer[style*="bordeaux-900"] h3,
footer[style*="bordeaux-900"] p,
footer[style*="bordeaux-900"] li,
footer[style*="bordeaux-900"] span:not([style*="color"]),
footer[style*="bordeaux-900"] div:not([style*="color"]),
footer[style*="bordeaux-900"] a:not([style*="color"]) {
  color: var(--on-dark);
}

/* Density */
[data-density="compact"] { --section-y: 64px; --gutter: 24px; }
[data-density="airy"]    { --section-y: 140px; --gutter: 40px; }
