/* Beckenham Property Support — theme layer on top of Bootstrap 5.3.3
 * (assets/vendor/bootstrap/bootstrap.min.css). Bootstrap supplies the grid,
 * flex/spacing utilities, responsive display helpers (d-none/d-lg-flex),
 * and the Offcanvas/Collapse components; this file supplies the brand
 * (navy/gold/cream), typography and the small set of custom components
 * Bootstrap doesn't have an equivalent for. Load order: bootstrap.min.css,
 * then this file — plain same-specificity rules below win by cascade
 * order, no !important needed. */

:root {
  --navy: #1a1a2e;
  --charcoal: #2d2d44;
  --gold: #d4af37;
  --gold-dark: #b8962e;
  --cream: #faf6ee;
  --light-gray: #f5f5f5;
  --text: #333333;
  --muted: #666666;
  --border: #e5e7eb;
  --whatsapp: #1B7A43;      /* verified ≈5.4:1 on white — passes AA */
  --whatsapp-dark: #145C34;
  --header-h: 64px;         /* used by scroll-margin-top below */
}
@media (min-width: 768px) { :root { --header-h: 76px; } }

html {
  scroll-behavior: smooth;
  color-scheme: light only;
}
@media (prefers-color-scheme: dark) {
  html { color-scheme: light only; }
}
html, body {
  background-color: #ffffff;
  color: #333333;
}
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Horizontal-overflow guard, scoped below the sticky header (not on
 * html/body — doing it there breaks position:sticky, see prior incident
 * notes) so the header stays pinned while decorative off-canvas glows
 * still get clipped. */
#page-overflow-guard {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Every in-page anchor target needs room for the sticky header, or the
 * heading lands underneath it when you follow a link straight to #id. */
#services, #about, #contact,
#property-maintenance, #roof-repairs, #guttering-fascias,
#painting-decorating, #roof-cleaning, #external-render-repairs,
#cleaning-deep-cleaning, #loft-insulation, #property-refurbishment,
#void-property-refurbishment, #fire-door-compliance, #fire-stopping {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

/* ---------- Headings ---------- */
:root { --heading-color: var(--navy); }
.bg-navy, .bg-navy *, .hero-bg, .hero-bg * { --heading-color: #ffffff; }
.card, .bg-white, .bg-light-gray, .bg-cream { --heading-color: var(--navy); }
.font-display { font-family: 'Montserrat', 'Inter', system-ui, sans-serif; letter-spacing: -0.02em; }
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Inter', system-ui, sans-serif;
  letter-spacing: -0.02em;
  color: var(--heading-color);
}
.font-serif, .serif-display {
  font-family: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  font-feature-settings: "ss01", "ss02";
  letter-spacing: -0.015em;
  font-weight: 500;
}
.italic-serif { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-feature-settings: "ss01"; }

/* ---------- Brand colour utilities (Bootstrap covers layout/spacing;
 * these are the brand-specific pieces it doesn't ship). ---------- */
.bg-navy { background-color: var(--navy) !important; }
.bg-cream { background-color: var(--cream) !important; }
.bg-light-gray { background-color: var(--light-gray) !important; }
.bg-gold { background-color: var(--gold) !important; }
.text-navy { color: var(--navy) !important; }
.text-gold { color: var(--gold) !important; }
.text-gold-dark { color: var(--gold-dark) !important; }
.text-ink { color: var(--text) !important; }
.text-muted { color: var(--muted) !important; }
.text-whatsapp { color: var(--whatsapp) !important; }
.text-white-90 { color: rgba(255,255,255,.9) !important; }
.text-white-80 { color: rgba(255,255,255,.8) !important; }
.text-white-70 { color: rgba(255,255,255,.7) !important; }
.text-white-60 { color: rgba(255,255,255,.6) !important; }
.text-white-55 { color: rgba(255,255,255,.55) !important; }
.text-white-50 { color: rgba(255,255,255,.5) !important; }
.text-white-40 { color: rgba(255,255,255,.4) !important; }
.border-white-10 { border-color: rgba(255,255,255,.1) !important; }
.border-gold-30 { border-color: rgba(212,175,55,.3) !important; }
.bg-gold-15 { background-color: rgba(212,175,55,.15) !important; }

/* Eyebrow label. Gold text passes contrast on dark surfaces (8.1:1 on
 * navy) but fails badly on light ones (2.1:1 on white) — the label text
 * switches to muted on light surfaces; the dash stays gold everywhere
 * (decorative, not held to a text contrast ratio). */
:root { --eyebrow-color: var(--gold); }
.bg-white, .bg-light-gray, .bg-cream, .card { --eyebrow-color: var(--muted); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--eyebrow-color);
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--gold); flex-shrink: 0; }
.eyebrow.is-center { justify-content: center; }
.eyebrow.is-no-rule::before { display: none; }

.gold-bar::before {
  content: ''; display: block; width: 48px; height: 3px;
  background: var(--gold); margin-bottom: 1rem; border-radius: 2px;
}

/* ---------- Buttons (Bootstrap's .btn base handles :active/:disabled
 * mechanics; these rules redeclare the brand colours/sizing — same
 * specificity as Bootstrap's, later in cascade order, so they win per
 * property without !important). ---------- */
.btn {
  min-height: 48px;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  border-radius: 6px;
  gap: 0.5rem;
}
.btn-sm { min-height: 44px; padding: 0.6rem 1.25rem; }
.btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  box-shadow: none;
}
.btn-primary {
  background-color: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--gold-dark);
  border-color: var(--gold-dark);
  color: var(--navy);
}
.btn-outline-light {
  background-color: transparent;
  border-color: rgba(255,255,255,0.6);
  color: #ffffff;
}
.btn-outline-light:hover {
  background-color: #ffffff;
  border-color: #ffffff;
  color: var(--navy);
}
.btn-whatsapp {
  background-color: var(--whatsapp);
  border-color: var(--whatsapp);
  color: #ffffff;
}
.btn-whatsapp:hover, .btn-whatsapp:focus {
  background-color: var(--whatsapp-dark);
  border-color: var(--whatsapp-dark);
  color: #ffffff;
}

/* ---------- Hero / cards / forms ---------- */
.hero-bg {
  background:
    radial-gradient(circle at 20% 30%, rgba(212,175,55,0.12), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,140,0,0.08), transparent 50%),
    linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
}
.card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 200ms ease, box-shadow 200ms ease;
  border: 0;
}
.card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.service-card { position: relative; overflow: hidden; }
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 4px; background: var(--gold);
}

input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  width: 100%;
  min-height: 48px;
  color: var(--text);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.25);
}
textarea { min-height: 120px; resize: vertical; }
label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 0.4rem; font-size: 0.95rem; }
.required-mark { color: #b3261e; }
.field-error {
  display: none;
  color: #b3261e;
  font-size: 0.85rem;
  margin-top: 0.35rem;
  font-weight: 600;
}
.is-invalid { border-color: #b3261e !important; }
.is-invalid + .field-error,
.is-invalid ~ .field-error { display: block; }

/* FAQ accordion — native <details>, no JS required */
.faq-item summary {
  list-style: none; cursor: pointer; padding: 1.25rem 0;
  font-weight: 600; color: var(--navy);
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; font-size: 1.05rem; border-bottom: 1px solid var(--border);
  min-height: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .faq-icon { flex-shrink: 0; width: 24px; height: 24px; transition: transform 200ms ease; color: var(--gold); }
.faq-item[open] summary .faq-icon { transform: rotate(45deg); }
.faq-item .faq-body { padding: 1rem 0 1.5rem; color: var(--muted); line-height: 1.7; border-bottom: 1px solid var(--border); }

/* ---------- Sticky mobile CTA bar ---------- */
.mobile-cta-bar {
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-cta-bar a { min-height: 56px; font-size: 0.95rem; }
@media (max-width: 991.98px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Header logo sizing (natural 559×105; ~20-30% larger than the
 * pre-consolidation baseline) ---------- */
.logo-header { height: 34px; width: auto; }
@media (min-width: 576px) { .logo-header { height: 38px; } }
@media (min-width: 768px) { .logo-header { height: 44px; } }
@media (min-width: 992px) { .logo-header { height: 52px; } }
.logo-offcanvas { height: 30px; width: auto; }
@media (min-width: 576px) { .logo-offcanvas { height: 34px; } }
.logo-footer { height: 56px; width: auto; }
@media (min-width: 576px) { .logo-footer { height: 62px; } }
@media (min-width: 992px) { .logo-footer { height: 72px; } }

/* The brand mark has dark-navy artwork on a transparent background — on
 * dark surfaces (footer, offcanvas) flip it to white via filter rather
 * than shipping a second file. */
.logo-dark { filter: none; opacity: 1; }
.logo-light { filter: brightness(0) invert(1); opacity: 0.95; }

/* ---------- Bootstrap Offcanvas restyle (navy/gold mobile menu) ---------- */
.offcanvas {
  --bs-offcanvas-width: min(360px, 88vw);
  --bs-offcanvas-bg: var(--navy);
  --bs-offcanvas-color: #ffffff;
}
.offcanvas .btn-close {
  filter: none;
  background-image: none;
  width: 44px; height: 44px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  position: relative;
  opacity: 1;
}
.offcanvas .btn-close::before, .offcanvas .btn-close::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 16px; height: 2px; background: #ffffff;
  transform-origin: center;
}
.offcanvas .btn-close::before { transform: translate(-50%,-50%) rotate(45deg); }
.offcanvas .btn-close::after { transform: translate(-50%,-50%) rotate(-45deg); }
.offcanvas .btn-close:hover::before, .offcanvas .btn-close:hover::after { background: var(--gold); }
.offcanvas .btn-close:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.offcanvas-nav a {
  display: flex; align-items: center; min-height: 56px;
  padding: 0.85rem 0.25rem;
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-weight: 600; font-size: 1.15rem; color: #ffffff;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
}
.offcanvas-nav a:hover, .offcanvas-nav a:focus-visible { color: var(--gold); }
.offcanvas-nav a.is-current { color: var(--gold); }

/* Desktop nav underline for the current section (updated by script.js
 * via IntersectionObserver as the visitor scrolls) */
.main-nav a { text-decoration: none; color: var(--navy); font-weight: 500; }
.main-nav a:hover, .main-nav a:focus-visible { color: var(--gold-dark); }
.main-nav a.is-current { color: var(--navy); font-weight: 700; border-bottom: 2px solid var(--gold); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--navy); color: #fff;
  padding: 0.5rem 1rem; z-index: 1100;
  text-decoration: none; border-radius: 0 0 6px 0;
}
.skip-link:focus { top: 0; }

/* ---------- Section rhythm / containers ---------- */
.section { padding: 4rem 0; }
@media (min-width: 768px) { .section { padding: 5.5rem 0; } }
.container-narrow { max-width: 1200px; }
.container-text { max-width: 720px; }

/* ---------- Photographic CTA band ---------- */
.cta-photo { position: relative; overflow: hidden; isolation: isolate; padding-top: 2.5rem; padding-bottom: 2.5rem; }
@media (min-width: 768px) { .cta-photo { padding-top: 4rem; padding-bottom: 4rem; } }
@media (min-width: 1024px) { .cta-photo { padding-top: 5rem; padding-bottom: 5rem; } }
.cta-photo__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.cta-photo__bg img { width: 100%; height: 100%; object-fit: cover; object-position: right center; display: block; }
@media (max-width: 767px) { .cta-photo__bg img { object-position: center; } }
.cta-photo__overlay { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: rgba(26,26,46,0.82); }
@media (min-width: 768px) {
  .cta-photo__overlay { background: linear-gradient(90deg, rgba(26,26,46,0.88) 0%, rgba(26,26,46,0.72) 42%, rgba(26,26,46,0.32) 100%); }
}
.cta-photo__content { position: relative; z-index: 2; }

/* ---------- Framed image with gold corner accents ---------- */
.frame-image { position: relative; padding: 14px; }
.frame-image::before, .frame-image::after {
  content: ''; position: absolute; width: 32px; height: 32px; border: 1.5px solid var(--gold);
}
.frame-image::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.frame-image::after { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.frame-image > img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Scroll reveal — opt-in via data-reveal; hidden ONLY once JS
 * has confirmed it can drive the animation (html.js). No JS → visible. */
.js [data-reveal] {
  opacity: 0; transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(.16,1,.3,1), transform 700ms cubic-bezier(.16,1,.3,1);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---------- Article typography (privacy/terms/cookies) ---------- */
.article { max-width: 720px; margin: 0 auto; color: var(--text); font-size: 1.0625rem; line-height: 1.75; }
.article p { margin: 0 0 1.25em; }
.article h2 {
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.625rem;
  color: var(--navy); margin: 2.25em 0 0.75em; letter-spacing: -0.02em;
  scroll-margin-top: calc(var(--header-h) + 12px);
}
.article ul { margin: 0 0 1.25em 1.25em; padding-left: 0.5rem; }
.article ul li { list-style: none; position: relative; padding-left: 1.25rem; margin-bottom: 0.5rem; }
.article ul li::before {
  content: ''; position: absolute; left: 0; top: 0.65em; width: 6px; height: 6px;
  background: var(--gold); border-radius: 50%;
}
.article a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.article a:hover { color: var(--gold-dark); }
.article strong { color: var(--navy); }
