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

:root {
  /* Color */
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --bg-muted: #f5f5f5;
  --text-primary: #0a0a0a;
  --text-secondary: #525252;
  --text-tertiary: #a3a3a3;
  --border: #e5e5e5;
  --border-strong: #d4d4d4;
  --accent: #ff4520;
  --accent-deep: #cc2f0f;
  --invert-bg: #0a0a0a;
  --invert-text: #ffffff;
  --invert-border: #1f1f1f;
  --invert-muted: #262626;

  /* Legacy aliases for any leftover refs */
  --paper: var(--bg);
  --ink: var(--text-primary);
  --graphite: var(--text-secondary);
  --slate: var(--text-tertiary);
  --thread: var(--accent);
  --thread-deep: var(--accent-deep);
  --bone: var(--bg-subtle);
  --linen: var(--bg-muted);
  --linen-deep: var(--border);
  --sage: #6b7f5c;
  --rust: #9a4b2e;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-display: var(--font-sans);

  /* Layout */
  --maxw: 1280px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur-micro: 120ms;
  --dur-base: 240ms;
  --dur-slow: 480ms;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--text-primary);
  margin: 0;
}

p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-micro) var(--ease);
}

button { font: inherit; cursor: pointer; }

::selection { background: var(--accent); color: var(--invert-text); }

/* Terminal-cursor blink for the brand underscore.
   Runs 3 cycles (~3s) on page load, then settles visible. */
@keyframes cursor-blink {
  0%, 49% { opacity: 1; }
  50%, 99% { opacity: 0; }
  100% { opacity: 1; }
}
.cursor-blink {
  animation: cursor-blink 1s linear 3 forwards;
}

/* Stock-chart "live" pulse — runs after the line finishes drawing,
   then settles solid. */
@keyframes chart-pulse {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 0 transparent); }
  50% { opacity: 0.55; filter: drop-shadow(0 0 6px var(--accent)); }
}
.chart-pulse {
  animation: chart-pulse 0.85s ease-in-out 3 forwards;
}

/* CTA arrow style */
.cta-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  color: var(--text-primary);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  text-decoration: none;
  transition: gap var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}
.cta-arrow:hover { gap: 14px; color: var(--accent); }
.cta-arrow .arrow { transition: transform var(--dur-base) var(--ease); }
.cta-arrow:hover .arrow { transform: translateX(4px); }

/* Solid button — square corners, no radius */
.btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 0 32px;
  background: var(--text-primary);
  color: var(--invert-text);
  border: 1px solid var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  border-radius: 0;
  text-decoration: none;
  transition: background var(--dur-micro) var(--ease), color var(--dur-micro) var(--ease), border-color var(--dur-micro) var(--ease);
}
.btn-solid:hover { background: var(--accent); border-color: var(--accent); color: var(--invert-text); }
.btn-solid:disabled { opacity: 0.5; cursor: not-allowed; }

/* Outline button */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 0 32px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  border-radius: 0;
  text-decoration: none;
  transition: border-color var(--dur-micro) var(--ease);
}
.btn-outline:hover { border-color: var(--text-primary); }

/* Form input */
.input-v3 {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text-primary);
  border-radius: 0;
  transition: border-color var(--dur-micro) var(--ease);
}
.input-v3:focus { outline: none; border-color: var(--text-primary); }
.input-v3.error { border-color: var(--accent); }
textarea.input-v3 { height: auto; min-height: 120px; padding: 12px 16px; font-family: inherit; resize: vertical; line-height: 1.5; }

/* Mono accents */
.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
