/* ============================================================
   FWG — Freedom, Wealth, Gratitude
   Considered Development. Enduring Value.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Jost:wght@400;500;600&display=swap');

/* ---- Variables -------------------------------------------- */
:root {
  --parchment:   #F5F0E8;
  --greige:      #D4C9B8;
  --warm-stone:  #B8A99A;
  --deep-linen:  #8C7B6E;
  --charcoal:    #2C2C2C;
  --blanc:       #FDFAF6;
  --soft-gold:   #C4A882;
  --blush:       #D4A5A0;

  --section-pad: 100px;
  --container:   1160px;
  --radius:      4px;
}

/* ---- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--parchment);
  color: var(--charcoal);
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---- Typography -------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  line-height: 1.15;
  color: var(--charcoal);
}

h1 { font-size: clamp(2.6rem, 5vw, 4.2rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
h4 { font-size: 1.25rem; }

p {
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  color: var(--charcoal);
  max-width: 68ch;
}

.lead {
  font-size: 1.125rem;
  color: var(--deep-linen);
  line-height: 1.9;
}

.eyebrow {
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--soft-gold);
  display: block;
  margin-bottom: 1rem;
}

/* ---- Container --------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}

/* ---- Divider ----------------------------------------------- */
.divider {
  border: none;
  border-top: 1px solid var(--warm-stone);
  margin: 0;
  opacity: 0.6;
}

.divider--gold {
  border-top-color: var(--soft-gold);
  opacity: 0.5;
  width: 60px;
  margin: 1.5rem 0;
}

/* ---- Navigation -------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--parchment);
  border-bottom: 1px solid rgba(184, 169, 154, 0.3);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-wordmark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--soft-gold);
  text-decoration: none;
  transition: opacity 0.2s;
}
.nav-wordmark:hover { opacity: 0.75; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a {
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--charcoal);
  transition: color 0.2s;
  text-decoration: none;
}
.nav-links a:hover { color: var(--soft-gold); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--charcoal);
  margin: 6px 0;
  transition: 0.3s;
}

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-block;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 14px 36px;
  border: 1px solid var(--charcoal);
  color: var(--charcoal);
  background: transparent;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
  text-decoration: none;
}
.btn:hover {
  background: var(--charcoal);
  color: var(--parchment);
}

.btn--gold {
  border-color: var(--soft-gold);
  color: var(--soft-gold);
}
.btn--gold:hover {
  background: var(--soft-gold);
  color: var(--blanc);
}

/* ---- Hero ------------------------------------------------- */
.hero {
  background-color: var(--parchment);
  padding: 130px 0 120px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 45%;
  height: 100%;
  background: linear-gradient(135deg, transparent 30%, rgba(212, 201, 184, 0.4) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.hero h1 {
  margin-bottom: 1.5rem;
  color: var(--charcoal);
}

.hero .lead {
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
  max-width: 56ch;
}

/* ---- Sections --------------------------------------------- */
.section {
  padding: var(--section-pad) 0;
}

.section--blanc {
  background: var(--blanc);
}
.section--greige {
  background: var(--greige);
}
.section--dark {
  background: var(--charcoal);
  color: var(--parchment);
}
.section--dark h2,
.section--dark h3,
.section--dark p { color: var(--parchment); }
.section--dark .lead { color: var(--greige); }

.section-header {
  margin-bottom: 3.5rem;
}
.section-header.centered {
  text-align: center;
}
.section-header.centered p {
  margin: 0 auto;
}

/* ---- Image Placeholder ------------------------------------ */
.img-placeholder {
  width: 100%;
  background: linear-gradient(145deg, var(--greige) 0%, var(--warm-stone) 60%, #a8958a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.img-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(253,250,246,0.15) 0%, transparent 60%);
}

.img-placeholder-label {
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(44, 44, 44, 0.55);
  position: relative;
  z-index: 1;
}

/* ---- Cards ------------------------------------------------ */
.card {
  background: var(--parchment);
  border-radius: var(--radius);
  box-shadow: 0 2px 20px rgba(44, 44, 44, 0.07);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
}
.card:hover {
  box-shadow: 0 6px 32px rgba(44, 44, 44, 0.12);
  transform: translateY(-2px);
}

.card-body {
  padding: 32px 36px 40px;
}

.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.card-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--deep-linen);
  margin-bottom: 1rem;
}

.card-text {
  font-size: 0.92rem;
  color: var(--deep-linen);
  margin-bottom: 1.5rem;
  max-width: none;
}

/* ---- Divisions Grid --------------------------------------- */
.divisions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--warm-stone);
  border: 1px solid var(--warm-stone);
  border-radius: var(--radius);
  overflow: hidden;
}

.division-item {
  background: var(--blanc);
  padding: 44px 36px;
  transition: background 0.25s;
}
.division-item:hover {
  background: var(--parchment);
}

.division-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
  color: var(--charcoal);
}

.division-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--deep-linen);
}

/* ---- Developments Grid ------------------------------------ */
.dev-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.dev-card .img-placeholder {
  height: 300px;
}

/* ---- Stat Strip ------------------------------------------- */
.stat-strip {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  padding: 60px 0;
  border-top: 1px solid rgba(184,169,154,0.4);
  border-bottom: 1px solid rgba(184,169,154,0.4);
}

.stat-item {}
.stat-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  color: var(--soft-gold);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--deep-linen);
}

/* ---- Team ------------------------------------------------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
}

.team-card {
  padding: 0;
}

.team-photo {
  height: 360px;
  margin-bottom: 2rem;
  border-radius: var(--radius);
}

.team-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

.team-roles {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--soft-gold);
  margin-bottom: 1.25rem;
}

.team-bio {
  font-size: 0.94rem;
  color: var(--deep-linen);
  line-height: 1.85;
  max-width: none;
}

/* ---- Advisory Divisions ----------------------------------- */
.advisory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: rgba(184,169,154,0.3);
}

.advisory-item {
  background: var(--blanc);
  padding: 64px 56px;
}

.advisory-item-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.advisory-item-tagline {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--soft-gold);
  margin-bottom: 1.5rem;
}

.advisory-item p {
  font-size: 0.94rem;
  color: var(--deep-linen);
  line-height: 1.85;
  max-width: none;
}

/* ---- Contact Form ---------------------------------------- */
.contact-form {
  max-width: 620px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--deep-linen);
  margin-bottom: 0.6rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--blanc);
  border: 1px solid var(--warm-stone);
  border-radius: 0;
  padding: 14px 18px;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 0.94rem;
  color: var(--charcoal);
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--soft-gold);
}

.form-group textarea {
  height: 150px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

/* ---- Dev Detail Page -------------------------------------- */
.dev-detail-hero {
  padding: 80px 0 0;
}

.dev-detail-img {
  height: 480px;
  border-radius: var(--radius);
  margin-bottom: 0;
}

.dev-meta {
  display: flex;
  gap: 3rem;
  padding: 40px 0;
  border-bottom: 1px solid rgba(184,169,154,0.4);
  margin-bottom: 3rem;
}

.dev-meta-item-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm-stone);
  margin-bottom: 0.3rem;
}

.dev-meta-item-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--charcoal);
}

/* ---- Footer ----------------------------------------------- */
.site-footer {
  background: var(--charcoal);
  color: var(--greige);
  padding: 72px 0 48px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
}

.footer-wordmark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  color: var(--soft-gold);
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 0.75rem;
  text-decoration: none;
}

.footer-tagline {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--warm-stone);
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
}

.footer-location {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm-stone);
  margin-top: 0.5rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-end;
}

.footer-nav a {
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--warm-stone);
  transition: color 0.2s;
  text-decoration: none;
}
.footer-nav a:hover { color: var(--soft-gold); }

.footer-bottom {
  border-top: 1px solid rgba(184,169,154,0.2);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 0.72rem;
  color: rgba(184,169,154,0.5);
  letter-spacing: 0.08em;
}

/* ---- Page Hero (interior pages) -------------------------- */
.page-hero {
  padding: 80px 0 70px;
  border-bottom: 1px solid rgba(184,169,154,0.35);
}

.page-hero h1 {
  margin-bottom: 1rem;
}

.page-hero .lead {
  max-width: 60ch;
}

/* ---- Utility --------------------------------------------- */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }

.text-gold { color: var(--soft-gold); }
.text-stone { color: var(--warm-stone); }
.text-linen { color: var(--deep-linen); }

/* ---- Breadcrumb ------------------------------------------ */
.breadcrumb {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm-stone);
  margin-bottom: 2rem;
}
.breadcrumb a {
  color: var(--warm-stone);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--soft-gold); }
.breadcrumb span { margin: 0 0.5rem; }

/* ---- 404 -------------------------------------------------- */
.not-found {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.not-found-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 8rem;
  color: var(--greige);
  line-height: 1;
  margin-bottom: 1rem;
}

/* ---- Nav Dropdowns --------------------------------------- */
.nav-links li {
  position: relative;
}

.nav-item--dropdown > a::after {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  margin-left: 5px;
  vertical-align: middle;
  position: relative;
  top: -2px;
  opacity: 0.55;
  transition: transform 0.2s;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--parchment);
  border: 1px solid rgba(184,169,154,0.3);
  border-top: 2px solid var(--soft-gold);
  min-width: 230px;
  /* Use margin-top:0 and invisible top padding so there is NO gap to cross */
  margin-top: 0;
  padding: 0;
  z-index: 200;
  box-shadow: 0 12px 40px rgba(44,44,44,0.10);
}

/* Invisible top padding extends hover target — no gap between nav item and dropdown */
.nav-dropdown::before {
  content: '';
  display: block;
  height: 12px;
  background: transparent;
}

/* Extend the li hover target upward to bridge the gap */
.nav-item--dropdown {
  padding-bottom: 0;
}

.nav-item--dropdown:hover .nav-dropdown,
.nav-item--dropdown:focus-within .nav-dropdown {
  display: block;
}

/* Slight close delay prevents dropdown snap-closing on diagonal mouse moves */
.nav-item--dropdown .nav-dropdown {
  transition: opacity 0.12s ease;
}
.nav-item--dropdown:not(:hover) .nav-dropdown {
  pointer-events: none;
}

/* Keep nav item hovered while dropdown is open */
.nav-item--dropdown:hover > a {
  color: var(--soft-gold);
}

.nav-dropdown li:last-child a {
  padding-bottom: 12px;
}

.nav-dropdown li a {
  display: block;
  padding: 10px 20px;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 0.73rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--charcoal);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-dropdown li a:hover {
  color: var(--soft-gold);
  background: rgba(196,168,130,0.07);
}

/* Nav CTA button */
.nav-item--cta > .nav-cta {
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 9px 22px;
  border: 1px solid var(--charcoal);
  color: var(--charcoal);
  background: transparent;
  transition: background 0.25s, color 0.25s;
  text-decoration: none;
}

.nav-item--cta > .nav-cta:hover {
  background: var(--charcoal);
  color: var(--parchment);
}

/* ---- Footer Grid ------------------------------------------ */
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
}

.footer-col-heading {
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--soft-gold);
  margin-bottom: 1rem;
}

.footer-col-nav {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col-nav a {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--warm-stone);
  transition: color 0.2s;
  text-decoration: none;
}

.footer-col-nav a:hover { color: var(--soft-gold); }

.footer-bottom-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.footer-bottom-nav a {
  font-size: 0.72rem;
  color: rgba(184,169,154,0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
  text-decoration: none;
}

.footer-bottom-nav a:hover { color: var(--soft-gold); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  :root { --section-pad: 80px; }

  .divisions-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .advisory-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root { --section-pad: 64px; }

  .container { padding: 0 24px; }

  /* Nav mobile */
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: var(--parchment);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid rgba(184,169,154,0.3);
    padding: 1rem 0;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 14px 24px;
    width: 100%;
    border-bottom: 1px solid rgba(184,169,154,0.15);
  }
  .nav-links a:last-child { border-bottom: none; }
  .site-nav { position: relative; }

  /* Hero */
  .hero { padding: 0; }
  .hero::before { display: none; }

  /* Grids */
  .divisions-grid { grid-template-columns: 1fr; }
  .dev-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }

  /* Advisory */
  .advisory-grid { grid-template-columns: 1fr; }
  .advisory-item { padding: 48px 32px; }

  /* Nav dropdowns — mobile: tap to toggle */
  .nav-item--dropdown > a::after { display: none; }
  .nav-dropdown {
    display: none;
    position: static;
    transform: none;
    border: none;
    border-top: none;
    box-shadow: none;
    background: rgba(196,168,130,0.06);
    padding: 0;
    min-width: 0;
  }
  .nav-item--dropdown.mobile-open .nav-dropdown {
    display: flex;
    flex-direction: column;
    background: rgba(196,168,130,0.06);
    padding: 0;
  }
  .nav-item--dropdown > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .nav-item--dropdown > a .nav-expand-icon {
    font-size: 1.1rem;
    color: var(--soft-gold);
    opacity: 0.75;
    margin-left: auto;
    padding-right: 4px;
    line-height: 1;
    font-style: normal;
    font-family: sans-serif;
  }
  .nav-dropdown li a {
    padding: 10px 40px;
    border-bottom: 1px solid rgba(184,169,154,0.1);
    font-size: 0.71rem;
    white-space: normal;
  }
  .nav-item--cta { border-top: 1px solid rgba(184,169,154,0.15); }
  .nav-item--cta > .nav-cta {
    display: block;
    padding: 14px 24px;
    border: none;
    font-size: 0.78rem;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .footer-bottom-nav {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Form */
  .form-row { grid-template-columns: 1fr; }

  /* Stat strip */
  .stat-strip {
    flex-direction: column;
    gap: 2rem;
  }

  /* Team photo */
  .team-photo { height: 280px; }

  /* Dev detail */
  .dev-detail-img { height: 280px; }
  .dev-meta { flex-direction: column; gap: 1.5rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  .not-found-number { font-size: 5rem; }
  .division-item { padding: 36px 28px; }
}

/* ============================================================
   MOBILE UTILITY CLASSES (added by fwg-mobile-audit.py)
   ============================================================ */

/* Utility grid classes to replace inline multi-column grids */
.fwg-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.fwg-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.fwg-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); }
.fwg-grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); }
.fwg-cta-row { display: grid; grid-template-columns: 1fr auto; align-items: center; }

@media (max-width: 1024px) {
  .fwg-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .fwg-grid-5 { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 768px) {
  /* All multi-col utility grids collapse to single column */
  .fwg-grid-2,
  .fwg-grid-3,
  .fwg-grid-4,
  .fwg-grid-5 {
    grid-template-columns: 1fr !important;
  }

  /* CTA rows (heading + button) stack on mobile */
  .fwg-cta-row {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Footer inner (wordmark + nav links) */
  .footer-inner {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  .footer-nav { align-items: flex-start !important; }

  /* Advisory items: tighten padding */
  .advisory-item { padding: 36px 24px !important; }

  /* Stat strip stat items */
  .stat-strip { flex-direction: column; gap: 2rem; }

  /* Profile grid (suburb pages) */
  .profile-grid { grid-template-columns: 1fr !important; gap: 2rem !important; }
}

@media (max-width: 480px) {
  /* Process page: 5-col grid */
  .fwg-grid-5 { grid-template-columns: 1fr !important; }
}

@media (max-width: 768px) {
  .fwg-inset-box { padding: 32px 24px !important; }
}

/* ============================================================
   MOBILE UX FIXES — fwg-mobile-ux-fix pass
   ============================================================ */

/* 1. Global horizontal overflow prevention */
html, body { overflow-x: hidden; }

/* 2. Gap overrides for fwg utility grids — inline styles set large gaps
      that the column collapse alone doesn't fix */
@media (max-width: 768px) {
  .fwg-grid-2,
  .fwg-grid-3,
  .fwg-grid-4,
  .fwg-grid-5 {
    gap: 2.5rem !important;
  }

  /* Card body — tighter on mobile */
  .card-body {
    padding: 24px 24px 32px !important;
  }

  /* Full-screen hero content (height:100svh heroes) — breathing room
     so text isn't flush against the top/bottom of the viewport */
  .hero-content {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  /* Stat strip — allow items to wrap */
  .stat-strip { flex-wrap: wrap; }

  /* Section-level overflow containment */
  .section { overflow-x: hidden; }

  /* Prevent any wide table/image from creating horizontal scroll */
  img, table { max-width: 100%; }
}

@media (max-width: 480px) {
  /* Tighter gaps on very small screens */
  .fwg-grid-2,
  .fwg-grid-3 {
    gap: 1.5rem !important;
  }

  /* Smaller card body */
  .card-body {
    padding: 20px 20px 24px !important;
  }

  /* Hero content — tighter vertical padding on tiny screens */
  .hero-content {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  /* Hero CTA buttons — full width stacked on very small screens */
  .hero-content .btn {
    display: block !important;
    text-align: center;
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
  }

  /* Same treatment for button rows with margin-left spacing */
  .btn + .btn {
    margin-left: 0 !important;
    margin-top: 0.75rem;
  }

  /* Tighten advisory item padding */
  .advisory-item {
    padding: 36px 20px !important;
  }

  /* Page hero vertical padding */
  .page-hero {
    padding: 48px 0 40px;
  }
}

/* Service enquiry content pass */
.fwg-hero-actions { display:flex; flex-wrap:wrap; align-items:center; gap:1.5rem; margin-top:2rem; }
.fwg-hero-secondary { color:#F5F0E8; text-decoration:underline; text-underline-offset:5px; }
.fwg-service-link { display:block; color:inherit; text-decoration:none; }
.fwg-service-link:focus-visible { outline:2px solid var(--charcoal); outline-offset:4px; }
.advisory-item[id] { scroll-margin-top:100px; }
.form-group select { min-width:0; max-width:100%; -webkit-appearance:auto; appearance:auto; }
body > section:has(> .container > .hero-content) { height:auto !important; min-height:100svh !important; padding:100px 0 50px; box-sizing:border-box; }
@media(max-width:480px) { .fwg-hero-actions { gap:1rem; } }
