/* ==========================================================================
   networkcabling.au — site styles
   tokens.css (next to this file) is THE brand source of truth — the only
   copy, deployed with the site. Every colour below comes from a token.
   ========================================================================== */
@import url("tokens.css");

*, *::before, *::after { box-sizing: border-box }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100% }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text-body);
  font: var(--step-0)/1.65 var(--font-body);
  font-synthesis-weight: none;
}
img, svg { max-width: 100%; height: auto; display: block }
a { color: var(--brand-text); text-underline-offset: .18em; text-decoration-thickness: 1px }
a:hover { color: var(--blue-600) }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-strong);
  line-height: 1.15;
  letter-spacing: -0.022em;
  margin: 0 0 var(--s-3);
  text-wrap: balance;
}
h1 { font-size: var(--step-4); font-weight: 800 }
h2 { font-size: var(--step-3); font-weight: 750; margin-top: var(--s-7) }
h3 { font-size: var(--step-1); font-weight: 700; margin-top: var(--s-5) }
p  { margin: 0 0 var(--s-3); max-width: 68ch }
ul, ol { max-width: 68ch }
strong { color: var(--text-strong); font-weight: 650 }

:focus-visible {
  outline: 3px solid var(--blue-400);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto }
.lede { font-size: var(--step-1); color: var(--ink-500); max-width: 60ch }
.eyebrow {
  font: 650 var(--step--1)/1 var(--font-mono);
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--copper-text);
  margin: 0 0 var(--s-2);
}
.skip {
  position: absolute; left: -9999px;
  background: var(--ink-900); color: var(--white);
  padding: var(--s-2) var(--s-3); border-radius: var(--radius);
}
.skip:focus { left: var(--s-3); top: var(--s-3); z-index: 99 }

/* --- header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247,249,251,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink-100);
}
.site-header .wrap {
  display: flex; align-items: center; gap: var(--s-4);
  min-height: 68px;
}
.brand {
  font: 800 var(--step-1)/1 var(--font-display);
  color: var(--text-strong); text-decoration: none;
  letter-spacing: -.03em; margin-right: auto;
}
.brand span { color: var(--brand-text) }
.nav { display: flex; gap: var(--s-4); align-items: center }
.nav a { color: var(--ink-500); text-decoration: none; font-weight: 550 }
.nav a:hover { color: var(--text-strong) }

/* ---- primary menu ------------------------------------------------------
   CSS-only. Desktop: hover + :focus-within dropdowns (keyboard reaches them).
   Mobile: checkbox hamburger reveals every group stacked - no nested tapping.
   Replaces a rule that hid .nav under 860px with nothing to take its place. */
.navcb { position: absolute; opacity: 0; pointer-events: none }
.navburger { display: none }
.menu { display: flex; gap: var(--s-4); align-items: center; list-style: none; margin: 0; padding: 0 }
.m-item { position: relative }
.m-top { display: inline-flex; align-items: center; gap: .35em; padding: .5rem 0 }
.m-top::after {
  content: ""; width: .34em; height: .34em; margin-top: -.2em;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); opacity: .55;
}
.m-sub {
  position: absolute; top: 100%; left: 50%; translate: -50% 0;
  min-width: 15rem; padding: var(--s-2); margin: 0; list-style: none;
  background: var(--surface, #fff); border: 1px solid var(--ink-100);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(11,16,21,.13);
  opacity: 0; visibility: hidden; translate: -50% 6px;
  transition: opacity .14s ease, translate .14s ease, visibility .14s;
  z-index: 50;
}
.m-item:hover > .m-sub, .m-item:focus-within > .m-sub {
  opacity: 1; visibility: visible; translate: -50% 0;
}
.m-sub a {
  display: block; padding: .5rem .7rem; border-radius: 8px;
  font-weight: 500; font-size: var(--step--1); white-space: nowrap;
}
.m-sub a:hover, .m-sub a:focus-visible { background: var(--ink-050); color: var(--text-strong) }
.menu a[aria-current="page"] { color: var(--text-strong); font-weight: 700 }

@media (max-width: 860px) {
  .navburger {
    display: inline-flex; align-items: center; gap: .5em; cursor: pointer;
    font-weight: 650; color: var(--ink-500); padding: .5rem 0;
  }
  .navburger > span {
    width: 1.1rem; height: 2px; background: currentColor; position: relative;
  }
  .navburger > span::before, .navburger > span::after {
    content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: currentColor;
  }
  .navburger > span::before { top: -6px } .navburger > span::after { top: 6px }
  .nav { position: static }
  .menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--s-3) var(--s-4) var(--s-5);
    background: var(--paper); border-bottom: 1px solid var(--ink-100);
    box-shadow: 0 16px 32px rgba(11,16,21,.12);
    max-height: 78vh; overflow-y: auto;
  }
  .navcb:checked ~ .menu { display: flex }
  .m-top {
    font: 650 var(--step--1)/1 var(--font-mono);
    letter-spacing: .10em; text-transform: uppercase;
    color: var(--ink-400); padding: var(--s-3) 0 var(--s-1);
  }
  .m-top::after { display: none }
  .m-sub {
    position: static; opacity: 1; visibility: visible; translate: none;
    min-width: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none;
    background: none; transition: none;
  }
  .m-sub a { padding: .45rem 0; white-space: normal }
  .m-sub a:hover { background: none }
}
@media (prefers-reduced-motion: reduce) { .m-sub { transition: none } }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; min-height: 48px; padding: 0 var(--s-4);
  border-radius: var(--radius); border: 1px solid transparent;
  font: 650 var(--step-0)/1 var(--font-display);
  text-decoration: none; cursor: pointer;
  transition: transform var(--m-ui) var(--e-ui), background var(--m-ui) var(--e-ui);
}
.btn-primary { background: var(--blue-500); color: var(--white) }
.btn-primary:hover { background: var(--blue-600); color: var(--white); transform: translateY(-1px) }
.btn-ghost { border-color: var(--ink-100); background: var(--white); color: var(--text-strong) }
.btn-ghost:hover { border-color: var(--ink-300); color: var(--text-strong) }
.btn-lg { min-height: 56px; padding: 0 var(--s-5); font-size: var(--step-1) }

/* --- hero --------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(70% 120% at 88% 8%, rgba(11,120,232,.16), transparent 60%),
    radial-gradient(50% 100% at 4% 96%, rgba(194,94,26,.12), transparent 62%),
    var(--ink-900);
  color: var(--text-on-dark);
  padding: var(--s-8) 0 var(--s-7);
  overflow: hidden;
}
.hero h1 { color: var(--white); max-width: 16ch }
.hero .eyebrow { color: var(--copper-300) }
.hero-grid {
  display: grid; gap: var(--s-6);
  grid-template-columns: 1.05fr .95fr; align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr } }
.hero-lede { font-size: var(--step-1); color: var(--ink-200); max-width: 52ch }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5) }
.hero-visual { animation: rise-in var(--m-snap) var(--e-snap) both }

.cred-strip {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  margin-top: var(--s-5); padding-top: var(--s-4);
  border-top: 1px solid var(--ink-700);
  font: 550 var(--step--1)/1.4 var(--font-mono);
  color: var(--ink-300);
}
.cred-strip b { color: var(--copper-300); font-weight: 650 }

/* --- sections ----------------------------------------------------------- */
section { padding: var(--s-7) 0 }
section > .wrap > h2:first-child { margin-top: 0 }
.section-dark { background: var(--ink-900); color: var(--text-on-dark) }
.section-dark h2, .section-dark h3 { color: var(--white) }
.section-dark a { color: var(--blue-300) }
.section-tint { background: var(--ink-050) }

/* --- table of contents -------------------------------------------------- */
.toc {
  background: var(--white); border: 1px solid var(--ink-100);
  border-left: 3px solid var(--blue-400);
  border-radius: var(--radius); padding: var(--s-4) var(--s-5);
  margin: var(--s-5) 0; max-width: 62ch; box-shadow: var(--shadow-sm);
}
.toc h2 { font-size: var(--step-0); margin: 0 0 var(--s-2); text-transform: uppercase;
  letter-spacing: .08em; font-family: var(--font-mono); color: var(--ink-400) }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: var(--s-5) }
@media (max-width: 700px) { .toc ol { columns: 1 } }
.toc li { margin: .25rem 0; break-inside: avoid }
.toc a { color: var(--ink-500); text-decoration: none }
.toc a:hover { color: var(--brand-text); text-decoration: underline }

/* --- cards -------------------------------------------------------------- */
.grid { display: grid; gap: var(--s-4) }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)) }
.card {
  background: var(--white); border: 1px solid var(--ink-100);
  border-radius: var(--radius); padding: var(--s-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--m-ui) var(--e-ui), transform var(--m-ui) var(--e-ui);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px) }
.card h3 { margin-top: 0 }
.card p:last-child { margin-bottom: 0 }
.card-num {
  font: 700 var(--step--1)/1 var(--font-mono);
  color: var(--copper-text); display: block; margin-bottom: var(--s-2);
}
.section-dark .card {
  background: var(--ink-800); border-color: var(--ink-600); color: var(--ink-200);
}
.section-dark .card-num { color: var(--copper-300) }

/* --- spec table --------------------------------------------------------- */
.table-scroll { overflow-x: auto; margin: var(--s-4) 0 }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: var(--step-0) }
th, td { text-align: left; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--ink-100) }
th { font-family: var(--font-display); color: var(--text-strong); font-weight: 700;
     border-bottom-width: 2px; border-bottom-color: var(--ink-300) }
td code { font: var(--step--1) var(--font-mono); color: var(--copper-text) }

/* --- callout ------------------------------------------------------------ */
.note {
  border-left: 3px solid var(--copper-400);
  background: var(--white); border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--s-4) var(--s-5); margin: var(--s-5) 0;
  box-shadow: var(--shadow-sm);
}
.note p:last-child { margin-bottom: 0 }

/* --- FAQ ---------------------------------------------------------------- */
.faq details {
  border-bottom: 1px solid var(--ink-100);
  padding: var(--s-3) 0;
}
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: flex-start; gap: var(--s-3);
  min-height: 44px; padding: var(--s-1) 0;
}
.faq summary::-webkit-details-marker { display: none }
.faq summary h3 {
  display: inline; font: 650 var(--step-0)/1.45 var(--font-display);
  margin: 0; color: var(--text-strong);
}
.faq summary::after {
  content: "+"; margin-left: auto; flex: none;
  font: 400 var(--step-2)/0.8 var(--font-mono); color: var(--brand-text);
  transition: transform var(--m-ui) var(--e-ui);
}
.faq details[open] summary::after { transform: rotate(45deg) }
.faq details > *:not(summary) { padding-left: 0 }

/* --- quote form --------------------------------------------------------- */
.quote { background: var(--ink-900); color: var(--text-on-dark) }
.quote h2 { color: var(--white) }
.quote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6) }
@media (max-width: 900px) { .quote-grid { grid-template-columns: 1fr } }
.form-row { display: grid; gap: var(--s-1); margin-bottom: var(--s-3) }
label { font: 600 var(--step--1)/1.3 var(--font-display); color: var(--ink-200) }
input, select, textarea {
  font: var(--step-0) var(--font-body);
  padding: .75rem var(--s-3); min-height: 48px;
  border: 1px solid var(--ink-600); border-radius: var(--radius);
  background: var(--ink-800); color: var(--white); width: 100%;
}
textarea { min-height: 110px; resize: vertical }
input::placeholder, textarea::placeholder { color: var(--ink-400) }
input:focus, select:focus, textarea:focus { border-color: var(--blue-400) }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden }
.form-note { font-size: var(--step--1); color: var(--ink-300) }
.status { padding: var(--s-3); border-radius: var(--radius); margin-bottom: var(--s-4) }
.status-ok  { background: rgba(27,127,76,.15); border: 1px solid var(--ok); color: var(--white) }
.status-err { background: rgba(179,38,30,.15); border: 1px solid var(--err); color: var(--white) }

/* --- footer ------------------------------------------------------------- */
.site-footer {
  background: var(--ink-900); color: var(--ink-300);
  border-top: 1px solid var(--ink-700); padding: var(--s-6) 0 var(--s-5);
  font-size: var(--step--1);
}
.site-footer a { color: var(--ink-200); text-decoration: none }
.site-footer a:hover { color: var(--white); text-decoration: underline }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: var(--s-5) }
.footer-grid h3 { color: var(--white); font-size: var(--step-0); margin: 0 0 var(--s-2) }
.footer-grid ul { list-style: none; margin: 0; padding: 0 }
.footer-grid li { margin: .3rem 0 }
.legal { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--ink-700);
  color: var(--ink-400) }

/* --- call bar (mobile) -------------------------------------------------- */
.callbar {
  position: fixed; inset: auto 0 0 0; z-index: 50; display: none;
  background: var(--blue-500); color: var(--white);
  text-align: center; padding: var(--s-3); font: 700 var(--step-0) var(--font-display);
  text-decoration: none;
}
@media (max-width: 700px) {
  .callbar { display: block }
  body { padding-bottom: 60px }
}
