/* Fastmash landing page. Palette A (midnight teal); one deliberate dark look. */
@font-face {
  font-family: "Source Code Pro";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/source-code-pro-v11-all-charsets-500.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1c2330;
  --line: #30363d;
  --fg: #e6edf3;
  --muted: #9fb0c3;
  --teal: #2dd4bf;
  --teal-ink: #04201c;
  --amber: #fbbf24;
  --red: #f87171;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wide: 72rem;
}

* { box-sizing: border-box; }
/* Focused controls scroll clear of the fixed motion button. */
html { -webkit-text-size-adjust: 100%; scroll-padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 var(--sans);
  padding-inline: 20px;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: #5eead4; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.skip-link {
  position: fixed; top: 1rem; left: 1rem; z-index: 1000;
  padding: 0.7rem 1rem; border-radius: 6px; background: var(--teal); color: var(--teal-ink);
  font-weight: 600; transform: translateY(calc(-100% - 2rem));
}
.skip-link:focus { transform: none; }
.skip-link:hover { color: var(--teal-ink); }
code { font-family: var(--mono); font-size: 0.9em; }
h1, h2 { text-wrap: balance; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }

.nav, main, .footer { max-width: var(--wide); margin-inline: auto; }

/* Navigation */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--fg); text-decoration: none;
  font: 600 20px/1 var(--mono); letter-spacing: -0.02em;
}
.brand-mark { width: 22px; height: 22px; display: block; }
.nav nav { display: flex; gap: 22px; font-size: 15px; }
.nav nav a { color: var(--muted); text-decoration: none; }
.nav nav a:hover { color: var(--fg); }

/* Hero */
.hero {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px; align-items: center;
  padding-block: 56px 72px;
}
.hero-art { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 83% 38%, rgba(45, 212, 191, 0.13), transparent 58%);
}
.eyebrow {
  margin: 0 0 14px; color: var(--teal);
  font: 500 13px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
}
h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); font-weight: 800; }
.hero-accent { color: var(--teal); }
.star { color: var(--amber); text-decoration: underline; font-weight: 800; }
.lede { margin: 20px 0 28px; color: var(--muted); font-size: 1.12rem; max-width: 34rem; }
.lede strong { color: var(--fg); }
.hero-proof { color: var(--muted); font-size: 14px; margin: -8px 0 24px; }

.install {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--amber); border-radius: 12px;
  padding: 6px 6px 6px 16px;
}
.install code {
  flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap;
  font-size: 15px; padding-block: 8px; scrollbar-width: none;
}
.install code::before { content: "$ "; color: var(--amber); }
.copy {
  flex: none; font: 600 14px/1 var(--sans); color: var(--teal-ink);
  background: var(--teal); border: 0; border-radius: 7px; padding: 10px 14px; cursor: pointer;
}
.copy:hover { background: #5eead4; }
.installer { max-width: 36rem; }
.install-tabs {
  display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px;
}
.install-tabs [role="tab"] {
  flex: none; font: 500 13.5px/1 var(--sans); color: var(--muted); background: none;
  border: 1px solid transparent; border-radius: 7px; padding: 8px 11px; cursor: pointer;
}
.install-tabs [role="tab"]:hover { color: var(--fg); }
.install-tabs [role="tab"][aria-selected="true"] { color: var(--fg); background: var(--surface); border-color: var(--line); }
.install-panel + .install-panel { margin-top: 12px; }
.install-panel[hidden] + .install-panel, .install-panel + .install-panel[hidden] { margin-top: 0; }
.install-note { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.install-alt { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  display: inline-block; padding: 11px 18px; border-radius: 9px;
  border: 1px solid var(--line); color: var(--fg); text-decoration: none; font-weight: 600; font-size: 15px;
}
.button:hover { border-color: var(--muted); color: var(--fg); }
.button.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.button.primary:hover { background: #ffffff; color: var(--bg); }
.button.accent-edge { border-color: var(--amber); }
.button.accent-edge:hover { border-color: #fcd34d; }

/* Terminal, inside a glowing aura that pulses while motion runs */
.terminal-aura {
  position: relative; min-width: 0; padding: 2px; border-radius: 14px;
  background-image: radial-gradient(closest-corner, var(--teal) 0%, transparent 90%);
}
.terminal-aura::before, .terminal-aura::after {
  content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit;
  background-image: inherit; animation: 7s ease-out infinite paused;
}
.terminal-aura::before { opacity: 0.7; filter: blur(0.25rem); animation-name: aura-glow; }
.terminal-aura::after { opacity: 0.3; filter: blur(1rem); animation-name: aura-glow-after; }
.terminal-aura[data-motion-active]::before, .terminal-aura[data-motion-active]::after { animation-play-state: running; }
@keyframes aura-glow { 20%, 80% { opacity: 0.7; filter: blur(0.25rem); } 50% { opacity: 1; filter: blur(0.75rem); } }
@keyframes aura-glow-after { 20%, 80% { opacity: 0.3; filter: blur(1rem); } 50% { opacity: 0.6; filter: blur(1.5rem); } }
.terminal {
  position: relative; z-index: 1;
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.terminal-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.terminal-bar small { margin-left: auto; font: 500 12px/1.5 var(--mono); color: var(--muted); }
.terminal pre, .diff { margin: 0; overflow-x: auto; scrollbar-width: thin; }
.terminal code {
  display: block; padding: 18px 20px 22px; font-size: 14px; line-height: 1.75; tab-size: 8;
  color: var(--fg); white-space: pre;
}
.prompt { color: var(--amber); }
.cli-syntax { color: #67d8ef; }
.terminal-omission { color: var(--muted); }
.terminal figcaption { padding: 14px 20px; margin: 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.cursor { display: inline-block; width: 8px; height: 1.1em; vertical-align: -0.2em; background: var(--teal); }

/* Sections */
section { padding-block: 56px; border-top: 1px solid var(--line); }
.section-head { max-width: 44rem; margin-bottom: 28px; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; }
.section-head p { margin: 12px 0 0; color: var(--muted); }
.section-head .eyebrow { margin: 0 0 14px; color: var(--teal); }

/* Three concrete workflows keep the extra capabilities easy to explore. */
.workflow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.workflow-card {
  display: flex; flex-direction: column; align-items: flex-start; min-width: 0;
  padding: 24px; border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(145deg, var(--surface), var(--bg));
}
.workflow-card h3 { margin: 0; font-size: 1.25rem; line-height: 1.35; letter-spacing: -0.02em; }
.workflow-card > p:not(.workflow-index) { margin: 14px 0 20px; color: var(--muted); font-size: 15px; }
.workflow-index { color: var(--teal); font: 500 12px/1.5 var(--mono); letter-spacing: 0.05em; margin: 0 0 22px; }
.workflow-card pre { width: 100%; margin: auto 0 20px; padding: 14px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); overflow-x: auto; scrollbar-width: thin; }
.workflow-card pre code { font-size: 11.5px; line-height: 1.65; }
.workflow-card a { font-size: 14px; padding-block: 4px; }

/* Benchmark chart (generated SVG, inlined at build time) */
.chart { background: var(--surface); border: 1px solid var(--amber); border-radius: 12px; padding: 20px 16px 8px; overflow-x: auto; }
.fm-chart { display: block; width: 100%; min-width: 520px; max-width: 900px; height: auto; margin: 0 auto; }
.fm-chart text { font-family: var(--sans); font-size: 12px; }
.fm-chart .fm-text { fill: var(--fg); }
.fm-chart .fm-muted { fill: var(--muted); font-size: 11px; }
.fm-chart .fm-value { fill: var(--fg); font-size: 10px; font-variant-numeric: tabular-nums; }
.fm-chart .fm-bar-0 { fill: var(--teal); }
.fm-chart .fm-bar-1 { fill: var(--amber); }
.fm-chart .fm-grid { stroke: rgba(230, 237, 243, 0.08); stroke-width: 1; }
.fm-chart .fm-parity { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 3; }
.fine-print { margin: 14px 0 0; color: var(--muted); font-size: 14px; }

/* Comparison */
.compare { border: 1px solid var(--amber); border-radius: 12px; overflow: hidden; }
.compare-row {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 20px; padding: 16px 20px; border-top: 1px solid var(--line); font-size: 15px;
}
.compare-row:first-child { border-top: 0; }
.compare-head { background: var(--surface); color: var(--muted); font: 500 13px/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.topic { font-weight: 600; }
.gnu { color: var(--muted); }
.fm { color: var(--fg); padding-left: 22px; position: relative; }
.fm::before {
  content: ""; position: absolute; left: 0; top: 0.45em; width: 12px; height: 7px;
  border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg);
}
.more { margin: 16px 0 0; }

/* Switch */
.switch { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.switch-copy p { color: var(--muted); margin: 14px 0 24px; }
.diff { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.diff code { display: block; padding: 18px 20px; font-size: 14px; line-height: 1.9; white-space: pre; }
.del { color: var(--red); }
.add { color: var(--teal); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding-block: 32px 96px; color: var(--muted); font-size: 14px; }
.footer p { margin: 4px 0; }
.footer a { color: var(--fg); }
.footer .author { margin-top: 14px; font-size: 13px; }
.footer .profiles { margin-left: 10px; }
.footer .profiles a { color: var(--muted); }
.footer .sibling { font-size: 13px; }
.footer .sibling a { color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Phones and narrow windows */
@media (max-width: 880px) {
  .hero, .switch { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero { padding-block: 32px 48px; }
  .workflow-grid { grid-template-columns: minmax(0, 1fr); }
  .workflow-card pre code { font-size: 13px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; padding-inline: 16px; }
  .nav nav { gap: 16px; font-size: 14px; }
  .nav nav a:nth-child(2) { display: none; }
  .install code { font-size: 13px; }
  .compare-head { display: none; }
  .compare-row { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 16px; }
  .gnu::before { content: "GNU datamash: "; color: var(--muted); font-weight: 600; }
  .terminal code, .diff code { font-size: 12.5px; }
}
/* Motion: entrances, ambient glows and short hover lifts. Content stays usable without them. */
html[data-entrances-ready] [data-reveal]:not([data-revealed]) { opacity: 0; }
a { transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1); }
.button, .copy, .install-tabs [role="tab"] {
  transition-property: color, background-color, border-color, box-shadow, translate;
  transition-duration: 0.2s; transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}
.button:active, .copy:active { translate: 0 0.5px; }
.workflow-card { transition: translate 300ms, border-color 300ms, box-shadow 300ms; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
@media (hover: hover) {
  .workflow-card:hover {
    border-color: var(--teal);
    box-shadow: 0 20px 25px -5px rgba(45, 212, 191, 0.15), 0 8px 10px -6px rgba(45, 212, 191, 0.15);
  }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .button.primary:hover { translate: 0 -2px; }
  .button.accent-edge:hover, .workflow-card:hover { translate: 0 -4px; }
}
.motion-toggle {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  min-height: 44px; padding: 0 16px; border: 1px solid rgba(45, 212, 191, 0.4); border-radius: 7px;
  background: var(--bg); color: var(--teal); font: 600 12px/1 var(--sans); cursor: pointer;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}
.motion-toggle:hover { border-color: var(--teal); }
.motion-toggle:disabled { color: var(--muted); border-color: var(--line); cursor: default; }
@media (prefers-reduced-motion: reduce), print {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  [data-reveal] { opacity: 1 !important; }
  .motion-toggle { display: none; }
}
@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight; }
  .hero-art, .terminal-aura::before, .terminal-aura::after { display: none; }
  .terminal-aura { background: none; }
  .hero-accent, .cli-syntax, .workflow-index { color: inherit; }
  .terminal, .workflow-card, .workflow-card pre, .install, .button, .motion-toggle { border-color: CanvasText; }
  .workflow-card { background: Canvas; }
  .install-tabs [role="tab"][aria-selected="true"] { border-color: Highlight; }
}
