/* Tonefield Networks — Microsoft-stack configuration for voice and contact-centre telecom providers */

:root {
  color-scheme: light;
  --paper: #faf6f5;
  --white: #ffffff;
  --ink: #241b22;
  --muted: #5f535b;
  --tone: #a8306b;
  --tone-deep: #7a2150;
  --tone-wash: #f7e7ee;
  --line: #e6dbdf;
  --line-strong: #b89aa6;
  --control: #8a7580;
  --alert: #96352f;
  --alert-wash: #fbecea;
  --flag: #6b4e00;
  --flag-wash: #fff4cc;
  --focus: #4a1030;

  --head: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --body: -apple-system, "Segoe UI", system-ui, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Consolas", monospace;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 1.02rem; line-height: 1.62; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; line-height: 1.2; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.15rem); font-weight: 400; }
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2.05rem); font-weight: 400; }
h3 { font-size: 1.3rem; font-weight: 700; }
h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; font-family: var(--body); }
p, ul, ol, dl { margin: 0 0 1em; }
a { color: var(--tone); text-underline-offset: 0.18em; }
a:hover { color: var(--tone-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.wrap { width: 100%; max-width: 70rem; margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 20; background: var(--ink); color: #fff; padding: 0.6rem 1rem; text-decoration: none; }
.skip-link:focus { top: 1rem; color: #fff; }
.pending { background: var(--flag-wash); color: var(--flag); border: 1px dashed #c9a93a; padding: 0.05em 0.35em; font-weight: 700; font-size: 0.92em; }

/* Header: thin rule, serif wordmark, no boxed nav-cta */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 2rem; padding: 1.1rem 0; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--head); font-size: 1.4rem; color: var(--ink); text-decoration: none; }
.brand svg { width: 1.7rem; height: 1.7rem; border-radius: 3px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1.3rem; font-size: 0.95rem; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 0.3rem 0; display: inline-block; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--tone); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--tone); }
.site-nav .nav-cta { color: var(--tone-deep); font-weight: 700; }

.btn { display: inline-block; background: var(--tone); color: #fff; font-family: var(--body); font-weight: 700; font-size: 1rem; text-decoration: none; padding: 0.68rem 1.25rem; border: 0; border-radius: 2px; cursor: pointer; transition: background-color 0.15s ease; }
.btn:hover { background: var(--tone-deep); color: #fff; }

/* Hero */
.hero { padding: clamp(2.5rem, 6vw, 4.25rem) 0 clamp(2rem, 5vw, 3rem); background: var(--white); border-bottom: 1px solid var(--line); }
.hero .kicker { font-size: 1rem; color: var(--tone-deep); font-weight: 700; }
.hero h1 { max-width: 40rem; margin-top: 0.4rem; }
.hero .lead { font-size: 1.13rem; max-width: 38rem; }
.hero .scope { font-size: 0.92rem; color: var(--muted); max-width: 38rem; margin: 1.1rem 0 0; font-style: italic; }
.tone-wave { margin-top: 2rem; background: var(--tone-wash); padding: 1.25rem clamp(1rem, 3vw, 1.75rem) 0.75rem; }
.tone-wave figcaption { font-size: 0.86rem; color: var(--muted); margin-top: 0.4rem; }
.tone-wave .line { stroke: var(--tone); stroke-width: 3; fill: none; }
.tone-wave .threshold { stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 5 5; }
.tone-wave .mark { fill: var(--alert); }
.tone-wave text { font-family: var(--body); font-size: 12.5px; fill: var(--muted); }

/* Sections */
.section { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lede { max-width: 40rem; color: var(--muted); font-size: 1.06rem; }

/* Fit: plain prose, no bullets or pills */
.fit-prose { max-width: 46rem; }
.fit-prose .fit-yes { font-size: 1.08rem; }
.fit-prose .fit-no { font-style: italic; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 0.5rem; }

/* Services: flat 3-up card grid */
.svc-grid { display: grid; gap: 1.5rem; margin-top: 2rem; }
.svc-card { background: var(--white); border: 1px solid var(--line); padding: 1.5rem clamp(1.1rem, 3vw, 1.5rem); display: flex; flex-direction: column; }
.svc-card .num { font-family: var(--head); font-size: 1rem; color: var(--tone); border: 1.5px solid var(--tone); border-radius: 50%; width: 1.9rem; height: 1.9rem; display: flex; align-items: center; justify-content: center; margin-bottom: 0.75rem; }
.svc-card h3 { margin-bottom: 0.2rem; }
.svc-card .stack { font-family: var(--mono); font-size: 0.78rem; color: var(--tone-deep); display: block; margin-bottom: 0.75rem; }
.svc-card .svc-intro { font-size: 0.97rem; }
.svc-card h4 { margin-top: 0.9rem; margin-bottom: 0.35rem; }
.svc-card ul { margin: 0; padding-left: 1.1rem; font-size: 0.94rem; }
.svc-card li { margin-bottom: 0.3rem; }
.svc-card li::marker { color: var(--tone); }
.svc-card p { margin: 0; font-size: 0.94rem; }
.svc-card .licence { margin-top: auto; padding-top: 0.9rem; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); font-style: italic; }
@media (min-width: 60rem) { .svc-grid { grid-template-columns: repeat(3, 1fr); } }

/* Before / during / after stepper */
.stepper { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.75rem; }
.stepper li { position: relative; }
.stepper .when { font-family: var(--body); font-weight: 700; color: var(--tone-deep); text-transform: uppercase; font-size: 0.82rem; letter-spacing: 0.08em; }
.stepper h3 { margin: 0.25rem 0 0.4rem; }
.stepper p { margin: 0 0 0.4rem; }
.stepper .via { font-size: 0.86rem; color: var(--muted); margin: 0; }
@media (min-width: 60rem) {
  .stepper { grid-template-columns: repeat(3, 1fr); gap: 0; }
  .stepper li { padding: 0 1.75rem; border-left: 1px solid var(--line); }
  .stepper li:first-child { border-left: 0; padding-left: 0; }
  .stepper li:last-child { padding-right: 0; }
}

/* Resource teaser */
.resource-teaser { background: var(--tone-wash); padding: clamp(1.5rem, 4vw, 2.25rem); }
.resource-teaser h2 { margin-bottom: 0.5rem; }
.resource-teaser .meta { font-family: var(--mono); font-size: 0.82rem; color: var(--tone-deep); text-transform: uppercase; letter-spacing: 0.06em; }

/* About: horizontal facts strip */
.about-copy { max-width: 42rem; }
.facts-strip { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 1.75rem; }
.facts-strip > div { background: var(--white); padding: 1rem 1.25rem; }
.facts-strip dt { font-family: var(--body); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 0.3rem; }
.facts-strip dd { margin: 0; font-size: 0.97rem; }
@media (min-width: 56rem) { .facts-strip { grid-template-columns: repeat(3, 1fr); } }

/* Contact: notices stacked above a full-width form */
.notice-row { display: grid; gap: 1.25rem; margin: 1.75rem 0 2rem; }
@media (min-width: 50rem) { .notice-row { grid-template-columns: 1fr 1fr; } }
.notice-box { padding: 1rem 1.2rem; border: 1px solid var(--line); background: var(--white); }
.notice-box.is-alert { border-left: 4px solid var(--alert); background: var(--alert-wash); border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.notice-box h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.notice-box.is-alert h3 { color: var(--alert); }
.notice-box p { margin: 0 0 0.4rem; font-size: 0.94rem; }
.notice-box p:last-child { margin-bottom: 0; }
.notice-box .mail { font-family: var(--mono); font-size: 0.93rem; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.enquiry-form { max-width: 42rem; background: var(--white); border: 1px solid var(--line); padding: 1.5rem clamp(1rem, 3vw, 2rem) 1.75rem; }
.enquiry-form h3 { margin-bottom: 0.2rem; }
.form-required-note { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.25rem; }
.field-row { display: grid; gap: 0 1.25rem; }
@media (min-width: 42rem) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-weight: 700; font-size: 1rem; margin-bottom: 0.3rem; }
.field .req { color: var(--alert); }
.field .optional { font-weight: 400; color: var(--muted); font-size: 0.88rem; }
.field-hint { font-size: 0.9rem; color: var(--muted); margin: -0.05rem 0 0.4rem; }
.field input, .field select, .field textarea { display: block; width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--control); border-radius: 2px; padding: 0.6rem 0.75rem; min-height: 2.9rem; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.field textarea { resize: vertical; min-height: 8.5rem; line-height: 1.5; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--tone); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--tone); }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 2.4rem; cursor: pointer; }
.select-wrap::after { content: ""; position: absolute; right: 0.95rem; top: 50%; width: 0.45rem; height: 0.45rem; border-right: 2px solid var(--tone); border-bottom: 2px solid var(--tone); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.field [aria-invalid="true"] { border: 2px solid var(--alert); padding: calc(0.6rem - 1px) calc(0.75rem - 1px); background: #fffafa; }
.field-error { color: var(--alert); font-size: 0.9rem; font-weight: 700; margin: 0.35rem 0 0; }
.field-error::before { content: "Error: "; }
.field-count { font-size: 0.8rem; color: var(--muted); text-align: right; margin: 0.25rem 0 0; }
.field-count.is-near { color: var(--alert); font-weight: 700; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.error-summary { border: 2px solid var(--alert); background: var(--alert-wash); padding: 0.85rem 1.05rem; margin-bottom: 1.3rem; }
.error-summary h4 { color: var(--alert); text-transform: none; letter-spacing: 0; font-size: 1rem; margin: 0 0 0.3rem; font-family: var(--body); font-weight: 700; }
.error-summary ul { margin: 0; padding-left: 1.2rem; }
.error-summary a { color: var(--alert); font-weight: 700; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.25rem; margin-top: 0.4rem; }
.form-actions .btn:disabled { background: var(--line-strong); color: var(--ink); cursor: not-allowed; }
.form-privacy { font-size: 0.88rem; color: var(--muted); margin: 0; }
.form-status:empty { display: none; }
.form-status { margin-top: 1.1rem; padding: 0.75rem 1rem; border-left: 4px solid var(--line-strong); background: var(--paper); font-size: 0.96rem; }
.form-status:focus { outline: none; }
.form-status:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.form-status.is-preview { border-left-color: #c9a93a; background: var(--flag-wash); color: var(--flag); }
.form-status.is-success { border-left-color: var(--tone); background: var(--tone-wash); color: var(--tone-deep); }
.form-status.is-error { border-left-color: var(--alert); background: var(--alert-wash); color: var(--alert); }
.form-noscript { border-left: 4px solid var(--line-strong); background: var(--white); padding: 0.75rem 1rem; margin-top: 1rem; }

/* Footer */
.site-footer { background: var(--ink); color: #e9dde2; padding: 2rem 0 1.75rem; font-size: 0.9rem; }
.site-footer a { color: #ecb8cf; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; gap: 1rem; }
.footer-top p { margin: 0; max-width: 46rem; }
.footer-top ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.footer-legal { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 1.5rem; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid #4a3942; font-size: 0.86rem; }
.footer-legal p { margin: 0; }
.footer-legal a[aria-current="page"] { color: #fff; }
.footer-legal .mail { font-family: var(--mono); }
@media (min-width: 56rem) { .footer-top { grid-template-columns: 1fr auto; } }
@media (max-width: 30rem) { .footer-legal { flex-direction: column; gap: 0.4rem; } }

/* Docs */
.doc { padding: clamp(2rem, 5vw, 3.5rem) 0 3.5rem; }
.doc-head { max-width: 48rem; margin-bottom: 1.75rem; }
.doc-meta { color: var(--muted); font-size: 0.95rem; }
.doc-body { max-width: 42rem; }
.doc-body h2 { font-size: 1.4rem; margin-top: 2rem; }
.doc-body ul { padding-left: 1.2rem; }
.summary { background: var(--tone-wash); padding: 1rem 1.2rem; margin-bottom: 1.5rem; }
.summary p:last-child { margin-bottom: 0; }

/* Call Quality Quick-Check tool */
.tool { max-width: 52rem; }
.tool-intro { max-width: 44rem; }
.tool-warn { background: var(--flag-wash); border-left: 4px solid #c9a93a; color: var(--flag); padding: 0.65rem 1rem; font-size: 0.93rem; max-width: 48rem; margin-bottom: 1.75rem; }
.tool-form { background: var(--white); border: 1px solid var(--line); padding: 1.5rem clamp(1rem, 3vw, 2rem); max-width: 40rem; }
.tool-form .field-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 36rem) { .tool-form .field-row { grid-template-columns: 1fr 1fr 1fr; } }
.tool-form label { display: block; font-weight: 700; margin-bottom: 0.3rem; font-size: 0.95rem; }
.tool-form .hint { display: block; font-weight: 400; color: var(--muted); font-size: 0.82rem; margin-top: 0.2rem; }
.tool-form input { width: 100%; font: inherit; padding: 0.55rem 0.7rem; border: 1px solid var(--control); border-radius: 2px; }
.tool-form input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--tone); }
.tool-form .btn { margin-top: 1.25rem; }
.tool-result { margin-top: 1.75rem; max-width: 40rem; }
.tool-result:empty { display: none; }
.result-card { border: 1px solid var(--line); border-top: 4px solid var(--tone); background: var(--white); padding: 1.1rem 1.3rem; }
.result-card h3 { margin-bottom: 0.6rem; }
.result-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-top: 1px solid var(--line); font-size: 0.95rem; }
.result-row:first-of-type { border-top: 0; }
.result-row .rating { font-weight: 700; }
.result-row .rating.good { color: #1d6a4e; }
.result-row .rating.fair { color: var(--flag); }
.result-row .rating.poor { color: var(--alert); }
.result-note { font-size: 0.92rem; color: var(--muted); margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.print-hint { color: var(--muted); font-size: 0.95rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; color: #000; font-size: 10pt; line-height: 1.4; }
  .skip-link, .site-nav, .print-hint, .no-print, .site-footer { display: none !important; }
  .site-header { border-bottom: 2px solid #000; }
  .site-header .wrap, .wrap { padding: 0; max-width: none; }
  a { color: #000; text-decoration: none; }
  .doc { padding: 5mm 0 0; }
  h1 { font-size: 20pt; }
}
