/* cineviv.com/design: Ortho Sans. One grid, square corners, rules at 0 and 90 degrees. */

:root {
	--bg: #000;
	--panel: #0b0b0b;
	--line: #1f1f1f;
	--line-2: #2e2e2e;
	--text: #ececec;
	--muted: #8a8a8a;
	--dim: #5c5c5c;
	--accent: #F04A00;
	--max: 1360px;
	--pad: clamp(20px, 4vw, 56px);
	--ui: "Ortho Sans Trial", system-ui, sans-serif;
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
	margin: 0; background: var(--bg); color: var(--text);
	font: 400 15px/1.5 var(--ui); letter-spacing: 0.005em;
	-webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #000; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

/* bar ----------------------------------------------------------------------------------- */
.bar {
	position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px;
	padding: 14px var(--pad); background: rgba(0,0,0,0.86); backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 500; }
.brand svg { width: 22px; height: 22px; }
.brand .slash { color: var(--dim); }
.mark { fill: var(--accent); }
.nav { display: flex; gap: 22px; margin-left: auto; color: var(--muted); }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--text); }
@media (max-width: 900px) { .nav { display: none; } .bar .btn { margin-left: auto; } }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 14px 20px; border: 1px solid var(--text); background: var(--text); color: #000;
	text-decoration: none; cursor: pointer; font-weight: 500; transition: background .15s, color .15s;
}
.btn:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn.small { padding: 8px 14px; font-size: 13px; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.ghost:hover { background: transparent; border-color: var(--text); }

main { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* hero ---------------------------------------------------------------------------------- */
.hero { padding: clamp(56px, 10vw, 140px) 0 clamp(40px, 6vw, 80px); border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 18px; color: var(--muted); font-size: 13px; letter-spacing: .04em; }
.hero-word {
	margin: 0; font-size: clamp(64px, 15.5vw, 236px); line-height: .92; letter-spacing: 0; font-kerning: normal; font-feature-settings: "kern" 1;
	font-weight: 400; white-space: nowrap;
	/* the weight sweep runs in CSS alone (no script, no reduced-motion gate), so every browser shows it */
	animation: wght-sweep 9s ease-in-out infinite;
}
@keyframes wght-sweep {
	0%, 100% { font-weight: 100; }
	50% { font-weight: 900; }
}
.hero-line { max-width: 34em; margin: 32px 0 0; font-size: clamp(18px, 2vw, 24px); line-height: 1.35; color: var(--text); font-weight: 300; }
.facts { display: grid; grid-template-columns: repeat(6, 1fr); margin: 56px 0 0; border-top: 1px solid var(--line); }
.facts > div { padding: 18px 16px 0 0; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 6px 0 0; font-size: clamp(22px, 2.6vw, 34px); font-weight: 500; font-variant-numeric: tabular-nums; }
.facts small { font-size: 13px; color: var(--muted); font-weight: 400; }
@media (max-width: 800px) { .facts { grid-template-columns: repeat(3, 1fr); row-gap: 20px; } }

/* blocks -------------------------------------------------------------------------------- */
.block { padding: clamp(56px, 8vw, 110px) 0; border-bottom: 1px solid var(--line); }
.block-head { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; align-items: baseline; margin-bottom: 36px; }
.block-head h2 { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: .02em; }
.block-head p { margin: 0; color: var(--muted); max-width: 40em; }
@media (max-width: 800px) { .block-head { grid-template-columns: 1fr; gap: 8px; } }
.note, .fine { color: var(--dim); font-size: 13px; margin: 18px 0 0; max-width: 62em; }
h3 { font-size: 15px; font-weight: 500; margin: 0 0 12px; }

/* controls ------------------------------------------------------------------------------ */
.ctl { display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--muted); }
.ctl output { color: var(--text); font-variant-numeric: tabular-nums; margin-left: 4px; }
.ctl select {
	appearance: none; background: transparent; border: 1px solid var(--line-2); padding: 7px 28px 7px 10px; font-size: 13px;
	color: var(--text); border-radius: 0; cursor: pointer;
	background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
	background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.ctl select option { background: #111; color: var(--text); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; min-width: 120px; height: 18px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 1px; background: var(--line-2); }
input[type=range]::-moz-range-track { height: 1px; background: var(--line-2); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -6px; background: var(--text); border: 0; border-radius: 0; }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; background: var(--text); border: 0; border-radius: 0; }
input[type=range]:hover::-webkit-slider-thumb { background: var(--accent); }
.seg { display: flex; border: 1px solid var(--line-2); }
.seg button { flex: 1; background: transparent; border: 0; padding: 6px 10px; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button[aria-pressed=true] { background: var(--text); color: #000; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chips button { background: transparent; border: 1px solid var(--line-2); padding: 5px 8px; font-size: 12px; color: var(--muted); cursor: pointer; }
.chips button[aria-pressed=true] { border-color: var(--text); color: var(--text); }
.chips button[disabled] { opacity: .3; cursor: default; }

/* tester -------------------------------------------------------------------------------- */
.tester { border: 1px solid var(--line); background: var(--panel); }
.toolbar {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 22px;
	padding: 20px; border-bottom: 1px solid var(--line); position: sticky; top: 53px; z-index: 5; background: var(--panel);
}
.toolbar .ctl-feat { grid-column: span 2; }
.reset { align-self: end; justify-self: start; background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 13px; padding: 6px 0; }
@media (max-width: 700px) {
	.toolbar { position: static; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 14px; padding: 16px; }
	.toolbar .ctl-feat { grid-column: span 2; }
	.ctl { min-width: 0; }
	input[type=range] { min-width: 0; }
	.seg button { padding: 6px 4px; font-size: 12px; }
}

.stage { --fg: var(--text); --sub: var(--dim); color: var(--fg); min-height: 420px; transition: background .2s, color .2s; }
.tester[data-theme=light] .stage { background: #f4f3ef; --fg: #0b0b0b; --sub: #8b8a86; }
.row { display: grid; grid-template-columns: 96px 1fr; border-bottom: 1px solid var(--line); }
.tester[data-theme=light] .row { border-color: #dcdbd6; }
.row:last-child { border-bottom: 0; }
.row-label { padding: 18px 0 0 20px; color: var(--sub); font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1.3; }
.sample {
	padding: 14px 24px 18px 0; outline: none; overflow-wrap: anywhere; min-width: 0;
	font-family: "Ortho Sans Trial"; font-kerning: normal; white-space: pre-wrap;
}
.sample:focus { box-shadow: inset 2px 0 0 var(--accent); }
.stage.text .row { grid-template-columns: 1fr; }
.stage.text .row-label { display: none; }
.stage.text .sample { padding: 32px clamp(20px, 6vw, 96px) 48px; max-width: 64em; }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; } .row-label { padding: 12px 16px 0; } .sample { padding: 6px 16px 16px; } }

/* weights ------------------------------------------------------------------------------- */
.weights { 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); }
.weights li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px; min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; transition: background .15s; }
.weights li:hover { background: var(--panel); }
.weights .aa { font-size: clamp(72px, 9vw, 128px); line-height: 1; letter-spacing: -0.02em; }
.weights .wn { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.weights .wn b { color: var(--text); font-weight: 400; }
@media (max-width: 800px) { .weights { grid-template-columns: repeat(2, 1fr); } }

/* scripts ------------------------------------------------------------------------------- */
.scripts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.scripts li { background: var(--bg); padding: 20px; min-height: 230px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; transition: background .15s; }
.scripts li:hover, .scripts li:focus-visible { background: var(--panel); }
.scripts .s-sample { font-size: clamp(28px, 3vw, 40px); line-height: 1.2; margin: 20px 0; }
.scripts .s-name { font-weight: 500; }
.scripts .s-meta { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 1000px) { .scripts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .scripts { grid-template-columns: 1fr; } }

/* glyphs -------------------------------------------------------------------------------- */
.glyph-ui { display: grid; grid-template-columns: 340px 1fr; gap: 24px; }
.glyph-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 80px; align-self: start; }
.glyph-big {
	aspect-ratio: 1; border: 1px solid var(--line); display: grid; place-items: center; font-size: 190px; line-height: 1;
	background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 25%; background-position: 0 -1px;
}
.glyph-meta { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.glyph-meta dt { color: var(--muted); font-size: 12px; }
.glyph-meta dd { margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.glyph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); align-content: start; max-height: 640px; overflow: auto; }
.glyph-grid button { aspect-ratio: 1; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; font-size: 26px; cursor: pointer; padding: 0; font-family: "Ortho Sans Trial"; }
.glyph-grid button:hover, .glyph-grid button:focus-visible, .glyph-grid button.on { background: var(--text); color: #000; outline: none; }
@media (max-width: 860px) { .glyph-ui { grid-template-columns: 1fr; } .glyph-side { position: static; } .glyph-big { font-size: 140px; max-width: 320px; } }

/* features ------------------------------------------------------------------------------ */
.features { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.features li { display: grid; grid-template-columns: 70px 1.2fr 2fr; gap: 20px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.features code { font-family: inherit; color: var(--accent); font-size: 13px; }
.features .f-name { color: var(--muted); }
.features .f-demo { font-size: clamp(26px, 3.2vw, 44px); line-height: 1.1; display: flex; gap: 28px; align-items: baseline; flex-wrap: wrap; }
.features .f-demo span:first-child { color: var(--dim); }
.f-svg { height: 1.25em; display: block; fill: currentColor; }
.f-svg.on { color: var(--text); }
.features li[aria-pressed=true] .f-demo span:first-child { color: var(--text); }
.features li[aria-pressed=true] .f-demo span:last-child { color: var(--dim); }
@media (max-width: 760px) { .features li { grid-template-columns: 56px 1fr; } .features .f-demo { grid-column: 1 / -1; } }

/* licensing ----------------------------------------------------------------------------- */
.lic { display: grid; grid-template-columns: 1fr 400px; gap: 32px; align-items: start; }
@media (max-width: 1000px) { .lic { grid-template-columns: 1fr; } }
.config { display: flex; flex-direction: column; gap: 28px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.opts { display: grid; grid-template-columns: repeat(var(--n, 2), 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.opts[data-name=package] { --n: 3; }
.opts[data-name=tier] { --n: 4; }
@media (max-width: 1240px) { .opts[data-name=tier] { --n: 2; } }
@media (max-width: 560px) { .opts, .opts[data-name=package], .opts[data-name=tier] { --n: 1; } }
.opt { position: relative; background: var(--bg); padding: 16px 18px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-height: 118px; transition: background .15s; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:hover { background: var(--panel); }
.opt:has(input:checked) { background: var(--text); color: #000; }
.opt:has(input:checked) .o-detail, .opt:has(input:checked) .o-price { color: #333; }
.opt:has(input:focus-visible) { outline: 1px solid var(--accent); outline-offset: -1px; }
.o-title { font-weight: 500; }
.o-detail { color: var(--muted); font-size: 13px; line-height: 1.4; }
.o-price { margin-top: auto; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
#l-weight-wrap { margin-top: 14px; max-width: 260px; }
#l-weight-wrap[hidden] { display: none; }

.summary { position: sticky; top: 80px; border: 1px solid var(--line-2); padding: 24px; display: flex; flex-direction: column; gap: 14px; background: var(--panel); }
.sum-name { margin: 0; font-weight: 500; line-height: 1.35; }
.sum-price { margin: 4px 0; font-size: 48px; line-height: 1; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sum-price small { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 8px; letter-spacing: 0; }
.sum-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.sum-list li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; }
.sum-list li b { color: var(--text); font-weight: 400; text-align: right; }
.agree { display: flex; gap: 10px; font-size: 13px; color: var(--muted); align-items: flex-start; cursor: pointer; }
.agree input { margin-top: 3px; accent-color: var(--accent); }
.fine:empty { display: none; }

.matrix-wrap { margin-top: 64px; overflow-x: auto; }
.matrix { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 640px; }
.matrix th, .matrix td { text-align: left; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); font-weight: 400; vertical-align: top; }
.matrix thead th { color: var(--muted); font-size: 13px; }
.matrix th small, .matrix td small { display: block; color: var(--muted); font-size: 12px; }
.terms-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 56px; }
.terms-grid p, .terms-grid li { color: var(--muted); font-size: 14px; }
.terms-grid ul { margin: 0; padding-left: 18px; }
.terms-grid li { margin-bottom: 6px; }
@media (max-width: 900px) { .terms-grid { grid-template-columns: 1fr; } }

/* faq ----------------------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { padding: 20px 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 0 0 22px; color: var(--muted); max-width: 46em; }

.foot { max-width: var(--max); margin: 0 auto; padding: 40px var(--pad) 56px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; color: var(--dim); font-size: 13px; }
.foot p { margin: 0; }
.foot a { margin-left: 18px; text-decoration: none; }
.foot a:hover { color: var(--text); }

/* licence download page ----------------------------------------------------------------- */
.portal { max-width: 760px; margin: 0 auto; padding: clamp(56px, 10vw, 120px) var(--pad); }
.portal h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 400; letter-spacing: -0.03em; margin: 0 0 24px; line-height: 1; }
.portal .card { border: 1px solid var(--line-2); padding: 24px; margin-top: 28px; display: flex; flex-direction: column; gap: 14px; background: var(--panel); }
.portal .muted { color: var(--muted); }
.field { background: transparent; border: 1px solid var(--line-2); padding: 10px 12px; font-size: 15px; color: var(--text); border-radius: 0; width: 100%; }
.field:focus { outline: 1px solid var(--accent); outline-offset: -1px; }
#p-pay { margin-top: 24px; }

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