/* ============================================================
   eda-akkaya — design tokens & base layer
   Linked AFTER the built style.css. Holds only what Tailwind
   cannot express: tokens, base element type, focus, CSS-only
   animation/state.
   ============================================================ */

:root {
  --ink: #16211c;
  --paper: #f4f5f1;
  --surface: #ffffff;
  --moss: #2e5e4e;
  --moss-deep: #1f4438;
  --moss-soft: #dce7e0;
  --signal: #9c5a0e;
  --signal-soft: #f7ead8;
  --line: #d6dad3;
  --muted: #5b655e;
  --btn-bg: #1f4438;
  --btn-bg-hover: #17352c;
  --btn-fg: #f4f5f1;
  --shadow: rgba(22, 33, 28, 0.16);
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Manrope', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

html.dark {
  --ink: #e8eee9;
  --paper: #0e1512;
  --surface: #151e19;
  --moss: #7fc0a4;
  --moss-deep: #a8d8c1;
  --moss-soft: #1a2a22;
  --signal: #e8a64b;
  --signal-soft: #2a2114;
  --line: #26332b;
  --muted: #9aa79e;
  --btn-bg: #7fc0a4;
  --btn-bg-hover: #98d0b8;
  --btn-fg: #0b120e;
  --shadow: rgba(0, 0, 0, 0.55);
}

* {
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

::selection {
  background: var(--moss-deep);
  color: var(--paper);
}

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

/* Scroll reveal (CSS-only animation, toggled by IntersectionObserver).
   Gated behind html.js so content stays visible when JS is unavailable. */
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Signature plateau chart draw-in */
html.js .chart-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.7s var(--ease-out);
}

html.js .is-visible .chart-line {
  stroke-dashoffset: 0;
}

html.js .chart-ghost {
  opacity: 0;
  transition: opacity 0.8s var(--ease-out) 1s;
}

html.js .is-visible .chart-ghost {
  opacity: 1;
}

html.js .chart-dot {
  opacity: 0;
  transition: opacity 0.4s var(--ease-out) 1.6s;
}

html.js .is-visible .chart-dot {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js .reveal,
  html.js .chart-line,
  html.js .chart-ghost,
  html.js .chart-dot {
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
    transition: none !important;
  }
}
