/* ==========================================================================
   Colour tokens: swap these for the client's brand (taken from the real logo).
   Every text/background pair must meet WCAG AA: 4.5:1 body text, 3:1 large
   text and UI. Brand colours that fail as text are used for fills only.
   Neutral defaults below (contrast on --bg in brackets).
   ========================================================================== */
:root {
  --bg: #FFFFFF;          /* page background */
  --surface: #F5F5F3;     /* alternate section / card background */
  --text: #1F2328;        /* body text (15.8:1) */
  --muted: #59606A;       /* secondary text (6.4:1) */
  --line: #D4D6D9;        /* borders and dividers */
  --brand: #2E3A46;       /* main brand colour: header, buttons (11.6:1) */
  --on-brand: #FFFFFF;    /* text on --brand */
  --accent: #8A5A12;      /* links and highlights (5.9:1) */
  --focus: #1A5FB4;       /* keyboard focus ring */
  --error: #A4161A;       /* form error text (7.8:1) */
  --ok: #1E6B34;          /* form success text (6.5:1) */
  --placeholder-bg: #FFF1B8; /* [CONFIRM ...] highlight */

  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 8px;
  --wrap: 1100px;
  color-scheme: light;    /* light mode only */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); }
p { margin: 0 0 1em; max-width: 65ch; }
a { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--bg); padding: 8px 12px; }
.ph { background: var(--placeholder-bg); color: var(--text); padding: 0 .2em; border-radius: 3px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: var(--radius); border: 2px solid var(--brand); background: var(--brand); color: var(--on-brand); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-line { background: transparent; color: var(--brand); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* Header: sticky, so the menu stays in reach. The preview banner sits above it and scrolls away. */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 10px; min-height: 68px; }
.brand { font-weight: 800; font-size: 1.2rem; color: var(--text); text-decoration: none; margin-right: auto; min-width: 0; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.primary-nav a, .sub-toggle { display: block; padding: 10px 12px; border-radius: 6px; text-decoration: none; color: var(--text); font-weight: 700; font-size: .95rem; }
.primary-nav a:hover, .sub-toggle:hover { background: var(--surface); }
.primary-nav a[aria-current="page"], .sub-toggle.current { box-shadow: inset 0 -3px 0 var(--brand); }
/* Services dropdown: opens on tap/click only, never on hover */
.has-sub { position: relative; }
.sub-toggle { display: flex; align-items: center; gap: 6px; background: none; border: 0; font-family: var(--font); cursor: pointer; min-height: 44px; width: 100%; }
.sub-toggle svg { width: 14px; height: 14px; flex: none; transition: transform .2s; }
.sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.primary-nav .sub { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px; flex-direction: column; gap: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; box-shadow: 0 14px 32px rgba(0,0,0,.14); z-index: 60; }
.primary-nav .sub.open { display: flex; }
.sub a { font-weight: 400; font-size: 1rem; }
.sub .sub-all { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 12px; font-weight: 700; }
.btn-call { padding: 8px 16px; }
.menu-toggle { display: none; min-width: 44px; min-height: 44px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; }
.menu-toggle svg { width: 22px; height: 22px; }
/* Menu collapses below 900px. Raise this if the client's name or extra menu items need more room on one line. */
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 20px 16px; max-height: calc(100vh - 68px); overflow-y: auto; }
  .primary-nav.open { display: block; }
  .primary-nav ul { flex-direction: column; }
  .primary-nav a, .sub-toggle { padding: 14px 8px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; min-height: 52px; }
  .sub-toggle { justify-content: space-between; }
  .sub-toggle svg { width: 18px; height: 18px; }
  .primary-nav a[aria-current="page"], .sub-toggle.current { box-shadow: inset 4px 0 0 var(--brand); padding-left: 16px; }
  .primary-nav .sub { position: static; min-width: 0; border: 0; border-radius: 0; box-shadow: none; padding: 0 0 0 16px; gap: 0; }
  .sub .sub-all { margin-top: 0; padding-top: 14px; border-top: 0; }
}
@media (max-width: 600px) { .call-label { display: none; } }

/* Sections */
section { padding: 56px 0; background: var(--bg); }
section.alt { background: var(--surface); }
.hero { padding: 64px 0; background: var(--surface); }
.lede { font-size: 1.2rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 24px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card p:last-child { margin-bottom: 0; }

/* Contact and form */
.contact-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .contact-grid { grid-template-columns: 1fr 1.3fr; } }
address { font-style: normal; margin-bottom: 1em; }
.visit-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; align-self: start; }
.visit-body { padding: 24px; }
/* Tap-to-load map: fixed height before and after loading */
.map-slot { min-height: 280px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; text-align: center; }
.map-pin { width: 40px; height: 40px; fill: var(--brand); }
.map-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.map-slot .small { margin: 0; max-width: 34ch; font-size: .9rem; color: var(--muted); }
.map { height: 280px; border: 0; width: 100%; display: block; background: var(--surface); }
form { display: grid; gap: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.field { display: grid; gap: 6px; }
label, legend { font-weight: 700; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: .95rem; }
input, textarea { font: inherit; color: var(--text); background: var(--bg); width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--muted); border-radius: 6px; }
textarea { min-height: 140px; resize: vertical; }
fieldset { border: 0; margin: 0; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 6px; }
.choice, .consent { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; }
.choice input, .consent input { width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.form-status { display: none; font-weight: 700; color: var(--ok); }
.form-status.show { display: block; }
.form-status.err { color: var(--error); }

/* Footer */
footer { background: var(--brand); color: var(--on-brand); padding: 40px 0 24px; font-size: .95rem; }
footer a, footer .linkbtn { color: var(--on-brand); }
footer h2 { font-size: 1.1rem; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin: 6px 0; }
.foot-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.legal { border-top: 1px solid rgba(255,255,255,.3); margin-top: 28px; padding-top: 16px; }
footer .ph { color: var(--text); }

/* Privacy policy dialog */
dialog { width: min(720px, calc(100% - 24px)); max-height: calc(100% - 48px); padding: 0; border: 0; border-radius: var(--radius); color: var(--text); background: var(--bg); }
dialog::backdrop { background: rgba(0,0,0,.5); }
.dlg-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
.dlg-head h2 { margin: 0; }
.dlg-body { padding: 20px; }
.dlg-body h3 { font-size: 1.1rem; margin-top: 1.4em; }
.draft-flag { background: var(--placeholder-bg); padding: 10px 14px; border-radius: 6px; font-weight: 700; }
