/* style.css — Promotedly design tokens + global component styles */

:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 0.8rem + 6vw, 6.5rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 980px;
  --content-wide: 1240px;
  --content-full: 100%;

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'General Sans', 'Helvetica Neue', sans-serif;
  --font-body: 'Satoshi', 'General Sans', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'Menlo', monospace;
}

/* ============ PROMOTEDLY PALETTE ============
   Deep intelligent charcoal + a single living accent: signal green (growth/AI).
   Avoids the blue/purple AI-gradient cliché. Dark-first, sophisticated. */

:root,
[data-theme='light'] {
  --color-bg: #f5f4f0;
  --color-surface: #ffffff;
  --color-surface-2: #fbfaf7;
  --color-surface-offset: #ecebe5;
  --color-surface-offset-2: #e3e1d9;
  --color-surface-dynamic: #d9d7cd;
  --color-divider: #ddd9d0;
  --color-border: #cfccc1;

  --color-text: #16180f;
  --color-text-muted: #5a5c4f;
  --color-text-faint: #97968a;
  --color-text-inverse: #f5f4f0;

  --color-primary: #3a6b1f;
  --color-primary-hover: #2c5316;
  --color-primary-active: #1f3d0f;
  --color-primary-highlight: #d9e6c7;

  --color-warning: #96530f;
  --color-warning-highlight: #e6d3bc;
  --color-error: #9c2b3b;
  --color-error-highlight: #e3c9cd;
  --color-success: #3a6b1f;
  --color-success-highlight: #d9e6c7;
  --color-blue: #1f5f8b;
  --color-blue-highlight: #c7dbe6;
  --color-gold: #a5790f;
  --color-gold-highlight: #ecdcb9;

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 110 / 0.08);
  --shadow-md: 0 4px 16px oklch(0.2 0.02 110 / 0.1);
  --shadow-lg: 0 20px 48px oklch(0.2 0.02 110 / 0.14);
  --shadow-glow: 0 0 0 1px oklch(0.55 0.18 130 / 0.25), 0 8px 32px oklch(0.55 0.18 130 / 0.18);
}

[data-theme='dark'] {
  --color-bg: #0a0b08;
  --color-surface: #12130f;
  --color-surface-2: #171812;
  --color-surface-offset: #1b1c15;
  --color-surface-offset-2: #22231a;
  --color-surface-dynamic: #2a2b20;
  --color-divider: #23241b;
  --color-border: #2e2f24;

  --color-text: #eeeee4;
  --color-text-muted: #98988a;
  --color-text-faint: #61614f;
  --color-text-inverse: #12130f;

  /* Signal — a living chartreuse/lime green. Growth, intelligence, alive. */
  --color-primary: #baf23c;
  --color-primary-hover: #cdf76a;
  --color-primary-active: #a3d92c;
  --color-primary-highlight: #2c3316;

  --color-warning: #f0a84e;
  --color-warning-highlight: #3a2f1c;
  --color-error: #ef6b7a;
  --color-error-highlight: #3a1f22;
  --color-success: #baf23c;
  --color-success-highlight: #2c3316;
  --color-blue: #6fb4e0;
  --color-blue-highlight: #1c2c38;
  --color-gold: #e0b64e;
  --color-gold-highlight: #3a331c;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.4);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.5);
  --shadow-lg: 0 24px 56px oklch(0 0 0 / 0.6);
  --shadow-glow: 0 0 0 1px oklch(0.85 0.22 128 / 0.3), 0 0 48px oklch(0.85 0.22 128 / 0.22);
}

/* Default to dark theme (system preference override below) */
:root:not([data-theme]) {
  --color-bg: #0a0b08;
  --color-surface: #12130f;
  --color-surface-2: #171812;
  --color-surface-offset: #1b1c15;
  --color-surface-offset-2: #22231a;
  --color-surface-dynamic: #2a2b20;
  --color-divider: #23241b;
  --color-border: #2e2f24;
  --color-text: #eeeee4;
  --color-text-muted: #98988a;
  --color-text-faint: #61614f;
  --color-text-inverse: #12130f;
  --color-primary: #baf23c;
  --color-primary-hover: #cdf76a;
  --color-primary-active: #a3d92c;
  --color-primary-highlight: #2c3316;
  --color-warning: #f0a84e;
  --color-warning-highlight: #3a2f1c;
  --color-error: #ef6b7a;
  --color-error-highlight: #3a1f22;
  --color-success: #baf23c;
  --color-success-highlight: #2c3316;
  --color-blue: #6fb4e0;
  --color-blue-highlight: #1c2c38;
  --color-gold: #e0b64e;
  --color-gold-highlight: #3a331c;
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.4);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.5);
  --shadow-lg: 0 24px 56px oklch(0 0 0 / 0.6);
  --shadow-glow: 0 0 0 1px oklch(0.85 0.22 128 / 0.3), 0 0 48px oklch(0.85 0.22 128 / 0.22);
}

body {
  background-color: var(--color-bg);
  background-image:
    radial-gradient(ellipse 900px 600px at 15% -10%, oklch(from var(--color-primary) l c h / 0.08), transparent),
    radial-gradient(ellipse 700px 500px at 100% 20%, oklch(from var(--color-primary) l c h / 0.05), transparent);
  overflow-x: hidden;
}

.wrap {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-5), 5vw, var(--space-12));
}

section {
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  box-shadow: 0 0 8px oklch(from var(--color-primary) l c h / 0.7);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.section-title {
  font-size: var(--text-2xl);
  max-width: 18ch;
}

.section-lede {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 56ch;
  margin-top: var(--space-4);
  font-family: var(--font-body);
  font-weight: 400;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  white-space: nowrap;
  min-height: 44px;
  text-decoration: none;
  transition:
    background var(--transition-interactive),
    color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive),
    border-color var(--transition-interactive);
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
  background: var(--color-primary-active);
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  border-color: var(--color-text-faint);
  background: var(--color-surface-offset);
  transform: translateY(-1px);
}
.btn-secondary:active {
  transform: translateY(0);
}
.btn-icon {
  width: 1em;
  height: 1em;
}

/* Scroll reveal — opacity + clip-path only, no CLS */
.reveal {
  opacity: 0;
  clip-path: inset(12% 0 0 0);
  transition:
    opacity 0.8s var(--ease-out),
    clip-path 0.8s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}
.reveal-stagger > * {
  opacity: 0;
  clip-path: inset(12% 0 0 0);
  transition:
    opacity 0.7s var(--ease-out),
    clip-path 0.7s var(--ease-out);
}
.reveal-stagger.is-visible > * {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 60ms; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 120ms; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 180ms; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 240ms; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 300ms; }
.reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 360ms; }
.reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 420ms; }
.reveal-stagger.is-visible > *:nth-child(9) { transition-delay: 480ms; }
.reveal-stagger.is-visible > *:nth-child(10) { transition-delay: 540ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-stagger > * {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transition: none;
  }
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--color-surface-dynamic);
  border-radius: var(--radius-full);
}
