/* ============================================================
   Doorsoft — Tokens & Base
   ============================================================ */

:root {
  /* Color tokens (dark by default) */
  --bg: #0a0a0b;
  --bg-elev: #111114;
  --bg-elev-2: #16161a;
  --border: #1f1f23;
  --border-strong: #2a2a30;
  --text: #f5f5f7;
  --text-muted: #a0a0a8;
  --text-dim: #6e6e76;

  --accent: #957ef8;
  --accent-2: #b6a4ff;
  --accent-deep: #5a48b8;
  --accent-soft: rgba(149, 126, 248, 0.12);
  --accent-glow: rgba(149, 126, 248, 0.45);

  --success: #6ee7a0;
  --warn: #f5c66e;
  --danger: #f57e7e;

  /* Density */
  --density: 1;
  --pad-section-y: calc(120px * var(--density));
  --pad-card: calc(28px * var(--density));
  --gap-grid: calc(20px * var(--density));

  /* Type */
  --font-sans: 'Space Grotesk', 'Inter Tight', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --fs-eyebrow: 12px;
  --fs-label: 13px;
  --fs-body: 17px;
  --fs-lede: 19px;
  --fs-h3: clamp(22px, 2.2vw, 28px);
  --fs-h2: clamp(36px, 4.5vw, 60px);
  --fs-h1: clamp(48px, 6.8vw, 92px);

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Layout */
  --max-w: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
}

[data-theme="light"] {
  --bg: #f6f5f1;
  --bg-elev: #ffffff;
  --bg-elev-2: #efedeb;
  --border: #e5e2dd;
  --border-strong: #d6d2cc;
  --text: #0e0e10;
  --text-muted: #555560;
  --text-dim: #84848e;
  --accent-soft: rgba(149, 126, 248, 0.10);
}

[data-density="compact"] {
  --density: 0.78;
  --pad-section-y: calc(96px * var(--density));
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 240ms ease, color 240ms ease;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

::selection { background: var(--accent); color: #0a0a0b; }

/* ============================================================
   Utilities
   ============================================================ */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--pad-section-y) 0;
  position: relative;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-glow);
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); letter-spacing: -0.035em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.025em; }
h3 { font-size: var(--fs-h3); letter-spacing: -0.015em; line-height: 1.2; }

p { text-wrap: pretty; }

.lede {
  font-size: var(--fs-lede);
  color: var(--text-muted);
  max-width: 56ch;
  line-height: 1.5;
}

.mono { font-family: var(--font-mono); }

.strike-accent {
  position: relative;
  white-space: nowrap;
  color: var(--text-muted);
}
.strike-accent::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  top: 54%;
  height: 0.08em;
  background: var(--accent);
  transform: rotate(-3deg);
  border-radius: 999px;
}

.grad-text {
  background: linear-gradient(100deg, var(--accent) 10%, #c9b9ff 50%, #ffffff 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 200ms ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #0a0a0b;
  box-shadow: 0 8px 32px -8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover { background: var(--accent-2); box-shadow: 0 14px 40px -8px var(--accent-glow); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-elev); border-color: var(--accent); }
.btn-sm { padding: 9px 16px; font-size: 13px; }

.btn .arrow {
  display: inline-block;
  transition: transform 200ms ease;
}
.btn:hover .arrow { transform: translateX(3px); }

/* Cards */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--pad-card);
  transition: border-color 200ms ease, transform 220ms ease, background 200ms ease;
}
.card:hover {
  border-color: var(--border-strong);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.chip-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-glow);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* Section header */
.sec-head {
  display: grid;
  gap: 18px;
  margin-bottom: 64px;
  max-width: 720px;
}
.sec-head h2 { color: var(--text); }
.sec-head .sub {
  color: var(--text-muted);
  font-size: var(--fs-lede);
  line-height: 1.45;
}

/* Divider line */
.hairline {
  border-top: 1px solid var(--border);
}

/* Reveal on view */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}
