/* AnvilCAD website. One stylesheet, no build step. */

:root {
  --bg: #0e1218;
  --bg-alt: #121821;
  --panel: #161d27;
  --panel-2: #1b2430;
  --line: #253041;
  --line-soft: #1d2633;
  --text: #e7ecf3;
  --muted: #9aa7b8;
  --dim: #6f7c8e;
  --accent: #f0782b;
  --accent-strong: #c2410c;
  --accent-soft: rgba(240, 120, 43, 0.14);
  --good: #4ade80;
  --mid: #fbbf24;
  --bad: #f87171;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 8px;
  --wrap: 1180px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
code { font-family: var(--mono); font-size: 0.9em; color: #f5c6a5; }
h1, h2, h3 { margin: 0; font-weight: 550; letter-spacing: -0.02em; line-height: 1.1; }
h2 { font-size: clamp(30px, 4vw, 44px); }
h3 { font-size: 17px; letter-spacing: -0.005em; line-height: 1.35; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #000; padding: 8px 12px; border-radius: 4px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.eyebrow {
  font: 500 12px/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; background: currentColor; display: inline-block; }
.lede { color: var(--muted); font-size: 17px; margin-top: 20px; max-width: 34em; }
.fine { color: var(--dim); font-size: 14px; margin-top: 22px; max-width: 40em; }
.fine.wide { max-width: none; margin-top: 36px; }
.fine a { color: var(--muted); }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.accent { color: var(--accent); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 18, 24, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; text-decoration: none; letter-spacing: -0.01em; }
.brand-small { font-size: 15px; }
.nav-list { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav-list a { display: block; padding: 8px 12px; font-size: 14px; color: var(--muted); text-decoration: none; border-radius: 6px; }
.nav-list a:hover { color: var(--text); background: var(--panel); }
.nav-gh { color: var(--text) !important; }
.menu-btn { display: none; align-items: center; gap: 8px; background: none; border: 0; color: var(--muted); font: 500 14px var(--sans); cursor: pointer; padding: 8px; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 20px; border-radius: 6px;
  font: 500 15px var(--sans); text-decoration: none;
  border: 1px solid transparent; transition: background 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--accent-strong); color: #fff; border-color: #d4561e; }
.btn-primary:hover { background: #d4561e; }
.btn-secondary { background: var(--panel); color: var(--text); border-color: var(--line); }
.btn-secondary:hover { border-color: #3a475a; background: var(--panel-2); }
.text-link { display: inline-flex; gap: 8px; align-items: center; color: var(--accent); font-size: 15px; font-weight: 500; text-decoration: none; margin-top: 28px; }
.text-link:hover span { transform: translateX(3px); }
.text-link span { transition: transform 0.15s; }

/* Hero */
.hero { padding: 72px 0 40px; border-bottom: 1px solid var(--line-soft); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5vw, 58px); line-height: 1.04; letter-spacing: -0.03em; }
.cta-col { display: grid; gap: 12px; margin-top: 34px; max-width: 420px; }
.cta-col .text-link { margin-top: 8px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; justify-content: center; }

.player { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7); }
.player-screen { position: relative; aspect-ratio: 1440 / 900; background: #e9ecf0; }
.player-screen video { width: 100%; height: 100%; object-fit: cover; }
.player-bar {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 16px; border-top: 1px solid var(--line);
  font: 12px/1.5 var(--mono); color: var(--muted);
}
.player-bar a { color: var(--accent); text-decoration: none; white-space: nowrap; }
.play-toggle {
  position: absolute; right: 12px; bottom: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15); background: rgba(14, 18, 24, 0.72); color: #fff;
  display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity 0.2s;
}
.player-screen:hover .play-toggle, .play-toggle:focus-visible, .player-screen.paused .play-toggle, .card-media:hover .play-toggle { opacity: 1; }

.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 48px; font: 12px var(--mono); color: var(--muted); }
.meta-row .sep { color: var(--dim); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.15); }

.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.steps button {
  all: unset; box-sizing: border-box; cursor: pointer; width: 100%; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: 22px 20px 22px 0; border-top: 2px solid transparent; margin-top: -1px;
}
.steps li + li button { padding-left: 20px; border-left: 1px solid var(--line-soft); }
.steps button[aria-selected="true"] { border-top-color: var(--accent); }
.steps button:hover .step-title { color: var(--accent); }
.steps button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.num { display: block; font: 500 12px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.steps button[aria-selected="true"] .num { color: var(--accent); }
.step-title { display: block; font-weight: 550; font-size: 17px; transition: color 0.15s; }
.step-body { display: block; color: var(--muted); font-size: 14px; margin-top: 6px; line-height: 1.5; }

/* Sections */
.section { padding: 112px 0; border-bottom: 1px solid var(--line-soft); }
.section-alt { background: var(--bg-alt); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 72px; align-items: center; }
.split-rev > :first-child { order: 2; }
.split-rev { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 48px; }
.section-head-row .text-link { margin-top: 0; }
.stack-col { display: grid; gap: 16px; min-width: 0; }

.numbered { list-style: none; margin: 40px 0 0; padding: 0; }
.numbered li { display: grid; grid-template-columns: 44px 1fr; padding: 18px 0; border-top: 1px solid var(--line); }
.numbered li:last-child { border-bottom: 1px solid var(--line); }
.numbered .n { font: 12px var(--mono); color: var(--dim); padding-top: 3px; }
.numbered p { color: var(--muted); font-size: 15px; margin-top: 4px; }

.ticks { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 26px; color: var(--muted); font-size: 15px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 10px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.ticks strong { color: var(--text); font-weight: 550; }

/* Panels, tables, terminals */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.panel-head .mono { font-size: 11px; font-weight: 400; }
.panel-foot { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.status-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.status-table th { text-align: left; padding: 12px 16px; width: 1%; white-space: nowrap; vertical-align: top; }
.status-table td { padding: 12px 16px 12px 0; color: var(--muted); }
.status-table tr + tr th, .status-table tr + tr td { border-top: 1px solid var(--line-soft); }
.pill { display: inline-block; font: 500 11px/1 var(--mono); padding: 5px 8px; border-radius: 4px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); letter-spacing: 0.04em; }
.pill-good { color: var(--good); border-color: rgba(74, 222, 128, 0.3); background: rgba(74, 222, 128, 0.08); }
.pill-mid { color: var(--mid); border-color: rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.08); }
.pill-bad { color: var(--bad); border-color: rgba(248, 113, 113, 0.3); background: rgba(248, 113, 113, 0.08); }

pre { margin: 0; overflow-x: auto; font: 12.5px/1.7 var(--mono); }
pre code { color: var(--text); font-size: inherit; }
.csv { padding: 14px 16px; color: var(--muted); }
.csv code { color: var(--muted); white-space: pre; }
.csv-h { color: var(--accent); }
.cmd { background: #0a0d12; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.prompt { color: var(--accent); user-select: none; }

.terminal { background: #0a0d12; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.8); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); background: var(--panel); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2e3a4b; }
.term-bar span { margin-left: 8px; font: 12px var(--mono); color: var(--dim); }
.terminal pre { padding: 18px 18px 22px; }
.terminal .c { color: var(--dim); }
.t-line { display: inline; }
.t-in { color: var(--accent); }
.t-ok { color: var(--good); }
.t-out { color: var(--muted); }
.js .terminal.typing .t-line { visibility: hidden; }
.js .terminal.typing .t-line.shown { visibility: visible; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font: 12px var(--mono); padding: 6px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: var(--panel); }
.chips-tabs { margin-top: 28px; }
.chips-tabs span:first-child { color: var(--accent); border-color: rgba(240, 120, 43, 0.4); background: var(--accent-soft); }

/* Tool grid */
.tool-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tool-grid li { padding: 28px 28px 32px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tool-grid h3 { margin-bottom: 8px; }
.tool-grid p { color: var(--muted); font-size: 15px; }

/* B-rep figure */
.brep { margin: 0; color: var(--muted); }
.brep svg { width: 100%; height: auto; color: #c3ccd8; }
.brep figcaption { font: 12px/1.6 var(--mono); color: var(--dim); margin-top: 12px; }
.brep .f-top { fill: rgba(195, 204, 216, 0.06); }
.brep .f-left { fill: rgba(195, 204, 216, 0.12); }
.brep .f-right { fill: rgba(195, 204, 216, 0.03); }
.hl { opacity: 0; transition: opacity 0.4s; }
.hl-face { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; }
.hl-edge { stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.hl-vert { fill: var(--accent); }
.lb { fill: var(--dim); opacity: 0.55; transition: fill 0.4s, opacity 0.4s; }
.brep[data-show="face"] .hl-face, .brep[data-show="edge"] .hl-edge, .brep[data-show="vert"] .hl-vert { opacity: 1; }
.brep[data-show="face"] .lb-face, .brep[data-show="edge"] .lb-edge, .brep[data-show="vert"] .lb-vert { fill: var(--accent); opacity: 1; }

/* Cards */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-media { position: relative; aspect-ratio: 16 / 10; background: #e9ecf0; border-bottom: 1px solid var(--line); }
.card-media video { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 26px 28px 30px; }
.card-body .eyebrow { margin-bottom: 12px; }
.card-body h3 { font-size: 22px; letter-spacing: -0.015em; }
.card-body p:last-child { color: var(--muted); font-size: 15px; margin-top: 10px; }

/* Roadmap */
.road { list-style: none; margin: 0; padding: 0; position: relative; }
.road li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 0 0 26px 26px; position: relative; }
.road li::before { content: ""; position: absolute; left: 0; top: 7px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg); }
.road li::after { content: ""; position: absolute; left: 5px; top: 20px; bottom: -2px; width: 1px; background: var(--line); }
.road li:last-child::after { display: none; }
.road li.done::before { background: var(--accent); border-color: var(--accent); }
.road li.active::before { border-color: var(--accent); }
.road .mono { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; padding-top: 2px; }
.road li.done .mono, .road li.active .mono { color: var(--accent); }
.road p { color: var(--muted); font-size: 15px; margin-top: 4px; }

/* Release + contribute */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.duo-item { padding: 40px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.duo-item h2 { font-size: 30px; }
.duo-item > p:not(.eyebrow) { color: var(--muted); margin-top: 14px; }
.duo-item .text-link { margin-top: 22px; }

/* Get */
.get { text-align: center; background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(240, 120, 43, 0.12), transparent 70%), var(--bg); }
.get-inner { display: flex; flex-direction: column; align-items: center; }
.get .eyebrow { justify-content: center; }
.get .lede { margin-left: auto; margin-right: auto; }
.copy-cmd { display: flex; align-items: stretch; margin-top: 24px; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: #0a0d12; overflow: hidden; }
.copy-cmd pre { padding: 14px 18px; text-align: left; }
.copy-btn { border: 0; border-left: 1px solid var(--line); background: var(--panel); color: var(--text); font: 500 13px var(--sans); padding: 0 18px; cursor: pointer; }
.copy-btn:hover { color: var(--accent); }

/* Footer */
.site-footer { padding: 48px 0 56px; }
.footer-row { display: grid; gap: 10px; color: var(--muted); font-size: 14px; }
.footer-row .fine { margin-top: 6px; }

/* Responsive */
@media (max-width: 1000px) {
  .hero-grid, .split, .split-rev { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .split-rev > :first-child { order: 0; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) button { padding-left: 0; border-left: 0; }
  .steps li:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  #nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); }
  #nav.open { display: block; }
  .nav-list { flex-direction: column; padding: 8px 16px 16px; }
  .nav-list a { padding: 12px 8px; font-size: 16px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding-top: 48px; }
  .section { padding: 80px 0; }
  .tool-grid, .cards, .duo, .tool-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li button, .steps li + li button { padding-left: 0; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--line-soft); }
  .section-head-row { flex-direction: column; align-items: flex-start; }
  .duo-item { padding: 28px 22px; }
  .player-bar { flex-direction: column; gap: 4px; }
  .copy-cmd { flex-direction: column; width: 100%; }
  .copy-btn { border-left: 0; border-top: 1px solid var(--line); padding: 10px; }
  .tool-grid li { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hl, .lb, .text-link span { transition: none; }
}
