/*
  yourpbx.uk shared stylesheet. Source: site-src/site.css. The build
  (node site-src/build.mjs) copies it to site/assets/site.<hash>.css, so a
  change gets a new filename and the year-long cache in _headers is safe.

  Committed to one visual world rather than following the viewer's theme.
  The product is dark-first and the identity is violet on ink; a light
  version would be a different brand, not the same one politely inverted.

  Nothing external. _headers keeps the CSP at default-src 'self', so there
  are no webfonts, no analytics and no scripts - the type is a system stack
  and the mark is inline SVG.
*/
:root {
  --ink: #14121C;
  --panel: #1E1B29;
  --line: rgba(255,255,255,.09);
  --text: #ECE9F5;
  --dim: #A8A2BC;
  --faint: #8A84A0;  /* was #7C7690 (4.3:1 on ink); this passes AA for small text */
  --violet: #7C3AED;
  --violet-up: #A855F7;
  --wash: rgba(124,58,237,.13);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --step: clamp(1.1rem, .7rem + 1.6vw, 1.8rem);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--ink); color: var(--text);
  font-family: var(--sans); line-height: 1.6; -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 var(--step); }
.wrap.narrow { max-width: 760px; }
a { color: var(--violet-up); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; max-width: 62ch; }
a:focus-visible, input:focus-visible, select:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--violet-up); outline-offset: 2px;
}

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 10;
  background: var(--violet); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 8px; }

.eyebrow {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--violet-up); font-weight: 600;
}

/* ---------- header and navigation (no script: <details> on narrow screens) ---------- */
/* Stays at the top while the page scrolls. Translucent ink with a blur so
   content passing underneath does not fight the links. No script needed. */
.site-head {
  position: sticky; top: 0; z-index: 20; padding: 14px 0;
  background: rgba(20,18,28,.86); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
/* In-page links (#enquire, /features#routing) land below the bar, not under it. */
[id] { scroll-margin-top: 84px; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.brand svg { width: 34px; height: 34px; color: var(--violet-up); display: block; }
.brand .name { font-size: 1.3rem; font-weight: 740; letter-spacing: -.035em; }
.brand .name span { color: var(--violet-up); }

.nav-wide { display: flex; align-items: center; gap: 4px; }
.nav-wide a:not(.btn), .nav-menu a:not(.btn) {
  color: var(--dim); text-decoration: none; font-size: .9rem; font-weight: 560;
  padding: 8px 10px; border-radius: 8px;
}
.nav-wide a:not(.btn):hover, .nav-menu a:not(.btn):hover { color: var(--text); }
.nav-wide a[aria-current="page"], .nav-menu a[aria-current="page"] {
  color: var(--text); text-decoration: underline; text-decoration-color: var(--violet-up);
  text-decoration-thickness: 2px; text-underline-offset: 7px;
}
.nav-wide .btn { margin-left: 10px; padding: 9px 16px; font-size: .88rem; }

.nav-menu { display: none; position: relative; }
.nav-menu summary {
  list-style: none; cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--text);
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 14px;
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu[open] summary { border-color: var(--violet-up); }
.nav-menu .panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 5; min-width: 230px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px; display: grid; gap: 2px; box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
.nav-menu .panel .btn { margin-top: 8px; text-align: center; }
.nav-wide a, .site-head .btn { white-space: nowrap; }
/* Tighter between ~700 and 960px so the full bar stays across the top on a
   narrow window or a zoomed laptop screen; "Menu" only below that (James,
   17 Nov 2026: the links had gone into the menu on his screen). */
@media (max-width: 960px) {
  .site-head .wrap { gap: 10px; }
  .nav-wide { gap: 0; }
  .nav-wide a:not(.btn) { padding: 8px 7px; font-size: .86rem; }
  .site-head .btn { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 700px) {
  .nav-wide { display: none; }
  .nav-menu { display: block; }
}

/* ---------- page heads ---------- */
.hero { padding: clamp(44px, 9vw, 92px) 0 clamp(36px, 6vw, 60px); display: grid; gap: 24px; }
.hero h1 {
  font-size: clamp(2.1rem, 1.1rem + 4.4vw, 4rem); font-weight: 760;
  letter-spacing: -.04em; line-height: 1.03; max-width: 17ch;
}
.hero h1 em { font-style: normal; color: var(--violet-up); }
.hero .sub { font-size: clamp(1.02rem, .95rem + .5vw, 1.24rem); color: var(--dim); }
.hero .aside { font-size: .9rem; color: var(--dim); }

.page-head { padding: clamp(36px, 7vw, 72px) 0 clamp(34px, 5vw, 54px); display: grid; gap: 20px; }
.page-head h1 {
  font-size: clamp(1.9rem, 1.1rem + 3.2vw, 3.1rem); font-weight: 750;
  letter-spacing: -.035em; line-height: 1.07; max-width: 22ch;
}
.page-head .sub { font-size: clamp(1rem, .95rem + .35vw, 1.15rem); color: var(--dim); }
.page-head .sub + .sub { margin-top: -6px; }
.crumbs { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--faint); }
.crumbs a { color: var(--faint); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current="page"] { color: var(--violet-up); font-weight: 600; }
.updated { font-family: var(--mono); font-size: .74rem; color: var(--faint); }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px; font-weight: 640;
  font-size: .95rem; text-decoration: none; border: 1px solid transparent;
}
.btn-primary { background: var(--violet); color: #fff; }
.btn-primary:hover { background: var(--violet-up); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--violet-up); color: var(--violet-up); }

.status {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--wash);
  font-size: .82rem; color: var(--dim); width: fit-content;
}
.status i {
  width: 8px; height: 8px; border-radius: 50%; background: #34D399; display: block;
  box-shadow: 0 0 0 3px rgba(52,211,153,.18);
}

/* ---------- sections ---------- */
section { padding: clamp(46px, 7vw, 82px) 0; border-top: 1px solid var(--line); }
.sec-head { display: grid; gap: 10px; margin-bottom: 30px; }
.sec-head:last-child { margin-bottom: 0; }
.sec-head h2 { font-size: clamp(1.4rem, 1.1rem + 1.3vw, 2rem); font-weight: 720; letter-spacing: -.03em; }
.sec-head p { color: var(--dim); }
.sec-foot { margin-top: 26px; color: var(--dim); font-size: .95rem; }
.sec-foot p + p { margin-top: 10px; }

.groups { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }
.group {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px; display: grid; gap: 14px; align-content: start;
}
.group h3 {
  font-size: .76rem; font-family: var(--mono); letter-spacing: .12em;
  text-transform: uppercase; color: var(--violet-up); font-weight: 600;
}
.group ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.group li { display: grid; gap: 3px; }
.group b { font-weight: 620; font-size: .93rem; }
.group span { color: var(--dim); font-size: .86rem; line-height: 1.5; }
.group .more { font-size: .86rem; font-weight: 600; text-decoration: none; }
.group .more:hover { text-decoration: underline; }

/* Cards with a real sentence-case H3 and a paragraph. */
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cards.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px; display: grid; gap: 10px; align-content: start;
}
.card h3, .card .card-h { font-size: 1.04rem; font-weight: 680; letter-spacing: -.015em; }
.card p { color: var(--dim); font-size: .93rem; }

/* Numbered steps (/how-it-works). */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.steps > li {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px;
  display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; counter-increment: step;
}
.steps > li::before {
  content: counter(step, decimal-leading-zero); grid-row: span 2;
  font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; color: var(--violet-up); font-weight: 600; padding-top: 4px;
}
.steps h2 { font-size: 1.12rem; font-weight: 690; letter-spacing: -.02em; }
.steps p { color: var(--dim); font-size: .95rem; }

/* Plain lists inside sections. */
.list { margin: 0; padding-left: 1.15rem; display: grid; gap: 8px; color: var(--dim); max-width: 66ch; }
.list b { color: var(--text); font-weight: 620; }
ol.list { padding-left: 1.4rem; }

/* Long-form reading (privacy, terms, the PSTN guide). */
.prose { max-width: 70ch; }
.prose h2 { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.45rem); font-weight: 700; letter-spacing: -.02em; margin-top: 44px; }
.prose h3 { font-size: 1.04rem; font-weight: 680; letter-spacing: -.01em; margin-top: 26px; }
.prose p, .prose li { color: var(--dim); }
.prose p { margin: 12px 0 0; max-width: none; }
.prose ul, .prose ol { margin: 12px 0 0; padding-left: 1.15rem; display: grid; gap: 7px; }
.prose strong { color: var(--text); font-weight: 620; }
.prose > :first-child { margin-top: 0; }
.prose .cta-row { margin-top: 18px; }
.legal { padding-bottom: 70px; }
.legal h2 { font-size: 1.08rem; font-weight: 690; margin-top: 38px; }

.callout { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-top: 22px; }
.callout p:first-child { margin-top: 0; }
.callout.lead { margin-top: 0; }
.callout.lead p { color: var(--text); }

table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: .92rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--dim); }
th { color: var(--faint); font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }

.sources { font-size: .84rem; }
.sources li { color: var(--dim); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 780px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 20px; display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--violet-up); font-size: 1.05rem; }
.faq details[open] summary::after { content: "\2212"; }
.faq summary h3 { font-size: 1rem; font-weight: 640; letter-spacing: -.01em; }
.faq .answer { padding: 0 20px 18px; color: var(--dim); font-size: .95rem; }
.faq .answer p + p { margin-top: 10px; }
.faq-group + .faq-group { margin-top: 38px; }
.faq-group > h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 14px; }

/* ---------- forms ---------- */
.form-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: clamp(22px, 4vw, 34px);
}
.form-card > .sec-head { margin-bottom: 0; }
.form-card .cta-row { margin-top: 20px; }
form { display: grid; gap: 15px; margin-top: 22px; }
.row { display: grid; gap: 15px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
label { display: grid; gap: 6px; font-size: .84rem; color: var(--dim); font-weight: 560; }
label .opt { color: var(--faint); font-weight: 400; }
input, select {
  font: inherit; font-size: .94rem; color: var(--text); background: var(--ink);
  border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; width: 100%;
}
.form-note { font-size: .8rem; color: var(--dim); margin-top: 2px; }
button[type="submit"] {
  justify-self: start; padding: 12px 26px; border-radius: 10px; border: 0;
  background: var(--violet); color: #fff; font-weight: 640; font-size: .95rem; cursor: pointer;
}
button[type="submit"]:hover { background: var(--violet-up); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 404 ---------- */
.lost { padding: clamp(40px, 8vw, 90px) 0; display: grid; gap: 18px; }
.lost h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.7rem); font-weight: 750; letter-spacing: -.035em; line-height: 1.08; }
.lost p { color: var(--dim); }
.lost ul { margin: 0; padding-left: 1.15rem; display: grid; gap: 6px; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 44px 0 46px; color: var(--faint); font-size: .86rem; }
.foot-grid { display: grid; gap: 30px; grid-template-columns: 1.4fr repeat(3, 1fr); }
.foot-brand { display: grid; gap: 12px; align-content: start; }
.foot-brand .brand svg { width: 28px; height: 28px; }
.foot-brand .brand .name { font-size: 1.1rem; }
.foot-brand p { color: var(--dim); font-size: .86rem; max-width: 34ch; }
.site-foot h2 { font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin-bottom: 12px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-foot a { color: var(--dim); text-decoration: none; }
.site-foot a:hover { color: var(--text); text-decoration: underline; }
.site-foot .legal-line { max-width: none; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
