/* ==========================================================================
   Patios Perth Elite — Locked Component Library
   Industry: outdoor living / patio & alfresco construction, Perth WA
   Palette cues: coral/salmon awning + timber posts from brand logo,
   deep dusk-slate for structure, warm sand paper background.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Work+Sans:wght@400;500;600;700&display=swap');

:root {
  /* ---- Brand tokens ---- */
  --bc-primary: #22394a;        /* deep dusk slate — structure, trust */
  --bc-primary-dark: #172733;
  --bc-primary-light: #3a5a72;
  --bc-accent: #e2585f;         /* coral/salmon from awning stripe — decorative use */
  --bc-accent-dark: #a83039;    /* AA-safe interactive coral — buttons, links, eyebrows */
  --bc-accent-darker: #7e232a;  /* hover/active state for accent-dark */
  --bc-accent-light: #f2a6a9;
  --bc-timber: #b6844f;         /* timber post tan, used sparingly */
  --bc-timber-dark: #8f6538;

  --bc-paper: #faf5ec;          /* warm sand background */
  --bc-paper-alt: #f2e9d8;      /* deeper sand for section banding */
  --bc-ink: #221d18;            /* warm near-black ink */
  --bc-ink-soft: #524a40;       /* secondary text on paper */
  --bc-white: #ffffff;
  --bc-line: #e3d7c2;           /* hairline border on paper */

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

  --bc-fs-h1: clamp(2.25rem, 1.6rem + 2.6vw, 3.6rem);
  --bc-fs-h2: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  --bc-fs-h3: clamp(1.3rem, 1.15rem + 0.7vw, 1.65rem);
  --bc-fs-lead: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
  --bc-fs-body: 1rem;
  --bc-fs-small: 0.875rem;
  --bc-lh-tight: 1.15;
  --bc-lh-normal: 1.6;

  /* ---- Space scale ---- */
  --bc-sp-1: 0.25rem;
  --bc-sp-2: 0.5rem;
  --bc-sp-3: 0.75rem;
  --bc-sp-4: 1rem;
  --bc-sp-5: 1.5rem;
  --bc-sp-6: 2rem;
  --bc-sp-7: 3rem;
  --bc-sp-8: 4.5rem;
  --bc-sp-9: 6.5rem;

  /* ---- Misc ---- */
  --bc-radius: 10px;
  --bc-radius-lg: 18px;
  --bc-shadow: 0 12px 30px -12px rgba(34, 25, 18, 0.28);
  --bc-shadow-sm: 0 4px 14px -6px rgba(34, 25, 18, 0.22);
  --bc-container: 1160px;
  --bc-ease: cubic-bezier(.2,.7,.3,1);
}

/* ==========================================================================
   Base / reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bc-paper);
  color: var(--bc-ink);
  font-family: var(--bc-font-body);
  font-size: var(--bc-fs-body);
  line-height: var(--bc-lh-normal);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--bc-accent-dark); }
h1, h2, h3, h4 {
  font-family: var(--bc-font-display);
  line-height: var(--bc-lh-tight);
  color: var(--bc-primary);
  margin: 0 0 var(--bc-sp-4);
  font-weight: 600;
}
h1 { font-size: var(--bc-fs-h1); font-weight: 700; }
h2 { font-size: var(--bc-fs-h2); }
h3 { font-size: var(--bc-fs-h3); }
p { margin: 0 0 var(--bc-sp-4); }

/* ==========================================================================
   Container / layout helpers
   ========================================================================== */
.bc-container {
  width: 100%;
  max-width: var(--bc-container);
  margin-inline: auto;
  padding-inline: var(--bc-sp-5);
}
@media (min-width: 640px) {
  .bc-container { padding-inline: var(--bc-sp-6); }
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */
.bc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--bc-sp-2);
  font-family: var(--bc-font-body);
  font-weight: 600;
  font-size: var(--bc-fs-body);
  padding: 0.85em 1.7em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition: transform .18s var(--bc-ease), box-shadow .18s var(--bc-ease), background-color .18s var(--bc-ease), color .18s var(--bc-ease);
}
.bc-btn:hover { transform: translateY(-2px); }
.bc-btn:focus-visible { outline: 3px solid var(--bc-primary-light); outline-offset: 2px; }

.bc-btn--primary {
  background: var(--bc-accent-dark);
  color: var(--bc-white);
  box-shadow: var(--bc-shadow-sm);
}
.bc-btn--primary:hover { background: var(--bc-accent-darker); }

.bc-btn--accent {
  background: var(--bc-primary);
  color: var(--bc-white);
  box-shadow: var(--bc-shadow-sm);
}
.bc-btn--accent:hover { background: var(--bc-primary-dark); }

.bc-btn--ghost {
  background: transparent;
  color: var(--bc-white);
  border-color: rgba(255,255,255,.6);
}
.bc-btn--ghost:hover { background: rgba(255,255,255,.12); 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 {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bc-paper);
  border-bottom: 1px solid var(--bc-line);
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--bc-sp-5);
  padding-block: var(--bc-sp-3);
}
.site-header__logo {
  display: flex;
  align-items: center;
  gap: var(--bc-sp-3);
  font-family: var(--bc-font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--bc-primary);
  text-decoration: none;
}
.site-header__logo img { height: 42px; width: auto; }

.site-nav { display: flex; }
.site-nav__list {
  list-style: none;
  display: flex;
  gap: var(--bc-sp-5);
  margin: 0;
  padding: 0;
}
.site-nav__list a {
  color: var(--bc-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--bc-fs-small);
  letter-spacing: .02em;
  padding: var(--bc-sp-2) 0;
  border-bottom: 2px solid transparent;
  transition: border-color .18s var(--bc-ease), color .18s var(--bc-ease);
}
.site-nav__list a:hover,
.site-nav__list a:focus-visible {
  color: var(--bc-accent-dark);
  border-bottom-color: var(--bc-accent);
}
.site-nav__cta { display: flex; align-items: center; }

@media (max-width: 780px) {
  .site-nav__list { display: none; }
}

.site-footer {
  background: var(--bc-primary-dark);
  color: rgba(255,255,255,.85);
  padding-block: var(--bc-sp-8) var(--bc-sp-6);
}
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--bc-sp-6);
  margin-bottom: var(--bc-sp-7);
}
.site-footer__heading {
  font-family: var(--bc-font-display);
  color: var(--bc-white);
  font-size: 1.05rem;
  margin-bottom: var(--bc-sp-3);
}
.site-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--bc-sp-2); }
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: var(--bc-sp-5);
  font-size: var(--bc-fs-small);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--bc-sp-3);
  color: rgba(255,255,255,.6);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.bc-hero {
  position: relative;
  background: linear-gradient(160deg, var(--bc-primary) 0%, var(--bc-primary-dark) 100%);
  color: var(--bc-white);
  overflow: hidden;
}
.bc-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 60% at 85% 15%, rgba(226,88,95,.35), transparent 70%);
  pointer-events: none;
}
.bc-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--bc-sp-7);
  align-items: center;
  padding-block: var(--bc-sp-9) var(--bc-sp-8);
}
.bc-hero .bc-eyebrow {
  color: var(--bc-accent-light);
}
.bc-hero h1 { color: var(--bc-white); }
.bc-hero__lede {
  font-size: var(--bc-fs-lead);
  color: rgba(255,255,255,.85);
  max-width: 46ch;
  margin-bottom: var(--bc-sp-6);
}
.bc-hero__actions { display: flex; flex-wrap: wrap; gap: var(--bc-sp-4); }
.bc-hero__media {
  border-radius: var(--bc-radius-lg);
  overflow: hidden;
  box-shadow: var(--bc-shadow);
  aspect-ratio: 4 / 3;
}
.bc-hero__media img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px) {
  .bc-hero__grid { grid-template-columns: 1fr; padding-block: var(--bc-sp-7) var(--bc-sp-6); }
}

/* ==========================================================================
   Prose
   ========================================================================== */
.bc-prose {
  padding-block: var(--bc-sp-8);
  background: var(--bc-paper);
  color: var(--bc-ink);
}
.bc-prose__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--bc-sp-6);
}
.bc-prose__grid.bc-prose--with-image {
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
.bc-prose__body :is(h2, h3) { color: inherit; }
.bc-prose__body p { color: var(--bc-ink-soft); max-width: 68ch; }
.bc-prose__img {
  border-radius: var(--bc-radius-lg);
  overflow: hidden;
  box-shadow: var(--bc-shadow-sm);
}

.bc-prose--has-color {
  background: var(--bc-paper-alt);
}
.bc-prose--dark {
  background: var(--bc-primary-dark);
  color: var(--bc-white);
}
.bc-prose--dark .bc-prose__body h2,
.bc-prose--dark .bc-prose__body h3 { color: var(--bc-white); }
.bc-prose--dark .bc-prose__body p { color: rgba(255,255,255,.78); }

@media (max-width: 780px) {
  .bc-prose__grid.bc-prose--with-image { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Grid (services / features / cards)
   ========================================================================== */
.bc-grid { padding-block: var(--bc-sp-8); }
.bc-grid__head { max-width: 62ch; margin-bottom: var(--bc-sp-7); }
.bc-grid__cards {
  display: grid;
  gap: var(--bc-sp-5);
  grid-template-columns: 1fr;
}
.bc-grid--2col .bc-grid__cards { grid-template-columns: repeat(2, 1fr); }
.bc-grid--3col .bc-grid__cards { grid-template-columns: repeat(3, 1fr); }
.bc-grid--4col .bc-grid__cards { grid-template-columns: repeat(4, 1fr); }

.bc-grid__card {
  background: var(--bc-white);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius);
  padding: var(--bc-sp-5);
  box-shadow: var(--bc-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--bc-sp-3);
}
.bc-grid--text-only .bc-grid__card { background: transparent; border-color: var(--bc-line); box-shadow: none; }
.bc-grid--imaged .bc-grid__card { padding: 0; overflow: hidden; }
.bc-grid__card-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.bc-grid--imaged .bc-grid__card-body { padding: var(--bc-sp-5); display: flex; flex-direction: column; gap: var(--bc-sp-2); }
.bc-grid__card h3 { font-size: 1.2rem; margin-bottom: var(--bc-sp-2); }
.bc-grid__card p { color: var(--bc-ink-soft); margin-bottom: 0; font-size: var(--bc-fs-small); }
.bc-grid__card-icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--bc-paper-alt);
  color: var(--bc-accent-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}

@media (max-width: 900px) {
  .bc-grid--3col .bc-grid__cards,
  .bc-grid--4col .bc-grid__cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .bc-grid--2col .bc-grid__cards,
  .bc-grid--3col .bc-grid__cards,
  .bc-grid--4col .bc-grid__cards { grid-template-columns: 1fr; }
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.bc-faq { padding-block: var(--bc-sp-8); background: var(--bc-paper-alt); }
.bc-faq__list { max-width: 800px; margin: var(--bc-sp-6) auto 0; display: grid; gap: var(--bc-sp-3); }
.bc-faq__item {
  background: var(--bc-white);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius);
  padding: var(--bc-sp-2) var(--bc-sp-5);
}
.bc-faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--bc-sp-4);
  font-family: var(--bc-font-display);
  font-weight: 600;
  color: var(--bc-primary);
  padding-block: var(--bc-sp-4);
  cursor: pointer;
  list-style: none;
}
.bc-faq__q::-webkit-details-marker { display: none; }
.bc-faq__q::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--bc-accent-dark);
  flex: none;
  transition: transform .2s var(--bc-ease);
}
details[open] > .bc-faq__q::after { transform: rotate(45deg); }
.bc-faq__a { color: var(--bc-ink-soft); padding-bottom: var(--bc-sp-4); margin: 0; }

/* ==========================================================================
   Gallery
   ========================================================================== */
.bc-gallery { padding-block: var(--bc-sp-8); }
.bc-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--bc-sp-4);
}
.bc-gallery__cell {
  position: relative;
  border-radius: var(--bc-radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--bc-shadow-sm);
}
.bc-gallery__cell img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--bc-ease); }
.bc-gallery__cell:hover img { transform: scale(1.06); }
.bc-gallery__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--bc-sp-3) var(--bc-sp-4);
  background: linear-gradient(0deg, rgba(23,39,51,.85), transparent);
  color: var(--bc-white);
  font-size: var(--bc-fs-small);
  font-weight: 600;
}
@media (max-width: 780px) {
  .bc-gallery__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .bc-gallery__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Video
   ========================================================================== */
.bc-video { padding-block: var(--bc-sp-8); background: var(--bc-paper-alt); }
.bc-video__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--bc-sp-7);
  align-items: center;
}
.bc-video__copy p { color: var(--bc-ink-soft); }
.bc-video__player {
  border-radius: var(--bc-radius-lg);
  overflow: hidden;
  box-shadow: var(--bc-shadow);
  background: var(--bc-ink);
}
.bc-video__frame {
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  display: block;
}
@media (max-width: 860px) {
  .bc-video__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Map
   ========================================================================== */
.bc-map { padding-block: var(--bc-sp-8); }
.bc-map__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.3fr;
  gap: var(--bc-sp-7);
  align-items: stretch;
}
.bc-map__info {
  background: var(--bc-primary);
  color: var(--bc-white);
  border-radius: var(--bc-radius-lg);
  padding: var(--bc-sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--bc-sp-3);
}
.bc-map__info h3 { color: var(--bc-white); }
.bc-map__addr { color: rgba(255,255,255,.85); font-style: normal; line-height: var(--bc-lh-normal); }
.bc-map__frame {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  border-radius: var(--bc-radius-lg);
  box-shadow: var(--bc-shadow-sm);
}
@media (max-width: 860px) {
  .bc-map__grid { grid-template-columns: 1fr; }
  .bc-map__frame { min-height: 260px; }
}

/* ==========================================================================
   Testimonial
   ========================================================================== */
.bc-testimonial { padding-block: var(--bc-sp-8); background: var(--bc-primary-dark); color: var(--bc-white); }
.bc-testimonial__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--bc-sp-5);
}
.bc-testimonial__card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--bc-radius);
  padding: var(--bc-sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--bc-sp-3);
}
.bc-testimonial__stars { color: var(--bc-accent-light); letter-spacing: .15em; font-size: 1rem; }
.bc-testimonial__quote { color: rgba(255,255,255,.9); margin: 0; font-size: var(--bc-fs-small); }
.bc-testimonial__author { font-weight: 700; font-size: var(--bc-fs-small); color: var(--bc-white); }
.bc-testimonial__role { font-size: .8rem; color: rgba(255,255,255,.6); }
@media (max-width: 900px) {
  .bc-testimonial__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .bc-testimonial__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Formband (lead capture) + form fields
   ========================================================================== */
.bc-formband {
  padding-block: var(--bc-sp-8);
  background: var(--bc-paper-alt);
}
.bc-formband__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--bc-sp-7);
  align-items: center;
}
.bc-formband__title { margin-bottom: var(--bc-sp-3); }
.bc-formband__lede { color: var(--bc-ink-soft); max-width: 46ch; }
.bc-formband__form {
  background: var(--bc-white);
  border-radius: var(--bc-radius-lg);
  padding: var(--bc-sp-6);
  box-shadow: var(--bc-shadow);
  display: grid;
  gap: var(--bc-sp-4);
}

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

.bc-formband--final {
  background: linear-gradient(160deg, var(--bc-accent-dark) 0%, var(--bc-accent-darker) 100%);
  color: var(--bc-white);
}
.bc-formband--final .bc-formband__title,
.bc-formband--final .bc-formband__lede { color: var(--bc-white); }
.bc-formband--final .bc-formband__lede { color: rgba(255,255,255,.9); }

.bc-form-field { display: grid; gap: var(--bc-sp-2); }
.bc-form-field label {
  font-size: var(--bc-fs-small);
  font-weight: 600;
  color: var(--bc-ink);
}
.bc-form-field input,
.bc-form-field textarea,
.bc-form-field select {
  font-family: var(--bc-font-body);
  font-size: var(--bc-fs-body);
  padding: 0.7em 0.9em;
  border: 1.5px solid var(--bc-line);
  border-radius: 8px;
  background: var(--bc-paper);
  color: var(--bc-ink);
}
.bc-form-field input:focus,
.bc-form-field textarea:focus,
.bc-form-field select:focus {
  outline: none;
  border-color: var(--bc-accent);
  box-shadow: 0 0 0 3px rgba(226,88,95,.2);
}
.bc-form-field--required label::after {
  content: " *";
  color: var(--bc-accent-dark);
}

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

/* ==========================================================================
   Utility
   ========================================================================== */
.bc-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
