/* ClipForge site — one stylesheet, no external fonts, no inline styles (CSP: style-src 'self'). */

:root {
  --bg: #0e0f12;
  --panel: #14161b;
  --panel-2: #1a1d24;
  --line: #242730;
  --line-2: #323642;
  --text: #f2f3f5;
  --muted: #8f96a3;
  --accent: #ff4d2e;
  --accent-ink: #0e0f12;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Cascadia Code", Consolas, "SF Mono", Menlo, "Liberation Mono", monospace;
  --w: 1120px;
}

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

html { color-scheme: dark; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
[id] { scroll-margin-top: 76px; } /* clear the sticky header on anchor jumps */

a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 650; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.05rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: .9em; }
code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 3px; padding: .05em .35em; }

.wrap { max-width: var(--w); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(14, 15, 18, .94); z-index: 5; }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-weight: 700; letter-spacing: .02em; text-decoration: none; }
.rec { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.site-nav { margin-left: auto; overflow-x: auto; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 6px 10px; font-size: .875rem; color: var(--muted); text-decoration: none; white-space: nowrap; border-radius: 3px; }
.site-nav a:hover { color: var(--text); background: var(--panel); }
@media (max-width: 760px) { .site-nav .opt { display: none; } }
/* on phones the home page header keeps only the Buy button (nav is followed by it); legal pages keep their short nav */
@media (max-width: 560px) { .site-nav:not(:last-child) { display: none; } .site-head .btn { margin-left: auto; } }
.btn { white-space: nowrap; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border: 1px solid var(--line-2); border-radius: 4px; font-weight: 600; text-decoration: none; line-height: 1.2; }
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #ff6a4f; border-color: #ff6a4f; }
.btn-sm { padding: 7px 12px; font-size: .875rem; }
.btn .k { font-family: var(--mono); font-size: .8em; opacity: .75; }

/* ---------- sections ---------- */
.sec { border-bottom: 1px solid var(--line); padding: 88px 0; }
.sec-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 36px; }
.sec-head h2 { margin: 0; }
.sec-num { font-family: var(--mono); font-size: .8rem; color: var(--muted); border: 1px solid var(--line); padding: 2px 8px; border-radius: 3px; white-space: nowrap; }
.sec-intro { max-width: 62ch; color: var(--muted); margin-bottom: 40px; }
.label { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 80px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-bottom: 20px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 52ch; }
.lede strong { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.facts li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.facts li:nth-child(odd) { padding-right: 12px; }
.facts .label { display: block; margin-bottom: 2px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- framing diagram (16:9 -> 9:16) ---------- */
.frame-diagram { margin: 0; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; }
.fd-bar { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.fd-bar .live { color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.fd-body { display: grid; grid-template-columns: 1fr auto 150px; gap: 18px; align-items: center; padding: 22px 18px; }
.monitor .label { display: block; margin-bottom: 6px; font-size: .68rem; }

.scr { position: relative; overflow: hidden; border: 1px solid var(--line-2); border-radius: 2px; }
.scr-16 { aspect-ratio: 16 / 9; }
.scr-9 { aspect-ratio: 9 / 16; }

/* stylised gameplay: horizon + floor grid, all muted */
.game {
  background:
    repeating-linear-gradient(90deg, rgba(242, 243, 245, .05) 0 1px, transparent 1px 22px),
    linear-gradient(180deg, #232733 0 48%, #191c23 48% 100%);
}
.game::after { content: ""; position: absolute; left: 0; right: 0; bottom: 12%; height: 2px; background: rgba(242, 243, 245, .12); }
.cam { background: #2a2e38; }
.cam svg { width: 100%; height: 100%; }
.sil { fill: #4a505e; }
.facebox { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 2; }

.src-cam { position: absolute; left: 4%; top: 6%; width: 30%; aspect-ratio: 16 / 9; border: 1px dashed var(--accent); }
.crop-tag { position: absolute; left: 4%; top: calc(36% + 4px); /* cam is 30% of a 16:9 box, so 30% of its height too */ font-family: var(--mono); font-size: .62rem; color: var(--accent); }

.fd-arrow { display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--mono); font-size: .68rem; color: var(--muted); }
.fd-arrow svg { width: 34px; height: 12px; }
.fd-arrow path { fill: none; stroke: var(--muted); stroke-width: 1.5; }

.out-cam { position: absolute; left: 0; right: 0; top: 0; height: 40%; border-bottom: 1px solid var(--bg); }
.out-game { position: absolute; left: 0; right: 0; top: 40%; bottom: 0; }
.caps { position: absolute; left: 6%; right: 6%; top: 52%; text-align: center; font: 800 .74rem/1.3 var(--sans); text-transform: uppercase; color: #fff; letter-spacing: .01em; }
.caps span { padding: 0 2px; }
.caps .hl { background: var(--accent); color: var(--accent-ink); border-radius: 2px; }
.zone { position: absolute; right: 4px; font-family: var(--mono); font-size: .56rem; color: var(--muted); background: rgba(14, 15, 18, .8); padding: 0 3px; }
.zone-a { top: 4px; }
.zone-b { top: calc(40% + 4px); }

.fd-legend { list-style: none; margin: 0; padding: 10px 12px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--mono); font-size: .7rem; color: var(--muted); }
.fd-legend b { color: var(--text); font-weight: 600; }

@media (max-width: 520px) {
  .fd-body { grid-template-columns: 1fr; justify-items: center; }
  .fd-body .monitor { width: 100%; }
  .fd-body .monitor.out { width: 160px; }
  .fd-arrow svg { transform: rotate(90deg); }
}

/* ---------- pipeline as a timeline ---------- */
.timeline { position: relative; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); overflow: hidden; }
.ruler {
  height: 28px; border-bottom: 1px solid var(--line); position: relative;
  background:
    repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 100px) 0 100% / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 20px) 0 100% / 100% 6px no-repeat;
}
.ruler ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.ruler li { font-family: var(--mono); font-size: .68rem; color: var(--muted); padding: 5px 0 0 10px; }
.track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stage { border-right: 1px solid var(--line); padding: 14px 14px 22px; }
.stage:last-child { border-right: 0; }
.clip { border: 1px solid var(--line-2); background: var(--panel-2); border-radius: 3px; padding: 10px 12px; margin-bottom: 16px; position: relative; }
.clip::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line-2); border-radius: 3px 0 0 3px; }
.stage.on .clip::before { background: var(--accent); }
.clip h3 { margin: 4px 0 0; font-size: 1rem; }
.clip .label { font-size: .68rem; }
.stage p { font-size: .925rem; color: var(--muted); }
.tech { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tech li { font-family: var(--mono); font-size: .7rem; border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; color: var(--muted); }
.playhead { position: absolute; top: 0; height: 112px; left: 72%; width: 1px; background: var(--accent); pointer-events: none; }
.playhead::before { content: ""; position: absolute; top: 0; left: -5px; border: 5px solid transparent; border-top: 7px solid var(--accent); }
@media (max-width: 900px) {
  .track, .ruler ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage:nth-child(2) { border-right: 0; }
  .stage:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .playhead, .ruler li:nth-child(n+3) { display: none; }
}
@media (max-width: 560px) {
  .track { grid-template-columns: 1fr; }
  .stage { border-right: 0; border-bottom: 1px solid var(--line); }
  .stage:last-child { border-bottom: 0; }
}

/* ---------- panels / two-up ---------- */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px) { .two { grid-template-columns: 1fr; } }
.panel { border: 1px solid var(--line); border-radius: 6px; background: var(--panel); padding: 24px; }
.panel > .label { display: block; margin-bottom: 10px; }
.panel p:last-child, .panel ul:last-child { margin-bottom: 0; }
.ticks { list-style: none; margin: 0 0 1em; padding: 0; }
.ticks li { padding: 7px 0 7px 22px; border-top: 1px solid var(--line); position: relative; font-size: .95rem; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 8px; height: 1px; background: var(--muted); }

/* export pack file listing */
.files { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: .85rem; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); }
.files li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 9px 12px; border-top: 1px solid var(--line); }
.files li:first-child { border-top: 0; color: var(--muted); }
.files .t { color: var(--muted); }

/* ---------- comparison table ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
caption { text-align: left; padding: 0 0 12px; color: var(--muted); font-size: .875rem; }
th, td { text-align: left; vertical-align: top; padding: 13px 16px; border-top: 1px solid var(--line); }
thead th { border-top: 0; background: var(--panel); font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
tbody th { font-weight: 500; color: var(--muted); width: 26%; }
.cmp { min-width: 600px; } /* scroll sideways on phones instead of 3-word lines */
.cmp td:nth-child(2) { background: rgba(255, 77, 46, .045); }
.cmp thead th:nth-child(2) { color: var(--text); border-bottom: 2px solid var(--accent); }
.foot-note { font-size: .82rem; color: var(--muted); margin-top: 14px; max-width: 80ch; }

/* ---------- pricing ---------- */
.price-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .price-grid { grid-template-columns: 1fr; } }
.price-panel { border: 1px solid var(--line-2); }
.price { display: flex; align-items: baseline; gap: 12px; margin: 4px 0 6px; }
.price .num { font-size: 3.4rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.price .per { font-family: var(--mono); font-size: .85rem; color: var(--muted); }
.kv { margin: 22px 0 24px; border-top: 1px solid var(--line); }
.kv div { display: grid; grid-template-columns: 11rem 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.kv dt { font-family: var(--mono); font-size: .78rem; color: var(--muted); padding-top: 2px; }
.kv dd { margin: 0; }
@media (max-width: 480px) { .kv div { grid-template-columns: 1fr; gap: 2px; } }
.checkout-note { font-size: .85rem; color: var(--muted); margin-top: 14px; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 28px 16px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-family: var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: "\2212"; color: var(--accent); }
.faq details > div { padding: 0 0 18px; color: var(--muted); max-width: 70ch; }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- rights strip ---------- */
.rights { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 4px; padding: 16px 20px; background: var(--panel); font-size: .95rem; }
.rights p { margin: 0; }

/* ---------- footer ---------- */
.site-foot { padding: 48px 0 56px; font-size: .875rem; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { padding: 3px 0; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--text); }
.site-foot .label { display: block; margin-bottom: 10px; }
.oss-line { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; font-size: .8rem; }

/* ---------- legal / doc pages ---------- */
.doc { max-width: 74ch; padding: 64px 0 88px; }
.doc h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.doc h2 { font-size: 1.25rem; margin-top: 2.2em; padding-top: 1.2em; border-top: 1px solid var(--line); }
.doc h3 { margin-top: 1.6em; }
.doc p, .doc li { color: #c9cdd4; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 1em; }
.doc li { margin-bottom: .4em; }
.doc .meta { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-bottom: 28px; }
.doc .summary { border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 18px 22px; margin: 0 0 8px; }
.doc .summary p, .doc .summary li { color: var(--text); }
.doc .summary ul { margin-bottom: 0; }
