/* Frita — design tokens */
:root {
  /* Brand */
  --brand: #007aff;
  --brand-ink: #0a4da8;
  --brand-tint: #d6e8ff;
  --brand-glow: rgba(0, 122, 255, 0.35);

  /* Surface (dark default) */
  --bg: #0a0b0d;
  --bg-elev: #111216;
  --bg-elev-2: #18191f;
  --surface-cream: #f4efe6;
  --surface-cream-2: #ebe4d6;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.16);
  --line-cream: rgba(10,11,13,0.12);

  /* Ink */
  --ink: #f4efe6;
  --ink-dim: rgba(244,239,230,0.62);
  --ink-faint: rgba(244,239,230,0.38);
  --ink-dark: #0a0b0d;
  --ink-dark-dim: rgba(10,11,13,0.62);
  --ink-dark-faint: rgba(10,11,13,0.38);

  /* Flavor palette */
  --flv-salt: #b8c7d6;
  --flv-ketchup: #c8402c;
  --flv-nacho: #e8a83a;
  --flv-jalapeno: #4a7a3d;
  --flv-secret: #2a1b3d;

  /* Type */
  --f-display: "Syne", "Archivo Black", system-ui, sans-serif;
  --f-body: "Inter Tight", "Inter", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Scale */
  --unit: 8px;
  --radius: 2px;
  --radius-lg: 6px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0, 0.55, 0.2);
  --dur: 0.5s;
  --dur-fast: 0.25s;
}

/* Density */
[data-density="compact"] { --unit: 6px; }
[data-density="roomy"] { --unit: 10px; }

/* Theme: cream */
[data-theme="cream"] {
  --bg: #f4efe6;
  --bg-elev: #ebe4d6;
  --bg-elev-2: #e1d9c6;
  --line: rgba(10,11,13,0.10);
  --line-strong: rgba(10,11,13,0.22);
  --ink: #0a0b0d;
  --ink-dim: rgba(10,11,13,0.62);
  --ink-faint: rgba(10,11,13,0.38);
}

/* Theme: light */
[data-theme="light"] {
  --bg: #ffffff;
  --bg-elev: #f6f6f4;
  --bg-elev-2: #ececea;
  --line: rgba(10,11,13,0.08);
  --line-strong: rgba(10,11,13,0.20);
  --ink: #0a0b0d;
  --ink-dim: rgba(10,11,13,0.62);
  --ink-faint: rgba(10,11,13,0.38);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--brand); color: #fff; }

/* Typography utilities */
.display {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.92;
}
.display-xl { font-size: clamp(64px, 11vw, 180px); }
.display-lg { font-size: clamp(48px, 7vw, 110px); }
.display-md { font-size: clamp(36px, 4.5vw, 72px); }
.display-sm { font-size: clamp(28px, 3vw, 44px); }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 500;
}

.overline {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.lead {
  font-size: clamp(17px, 1.3vw, 22px);
  line-height: 1.45;
  color: var(--ink-dim);
  max-width: 60ch;
  text-wrap: pretty;
}

/* Layout */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
.wrap {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
}
@media (max-width: 760px) {
  .wrap { padding: 0 24px; }
}

/* Grid overlay (subtle) */
.grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  opacity: 0.4;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: var(--f-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: transform var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-ink); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-solid-ink {
  background: var(--ink);
  color: var(--bg);
}

.btn .arrow {
  width: 14px; height: 14px;
  transition: transform var(--dur-fast) var(--ease);
}
.btn:hover .arrow { transform: translateX(3px); }

/* Divider */
.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* Reveal animation */
@keyframes rise {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.rise { animation: rise 0.9s var(--ease) both; }
.rise-1 { animation-delay: 0.05s; }
.rise-2 { animation-delay: 0.15s; }
.rise-3 { animation-delay: 0.25s; }
.rise-4 { animation-delay: 0.35s; }

/* Motion intensity */
[data-motion="low"] .rise { animation: none; }
[data-motion="low"] * { transition-duration: 0s !important; }

/* Marquee */
@keyframes slide-x {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
