/* Guardian Glass — site styles
   1. Theme tokens (light + dark)   2. Base   3. Layout & helpers   4. Buttons
   5. Header   6. Hero   7. Components   8. Contact   9. Footer   10. Motion   11. Responsive */

/* Fonts (self-hosted, latin subset, variable weight) */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url("../assets/fonts/space-grotesk-latin.woff2") format("woff2");
}

/* 1. Theme tokens ------------------------------------------------------- */
:root {
  --ink: #0b1020;            /* always-dark bands: top bar, hero, testimonial, footer */
  --ink-2: #141b33;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --text: #1d2433;
  --heading: #0b1020;
  --muted: #5b6478;
  --line: #e4e8f0;
  --brand: #1f3cff;
  --brand-2: #00b4ff;
  --brand-soft: #e9eeff;
  --brand-text: #1f3cff;     /* brand colour for text: stays readable in both themes */
  --ok: #11753f; --ok-bg: #e3f6ea;
  --bad: #b42318; --bad-bg: #fdecea;
  --warn: #a15c00; --warn-bg: #fdf0d5;
  --contrast: #0b1020;       /* dark button on light pages, light button on dark */
  --contrast-text: #ffffff;
  --nav-bg: rgba(255, 255, 255, .78);
  --chip-bg: rgba(255, 255, 255, .9);
  --shadow: 0 10px 30px -12px rgba(15, 25, 60, .18);
  --shadow-lg: 0 30px 60px -20px rgba(15, 25, 60, .35);
  --map-filter: none;
  --icon-sun: none;
  --icon-moon: block;

  --radius: 20px;
  --radius-sm: 12px;
  --max: 1200px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--font);
  color-scheme: light;
}

/* Dark palette: applied when the device prefers dark (unless the visitor chose
   light), or when the visitor chose dark with the header toggle. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #05080f; --ink-2: #111a33; --bg: #0a0f1d; --surface: #111829;
    --text: #d3d9ea; --heading: #f3f6ff; --muted: #97a2bf; --line: #222c48;
    --brand: #4a63ff; --brand-soft: rgba(74, 99, 255, .16); --brand-text: #9db0ff;
    --ok: #5ee08f; --ok-bg: rgba(94, 224, 143, .12); --bad: #ff8a80; --bad-bg: rgba(255, 138, 128, .12); --warn: #fbbf24; --warn-bg: rgba(251, 191, 36, .14);
    --contrast: #f3f6ff; --contrast-text: #0b1020;
    --nav-bg: rgba(10, 15, 29, .78); --chip-bg: rgba(17, 24, 41, .88);
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .75);
    --map-filter: invert(.9) hue-rotate(180deg) brightness(.95);
    --icon-sun: block; --icon-moon: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #05080f; --ink-2: #111a33; --bg: #0a0f1d; --surface: #111829;
  --text: #d3d9ea; --heading: #f3f6ff; --muted: #97a2bf; --line: #222c48;
  --brand: #4a63ff; --brand-soft: rgba(74, 99, 255, .16); --brand-text: #9db0ff;
  --ok: #5ee08f; --ok-bg: rgba(94, 224, 143, .12); --bad: #ff8a80; --bad-bg: rgba(255, 138, 128, .12); --warn: #fbbf24; --warn-bg: rgba(251, 191, 36, .14);
  --contrast: #f3f6ff; --contrast-text: #0b1020;
  --nav-bg: rgba(10, 15, 29, .78); --chip-bg: rgba(17, 24, 41, .88);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .75);
  --map-filter: invert(.9) hue-rotate(180deg) brightness(.95);
  --icon-sun: block; --icon-moon: none;
  color-scheme: dark;
}

/* 2. Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  line-height: 1.65; -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
}
img { max-width: 100%; height: auto; display: block; }
picture { display: contents; }
a { color: inherit; text-decoration: none; }
a[href^="tel:"] { white-space: nowrap; } /* a phone number never breaks across lines */
a, button { -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { font: inherit; color: inherit; -webkit-appearance: none; appearance: none; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; margin: 0 0 .5em; color: var(--heading); letter-spacing: -.02em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 1em; }

/* 3. Layout & helpers ------------------------------------------------------ */
.container { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-alt { background: var(--surface); transition: background-color .3s; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lead { margin-inline: auto; }
.section-head.center .eyebrow::before { display: none; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-text);
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; border-radius: 2px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.grad {
  background: linear-gradient(100deg, var(--brand-2), #7aa2ff 50%, #fff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split.reverse > :first-child { order: 2; }
/* grid children may shrink below their content width (prevents sideways scroll) */
.split > *, .hero-grid > *, .quote > *, .contact-grid > *, .form-grid > *, .qc-body { min-width: 0; }

/* 4. Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .98rem; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 25px -8px rgba(31, 60, 255, .6); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(31, 60, 255, .7); }
.btn-ghost {
  background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .25);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .16); }
.btn-dark { background: var(--contrast); color: var(--contrast-text); }
.btn-dark:hover { transform: translateY(-2px); }
.btn-block { width: 100%; margin-top: 20px; }
.link-arrow { font-weight: 600; color: var(--brand-text); transition: letter-spacing .2s; }
.link-arrow:hover { letter-spacing: .02em; }

/* 5. Header ---------------------------------------------------------------- */
.topbar { background: var(--ink); color: #b8c0d8; font-size: .85rem; }
.topbar .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 8px 0; }
.topbar span { display: inline-flex; flex-wrap: wrap; gap: 18px; }
.topbar a:hover { color: #fff; }

.nav {
  position: sticky; top: 0; z-index: 50; background: var(--nav-bg); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  transition: background-color .3s;
}
.nav .container { display: flex; align-items: center; gap: 8px; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 8px 18px -6px rgba(31, 60, 255, .55);
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.15rem; line-height: 1; color: var(--heading); }
.brand-name small {
  display: block; margin-top: 4px; font-family: var(--font); font-weight: 500; font-size: .68rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav-links a { display: block; padding: 10px 16px; border-radius: 999px; font-weight: 500; font-size: .95rem; transition: background .2s, color .2s; }
.nav-links a:hover, .nav-links a.active { background: var(--brand-soft); color: var(--brand-text); }
.nav-links .nav-cta { margin-left: 10px; padding: 11px 20px; background: var(--contrast); color: var(--contrast-text); }
.nav-links .nav-cta:hover { background: var(--brand); color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.theme-toggle, .menu-toggle {
  width: 42px; height: 42px; padding: 0; border-radius: 50%; display: grid; place-items: center;
  cursor: pointer; color: var(--heading); transition: background .2s, color .2s, transform .3s;
}
.theme-toggle { border: 1px solid var(--line); background: var(--surface); }
.theme-toggle:hover { background: var(--brand-soft); color: var(--brand-text); transform: rotate(15deg); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .sun { display: var(--icon-sun); }
.theme-toggle .moon { display: var(--icon-moon); }
.menu-toggle { display: none; border: 0; background: none; }
.menu-toggle svg { width: 26px; height: 26px; }

/* 6. Hero ------------------------------------------------------------------ */
.hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--ink);
  padding: clamp(90px, 14vw, 170px) 0 clamp(80px, 12vw, 140px);
}
.hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(11, 16, 32, .86) 0%, rgba(11, 16, 32, .62) 38%, rgba(11, 16, 32, .18) 68%, rgba(11, 16, 32, .08) 100%),
    linear-gradient(0deg, rgba(11, 16, 32, .5), transparent 40%);
}
.hero h1, .hero .lead, .hero .crumbs { text-shadow: 0 2px 18px rgba(5, 8, 15, .55); }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lead { color: #e3e8f5; font-size: 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: 48px; align-items: end; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; padding: 8px 16px 8px 8px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: .88rem; color: #dfe5f7;
}
.badge b { padding: 4px 10px; border-radius: 999px; font-size: .78rem; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.glass-card {
  padding: 28px; border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, .2); box-shadow: var(--shadow-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04));
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.stat strong { display: block; font-family: var(--display); font-size: 2.4rem; line-height: 1; }
.stat > span { font-size: .88rem; color: #b8c0d8; }
.page-hero { padding: clamp(80px, 11vw, 130px) 0 clamp(60px, 8vw, 90px); }
.page-hero h1 { font-size: clamp(2.2rem, 4.8vw, 3.8rem); max-width: 20ch; }
.crumbs { margin-bottom: 18px; font-size: .85rem; color: #c3cbe0; }
.crumbs a:hover { color: #fff; }

/* 7. Components ------------------------------------------------------------ */
/* Category tiles */
.tiles { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: -70px; }
.tile {
  position: relative; display: flex; align-items: flex-end; aspect-ratio: 3 / 4; overflow: hidden;
  border-radius: var(--radius); box-shadow: var(--shadow-lg); color: #fff;
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(11, 16, 32, .88)); }
.tile-body { position: relative; z-index: 1; width: 100%; padding: 22px; }
.tile h3 { margin: 0 0 4px; font-size: 1.4rem; color: #fff; }
.tile p { margin: 0; font-size: .9rem; color: #cfd6ea; }
.tile .arrow {
  position: absolute; top: 18px; right: 18px; z-index: 1; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background .3s, transform .3s;
}
.tile .arrow svg { width: 18px; height: 18px; }
.tile:hover img { transform: scale(1.08); }
.tile:hover .arrow { background: var(--brand); transform: rotate(-45deg); }

/* Image with floating note */
.media { position: relative; }
.media img { width: 100%; aspect-ratio: 4 / 3.2; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.media .float {
  position: absolute; left: -20px; bottom: -24px; max-width: 280px; display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow);
}
.media .float strong { display: block; font-size: .98rem; color: var(--heading); }
.media .float span { font-size: .82rem; color: var(--muted); }
.ic { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-text); }
.ic svg { width: 22px; height: 22px; }

/* Check list */
.checks { list-style: none; display: grid; gap: 12px; margin: 24px 0 30px; padding: 0; }
.checks li { display: flex; align-items: flex-start; gap: 12px; }
.checks li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a63ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  position: relative; overflow: hidden; padding: 30px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface);
  transition: transform .3s, box-shadow .3s, border-color .3s, background-color .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card .ic { width: 54px; height: 54px; margin-bottom: 20px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.card .ic svg { width: 26px; height: 26px; }
.card p { color: var(--muted); }
.card.img-card { padding: 0; }
.card.img-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-body { padding: 24px 26px 28px; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip { padding: 8px 16px; border-radius: 999px; font-size: .88rem; font-weight: 500; background: var(--brand-soft); color: var(--brand-text); }
.chip.dark { background: var(--ink-2); color: #dfe5f7; }

/* Gallery + lightbox */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery figure { position: relative; margin: 0; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); cursor: zoom-in; }
.gallery figure:nth-child(1), .gallery figure:nth-child(5) { grid-row: span 2; aspect-ratio: auto; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.gallery figure:hover img { transform: scale(1.06); }
.gallery figcaption {
  position: absolute; left: 14px; bottom: 14px; padding: 8px 14px; border-radius: 999px;
  font-size: .82rem; font-weight: 600; color: var(--heading); background: var(--chip-bg);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 24px;
  background: rgba(5, 8, 18, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.lightbox.open { display: grid; }
.lightbox img { max-height: 86vh; border-radius: var(--radius-sm); }
.lightbox .lb-close { position: absolute; top: 20px; right: 20px; width: 46px; height: 46px; border: 0; border-radius: 50%; background: #fff; color: #0b1020; font-size: 1.4rem; cursor: pointer; }


/* Testimonial */
.quote {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center;
  padding: clamp(32px, 6vw, 70px); border-radius: calc(var(--radius) + 8px);
  background: var(--ink); color: #dfe5f7; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.quote::before { content: ""; position: absolute; top: -200px; right: -150px; width: 500px; height: 500px; background: radial-gradient(circle, rgba(31, 60, 255, .55), transparent 65%); }
.quote .eyebrow { color: #7aa2ff; }
.quote blockquote { position: relative; margin: 0; font-family: var(--display); font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.4; color: #fff; }
.quote .btn { margin-top: 28px; }
/* Review slider: slides stack in one grid cell so the box keeps the tallest height */
.review-track { display: grid; }
/* outgoing slide fades out first, then the next one fades in, so text never overlaps */
.review { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transform: translateX(16px); transition: opacity .25s, transform .25s, visibility 0s .25s; }
.review.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .45s .25s, transform .45s .25s, visibility 0s .25s; }
.review h3 { margin-bottom: 14px; font-size: 1.1rem; color: #7aa2ff; }
.review figcaption { margin-top: 22px; color: #9aa5c4; }
.review-controls { position: relative; display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.review-btn {
  width: 42px; height: 42px; padding: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); color: #fff; transition: background .2s;
}
.review-btn:hover { background: var(--brand); border-color: transparent; }
.review-btn svg { width: 18px; height: 18px; }
.review-dots { display: flex; gap: 8px; }
.review-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .3); cursor: pointer; transition: width .3s, background .3s; }
.review-dots button[aria-current="true"] { width: 26px; background: #fff; }
.stars { margin-bottom: 18px; font-size: 1.2rem; letter-spacing: 3px; color: #ffc83d; }
.casey { position: relative; text-align: center; }
.casey img { width: 100%; max-width: 320px; aspect-ratio: 1; margin: 0 auto 16px; object-fit: cover; border-radius: 50%; border: 6px solid rgba(255, 255, 255, .1); }
.casey p { margin: 0; color: #9aa5c4; }
.casey strong { color: #fff; }

/* Call-to-action band */
.cta {
  position: relative; overflow: hidden; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 32px;
  padding: clamp(40px, 6vw, 72px); border-radius: calc(var(--radius) + 8px); color: #fff;
  background: linear-gradient(120deg, #1f3cff, #3a7bff 55%, var(--brand-2));
}
.cta::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 40L40 0' stroke='white' stroke-opacity='.08'/%3E%3C/svg%3E"); }
.cta h2 { margin: 0 0 8px; color: #fff; }
.cta p { margin: 0; color: #e4ebff; }
.cta .btn { position: relative; z-index: 1; background: #fff; color: #1f3cff; }
.section.flush-top { padding-top: 0; }

/* 8. Contact --------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px; align-items: start; }
.open-now { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 4px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; }
.open-now:empty { display: none; }
.open-now::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.open-now.is-open { background: var(--ok-bg); color: var(--ok); }
.open-now.is-closed { background: var(--bad-bg); color: var(--bad); }

.form-card { padding: clamp(24px, 4vw, 40px); border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.form-card h2 { font-size: 2rem; }
.form-card > p { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .88rem; font-weight: 600; color: var(--heading); }
.field input, .field textarea, .field select {
  width: 100%; min-width: 0; padding: 13px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--bg); color: var(--text); text-overflow: ellipsis; transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field select {
  padding-right: 44px; cursor: pointer;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a94ad' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand); background-color: var(--surface); box-shadow: 0 0 0 4px rgba(31, 60, 255, .12); }
.file-drop { position: relative; display: block; padding: 18px; border: 2px dashed var(--line); border-radius: var(--radius-sm); text-align: center; font-size: .9rem; color: var(--muted); cursor: pointer; }
.file-drop:hover { border-color: var(--brand); color: var(--brand-text); }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-drop:focus-within { outline: 3px solid var(--brand-2); outline-offset: 3px; }
.form-status { margin: 14px 0 0; font-weight: 600; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--bad); }

/* 9. Footer ---------------------------------------------------------------- */
.footer { padding: 80px 0 30px; background: var(--ink); color: #9aa5c4; }
.footer-grid { display: grid; grid-template-columns: 1.5fr .8fr 1.1fr 1.3fr; gap: 40px; }
.footer ul { list-style: none; display: grid; gap: 10px; margin: 0; padding: 0; }
.footer a { overflow-wrap: anywhere; }
.footer a:hover { color: #fff; }
.footer .brand-name { color: #fff; }
.footer .brand-name small { color: #9aa5c4; }
.footer-about { margin-top: 18px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .85rem; }
.social { display: flex; gap: 10px; margin-top: 20px; }
.social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); transition: background .2s; }
.social a:hover { background: var(--brand); }
.social svg { width: 18px; height: 18px; }

/* 10. Motion --------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media print { .reveal { opacity: 1; transform: none; transition: none; } } /* parts not scrolled to yet still print */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .area-shop .area-pulse { animation: none; }
}
@media (hover: none) {
  .card:hover, .btn-primary:hover, .btn-dark:hover { transform: none; }
}

/* Fallbacks for older browsers */
@supports not (aspect-ratio: 1) {
  .tile { min-height: 360px; }
  .media img, .card.img-card img { height: 340px; }
  .gallery figure { height: 280px; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav { background: var(--surface); }
  .glass-card { background: rgba(20, 27, 51, .92); }
}

/* 11. Responsive ----------------------------------------------------------- */
@media (max-width: 1100px) {
  .nav-links a { padding: 10px 12px; }
}
@media (max-width: 1024px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .topbar .hide-sm { display: none; }
  .nav-actions { margin-left: auto; }
  .menu-toggle { display: grid; }
  .nav-links {
    position: absolute; top: 74px; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 4px;
    margin: 0; padding: 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links .nav-cta { margin: 12px 0 0; text-align: center; }
  .split, .contact-grid, .quote { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  .media .float { left: 12px; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery figure:nth-child(1), .gallery figure:nth-child(5) { grid-row: auto; aspect-ratio: 1; }
}
@media (max-width: 560px) {
  .tiles, .cards, .form-grid, .footer-grid, .gallery { grid-template-columns: 1fr; }
  .tile { aspect-ratio: 4 / 3; }
}
@media (max-width: 380px) {
  .btn { padding: 13px 20px; }
}

/* Two overlapping photos */
.media.duo { padding: 0 8% 8% 0; }
.media.duo > :nth-child(2) img {
  position: absolute; right: 0; bottom: 0; width: 46%; aspect-ratio: 1;
  border: 6px solid var(--bg); box-shadow: var(--shadow-lg);
}
.section-alt .media.duo > :nth-child(2) img { border-color: var(--surface); }
.section-head-split { margin-bottom: 56px; }
.other-plastics { align-items: stretch; margin-top: 22px; }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards-4 { grid-template-columns: 1fr; } }

/* Long-form text (privacy policy) */
.prose { max-width: 780px; }
.prose h2 { margin-top: 1.8em; font-size: 1.5rem; }
.prose a { color: var(--brand-text); text-decoration: underline; }
.footer-bottom a { text-decoration: underline; }
.directions-note { margin: 0; text-align: center; font-size: .9rem; color: var(--muted); }

/* Accessibility helpers */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200; padding: 12px 20px; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* Top bar open/closed status */
.topbar .open-now { margin: 0; padding: 2px 10px; font-size: .78rem; }
.topbar .open-now.is-open { background: rgba(94, 224, 143, .14); color: #7fe7a6; }
.topbar .open-now.is-closed { background: rgba(255, 138, 128, .14); color: #ffa39b; }

/* Header gains a shadow once the page scrolls */
.nav.scrolled { box-shadow: 0 8px 24px -12px rgba(15, 25, 60, .25); }
.menu-toggle .close { display: none; }
.menu-toggle[aria-expanded="true"] .open { display: none; }
.menu-toggle[aria-expanded="true"] .close { display: block; }

/* Footer column headings (h2 for correct outline, styled small) */
.footer h2 { margin-bottom: 18px; font-family: var(--font); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: #fff; }

/* Lightbox: caption, prev/next */
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 14px; }
.lightbox figcaption { color: #dfe5f7; font-weight: 500; text-align: center; }
.lightbox .lb-nav {
  position: absolute; top: 50%; width: 50px; height: 50px; margin-top: -25px; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; transition: background .2s;
}
.lightbox .lb-nav:hover { background: var(--brand); }
.lightbox .lb-nav svg { width: 22px; height: 22px; }
.lightbox .lb-prev { left: 20px; }
.lightbox .lb-next { right: 20px; }
@media (max-width: 560px) { .lightbox .lb-nav { top: auto; bottom: 24px; margin: 0; } }

/* Form: show errors only after the visitor has interacted */
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); }

/* Phone action bar (call / directions) */
.action-bar { display: none; }
@media (max-width: 860px) {
  .action-bar {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60;
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border-radius: 999px;
    background: var(--nav-bg); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
    -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
    transform: translateY(150%); transition: transform .35s ease;
  }
  .action-bar.show { transform: none; }
  .action-bar .btn { padding: 12px 10px; font-size: .95rem; }
  .footer { padding-bottom: 110px; }
}

/* Hero on phones: text spans the full width, so shade top to bottom instead */
@media (max-width: 860px) {
  .hero::before { background: linear-gradient(180deg, rgba(11, 16, 32, .5), rgba(11, 16, 32, .76)); }
}

/* Dark band (service area) */
.section-ink { background: var(--ink); color: #c9d1e8; }
.section-ink h2 { color: #fff; }
.section-ink .eyebrow { color: #7aa2ff; }
.section-ink .lead { color: #d5dbec; }

/* Service area */
.area-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0; padding: 0; }
.area-list li {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: #fff; font-weight: 500;
}
.area-list li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-2), #7aa2ff); }
.area-note { margin-bottom: 26px; color: #aab4cf; }
.area-note a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.area-map {
  padding: 10px; border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, .1);
  background: radial-gradient(120% 90% at 30% 10%, #16214a, #0b1020 70%);
}
.area-map svg { display: block; width: 100%; height: auto; }
.area-grid { fill: rgba(255, 255, 255, .1); }
.area-glow-in { stop-color: #4a63ff; stop-opacity: .32; }
.area-glow-out { stop-color: #4a63ff; stop-opacity: 0; }
.area-ring { fill: none; stroke: rgba(122, 162, 255, .35); stroke-width: 1.5; stroke-dasharray: 4 7; }
.area-routes path { fill: none; stroke: rgba(0, 180, 255, .55); stroke-width: 1.5; stroke-dasharray: 2 6; }
.area-county { fill: rgba(255, 255, 255, .09); font: 700 44px var(--display); letter-spacing: .2em; text-anchor: middle; }
.area-town circle { fill: #00b4ff; stroke: #0b1020; stroke-width: 3; }
.area-town text { fill: #e6ebf7; font: 600 17px var(--font); }
.area-shop circle { fill: #fff; stroke: #4a63ff; stroke-width: 5; }
.area-shop .area-pulse { fill: rgba(74, 99, 255, .45); stroke: none; transform-box: fill-box; transform-origin: center; animation: area-pulse 2.4s ease-out infinite; }
.area-shop text { fill: #fff; font: 700 18px var(--display); }
.area-shop .area-sub { fill: #aab4cf; font: 500 14px var(--font); }
@keyframes area-pulse { from { transform: scale(.6); opacity: .9; } to { transform: scale(2.4); opacity: 0; } }

/* Affiliations & brands */
.logo-tile {
  display: grid; place-items: center; width: 100%; height: 120px; padding: 18px 22px;
  border-radius: 14px; border: 1px solid #e6eaf2; background: #fff;
  transition: transform .3s, box-shadow .3s;
}
.logo-tile.on-dark { border-color: #2a3352; background: #0f1424; }
.logo-tile img { width: auto; max-width: 100%; max-height: 80px; object-fit: contain; }
.affiliations { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.affil {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 20px 24px; text-align: center;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg);
  transition: transform .3s, box-shadow .3s;
}
.affil .logo-tile { height: 130px; margin-bottom: 14px; }
.affil .logo-tile img { max-height: 92px; }
.affil strong { font-family: var(--display); font-size: 1.05rem; color: var(--heading); }
.affil > span:last-child { font-size: .88rem; color: var(--muted); }
.brands-head { margin-top: clamp(64px, 8vw, 96px); }
.brands { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.brand-tile { flex: 0 1 calc(25% - 15px); display: grid; gap: 10px; text-align: center; font-size: .88rem; color: var(--muted); transition: color .3s; }
.brand-tile .logo-tile { height: 110px; }
.brand-tile .logo-tile img { max-height: 64px; }
.brand-tile .logo-tile img[height="160"] { max-height: 80px; }
.affil:hover, .brand-tile:hover .logo-tile { transform: translateY(-4px); box-shadow: var(--shadow); }
.brand-tile:hover { color: var(--brand-text); }

/* Methods of payment */
.pay { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.pay li {
  display: grid; place-content: center; justify-items: center; width: 64px; height: 42px; border-radius: 8px;
  line-height: 1; text-align: center; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}
.pay b { font: 800 .8rem var(--display); }
.pay small { display: block; white-space: nowrap; margin-top: 3px; font-size: .52rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.pay-interac, .pay-etransfer { background: #fdb913; color: #111; }
.pay-interac b, .pay-etransfer b { font-style: italic; }
.pay-etransfer small { letter-spacing: 0; }
.pay-amex { background: #1f72cd; color: #fff; }
.pay-amex b { font-size: .54rem; letter-spacing: .03em; text-transform: uppercase; }
.pay-visa { background: #1a1f71; color: #fff; }
.pay-visa b { font-size: 1.05rem; font-style: italic; font-weight: 900; letter-spacing: .03em; }
.pay-mc { background: #1b1c22; color: #fff; }
.pay-mc svg { width: 30px; height: 18px; }
.pay-mc small { text-transform: none; letter-spacing: 0; }
.pay-cash { background: #1f6f43; color: #fff; }
.pay-cash b { font-size: 1rem; }
.footer-hours li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.footer-hours li span:first-child { color: #fff; font-weight: 500; }
.footer .open-now { margin-top: 16px; }
.footer .open-now.is-open { background: rgba(94, 224, 143, .14); color: #7fe7a6; }
.footer .open-now.is-closed { background: rgba(255, 138, 128, .14); color: #ffa39b; }
.footer-contact { gap: 16px !important; }
.footer-contact li { display: flex; align-items: flex-start; gap: 12px; line-height: 1.5; }
.footer-contact svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: #7aa2ff; }
.footer-contact a { color: #fff; font-weight: 500; }
.footer-contact a:hover { color: #7aa2ff; }
.footer-contact small { display: block; font-size: .88rem; }
.footer-label { margin: 24px 0 10px; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.footer .pay { display: flex; gap: 5px; }
.footer .pay li { width: 48px; height: 32px; border-radius: 6px; }
.footer .pay b { font-size: .68rem; }
.footer .pay small { font-size: .44rem; }
.footer .pay-visa b { font-size: .88rem; }
.footer .pay-amex b { font-size: .46rem; }
.footer .pay-mc svg { width: 24px; height: 14px; }

/* Contact page */
.contact-section { padding-top: 0; }
.quick-contact { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: -56px 0 40px; }
.qc {
  display: flex; align-items: center; gap: 16px; padding: 22px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-lg);
  transition: transform .3s, border-color .3s;
}
.qc:hover { transform: translateY(-4px); border-color: var(--brand); }
.qc .ic { width: 52px; height: 52px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.qc h3 { margin: 0 0 4px; font: 600 .76rem var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.qc strong { display: block; font-family: var(--display); font-size: 1.15rem; color: var(--heading); overflow-wrap: anywhere; }
.qc-body > span { display: block; font-size: .88rem; color: var(--muted); }
.contact-side { display: grid; gap: 20px; }
.side-card { padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.side-card h3 { margin: 0 0 16px; font-size: 1.15rem; }
.side-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.side-head h3, .side-head .open-now { margin: 0; }
.week { list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.week li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 10px; color: var(--muted); }
.week li span:last-child { font-weight: 500; color: var(--heading); }
.week li.today { background: var(--brand-soft); font-weight: 600; color: var(--brand-text); }
.week li.today span:last-child { color: var(--brand-text); }
.side-perks .checks { margin: 0; }
.form-card .eyebrow { margin-bottom: 10px; }
.choice { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.choice legend { margin-bottom: 10px; padding: 0; font-size: .88rem; font-weight: 600; color: var(--heading); }
.choice label { position: relative; display: inline-block; margin: 0 6px 8px 0; cursor: pointer; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice span {
  display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); font-size: .9rem; font-weight: 500; transition: background .2s, border-color .2s, color .2s;
}
.choice label:hover span { border-color: var(--brand); }
.choice input:checked + span { border-color: var(--brand); background: var(--brand); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--brand-2); outline-offset: 2px; }
.map-card {
  position: relative; height: 440px; margin-top: 40px; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.map-card iframe { display: block; width: 100%; height: 100%; border: 0; filter: var(--map-filter); }
.map-panel {
  position: absolute; left: 24px; bottom: 24px; max-width: 340px; padding: 24px;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-lg);
}
.map-panel h3 { margin: 0 0 6px; }
.map-panel .directions-note { margin: 0 0 8px; text-align: left; }
.map-addr { margin: 0 0 16px; font-weight: 600; color: var(--heading); }

@media (max-width: 1024px) {
  .affiliations { grid-template-columns: repeat(2, 1fr); }
  .brand-tile { flex-basis: calc(33.333% - 14px); }
}
@media (max-width: 860px) {
  .quick-contact { grid-template-columns: 1fr; gap: 12px; margin-top: -36px; }
  .map-card { display: flex; flex-direction: column; height: auto; }
  .map-card iframe { height: 320px; }
  .map-panel { position: static; max-width: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
  .brand-tile { flex-basis: calc(50% - 10px); }
}
@media (max-width: 420px) {
  .affiliations { grid-template-columns: 1fr; }
  .brand-tile .logo-tile { height: 96px; padding: 14px; }
}
@media (hover: none) {
  .affil:hover, .brand-tile:hover .logo-tile, .qc:hover { transform: none; }
}

/* Phone action bar: call, directions, photo */
@media (max-width: 860px) {
  .action-bar { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .action-bar .btn { padding: 12px 6px; gap: 6px; }
}
/* The Photo button sits on the light bar, so it needs dark text in light mode */
.action-bar .btn-ghost { border-color: var(--line); background: var(--surface); color: var(--heading); -webkit-backdrop-filter: none; backdrop-filter: none; }
/* A line under the quote form (send a photo, leave a review) */
.form-alt { margin: 12px 0 0; font-size: .92rem; color: var(--muted, inherit); text-align: center; }
.form-alt a { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.form-alt svg { width: 16px; height: 16px; }
/* Read / leave a review */
.review-links { display: flex; flex-wrap: wrap; gap: 10px; }
.review-links .btn svg { width: 18px; height: 18px; }
/* Tablets wider than a phone (an iPad sideways, a big iPad): the same call / directions / photo bar,
   centred and no wider than it needs to be. Screens with a mouse don't get it. */
@media (min-width: 861px) and (hover: none) and (pointer: coarse) {
  .action-bar {
    position: fixed; left: 50%; width: min(520px, calc(100% - 24px)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px; border-radius: 999px;
    background: var(--nav-bg); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
    -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
    transform: translate(-50%, 150%); transition: transform .35s ease;
  }
  .action-bar.show { transform: translate(-50%, 0); }
  .action-bar .btn { padding: 12px 10px; font-size: .95rem; gap: 6px; }
  .footer { padding-bottom: 110px; }
}

/* Broken window? card, just under the top section (home and services) */
.urgent {
  position: relative; z-index: 2; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px 28px;
  margin-top: -56px; padding: 26px 30px; border-radius: var(--radius);
  border: 1px solid var(--line); border-left: 5px solid #f59e0b; background: var(--surface); box-shadow: var(--shadow-lg);
}
.urgent ~ .tiles { margin-top: 28px; }
.urgent-ic { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--warn-bg); color: var(--warn); }
.urgent-ic svg { width: 28px; height: 28px; }
.urgent h2 { margin: 0 0 6px; font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
.urgent p { margin: 0; color: var(--muted); }
.urgent .urgent-hours { margin-top: 6px; font-weight: 600; color: var(--heading); }
.urgent-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
@media (max-width: 860px) {
  .urgent { grid-template-columns: auto 1fr; margin-top: -36px; padding: 22px; }
  .urgent-actions { grid-column: 1 / -1; justify-content: stretch; }
  .urgent-actions .btn { flex: 1 1 200px; }
}
@media (max-width: 420px) {
  .urgent { grid-template-columns: 1fr; }
  .urgent-ic { width: 46px; height: 46px; }
}

/* Live Google rating (shown only when the server has a Google API key) */
.g-rating {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 22px; padding: 8px 16px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .92rem; color: var(--heading);
}
.g-rating[hidden] { display: none; }
.g-rating b { font-family: var(--display); font-size: 1rem; }
.g-stars {
  --pct: 100%; font-size: 1rem; letter-spacing: 2px; color: transparent;
  background: linear-gradient(90deg, #f5b400 var(--pct), rgba(148, 163, 184, .55) var(--pct)); -webkit-background-clip: text; background-clip: text;
}
.hero .g-rating, .quote .g-rating { border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08); color: #fff; }
.quote .g-rating { margin: 0 0 22px; }
.form-card .g-rating { margin: 0 0 20px; }
.review-stars { display: block; margin-bottom: 12px; letter-spacing: 3px; color: #ffc83d; }
.review-live blockquote { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7; overflow: hidden; }
.review figcaption a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* Photos added to the estimate form */
.file-drop:has(input:disabled) { opacity: .6; cursor: default; }
.photo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.photo-list:empty, .photo-note:empty { display: none; }
.photo-list li { position: relative; display: grid; gap: 4px; min-width: 0; }
.photo-list img, .photo-doc { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.photo-doc { display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.photo-name { overflow: hidden; font-size: .75rem; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.photo-remove {
  position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(11, 16, 32, .78); font-size: 1.1rem; line-height: 1; color: #fff; cursor: pointer;
}
.photo-remove:hover { background: var(--bad); }
.photo-note { margin: 8px 0 0; font-size: .85rem; font-weight: 600; color: var(--bad); }
.field-hint { margin: 8px 0 0; font-size: .85rem; color: var(--muted); }
/* Hidden box that only spam bots fill in */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* "Take a photo" opens the camera on phones and tablets; computers just get "Choose photos" */
.photo-pick { display: grid; gap: 10px; }
.file-camera { display: none; }
@media (hover: none) and (pointer: coarse) {
  .photo-pick { grid-template-columns: 1fr 1fr; }
  .file-camera { display: block; border-style: solid; border-color: var(--brand); background: var(--brand-soft); font-weight: 600; color: var(--brand-text); }
}

/* Free online estimate, at the top of every page: a header button on computers,
   in the top strip on phones (where the header links are inside the menu) */
.nav-links .nav-estimate { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -8px rgba(31, 60, 255, .6); }
.nav-links .nav-estimate:hover { background: var(--contrast); color: var(--contrast-text); }
.nav-call .nav-cta { margin-left: 0; }
.topbar-cta { display: none; }
@media (max-width: 1240px) { .nav-long { display: none; } }
@media (min-width: 861px) and (max-width: 1060px) { .nav-call { display: none; } } /* the number is in the top strip */
@media (max-width: 860px) {
  .topbar .container { align-items: center; }
  .topbar a.topbar-cta { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--brand); font-weight: 600; color: #fff; white-space: nowrap; }
  .topbar .topbar-cta span { display: inline; }
}
@media (max-width: 380px) { .topbar .topbar-cta .cta-long { display: none; } }

/* Sizes in inches or centimetres: the labels follow the choice */
.choice.units { grid-column: 1 / -1; margin: 0; }
.u-cm { display: none; }
#contact-form:has(input[name="units"][value="cm"]:checked) .u-in { display: none; }
#contact-form:has(input[name="units"][value="cm"]:checked) .u-cm { display: inline; }
.sizes-hint { grid-column: 1 / -1; margin-top: -6px; }

/* Estimate form: the windows or pieces, each a card with its size, quantity and photo */
.windows { grid-column: 1 / -1; min-width: 0; }
.windows-title, .window-photo-label { display: block; margin: 0; font-size: .88rem; font-weight: 600; color: var(--heading); }
.windows-max { font-weight: 500; color: var(--muted); }
.windows .sizes-hint { margin: 4px 0 0; }
.window-list { display: grid; gap: 12px; margin: 12px 0 0; padding: 0; list-style: none; }
.window { padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.window-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.window-title { margin: 0; font-size: 1rem; color: var(--heading); }
.window-remove { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: inherit; font-size: .85rem; font-weight: 600; color: var(--bad); cursor: pointer; }
.window-remove:hover { border-color: var(--bad); }
.window-grid { display: grid; grid-template-columns: 1fr 1fr 7.5rem; gap: 12px; }
.window-grid > * { min-width: 0; }
.window-photo { grid-column: 1 / -1; }
.window .photo-pick { margin-top: 6px; }
.window .file-drop { padding: 12px; }
.window-thumb { display: flex; align-items: center; gap: 10px; margin-top: 10px; min-width: 0; }
.window-thumb:empty { display: none; }
.window-thumb img { flex: none; width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.window-thumb .photo-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; color: var(--muted); }
.window-thumb .photo-remove { position: static; flex: none; }
.add-window { width: 100%; margin-top: 12px; padding: 14px; border: 2px dashed var(--brand); border-radius: var(--radius-sm); background: var(--brand-soft); font: inherit; font-weight: 600; color: var(--brand-text); cursor: pointer; }
.add-window:hover { background: var(--surface); }
.add-window:focus-visible, .window-remove:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }
.more-files .photo-pick { margin-top: 6px; }
@media (max-width: 560px) {
  .window-grid { grid-template-columns: 1fr 1fr; }
  .window-grid > .field:nth-child(3) { grid-column: 1 / -1; }
}

/* Estimate form in four numbered steps, made for thumbs: 16px text (so phones
   don't zoom into a box), buttons at least 44px tall, choices in a grid */
#contact-form .field input, #contact-form .field textarea, #contact-form .field select { font-size: 1rem; }
.form-step { padding: 20px 0 4px; border-top: 1px solid var(--line); }
.form-step:first-child { padding-top: 4px; border-top: 0; }
.step-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 1.12rem; color: var(--heading); }
.step-num { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); font-size: .9rem; font-weight: 700; color: #fff; }
.step-optional { font-size: .85rem; font-weight: 500; color: var(--muted); }
.form-step > .field + .field, .form-step > .choice + .field { margin-top: 14px; }
/* While a box in the form is being typed in, the phone bar at the bottom steps aside (it would cover the box above the keyboard) */
body.typing .action-bar { transform: translateY(150%); }
.choice span { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-align: center; line-height: 1.25; }
.choice-grid label { margin: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.choice-grid legend { grid-column: 1 / -1; }
.choice-grid span { display: flex; width: 100%; height: 100%; padding: 10px 12px; border-radius: 12px; }
.choice.units { margin-bottom: 6px; }
.qty-stepper { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 6px; align-items: stretch; }
.qty-stepper input { padding-left: 4px; padding-right: 4px; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.qty-stepper input::-webkit-inner-spin-button, .qty-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty-step { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font: inherit; font-size: 1.3rem; font-weight: 600; line-height: 1; color: var(--heading); cursor: pointer; touch-action: manipulation; }
.qty-step:hover { border-color: var(--brand); color: var(--brand-text); }
.qty-step:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }
.window-grid { grid-template-columns: 1fr 1fr 9.5rem; }
.windows .add-window .windows-max { font-weight: 500; }
@media (max-width: 560px) {
  .form-card { padding: 20px 16px; }
  .form-card h2 { font-size: 1.6rem; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .choice-when { grid-template-columns: 1fr 1fr 1fr; }
  .choice-when span { font-size: .85rem; padding: 8px 6px; }
  .window { padding: 12px; }
  .window-grid { grid-template-columns: 1fr 1fr; }
  .window-grid > .field-qty { grid-column: 1 / -1; }
  .field-qty .qty-stepper { grid-template-columns: 52px minmax(0, 8rem) 52px; }
  #contact-form .btn-block { padding-top: 16px; padding-bottom: 16px; font-size: 1.05rem; }
}

/* A finished window folded into one line (when the next one is added); Edit opens it again */
.window-summary { display: none; }
.window.collapsed { padding: 6px 8px 6px 14px; }
.window.collapsed .window-head { margin: 0; }
.window.collapsed .window-grid { display: none; }
.window.collapsed .window-title { flex: none; font-size: .95rem; }
.window.collapsed .window-summary {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; min-height: 44px; padding: 4px 6px;
  border: 0; border-radius: 10px; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer;
}
.window.collapsed .window-summary:hover .ws-edit { text-decoration: underline; }
.window-summary:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }
.ws-text { flex: 1; min-width: 0; overflow: hidden; font-size: .9rem; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); }
.ws-thumb:empty { display: none; }
.ws-thumb img { display: block; width: 32px; height: 32px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.ws-edit { flex: none; font-size: .88rem; font-weight: 600; color: var(--brand-text); }
.window.collapsed .window-remove { padding: 4px 10px; }
/* The open window, tighter */
.window { padding: 12px 14px 14px; }
.window-grid { gap: 10px; }
.window .file-drop { padding: 9px 10px; font-size: .88rem; }
.window-head { margin-bottom: 8px; }
/* Folded: Remove is a small ✕ (its name, "Remove window N", stays for screen readers) so the summary has room */
.window.collapsed .window-remove { display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; font-size: 0; }
.window.collapsed .window-remove::before { content: "✕"; font-size: .95rem; line-height: 1; }
.window.collapsed .window-head { gap: 4px; }
.window .file-drop span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
