/* =========================================================================
   Pergolas Perth Experts — Locked Component Library
   Brand direction: Jarrah-timber warmth × WA red-dirt sunset.
   Deep umber/charcoal structure, burnt-terracotta accent, sanded-cream paper.
   ========================================================================= */

:root {
  /* ---- Brand colour tokens ---- */
  --bc-primary: #3B2A20;        /* deep jarrah timber brown — headers, nav, dark sections */
  --bc-primary-dark: #241810;   /* deepest ironbark, for hover/pressed states */
  --bc-primary-tint: #5A4536;   /* lighter timber tone for secondary surfaces */

  --bc-accent: #AD5624;         /* burnt terracotta / sunset rust (WCAG AA vs white text) */
  --bc-accent-dark: #8C4419;    /* pressed/hover state for accent */
  --bc-accent-tint: #E4A176;    /* soft terracotta for highlights/badges */

  --bc-paper: #FBF4EA;          /* sanded-timber cream — page background */
  --bc-paper-alt: #F2E4CE;      /* deeper cream for alternating sections */
  --bc-paper-deep: #E9D6B8;     /* card/well background */

  --bc-ink: #241A12;            /* warm near-black — primary text */
  --bc-ink-soft: #5B4A3B;       /* muted brown-grey — secondary text */
  --bc-ink-faint: #8A7862;      /* tertiary text, placeholders */

  --bc-line: #DCC9AB;           /* hairline borders on cream */
  --bc-line-dark: rgba(255,255,255,0.16); /* hairline borders on dark surfaces */

  --bc-white: #FFFFFF;
  --bc-success: #3F6B3B;
  --bc-focus: #2E6FA7;

  /* ---- Type scale ---- */
  --bc-font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --bc-font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --bc-size-xs: 0.8125rem;
  --bc-size-sm: 0.9375rem;
  --bc-size-base: 1.0625rem;
  --bc-size-md: 1.25rem;
  --bc-size-lg: 1.625rem;
  --bc-size-xl: 2.25rem;
  --bc-size-2xl: 3rem;
  --bc-size-3xl: 3.75rem;

  --bc-lh-tight: 1.15;
  --bc-lh-snug: 1.35;
  --bc-lh-normal: 1.6;

  /* ---- Space scale ---- */
  --bc-space-3xs: 0.25rem;
  --bc-space-2xs: 0.5rem;
  --bc-space-xs: 0.75rem;
  --bc-space-sm: 1rem;
  --bc-space-md: 1.5rem;
  --bc-space-lg: 2.5rem;
  --bc-space-xl: 4rem;
  --bc-space-2xl: 6rem;
  --bc-space-3xl: 8rem;

  /* ---- Radius / shadow / motion ---- */
  --bc-radius-sm: 4px;
  --bc-radius-md: 10px;
  --bc-radius-lg: 18px;
  --bc-shadow-sm: 0 2px 8px rgba(36, 26, 18, 0.12);
  --bc-shadow-md: 0 12px 32px rgba(36, 26, 18, 0.18);
  --bc-ease: 180ms ease;

  --bc-container-w: 1160px;
}

/* ---------------------------------------------------------------------
   Reset / base
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bc-paper);
  color: var(--bc-ink);
  font-family: var(--bc-font-body);
  font-size: var(--bc-size-base);
  line-height: var(--bc-lh-normal);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--bc-font-display);
  line-height: var(--bc-lh-tight);
  margin: 0 0 var(--bc-space-sm);
  font-weight: 600;
  color: var(--bc-primary);
}
p { margin: 0 0 var(--bc-space-sm); }
:focus-visible { outline: 3px solid var(--bc-focus); outline-offset: 2px; }

/* ---------------------------------------------------------------------
   Container / eyebrow
   --------------------------------------------------------------------- */
.bc-container {
  width: 100%;
  max-width: var(--bc-container-w);
  margin: 0 auto;
  padding: 0 var(--bc-space-md);
}

.bc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--bc-space-3xs);
  font-family: var(--bc-font-body);
  font-size: var(--bc-size-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bc-accent-dark);
  margin-bottom: var(--bc-space-xs);
}
.bc-eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--bc-accent);
  display: inline-block;
}
.bc-eyebrow--on-dark { color: var(--bc-accent-tint); }

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.bc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--bc-space-3xs);
  font-family: var(--bc-font-body);
  font-weight: 700;
  font-size: var(--bc-size-sm);
  letter-spacing: 0.01em;
  padding: 0.85em 1.7em;
  border-radius: var(--bc-radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--bc-ease), color var(--bc-ease), border-color var(--bc-ease), transform var(--bc-ease);
}
.bc-btn:hover { transform: translateY(-1px); }
.bc-btn:active { transform: translateY(0); }

.bc-btn--primary {
  background: var(--bc-primary);
  color: var(--bc-white);
  border-color: var(--bc-primary);
}
.bc-btn--primary:hover { background: var(--bc-primary-dark); border-color: var(--bc-primary-dark); }

.bc-btn--accent {
  background: var(--bc-accent);
  color: var(--bc-white);
  border-color: var(--bc-accent);
}
.bc-btn--accent:hover { background: var(--bc-accent-dark); border-color: var(--bc-accent-dark); }

.bc-btn--ghost {
  background: transparent;
  color: var(--bc-white);
  border-color: rgba(255,255,255,0.55);
}
.bc-btn--ghost:hover { background: rgba(255,255,255,0.14); border-color: var(--bc-white); }

.bc-btn--outline {
  background: transparent;
  color: var(--bc-primary);
  border-color: var(--bc-primary);
}
.bc-btn--outline:hover { background: var(--bc-primary); color: var(--bc-white); }

/* ---------------------------------------------------------------------
   Site shell: header / nav / footer
   --------------------------------------------------------------------- */
.site-header {
  background: var(--bc-paper);
  border-bottom: 1px solid var(--bc-line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--bc-space-md);
  padding: var(--bc-space-sm) 0;
}
.site-header__brand {
  display: flex;
  align-items: center;
  gap: var(--bc-space-xs);
  font-family: var(--bc-font-display);
  font-weight: 700;
  font-size: var(--bc-size-md);
  color: var(--bc-primary);
  text-decoration: none;
}
.site-header__brand-mark {
  width: 40px; height: 40px;
  border-radius: var(--bc-radius-sm);
  background: var(--bc-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bc-white);
  font-weight: 700;
  flex-shrink: 0;
}

.site-nav { display: flex; align-items: center; gap: var(--bc-space-lg); }
.site-nav__list {
  list-style: none;
  display: flex;
  gap: var(--bc-space-md);
  margin: 0; padding: 0;
  font-weight: 600;
  font-size: var(--bc-size-sm);
}
.site-nav__list a {
  text-decoration: none;
  color: var(--bc-ink-soft);
  padding: var(--bc-space-3xs) 0;
  border-bottom: 2px solid transparent;
  transition: color var(--bc-ease), border-color var(--bc-ease);
}
.site-nav__list a:hover,
.site-nav__list a[aria-current="page"] {
  color: var(--bc-primary);
  border-color: var(--bc-accent);
}
.site-nav__toggle { display: none; }

@media (max-width: 760px) {
  .site-nav__list { display: none; }
  .site-nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border-radius: var(--bc-radius-sm);
    border: 1px solid var(--bc-line);
    background: var(--bc-paper);
  }
}

.site-footer {
  background: var(--bc-primary);
  color: rgba(255,255,255,0.86);
  padding: var(--bc-space-xl) 0 var(--bc-space-md);
}
.site-footer a { color: var(--bc-accent-tint); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--bc-space-lg);
  padding-bottom: var(--bc-space-lg);
  border-bottom: 1px solid var(--bc-line-dark);
}
.site-footer__heading {
  font-family: var(--bc-font-body);
  font-size: var(--bc-size-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bc-accent-tint);
  margin-bottom: var(--bc-space-xs);
}
.site-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--bc-space-2xs); font-size: var(--bc-size-sm); }
.site-footer__bottom {
  padding-top: var(--bc-space-md);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--bc-space-xs);
  font-size: var(--bc-size-xs);
  color: rgba(255,255,255,0.62);
}
@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------- */
.bc-hero {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(193, 98, 43, 0.35), transparent 60%),
    linear-gradient(160deg, var(--bc-primary) 0%, var(--bc-primary-dark) 100%);
  color: var(--bc-white);
  padding: var(--bc-space-2xl) 0;
  position: relative;
  overflow: hidden;
}
.bc-hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--bc-space-xl);
  align-items: center;
}
.bc-hero__title {
  font-size: var(--bc-size-3xl);
  color: var(--bc-white);
  margin-bottom: var(--bc-space-sm);
}
.bc-hero__lede {
  font-size: var(--bc-size-md);
  color: rgba(255,255,255,0.86);
  max-width: 46ch;
  margin-bottom: var(--bc-space-lg);
}
.bc-hero__actions { display: flex; gap: var(--bc-space-sm); flex-wrap: wrap; }
.bc-hero__media {
  border-radius: var(--bc-radius-lg);
  overflow: hidden;
  box-shadow: var(--bc-shadow-md);
  border: 1px solid var(--bc-line-dark);
}
.bc-hero__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.bc-hero__stats {
  display: flex;
  gap: var(--bc-space-lg);
  margin-top: var(--bc-space-lg);
  flex-wrap: wrap;
}
.bc-hero__stat-num {
  font-family: var(--bc-font-display);
  font-size: var(--bc-size-lg);
  color: var(--bc-accent-tint);
  display: block;
}
.bc-hero__stat-label { font-size: var(--bc-size-xs); color: rgba(255,255,255,0.72); }

@media (max-width: 900px) {
  .bc-hero__grid { grid-template-columns: 1fr; }
  .bc-hero__title { font-size: var(--bc-size-2xl); }
}

/* ---------------------------------------------------------------------
   Prose
   --------------------------------------------------------------------- */
.bc-prose {
  padding: var(--bc-space-2xl) 0;
}
.bc-prose__inner { max-width: 72ch; }
.bc-prose--has-color { background: var(--bc-paper-alt); }
.bc-prose--dark { background: var(--bc-primary); color: rgba(255,255,255,0.88); }
.bc-prose--dark h2, .bc-prose--dark h3 { color: var(--bc-white); }
.bc-prose--with-image .bc-prose__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--bc-space-xl);
  align-items: center;
  max-width: none;
}
.bc-prose--with-image .bc-prose__media img {
  border-radius: var(--bc-radius-lg);
  box-shadow: var(--bc-shadow-sm);
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
}
@media (max-width: 800px) {
  .bc-prose--with-image .bc-prose__grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------
   Grid (services / features)
   --------------------------------------------------------------------- */
.bc-grid { padding: var(--bc-space-2xl) 0; }
.bc-grid__header { max-width: 60ch; margin-bottom: var(--bc-space-lg); }
.bc-grid__list {
  display: grid;
  gap: var(--bc-space-md);
  list-style: none;
  margin: 0; padding: 0;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.bc-grid--2col .bc-grid__list { grid-template-columns: repeat(2, 1fr); }
.bc-grid--3col .bc-grid__list { grid-template-columns: repeat(3, 1fr); }
.bc-grid--4col .bc-grid__list { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .bc-grid--3col .bc-grid__list,
  .bc-grid--4col .bc-grid__list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .bc-grid--2col .bc-grid__list,
  .bc-grid--3col .bc-grid__list,
  .bc-grid--4col .bc-grid__list { grid-template-columns: 1fr; }
}

.bc-grid__card {
  background: var(--bc-white);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-md);
  padding: var(--bc-space-md);
  display: flex;
  flex-direction: column;
  gap: var(--bc-space-2xs);
  transition: box-shadow var(--bc-ease), transform var(--bc-ease);
}
.bc-grid__card:hover { box-shadow: var(--bc-shadow-sm); transform: translateY(-2px); }
.bc-grid__card-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: var(--bc-radius-sm);
  margin-bottom: var(--bc-space-2xs);
}
.bc-grid__card-icon {
  width: 48px; height: 48px;
  border-radius: var(--bc-radius-sm);
  background: var(--bc-paper-alt);
  color: var(--bc-accent-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--bc-size-md);
  margin-bottom: var(--bc-space-2xs);
}
.bc-grid__card-title { margin: 0; font-size: var(--bc-size-md); }
.bc-grid__card-copy { margin: 0; color: var(--bc-ink-soft); font-size: var(--bc-size-sm); }

.bc-grid--imaged .bc-grid__card { padding: 0; overflow: hidden; }
.bc-grid--imaged .bc-grid__card-body { padding: var(--bc-space-md); }
.bc-grid--imaged .bc-grid__card-img { margin-bottom: 0; border-radius: 0; }

.bc-grid--text-only .bc-grid__card { background: var(--bc-paper-alt); border-color: var(--bc-line); }

/* ---------------------------------------------------------------------
   FAQ
   --------------------------------------------------------------------- */
.bc-faq { padding: var(--bc-space-2xl) 0; background: var(--bc-paper-alt); }
.bc-faq__inner { max-width: 78ch; }
.bc-faq__list { display: grid; gap: var(--bc-space-sm); margin-top: var(--bc-space-lg); }
.bc-faq__item {
  background: var(--bc-white);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-md);
  padding: var(--bc-space-sm) var(--bc-space-md);
}
.bc-faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--bc-space-sm);
  font-family: var(--bc-font-display);
  font-weight: 600;
  font-size: var(--bc-size-md);
  color: var(--bc-primary);
  cursor: pointer;
  list-style: none;
}
.bc-faq__q::-webkit-details-marker { display: none; }
.bc-faq__q::after {
  content: "+";
  flex-shrink: 0;
  font-size: var(--bc-size-md);
  color: var(--bc-accent);
}
details[open] .bc-faq__q::after { content: "\2212"; }
.bc-faq__a { color: var(--bc-ink-soft); margin-top: var(--bc-space-xs); }

/* ---------------------------------------------------------------------
   Gallery
   --------------------------------------------------------------------- */
.bc-gallery { padding: var(--bc-space-2xl) 0; }
.bc-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--bc-space-sm);
  margin-top: var(--bc-space-lg);
}
.bc-gallery__cell {
  position: relative;
  border-radius: var(--bc-radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
}
.bc-gallery__cell img { width: 100%; height: 100%; object-fit: cover; }
.bc-gallery__caption {
  position: absolute;
  inset: auto 0 0 0;
  background: linear-gradient(0deg, rgba(36,26,18,0.85), transparent);
  color: var(--bc-white);
  font-size: var(--bc-size-xs);
  padding: var(--bc-space-md) var(--bc-space-xs) var(--bc-space-xs);
}
@media (max-width: 760px) {
  .bc-gallery__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .bc-gallery__grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------
   Video
   --------------------------------------------------------------------- */
.bc-video { padding: var(--bc-space-2xl) 0; background: var(--bc-paper-alt); }
.bc-video__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--bc-space-xl);
  align-items: center;
}
.bc-video__copy { max-width: 46ch; }
.bc-video__player { width: 100%; }
.bc-video__frame {
  position: relative;
  border-radius: var(--bc-radius-lg);
  overflow: hidden;
  box-shadow: var(--bc-shadow-md);
  aspect-ratio: 16/9;
  background: var(--bc-primary);
}
.bc-video__frame iframe,
.bc-video__frame video { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 860px) {
  .bc-video__grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------
   Map
   --------------------------------------------------------------------- */
.bc-map { padding: var(--bc-space-2xl) 0; }
.bc-map__grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: var(--bc-space-xl);
  align-items: stretch;
}
.bc-map__info {
  background: var(--bc-primary);
  color: var(--bc-white);
  border-radius: var(--bc-radius-lg);
  padding: var(--bc-space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--bc-space-sm);
}
.bc-map__addr { font-size: var(--bc-size-sm); color: rgba(255,255,255,0.85); }
.bc-map__addr strong { color: var(--bc-white); display: block; margin-bottom: var(--bc-space-3xs); }
.bc-map__frame {
  border-radius: var(--bc-radius-lg);
  overflow: hidden;
  min-height: 320px;
  border: 1px solid var(--bc-line);
}
.bc-map__frame iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }
@media (max-width: 860px) {
  .bc-map__grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------
   Testimonial
   --------------------------------------------------------------------- */
.bc-testimonial { padding: var(--bc-space-2xl) 0; background: var(--bc-primary); color: var(--bc-white); }
.bc-testimonial__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--bc-space-md);
}
.bc-testimonial__card {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--bc-line-dark);
  border-radius: var(--bc-radius-md);
  padding: var(--bc-space-md);
}
.bc-testimonial__quote {
  font-family: var(--bc-font-display);
  font-size: var(--bc-size-base);
  line-height: var(--bc-lh-snug);
  margin-bottom: var(--bc-space-sm);
}
.bc-testimonial__stars { color: var(--bc-accent-tint); letter-spacing: 0.15em; margin-bottom: var(--bc-space-2xs); }
.bc-testimonial__author { font-size: var(--bc-size-xs); color: rgba(255,255,255,0.7); font-weight: 700; }
@media (max-width: 860px) {
  .bc-testimonial__grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------
   Form band (lead capture)
   --------------------------------------------------------------------- */
.bc-formband { padding: var(--bc-space-2xl) 0; }
.bc-formband__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--bc-space-xl);
  align-items: start;
  background: var(--bc-paper-deep);
  border-radius: var(--bc-radius-lg);
  padding: var(--bc-space-xl);
}
.bc-formband__title { color: var(--bc-primary); }
.bc-formband__lede { color: var(--bc-ink-soft); max-width: 42ch; }
.bc-formband__form { display: grid; gap: var(--bc-space-sm); }

.bc-formband--intro .bc-formband__grid,
.bc-formband--final .bc-formband__grid {
  background: var(--bc-primary);
}
.bc-formband--intro .bc-formband__title,
.bc-formband--final .bc-formband__title { color: var(--bc-white); }
.bc-formband--intro .bc-formband__lede,
.bc-formband--final .bc-formband__lede { color: rgba(255,255,255,0.82); }

@media (max-width: 860px) {
  .bc-formband__grid { grid-template-columns: 1fr; padding: var(--bc-space-lg); }
}

.bc-form-field { display: grid; gap: var(--bc-space-3xs); }
.bc-form-field label {
  font-size: var(--bc-size-xs);
  font-weight: 700;
  color: var(--bc-ink-soft);
}
.bc-formband--intro .bc-form-field label,
.bc-formband--final .bc-form-field label { color: rgba(255,255,255,0.85); }
.bc-form-field input,
.bc-form-field textarea,
.bc-form-field select {
  font: inherit;
  font-size: var(--bc-size-sm);
  padding: 0.75em 0.9em;
  border-radius: var(--bc-radius-sm);
  border: 1px solid var(--bc-line);
  background: var(--bc-white);
  color: var(--bc-ink);
}
.bc-form-field input:focus,
.bc-form-field textarea:focus,
.bc-form-field select:focus { outline: 3px solid var(--bc-focus); outline-offset: 1px; }
.bc-form-field--required label::after {
  content: " *";
  color: var(--bc-accent);
}

/* ---------------------------------------------------------------------
   Utility
   --------------------------------------------------------------------- */
.bc-section-title { display: flex; flex-direction: column; }
.bc-visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
