/*
 * The public face: the website and the door into the panel (sign-in, setup, errors).
 *
 * The look is taken from the equipment this product replaces. The page is the grey of
 * an anodised front panel, type is the DIN-style lettering engraved on one, and the one
 * loud thing is a test card — the picture a channel shows before it goes on air.
 * Everything else stays quiet so the card can be the thing people remember.
 *
 * Self-contained on purpose: it shares no rules with the panel's stylesheet, so a
 * change to one can never quietly restyle the other.
 */

:root {
  --metal:   #D9DCDD;   /* the front panel */
  --metal-2: #E8EAEB;   /* a raised plate on it */
  --ink:     #12161A;   /* engraving */
  --ink-2:   #46505A;   /* secondary engraving */
  --rule:    #AEB5BA;   /* scribed lines */
  --slab:    #12161A;   /* the dark plate in the middle of the signal path */
  --field:   #FFFFFF;   /* inside a text box */
  --edge:    #ffffff88; /* the light catching the top of the monitor's bezel */
  --amber:   #F0A01E;   /* the brand's lamp, shared with the panel */
  --lamp:    #17A35A;   /* on air */
  --fault:   #C0271C;   /* something is wrong */

  --display: "DIN Alternate", "Bahnschrift", "D-DIN", "Roboto Condensed", "Arial Narrow", sans-serif;
  --text:    "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* a 1.25 scale from a 16px base */
  --s-1: 13px; --s0: 16px; --s1: 20px; --s2: 25px; --s3: 31px; --s4: 39px; --s5: 49px; --s6: 61px;
}

/* Dark: chosen with the switch, or taken from the device when nothing is chosen. The
   test card, the lamps and the amber are the same in both; only the panel changes. */
:root[data-theme="dark"] {
  --metal:   #22272C;   /* the same panel, black-anodised */
  --metal-2: #2D343A;
  --ink:     #ECEFF1;
  --ink-2:   #A7B1B9;
  --rule:    #48525A;
  --slab:    #000000;
  --field:   #14181B;
  --edge:    #ffffff14;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --metal:   #22272C;   /* the same panel, black-anodised */
    --metal-2: #2D343A;
    --ink:     #ECEFF1;
    --ink-2:   #A7B1B9;
    --rule:    #48525A;
    --slab:    #000000;
    --field:   #14181B;
    --edge:    #ffffff14;
  }
}

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

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--metal); color: var(--ink);
  font: 400 var(--s0)/1.55 var(--text);
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
::selection { background: var(--amber); color: var(--ink); }

/* read by screen readers, not shown */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── the test card ───────────────────────────────────────────────────────────
   SMPTE bars at 75%, the castellation row beneath them, and the dark row a
   monitor is lined up against. Drawn in CSS so it is sharp at any size. */

.tc {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: #000; aspect-ratio: 16 / 9; border-radius: 6px;
  /* the bezel */
  border: 10px solid #000; box-shadow: 0 1px 0 var(--edge), 0 18px 40px -22px #000b;
}
.tc-bars {
  flex: 67 1 0;
  background: linear-gradient(90deg,
    #C0C0C0 0 14.2857%, #C0C000 0 28.5714%, #00C0C0 0 42.8571%, #00C000 0 57.1428%,
    #C000C0 0 71.4285%, #C00000 0 85.7142%, #0000C0 0);
}
.tc-cast {
  flex: 8 1 0;
  background: linear-gradient(90deg,
    #0000C0 0 14.2857%, #131313 0 28.5714%, #C000C0 0 42.8571%, #131313 0 57.1428%,
    #00C0C0 0 71.4285%, #131313 0 85.7142%, #C0C0C0 0);
}
.tc-pluge {
  flex: 25 1 0;
  background: linear-gradient(90deg,
    #00214C 0 17.8571%, #FFFFFF 0 35.7142%, #32006A 0 53.5714%, #131313 0 71.4285%,
    #090909 0 76.1904%, #131313 0 80.9523%, #1D1D1D 0 85.7142%, #131313 0);
}
/* the station ident, keyed over the middle of the bars as it would be on air */
.tc-ident {
  position: absolute; left: 50%; top: 33.5%; transform: translate(-50%, -50%);
  background: #000; color: #fff; text-align: center; white-space: nowrap;
  padding: .5em 1.1em .45em; font-family: var(--display); line-height: 1.05;
}
.tc-ident b { display: block; font-weight: 700; font-size: clamp(20px, 3.4vw, 40px); letter-spacing: .04em; }
.tc-ident span {
  display: block; margin-top: .3em; font-size: clamp(13px, 1.7vw, 20px);
  font-variant-numeric: tabular-nums; letter-spacing: .06em; color: #D8D8D8;
}

/* the brand mark is the same seven bars, very small */
.mark {
  display: inline-block; width: 26px; height: 16px; border-radius: 2px; flex: none;
  background: linear-gradient(90deg,
    #C0C0C0 0 14.2857%, #C0C000 0 28.5714%, #00C0C0 0 42.8571%, #00C000 0 57.1428%,
    #C000C0 0 71.4285%, #C00000 0 85.7142%, #0000C0 0);
  box-shadow: 0 0 0 2px #000;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  font: 700 var(--s2)/1 var(--display); letter-spacing: .01em;
}

/* ── buttons and fields, shared by the site and the door ─────────────────── */

.vbtn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px; border-radius: 3px; cursor: pointer;
  font: 600 var(--s0)/1 var(--text); text-decoration: none;
  background: transparent; color: var(--ink); border: 2px solid var(--ink);
}
.vbtn:hover { background: var(--ink); color: var(--metal); }
.vbtn.go { background: var(--amber); color: #12161A; border-color: var(--ink); }
.vbtn.go:hover { background: var(--ink); color: var(--amber); }
.vbtn.wide { width: 100%; }

/* ══ the website ═════════════════════════════════════════════════════════ */

.vs { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

.vs-nav { display: flex; align-items: center; gap: 28px; padding: 26px 0; }
.vs-nav .brand { margin-right: auto; }
.vs-nav .link { text-decoration: none; font: 600 15px/1.2 var(--text); color: inherit; background: none; border: 0; padding: 6px 0; cursor: pointer; }
.vs-nav .link:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.vs-nav .vbtn { min-height: 38px; padding: 0 16px; font-size: 15px; }

.vs-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px;
  align-items: center; padding: 44px 0 76px;
}
.vs-hero h1 {
  margin: 0; font: 700 var(--s6)/.98 var(--display); letter-spacing: -.012em;
  text-wrap: balance;
}
.vs-hero .small { margin: 0 0 18px; font: 600 var(--s0)/1.3 var(--display); color: var(--ink-2); }
.vs-hero .lede { margin: 26px 0 0; font-size: var(--s1); line-height: 1.5; max-width: 34em; color: var(--ink-2); }
.vs-hero ul { margin: 24px 0 0; padding: 0; list-style: none; max-width: 34em; }
.vs-hero li { position: relative; padding: 5px 0 5px 22px; }
.vs-hero li::before { content: ""; position: absolute; left: 0; top: .85em; width: 9px; height: 9px; background: var(--ink); }
.vs-hero .acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.vs-hero figure { margin: 0; }
.vs-hero figcaption { margin-top: 14px; font-size: 14px; color: var(--ink-2); }

.vs-sec { padding: 68px 0; border-top: 2px solid var(--ink); }
.vs-sec > h2 { margin: 0; font: 700 var(--s4)/1.05 var(--display); letter-spacing: -.005em; }
.vs-sec > .sub { margin: 14px 0 0; max-width: 38em; font-size: var(--s1); line-height: 1.45; color: var(--ink-2); }

/* the signal path: what comes in, what is done to it, what goes out */
.vs-path {
  display: grid; grid-template-columns: 1fr 1.25fr 1fr; margin-top: 44px;
  border: 2px solid var(--ink); border-radius: 4px; background: var(--metal-2);
}
.vs-path > div { padding: 26px 28px 30px; }
.vs-path > div + div { border-left: 2px solid var(--ink); }
.vs-path h3 { margin: 0 0 14px; font: 700 var(--s2)/1.1 var(--display); }
.vs-path ul { margin: 0; padding: 0; list-style: none; }
.vs-path li { padding: 9px 0; border-top: 1px solid var(--rule); font-size: 15.5px; line-height: 1.35; }
.vs-path .mid { background: var(--slab); color: #F1F3F4; }
.vs-path .mid li { border-top-color: #3A444D; }
.vs-path .mid h3 { color: var(--amber); }

/* features as a specification sheet: name on the left, plain description on the right */
.vs-spec { margin: 40px 0 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; }
.vs-spec > div { display: grid; grid-template-columns: 11.5em 1fr; gap: 18px; padding: 18px 0; border-top: 1px solid var(--rule); }
.vs-spec dt { font: 700 var(--s1)/1.2 var(--display); }
.vs-spec dd { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }

/* pricing as one table, because the question is always "what is the difference" */
.vs-price { margin-top: 40px; overflow-x: auto; }
.vs-price table { width: 100%; min-width: 640px; border-collapse: collapse; }
.vs-price th, .vs-price td { text-align: left; padding: 15px 18px; border-top: 1px solid var(--rule); vertical-align: top; font-size: 15.5px; }
.vs-price thead th { border-top: 0; padding-bottom: 22px; width: 25%; }
.vs-price thead th:first-child { width: auto; }
.vs-price .plan { display: block; font: 700 var(--s2)/1.1 var(--display); }
.vs-price .cost { display: block; margin-top: 8px; font: 700 var(--s4)/1 var(--display); font-variant-numeric: tabular-nums; }
.vs-price .cost small { font: 400 15px/1 var(--text); color: var(--ink-2); }
.vs-price tbody th { font-weight: 600; color: var(--ink-2); }
.vs-price .pick { background: var(--metal-2); box-shadow: inset 2px 0 0 var(--ink), inset -2px 0 0 var(--ink); }
.vs-price thead .pick { box-shadow: inset 2px 0 0 var(--ink), inset -2px 0 0 var(--ink), inset 0 2px 0 var(--ink); border-radius: 4px 4px 0 0; }
.vs-price tfoot .pick { box-shadow: inset 2px 0 0 var(--ink), inset -2px 0 0 var(--ink), inset 0 -2px 0 var(--ink); }
.vs-price tfoot td { padding-top: 22px; padding-bottom: 22px; }
.vs-price .yes::before { content: ""; display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--lamp); margin-right: 9px; }
.vs-price .no { color: var(--ink-2); }

/* the same plans, stacked: shown instead of the table on a narrow screen */
.vs-plans { display: none; margin-top: 32px; gap: 18px; }
.vs-plan { border: 2px solid var(--ink); border-radius: 4px; padding: 22px 20px 20px; }
.vs-plan.pick { background: var(--metal-2); }
.vs-plan h3 { margin: 0; font: 700 var(--s2)/1.1 var(--display); }
.vs-plan .cost { margin: 6px 0 14px; font: 700 var(--s4)/1 var(--display); font-variant-numeric: tabular-nums; }
.vs-plan .cost small { font: 400 15px/1 var(--text); color: var(--ink-2); }
.vs-plan dl { margin: 0 0 18px; }
.vs-plan dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.vs-plan dt { color: var(--ink-2); font-weight: 600; }
.vs-plan dd { margin: 0; text-align: right; }
.vs-plan .yes::before { content: ""; display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--lamp); margin-right: 8px; }
.vs-plan .no { color: var(--ink-2); }

.vs-faq { margin-top: 34px; max-width: 46em; }
.vs-faq details { border-top: 1px solid var(--rule); }
.vs-faq details:last-child { border-bottom: 1px solid var(--rule); }
.vs-faq summary {
  cursor: pointer; list-style: none; padding: 19px 44px 19px 0; position: relative;
  font: 700 var(--s1)/1.25 var(--display);
}
.vs-faq summary::-webkit-details-marker { display: none; }
.vs-faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px;
  border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
}
.vs-faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.vs-faq p { margin: 0 0 22px; max-width: 40em; color: var(--ink-2); }

/* the closing band: the same black as the monitor */
.vs-close { background: #000; color: #fff; margin-top: 8px; }
.vs-close .vs { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-top: 54px; padding-bottom: 54px; }
.vs-close h2 { margin: 0; font: 700 var(--s4)/1.05 var(--display); }
.vs-close p { margin: 10px 0 0; color: #C3C9CE; font-size: var(--s1); }
.vs-close .vbtn { border-color: var(--amber); }
.vs-close .vbtn.go:hover { background: #fff; color: #000; border-color: #fff; }

.vs-foot { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 26px 0 40px; font-size: 14px; color: var(--ink-2); }

@media (max-width: 900px) {
  :root { --s6: 44px; --s4: 31px; }
  .vs { padding: 0 20px; }
  .vs-nav { gap: 16px; flex-wrap: wrap; padding: 18px 0; }
  .vs-nav .link.opt { display: none; }
  .vs-hero { grid-template-columns: 1fr; gap: 36px; padding: 20px 0 52px; }
  .vs-hero figure { order: -1; }
  .vs-sec { padding: 48px 0; }
  .vs-path { grid-template-columns: 1fr; }
  .vs-path > div + div { border-left: 0; border-top: 2px solid var(--ink); }
  .vs-spec { grid-template-columns: 1fr; }
  .vs-spec > div { grid-template-columns: 1fr; gap: 6px; }
}

/* a tablet held upright keeps the three-part signal path and the two-column sheet */
@media (min-width: 700px) and (max-width: 900px) {
  .vs-path { grid-template-columns: 1fr 1.2fr 1fr; }
  .vs-path > div { padding: 22px 18px 24px; }
  .vs-path > div + div { border-top: 0; border-left: 2px solid var(--ink); }
}

@media (max-width: 720px) {
  .vs-price { display: none; }
  .vs-plans { display: grid; }
  .vs-close .vs { padding-top: 40px; padding-bottom: 40px; }
  .vs-close .vbtn { width: 100%; }
}

/* ══ the door: sign in, first-time setup, and anything that went wrong ═════ */

.door { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 11fr) minmax(360px, 9fr); }

/* the left half is the monitor itself, edge to edge */
.door-screen { background: #000; display: flex; align-items: center; justify-content: center; padding: 6vmin; }
.door-screen .tc { width: 100%; max-width: 760px; border-width: 0; border-radius: 0; box-shadow: none; }

.door-side { display: flex; flex-direction: column; padding: 34px clamp(28px, 6vw, 76px) 30px; }
.door-side .brand { align-self: flex-start; }
.door-body { margin: auto 0; padding: 40px 0; width: 100%; max-width: 380px; }
.door-foot { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 14px; color: var(--ink-2); }
.door-foot button { font: 600 14px/1 var(--text); color: var(--ink); background: none; border: 0; padding: 8px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.door-foot a { font-weight: 600; }

.door-body h1, .door-body h2 { margin: 0 0 8px; font: 700 var(--s4)/1.05 var(--display); }
.door-body .hint { margin: 0 0 26px; color: var(--ink-2); font-size: 15.5px; }
.door-body label { display: block; margin: 18px 0 7px; font-weight: 600; font-size: 15px; }
.door-body input[type=text], .door-body input[type=email], .door-body input[type=password] {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 3px;
  background: var(--field); color: var(--ink); border: 2px solid var(--ink);
  font: 400 var(--s0)/1 var(--text);
}
.door-body input:focus-visible { outline: 3px solid var(--amber); outline-offset: 0; }
.door-body .field-note { margin: 7px 0 0; font-size: 14px; color: var(--ink-2); }
.door-body .send { margin-top: 28px; }

.door-msg { margin: 0 0 22px; padding: 13px 16px 13px 44px; position: relative; border-radius: 3px; background: var(--metal-2); border: 2px solid var(--ink); font-size: 15px; }
.door-msg::before { content: ""; position: absolute; left: 16px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--lamp); }
.door-msg.err::before { background: var(--fault); }

.door-code { font: 700 var(--s6)/1 var(--display); font-variant-numeric: tabular-nums; margin: 0 0 6px; }

@media (max-width: 860px) {
  .door { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .door-screen { padding: 0; }
  .door-screen .tc { aspect-ratio: 16 / 5; }
  .door-screen .tc-ident { top: 33.5%; }
  .door-side { padding: 26px 22px; }
  .door-body { padding: 30px 0; margin: 0; }
}

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

/* ══ central site additions ══════════════════════════════════════════════ */

/* plans come from the database, so they are cards at every width, not a fixed table */
.vs-plans.live { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-top: 40px; }
.vs-plans.live .vs-plan { display: flex; flex-direction: column; }
.vs-plans.live .also { margin: -6px 0 16px; color: var(--ink-2); font-size: 15px; }
.vs-plans.live ul { margin: 0 0 22px; padding: 0; list-style: none; flex: 1; }
.vs-plans.live li { padding: 9px 0; border-top: 1px solid var(--rule); font-size: 15.5px; }

/* the four steps from order to a running server: a real sequence, so it is numbered */
.vs-steps { margin: 40px 0 0; padding: 0; list-style: none; counter-reset: st; display: grid; grid-template-columns: repeat(4, 1fr); border: 2px solid var(--ink); border-radius: 4px; }
.vs-steps li { counter-increment: st; padding: 22px 22px 26px; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.vs-steps li + li { border-left: 2px solid var(--ink); }
.vs-steps li::before { content: counter(st); display: block; font: 700 var(--s4)/1 var(--display); color: var(--ink); margin-bottom: 14px; }
.vs-steps b { display: block; font: 700 var(--s1)/1.2 var(--display); color: var(--ink); margin-bottom: 6px; }
.vs-cmd { margin: 28px 0 0; padding: 18px 20px; background: #000; color: #E8EAEB; border-radius: 4px; font: 15px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; overflow-x: auto; white-space: nowrap; }
.vs-cmd i { font-style: normal; color: var(--amber); }
@media (max-width: 900px) {
  .vs-steps { grid-template-columns: 1fr 1fr; }
  .vs-steps li:nth-child(3) { border-left: 0; }
  .vs-steps li:nth-child(n+3) { border-top: 2px solid var(--ink); }
}
@media (max-width: 560px) {
  .vs-steps { grid-template-columns: 1fr; }
  .vs-steps li + li { border-left: 0; border-top: 2px solid var(--ink); }
}

/* the door on this site shows the name, not a test card */
.door-name { color: #fff; padding: 8vw; width: 100%; }
.door-name b { display: block; font: 700 clamp(40px, 6.4vw, 92px)/.95 var(--display); letter-spacing: -.02em; }
.door-name span { display: block; margin-top: 22px; max-width: 22em; color: #B9C0C5; font-size: var(--s1); line-height: 1.45; }
.door-name i { display: block; width: 72px; height: 6px; background: var(--amber); margin-bottom: 30px; }
.door-body .links { margin: 22px 0 0; font-size: 15px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.door-body .check { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-weight: 400; font-size: 15px; }
.door-body .check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--amber); flex: none; }
.door-body input.code { font: 600 26px/1 ui-monospace, Consolas, monospace; letter-spacing: .22em; text-align: center; }
/* this site's mark: one amber line under a dark plate, nothing to do with any one product */
.mark { width: 20px; height: 20px; border-radius: 3px; background: linear-gradient(#12161A 0 62%, var(--amber) 62% 78%, #12161A 78%); box-shadow: none; }
