/* Joltcomm Electrical — site styles
   Tokens first; everything below uses them. */

:root {
  --ink: #14263b;
  --ink-soft: #425468;
  --paper: #f2f4f6;
  --white: #ffffff;
  --line: #d3dae1;
  --deep: #0e2a47;
  --deep-2: #17395c;
  --volt: #ffc20e;
  --volt-ink: #1c1600;
  --cable-blue: #1b5fa8;
  --copper: #b8643a;
  --ok: #2e7d4f;
  --danger: #b3261e;

  --font-head: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Public Sans", "Segoe UI", Roboto, Arial, sans-serif;

  --gutter: 20px;
  --maxw: 1160px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  padding-bottom: 72px; /* room for the mobile action bar */
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--cable-blue); text-underline-offset: 3px; }
a:hover { color: var(--deep); }
:focus-visible { outline: 3px solid var(--volt); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible, .site-footer :focus-visible { outline-color: var(--volt); }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--volt); color: var(--volt-ink); padding: 10px 16px; font-weight: 700;
}
.skip-link:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-stretch: 75%;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.005em;
  margin: 0 0 0.5em;
  color: inherit;
}
h1 { font-size: clamp(2.6rem, 7.2vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3rem); }
h3 { font-size: 1.55rem; line-height: 1.12; }
h4 { font-size: 1.2rem; }
p { margin: 0 0 1em; max-width: 62ch; }
.lead { font-size: 1.2rem; line-height: 1.55; color: var(--ink-soft); }
.on-dark .lead, .page-hero .lead { color: inherit; opacity: 0.88; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--deep); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand { min-width: 0; }
.brand-logo { width: auto; height: 44px; max-width: 220px; object-fit: contain; flex: 0 1 auto; min-width: 0; }
.brand-name { min-width: 0; }
.brand-logo-only .brand-logo { height: 52px; max-width: 260px; }
.brand-name { font-family: var(--font-head); font-stretch: 75%; font-weight: 900; font-size: 1.7rem; line-height: 1; letter-spacing: 0.01em; }
.brand-name small { display: block; font-family: var(--font-body); font-stretch: 100%; font-weight: 600; font-size: 0.7rem; letter-spacing: 0.04em; color: var(--ink-soft); margin-top: 2px; }

.nav-toggle {
  appearance: none; border: 2px solid var(--deep); background: var(--white); color: var(--deep);
  font: 700 0.95rem var(--font-body); padding: 8px 14px; border-radius: var(--radius); cursor: pointer;
}
.site-nav { display: none; }
.site-nav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--white); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px;
  box-shadow: 0 12px 24px rgba(14, 42, 71, 0.12);
}
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 12px 0; text-decoration: none; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--line); }
.site-nav a[aria-current="page"] { color: var(--cable-blue); }
.site-nav li:last-child a { margin-top: 14px; border: 0; }

@media (min-width: 1180px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open { display: block; position: static; padding: 0; border: 0; box-shadow: none; background: none; }
  .site-nav ul { display: flex; align-items: center; gap: 2px; }
  .site-nav a { padding: 8px 10px; border: 0; font-size: 0.9rem; border-radius: var(--radius); }
  .site-nav a:hover { background: var(--paper); }
  .site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--volt); border-radius: 0; }
  .site-nav li:last-child a { margin: 0 0 0 8px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px; border-radius: var(--radius);
  font: 700 1rem var(--font-body); text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-volt { background: var(--volt); color: var(--volt-ink); }
.btn-volt:hover { background: #ffd04a; color: var(--volt-ink); }
.btn-line { background: transparent; color: var(--deep); border-color: var(--deep); }
.btn-line:hover { background: var(--deep); color: var(--white); }
.on-dark .btn-line { color: var(--white); border-color: rgba(255, 255, 255, 0.7); }
.on-dark .btn-line:hover { background: var(--white); color: var(--deep); }
.site-nav .btn { color: var(--volt-ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------- Hero (home) ---------- */
.hero { background: var(--white); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-grid { display: grid; gap: 28px; padding-block: 44px 0; align-items: end; }
.hero-copy { padding-bottom: 44px; }
.hero h1 { color: var(--deep); }
.hero .lead { max-width: 34rem; }
.hero-art { align-self: end; max-width: 440px; width: 100%; margin-inline: auto; }
.hero-art svg { width: 100%; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 48px; padding-top: 64px; }
  .hero-copy { padding-bottom: 72px; }
}

/* void illustration (inline svg, themed through classes) */
.void .wall { fill: #e6ebf0; stroke: var(--ink); stroke-width: 3; }
.void .floor { fill: var(--deep); }
.void .win { fill: #cfe0f1; stroke: var(--ink); stroke-width: 3; }
.void .mull { stroke: var(--ink); stroke-width: 2; }
.void .chain, .void .tier, .void .drop { stroke: var(--ink); stroke-width: 3; fill: none; stroke-linecap: round; }
.void .bulb { fill: var(--volt); stroke: var(--ink); stroke-width: 2; }
.void .glow { fill: url(#voidGlow); }
.void .cone { fill: var(--volt); opacity: 0.16; }
.void .dl { fill: var(--ink); }
.void .person { fill: var(--deep); }
.void .dim { stroke: var(--cable-blue); stroke-width: 3; fill: none; }
.void .dimdash { stroke: var(--cable-blue); stroke-width: 2; stroke-dasharray: 6 6; opacity: 0.7; }
.void .dimtag { fill: var(--volt); stroke: var(--ink); stroke-width: 2.5; }
.void .dimtxt { font: 800 28px var(--font-head); font-stretch: 75%; fill: var(--volt-ink); }

/* ---------- Trust strip ---------- */
.trust { background: var(--deep); color: var(--white); }
.trust ul { list-style: none; margin: 0; padding: 18px 0; display: grid; gap: 10px 24px; grid-template-columns: 1fr; }
.trust li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: 0.97rem; line-height: 1.35; }
.trust svg { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--volt); }
@media (min-width: 640px) { .trust ul { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .trust ul { grid-template-columns: repeat(3, 1fr); padding: 22px 0; } }

/* ---------- Sections ---------- */
.section { padding-block: 64px; }
.section-tight { padding-block: 44px; }
.section-white { background: var(--white); }
.section-deep { background: var(--deep); color: var(--white); }
.section-head { margin-bottom: 32px; max-width: 46rem; }
.section-head h2 { margin-bottom: 0.3em; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }
.section-deep .section-head p { color: inherit; opacity: 0.85; }

/* trade columns: ruled, not boxed */
.trades { display: grid; gap: 36px; }
.trade { border-top: 8px solid var(--trade, var(--volt)); padding-top: 18px; }
.trade h3 { margin-bottom: 0.25em; }
.trade p { color: var(--ink-soft); }
.trade ul { margin: 0 0 18px; }
.trade-electrical { --trade: var(--volt); }
.trade-data { --trade: var(--cable-blue); }
.trade-air { --trade: var(--copper); }
@media (min-width: 860px) { .trades { grid-template-columns: repeat(3, 1fr); gap: 40px; } }

.tick-list { list-style: none; padding: 0; margin: 0 0 1.2em; }
.tick-list li { position: relative; padding: 6px 0 6px 28px; border-bottom: 1px solid var(--line); }
.tick-list li:last-child { border-bottom: 0; }
.tick-list li::before {
  content: ""; position: absolute; left: 2px; top: 13px; width: 11px; height: 6px;
  border-left: 3px solid var(--ok); border-bottom: 3px solid var(--ok); transform: rotate(-45deg);
}
.section-deep .tick-list li { border-color: rgba(255, 255, 255, 0.18); }
.section-deep .tick-list li::before { border-color: var(--volt); }
.cols-2 { columns: 1; }
@media (min-width: 700px) { .cols-2 { columns: 2; column-gap: 40px; } .cols-2 li { break-inside: avoid; } }

.text-link { font-weight: 700; }

/* split: text + optional photo */
.split { display: grid; gap: 32px; align-items: center; }
.split-media { grid-template-columns: 1fr; }
@media (min-width: 860px) { .split-media { grid-template-columns: 1.1fr 0.9fr; gap: 56px; } .split-media.flip > :first-child { order: 2; } }
.photo { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--line); }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo figcaption { padding: 8px 12px; font-size: 0.88rem; color: var(--ink-soft); background: var(--white); }
.photo-slot { aspect-ratio: 4 / 3; display: grid; place-items: center; text-align: center; padding: 20px; border: 3px dashed var(--ink-soft); color: var(--ink-soft); font-weight: 700; background: repeating-linear-gradient(45deg, transparent 0 14px, rgba(20, 38, 59, 0.05) 14px 28px); }
.photo-row { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 28px; }
@media (min-width: 640px) { .photo-row { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }

/* "also" list on home */
.also { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.also a { display: grid; gap: 4px 24px; padding: 20px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.also a:hover h3 { color: var(--cable-blue); }
.also h3 { margin: 0; }
.also p { margin: 0; color: var(--ink-soft); }
@media (min-width: 760px) { .also a { grid-template-columns: 16rem 1fr; align-items: baseline; } }

/* steps: a real sequence, so numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: 64px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -4px; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: var(--volt); color: var(--volt-ink);
  font: 800 1.5rem var(--font-head); font-stretch: 75%;
}
.steps h3 { font-size: 1.3rem; margin-bottom: 0.2em; }
.steps p { margin: 0; color: var(--ink-soft); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); gap: 32px; } }

.areas { display: grid; gap: 28px; }
.areas dl { margin: 0; display: grid; gap: 0; }
.areas dt { font-weight: 800; padding-top: 12px; }
.areas dd { margin: 0; padding: 2px 0 12px; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
@media (min-width: 860px) { .areas { grid-template-columns: 0.8fr 1.2fr; gap: 56px; } }

/* ---------- Interior page hero ---------- */
.page-hero { background: var(--deep); color: var(--white); padding-block: 52px 56px; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--page-accent, var(--volt)); }
.page-hero h1 { font-size: clamp(2.3rem, 6vw, 3.9rem); max-width: 18ch; }
.page-hero .lead { max-width: 40rem; }
.accent-electrical { --page-accent: var(--volt); }
.accent-data { --page-accent: #4c97e0; }
.accent-air { --page-accent: var(--copper); }
.accent-security { --page-accent: #8fa4b8; }
.accent-drone { --page-accent: var(--volt); }

.breadcrumb { font-size: 0.9rem; opacity: 0.8; margin-bottom: 14px; }
.breadcrumb a { color: inherit; }

/* two-column body for interior pages */
.content-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .content-grid { grid-template-columns: 2fr 1fr; gap: 64px; } }
.aside-box { border: 2px solid var(--ink); border-radius: var(--radius); padding: 22px; background: var(--white); align-self: start; }
.aside-box h3 { font-size: 1.35rem; }
.aside-box p { font-size: 0.97rem; color: var(--ink-soft); }
.aside-box .btn { width: 100%; margin-top: 6px; }
.block + .block { margin-top: 44px; }
.block h2 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); }
.block h3 { margin-top: 1.1em; }
.note { border-left: 6px solid var(--volt); background: var(--white); padding: 14px 18px; margin: 20px 0; max-width: 62ch; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--volt); color: var(--volt-ink); padding-block: 48px; }
.cta-band .wrap { display: grid; gap: 20px; align-items: center; }
.cta-band h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.cta-band p { margin: 6px 0 0; }
.cta-band .btn-line { color: var(--volt-ink); border-color: var(--volt-ink); }
.cta-band .btn-line:hover { background: var(--volt-ink); color: var(--volt); }
.cta-band .btn-dark { background: var(--deep); color: var(--white); }
.cta-band .btn-dark:hover { background: var(--deep-2); color: var(--white); }
.cta-band .btn-row { margin: 0; }
@media (min-width: 860px) { .cta-band .wrap { grid-template-columns: 1fr auto; gap: 40px; } }

/* ---------- Forms ---------- */
.form { background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius); padding: 24px; }
.form-grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 0.97rem; }
.field .hint { font-weight: 400; color: var(--ink-soft); font-size: 0.88rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 2px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-height: 48px;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--cable-blue); outline: none; box-shadow: 0 0 0 3px rgba(27, 95, 168, 0.25); }
.field input[type="file"] { padding: 10px; background: var(--white); }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius); font-weight: 600; display: none; }
.form-status.is-ok { display: block; background: #e3f3ea; color: #174d2d; border: 2px solid var(--ok); }
.form-status.is-error { display: block; background: #fbe9e7; color: #7a1812; border: 2px solid var(--danger); }
.form-foot { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-top: 22px; }
.form-foot small { color: var(--ink-soft); }

.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border: 0; }
.contact-list strong { display: block; font-size: 0.88rem; color: var(--ink-soft); font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep); color: rgba(255, 255, 255, 0.88); padding-block: 52px 28px; font-size: 0.97rem; }
.site-footer a { color: var(--white); }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 48px; } }
.site-footer h2 { font-size: 1.15rem; font-stretch: 100%; font-family: var(--font-body); font-weight: 800; color: var(--white); margin-bottom: 0.6em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 3px 0; }
.footer-brand .brand { color: var(--white); margin-bottom: 14px; }
.footer-brand .brand-logo { background: var(--white); padding: 6px 8px; border-radius: var(--radius); }
.footer-brand .brand-name small { color: rgba(255, 255, 255, 0.7); }
.licence { margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid rgba(255, 255, 255, 0.2); font-size: 0.93rem; }
.legal { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.2); font-size: 0.88rem; opacity: 0.8; }

/* ---------- Mobile action bar ---------- */
.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--line);
  box-shadow: 0 -8px 20px rgba(14, 42, 71, 0.1);
}
.action-bar .btn { min-height: 50px; padding-inline: 10px; }
@media (min-width: 900px) { .action-bar { display: none; } body { padding-bottom: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
@media print { .site-header, .action-bar, .cta-band { display: none; } body { background: #fff; padding: 0; } }

/* ---------- additions for the database-driven version ---------- */
.void .win.win-sm { stroke-width: 2; }
.site-notice { background: var(--volt); color: var(--volt-ink); font-weight: 700; text-align: center; padding: 8px 0; font-size: 0.97rem; }
.aside-note { margin: 14px 0 0; }
.link-volt { color: var(--volt); }
.title-deep { color: var(--deep); }

@media (max-width: 520px) {
  .brand-logo { height: 36px; max-width: 34vw; }
  .brand-logo-only .brand-logo { height: 40px; max-width: 52vw; }
  .brand-name { font-size: 1.35rem; }
  .brand-name small { font-size: 0.62rem; }
}

/* Temporarily closed page */
.closed-body { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--deep); }
.closed-card { width: 100%; max-width: 34rem; padding: 32px 28px; background: var(--white); border-top: 6px solid var(--volt); border-radius: 6px; }
.closed-card h1 { margin: 0 0 14px; color: var(--deep); font-size: 2rem; line-height: 1.15; }
.closed-card p { margin: 0 0 12px; color: var(--ink); overflow-wrap: anywhere; }
.closed-brand { font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft) !important; }
.closed-when { font-weight: 700; }
.closed-actions { margin-top: 20px; }
.closed-preview { padding: 10px 0; background: var(--danger); color: var(--white); font-weight: 700; }

/* Private customer pages */
.cust-body { display: block; padding: 20px 16px; background: var(--paper); }
.cust-card { margin: 0 auto; max-width: 42rem; }
.cust-card h1 { font-size: 1.7rem; }
.cust-card h2 { margin: 18px 0 8px; font-size: 1.15rem; color: var(--deep); }
.cust-list { margin: 0 0 14px; padding-left: 20px; }
.cust-list li { margin-bottom: 6px; }
.cust-form label { display: block; margin: 14px 0 5px; font-weight: 700; }
.cust-form input[type="text"], .cust-form textarea { width: 100%; padding: 10px 12px; font: inherit; border: 1px solid var(--ink-soft); border-radius: 6px; background: var(--white); }
.cust-form input[type="file"] { width: 100%; font: inherit; }
.cust-card > p:last-child { margin-top: 14px; }
.cust-small { margin-top: 12px; font-size: 0.9rem; color: var(--ink-soft); }
.cust-err, .cust-ok { padding: 12px 14px; margin: 0 0 14px; border-radius: 6px; font-weight: 600; }
.cust-err { background: #fbe9e7; color: #7a1812; border: 2px solid var(--danger); }
.cust-ok { background: #e3f3ea; color: #124d2c; border: 2px solid var(--ok); }
.qd-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.qd-head p { margin: 0; }
.qd-brand { font-size: 1.2rem; font-weight: 800; color: var(--deep); }
.qd-ids { font-size: 0.85rem; color: var(--ink-soft); }
.qd-scroll { overflow-x: auto; }
.qd-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.qd-table th, .qd-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.qd-table .qd-n { text-align: right; white-space: nowrap; }
.qd-table tfoot th { text-align: right; font-weight: 600; }
.qd-total th, .qd-total td { font-size: 1.1rem; font-weight: 800; }
.qd-free { font-size: 0.85rem; color: var(--ink-soft); }
.qd-terms { font-size: 0.9rem; color: var(--ink-soft); }
@media print {
  .cust-noprint { display: none !important; }
  .cust-body { background: #fff; padding: 0; }
  .cust-card { max-width: none; border: 0; padding: 0; }
}
