/* interlockingbradford.ca. System fonts only: nothing to download, no font swap shift. */
:root {
  color-scheme: light;
  --ink: #1f2326;
  --muted: #555c63;
  --paper: #f6f4f0;
  --card: #ffffff;
  --line: #ded9cf;
  --charcoal: #23272b;
  --accent: #b5482a;
  --accent-dark: #8f3620;
  --radius: 14px;
  --wrap: 72rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-dark); text-underline-offset: 0.15em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid #1a5fb4; outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.narrow { max-width: 48rem; }
.skip { position: absolute; left: -999rem; top: 0; background: #fff; padding: 0.75rem 1rem; z-index: 100; }
.skip:focus { left: 0.5rem; top: 0.5rem; }
.preview-banner { margin: 0; padding: 0.4rem 1rem; text-align: center; font-size: 0.875rem; background: #fde68a; color: #3b2f00; }
.preview-note { padding: 0.6rem 0.8rem; background: #fde68a; color: #3b2f00; border-radius: 8px; font-size: 0.9rem; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.7rem 1.25rem;
  font: inherit; font-weight: 700; text-decoration: none; white-space: nowrap;
  border: 2px solid transparent; border-radius: 999px; cursor: pointer;
}
.btn-call { background: var(--accent); color: #fff; }
.btn-call:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-ghost { border-color: #fff; color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--charcoal); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 0; }

/* ---------- header and navigation (one nav tree, popover when it does not fit) */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgb(255 255 255 / 0.96); border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 0.75rem;
  max-width: 84rem; margin-inline: auto; padding: 0.6rem 1rem; min-height: 4.25rem;
}
/* Only the inline layout must keep its natural width (that is what the script measures). */
.site-header.is-wide .header-inner > * { flex-shrink: 0; white-space: nowrap; }
.menu-button { flex-shrink: 0; }
.site-logo { min-width: 0; }
.site-logo svg { flex-shrink: 0; }
.site-logo { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); text-decoration: none; font-size: 1.1rem; font-weight: 600; margin-inline-end: auto; }
.site-logo b { font-weight: 800; color: var(--accent-dark); }
.site-nav { display: flex; align-items: center; order: 3; }
.menu-button {
  anchor-name: --menu-button;
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 48px; padding: 0.5rem 0.85rem;
  font: inherit; font-weight: 600; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 999px; cursor: pointer;
}
.site-menu { list-style: none; margin: 0; padding: 0.5rem; }
.site-menu a { display: block; padding: 0.7rem 0.9rem; color: var(--ink); text-decoration: none; font-weight: 600; border-radius: 8px; }
.site-menu a:hover { background: var(--paper); }
.site-menu a[aria-current="page"] { color: var(--accent-dark); box-shadow: inset 3px 0 0 var(--accent); }
.site-menu[popover] {
  position: fixed; inset: auto;
  inset-block-start: 4.75rem;
  inset-block-start: anchor(--menu-button bottom);
  inset-inline-end: 1rem;
  inline-size: min(80dvw, 22rem); max-inline-size: calc(100dvw - 2rem);
  block-size: fit-content; max-block-size: calc(100dvh - 6rem);
  margin-block-start: 0.5rem; overflow: auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.18);
}
.site-menu[popover]::backdrop { background: rgb(0 0 0 / 0.25); }
.header-call { order: 2; padding-inline: 1rem; display: none; }
@media (min-width: 48rem) { .header-call { display: inline-flex; } }
.call-long { display: none; }
@media (min-width: 30rem) { .call-long { display: inline; } .call-short { display: none; } }

.site-header.is-wide {
  .menu-button { display: none; }
  .site-nav { order: 2; }
  .header-call { order: 3; }
  .site-menu {
    position: static; display: flex; align-items: center; gap: 0.1rem;
    inline-size: auto; max-inline-size: none; block-size: auto; max-block-size: none;
    overflow: visible; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none;
  }
  .site-menu a { padding: 0.5rem 0.55rem; font-size: 0.95rem; }
  .site-menu a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }
}
.site-header.is-measuring * { transition: none !important; }

/* Browsers without the Popover API: no menu button, the links wrap under the logo. */
@supports not selector(:popover-open) {
  .menu-button { display: none; }
  .header-inner { flex-wrap: wrap; }
  .site-nav { order: 4; flex-basis: 100%; }
  .site-menu { display: flex; flex-wrap: wrap; padding: 0; }
}

/* ---------- hero */
.hero { background: #fff; border-bottom: 1px solid var(--line); padding-block: clamp(2rem, 5vw, 4rem); }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero-pic img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: 0 20px 45px rgb(0 0 0 / 0.16); }
.hero-tall .hero-pic img { aspect-ratio: 4 / 5; object-position: center; max-height: 34rem; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 36rem; }
.crumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }
@media (min-width: 60rem) { .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 3.5rem; } }

/* ---------- sections */
.band { padding-block: clamp(2.25rem, 5vw, 4rem); }
.band.alt { background: #fff; border-block: 1px solid var(--line); }
.band:not(.alt):not(.answer-band) + .band:not(.alt):not(.faq) { padding-block-start: 0; }
.band:has(+ .wrap > .photo) { padding-block-end: 1.75rem; }
.answer-band { padding-block-end: 1rem; }
.answer { font-size: 1.15rem; padding: 1.25rem 1.4rem; background: #fff; border: 1px solid var(--line); border-inline-start: 5px solid var(--accent); border-radius: 10px; }
.preview { color: var(--muted); font-size: 0.98rem; }
.prose ul, .prose ol { padding-inline-start: 1.25rem; margin: 0 0 1.25em; }
.prose li { margin-bottom: 0.5em; }
.prose h2:not(:first-child) { margin-top: 1.6em; }

/* ---------- cards */
.cards { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.card { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: translate 0.2s, box-shadow 0.2s; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-body { padding: 1.1rem 1.2rem 1.3rem; }
.card h3 { margin-bottom: 0.35em; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.card:hover { box-shadow: 0 14px 30px rgb(0 0 0 / 0.12); }
.card:focus-within { outline: 3px solid #1a5fb4; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .card:hover { translate: 0 -3px; } }

/* ---------- steps */
.steps { list-style: none; margin: 1.5rem 0 0; padding: 0; counter-reset: step; display: grid; gap: 1rem; }
.steps li { counter-increment: step; position: relative; padding: 1.1rem 1.2rem 1.1rem 4.2rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { content: counter(step); position: absolute; left: 1.1rem; top: 1.05rem; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--charcoal); border-radius: 50%; }
.steps h3 { margin-bottom: 0.25em; }
.steps p { margin: 0; color: var(--muted); }

/* ---------- photos */
figure { margin: 0; }
figcaption { font-size: 0.9rem; color: var(--muted); padding-top: 0.5rem; }
.photo { margin: 0; }
.photo img { width: 100%; max-height: 34rem; object-fit: cover; border-radius: var(--radius); }
.photo-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); margin-top: 1.5rem; }
.tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.ba { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); margin-top: 1.5rem; }
.ba-note { margin-top: 1rem; color: var(--muted); }
.more { margin-top: 1.5rem; font-weight: 700; }

/* ---------- FAQ: native details, answers stay findable with Find in page */
.faq { background: #fff; border-block: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; align-items: center; gap: 0.7rem; padding: 1rem 0; min-height: 48px; font-weight: 700; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: ""; flex-shrink: 0; inline-size: 0.6rem; block-size: 0.6rem; border-inline-end: 2.5px solid var(--accent); border-block-end: 2.5px solid var(--accent); rotate: -45deg; }
.faq details[open] > summary::before { rotate: 45deg; }
.faq details p { margin: 0; padding: 0 0 1.1rem 1.3rem; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .faq summary::before { transition: rotate 0.2s; } }

/* ---------- call to action band */
.cta-band { background: var(--charcoal); color: #fff; padding-block: clamp(2.5rem, 6vw, 4rem); text-align: center; }
.cta-band p { color: #d9dde1; }
.cta-band .cta-row { justify-content: center; }

/* ---------- contact */
.contact-grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 56rem) { .contact-grid { grid-template-columns: 1fr 1.15fr; } }
.quote-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); }
.field { display: flex; flex-direction: column; gap: 0.3rem; margin: 0 0 1.25rem; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 700; padding: 0; }
.field input:not([type="checkbox"]), .field textarea {
  font: inherit; font-size: max(1rem, 1em); width: 100%; min-height: 48px; padding: 0.7rem 0.8rem;
  color: var(--ink); background: #fff; border: 2px solid #767676; border-radius: 8px;
}
.field textarea { resize: vertical; }
.field input:user-invalid, .field textarea:user-invalid { border-color: #b3261e; background: #fff6f5; }
.check { display: flex; align-items: center; gap: 0.6rem; min-height: 44px; font-weight: 500; }
.check input { width: 1.3rem; height: 1.3rem; accent-color: var(--accent); }
.hint { font-size: 0.9rem; color: var(--muted); }
.hp { position: absolute; clip-path: inset(50%); overflow: hidden; width: 1px; height: 1px; margin: -1px; white-space: nowrap; }
@media (pointer: coarse) { .field input:not([type="checkbox"]) { min-height: 52px; } }

/* ---------- footer */
.site-footer { background: var(--charcoal); color: #d9dde1; padding-block: 3rem 1.5rem; font-size: 0.97rem; border-top: 1px solid #3a4046; }
.cta-band + .site-footer { border-top-color: #3a4046; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.site-footer h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: #fff; margin: 0 0 0.8rem; }
.site-footer ul + h2 { margin-top: 1.5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding-block: 0.3rem; overflow-wrap: anywhere; }
.site-footer a { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 0.55rem; font-size: 1.1rem; font-weight: 600; color: #fff; }
.copyright { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid #3a4046; font-size: 0.88rem; color: #aab1b8; }

/* ---------- phone bar on small screens */
.mobile-call {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 54px;
  background: var(--accent); color: #fff; font-weight: 800; text-decoration: none;
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-call:hover { color: #fff; background: var(--accent-dark); }
body { padding-bottom: 54px; }
@media (min-width: 48rem) { .mobile-call { display: none; } body { padding-bottom: 0; } }

@media (forced-colors: active) {
  .site-menu a[aria-current="page"] { outline: 2px solid CanvasText; }
  .btn { border-color: ButtonText; }
}

