/* ==========================================================================
   VOO.run: design tokens, reset, buttons.

   Clean white ground, near-black ink, mint accent. Typography is the same
   system mono stack the editor's `font-mono` uses, site-wide.
   ========================================================================== */

:root {
  /* Ground: clean white, professional */
  --paper: #ffffff;
  --paper-2: #f9f9fb;
  --paper-3: #f3f4f6;
  --paper-4: #e8e9ed;

  /* Ink: near-black editorial type */
  --ink: #1a1a2e;
  --ink-2: #2d2d44;
  --text-dim: rgba(26, 26, 46, 0.62);
  --text-faint: rgba(26, 26, 46, 0.61); /* >= 4.5:1 contrast against white */

  /* Hairlines on paper */
  --line: rgba(20, 20, 40, 0.07);
  --line-mid: rgba(20, 20, 40, 0.12);
  --line-strong: rgba(20, 20, 40, 0.2);

  /* Signature VOO mint accent */
  --mint: #b2ffd6;
  --mint-hover: #c9ffe2;
  --mint-dark: #00c970;

  /* Dark sections (models, workflows, outro, footer): deep navy-black */
  --dark: #0a0a0f;
  --dark-2: #111118;
  --dark-text: #f0f0f8;
  --dark-dim: rgba(240, 240, 248, 0.65);
  --dark-faint: rgba(240, 240, 248, 0.58); /* >= 4.5:1 contrast against dark */
  --dark-line: rgba(255, 255, 255, 0.09);

  /* Radius ladder (Design.md §4):
     --radius-md: 6px: swatches, thumbnails, tags
     --radius-lg: 8px: buttons, menu items, small controls
     --radius-xl: 12px: inputs, list rows, cards
     --radius-2xl: 16px: panels, popovers, node cards
     --radius-3xl: 24px: drawers, large dialogs, feature shells
     --radius-full: 9999px: pills, status dots, avatars
  */
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

  /* Legacy aliases mapped to the ladder */
  --radius: var(--radius-xl);

  --shell: 1280px;
  --bar: 64px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Same mono stack as the editor's `font-mono`, used site-wide */
  --font:
    ui-monospace, "SFMono-Regular", Menlo, "Cascadia Code", monospace;
  --font-mono: var(--font);
  --font-serif: var(--font);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* account for sticky nav */
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

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

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

svg {
  display: block;
}

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

::selection {
  background: var(--mint);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--mint-dark);
  outline-offset: 3px;
  border-radius: var(--radius-md);
}

/* --- layout utilities --------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 32px;
}

/*
 * Display scale: Inter needs less negative tracking than monospace.
 * Adobe-style: large, confident, not over-compressed.
 */
.display {
  font-size: clamp(2.8rem, 6.5vw, 5.6rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.display--md {
  font-size: clamp(1.75rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.display--sm {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lead {
  max-width: 56ch;
  color: var(--text-dim);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
}

/* Eyebrow labels use mono: a professional Adobe-style tag */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mint-dark);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--mint-dark);
  border-radius: var(--radius-full);
}

/* --- film grain (subtle texture, not Awwwards-heavy) --------------------- */

.grain {
  position: fixed;
  inset: -100%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(4) infinite;
}

@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2%, 1%); }
  50%  { transform: translate(1%, -2%); }
  75%  { transform: translate(-1%, 2%); }
  100% { transform: translate(2%, -1%); }
}

/* --- custom cursor ------------------------------------------------------- */

body.has-cursor,
body.has-cursor a,
body.has-cursor button {
  cursor: none;
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  pointer-events: none;
}

.cursor__dot {
  position: fixed;
  top: -3px;
  left: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  transition: opacity 0.2s var(--ease);
}

.cursor__ring {
  position: fixed;
  top: -18px;
  left: -18px;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  opacity: 0.45;
  transition:
    width 0.25s var(--ease),
    height 0.25s var(--ease),
    top 0.25s var(--ease),
    left 0.25s var(--ease),
    opacity 0.25s var(--ease),
    background-color 0.25s var(--ease);
}

.cursor.is-hot .cursor__ring {
  width: 52px;
  height: 52px;
  top: -26px;
  left: -26px;
  background: var(--mint);
  border-color: var(--mint);
  opacity: 0.85;
}

.cursor.is-hot .cursor__dot {
  opacity: 0;
}

/* --- hero character reveal ---------------------------------------------- */

.ch-group {
  display: inline-block;
  white-space: nowrap;
}

.ch {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.ch__in {
  display: inline-block;
  transform: translateY(110%);
  animation: char-rise 0.7s var(--ease) forwards;
}

@keyframes char-rise {
  to { transform: translateY(0); }
}

/* --- marquee ------------------------------------------------------------ */

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--paper-3);
}

.marquee__half {
  display: flex;
  width: max-content;
  animation: marquee-scroll 36s linear infinite;
}

.marquee__group {
  display: flex;
  align-items: center;
}

.marquee__word {
  padding: 13px 24px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

.marquee__dot {
  color: var(--mint-dark);
  font-weight: 700;
}

@keyframes marquee-scroll {
  to { transform: translateX(-50%); }
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus-visible {
  transform: none;
}

/* --- buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition:
    transform 0.2s var(--ease),
    background-color 0.2s var(--ease),
    color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn__icon {
  width: 16px;
  height: 16px;
  flex: none;
}

/* Solid primary: Adobe-style filled button */
.btn--primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn--primary:hover {
  background: var(--ink-2);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.16), 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Outline quiet button */
.btn--quiet {
  border: 1.5px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.btn--quiet:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

/* Compact nav bar variant */
.btn--bar {
  min-height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 600;
}

.github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-dim);
  border-radius: var(--radius-md);
  transition: color 0.18s var(--ease);
}

/* --- reveal ------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.65s var(--ease),
    transform 0.65s var(--ease);
}

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

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .grain { animation: none; }
  .ch__in { transform: none; animation: none; }
  .marquee__half { animation: none; }
}
