/* ============================================================
   Layout — header, nav, footer, hero, sections, grids.
   ============================================================ */

/* ------------------------------ Header ------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--line);
}

/* The frosted backdrop lives on a pseudo-element: backdrop-filter on the
   header itself would make it the containing block for the fixed-position
   mobile menu, collapsing the menu to the header's height. */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
  transition: height var(--t);
}

.site-header.is-scrolled .header-inner {
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--navy);
}

.brand img {
  width: 44px;
  height: 46px;
  object-fit: contain;
  flex: none;
}

.brand-text {
  font-weight: 700;
  letter-spacing: 0.3px;
  font-size: 1rem;
  line-height: 1.2;
  max-width: 200px;
}

.nav-desktop {
  display: flex;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  position: relative;
  margin: 0;
}

/* :not(.btn) keeps these link styles off the "Book Consultation" button,
   which would otherwise lose its padding and get dark text on navy. */
.nav-item > a:not(.btn) {
  display: inline-block;
  padding: 8px 0;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  /* Gold underline that grows in on hover / marks the current page. */
  background: linear-gradient(var(--gold), var(--gold)) no-repeat left calc(100% - 2px) / 0 2px;
  transition: color var(--t-fast), background-size var(--t);
}

.nav-item > a:not(.btn):hover,
.nav-item > a:not(.btn)[aria-current='page'] {
  color: var(--navy);
  background-size: 100% 2px;
}

/* Chevron drawn with a mask so it takes the link colour and stays crisp;
   it flips when the dropdown opens. */
.nav-item.has-submenu > a::after {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-left: 5px;
  vertical-align: -4px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--t-fast);
}

.nav-item.has-submenu:hover > a::after,
.nav-item.has-submenu:focus-within > a::after {
  transform: rotate(180deg);
}

/* Dropdown */
.submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 236px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast);
}

.nav-item:hover .submenu,
.nav-item:focus-within .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu a {
  display: block;
  padding: 10px 18px;
  white-space: nowrap;
  font-size: 0.92rem;
  color: var(--ink);
}

.submenu a:hover,
.submenu a[aria-current='page'] {
  background: var(--off);
  color: var(--navy);
}

/* Header right actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  color: var(--navy);
  font-size: 1.05rem;
  white-space: nowrap;
}

.nav-cta {
  padding: 11px 22px;
  font-size: 0.92rem;
  margin-left: 4px;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(31, 58, 95, 0.18);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
  border-radius: 8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform var(--t), opacity var(--t-fast);
}

.hamburger[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ------------------------------ Mobile menu ------------------------------ */

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 900;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow-y: auto;
  padding: 12px 0 40px;
  border-top: 1px solid var(--line);
}

.mobile-menu[hidden] {
  display: none;
}

/* Follow the condensed header so no page content peeks through the gap. */
.site-header.is-scrolled .mobile-menu {
  top: 64px;
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-item {
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.mobile-item > a:not(.btn),
.mobile-submenu-header > a {
  display: block;
  padding: 16px 24px;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
}

.mobile-submenu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-submenu-header > a {
  flex: 1;
}

.submenu-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: 16px;
  padding: 0;
  background: var(--off);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--navy);
  transition: background var(--t-fast), border-color var(--t-fast);
}

.submenu-toggle svg {
  width: 22px;
  height: 22px;
  transition: transform var(--t);
}

.submenu-toggle[aria-expanded='true'] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.submenu-toggle[aria-expanded='true'] svg {
  transform: rotate(180deg);
}

.mobile-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--off);
}

.mobile-submenu[hidden] {
  display: none;
}

.mobile-submenu a {
  display: block;
  padding: 13px 24px 13px 40px;
  font-size: 0.98rem;
  color: var(--ink);
  border-top: 1px solid var(--line);
}

.mobile-item:has(> .mobile-cta) {
  border-bottom: 0;
}

.mobile-item > .mobile-cta {
  display: flex;
  margin: 20px 24px 0;
  padding: 15px 24px;
  font-size: 1rem;
}

.mobile-phone {
  display: block;
  margin: 24px;
  font-weight: 700;
  color: var(--navy);
  font-size: 1.1rem;
}

body.menu-open {
  overflow: hidden;
}

/* ------------------------------ Hero ------------------------------ */

.hero {
  position: relative;
}

/* Full-bleed image hero */
.hero--image {
  color: #fff;
  display: grid;
  min-height: min(72vh, 620px);
  align-items: center;
  overflow: hidden;
}

.hero-media,
.hero-media::after {
  position: absolute;
  inset: 0;
}

.hero-media {
  z-index: 0;
}

.hero-media picture,
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: '';
  background:
    linear-gradient(0deg, rgba(11, 24, 42, 0.55) 0%, rgba(11, 24, 42, 0) 35%),
    linear-gradient(
      100deg,
      rgba(11, 24, 42, 0.9) 0%,
      rgba(20, 38, 61, 0.7) 50%,
      rgba(20, 38, 61, 0.3) 100%
    );
}

/* Width cap goes on the children, not the .container itself — capping the
   container re-centres it and pulls the copy out of line with the logo. */
.hero-content {
  position: relative;
  z-index: 1;
  padding: clamp(4rem, 9vw, 6rem) 0;
}

.hero-content > * {
  max-width: 640px;
}

.hero-content > h1 {
  max-width: 820px;
}

.hero--image h1 {
  font-size: clamp(2.1rem, 4.8vw, 3.6rem);
  text-wrap: balance;
}

.hero--image .eyebrow {
  color: var(--gold);
}

.hero--image h1 {
  color: #fff;
}

.hero--image .lead {
  color: rgba(255, 255, 255, 0.88);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1.75rem;
}

/* Text-led hero (no image) */
.hero--text {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 12%, rgba(195, 168, 107, 0.2), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(31, 58, 95, 0.07), transparent 50%),
    linear-gradient(180deg, #ffffff, var(--off));
  border-bottom: 1px solid var(--line);
  padding: clamp(3.5rem, 8vw, 5.5rem) 0 clamp(3rem, 6vw, 4.5rem);
}

.hero--text .container > * {
  max-width: 860px;
}

.hero--text .eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero--text .eyebrow::before {
  content: '';
  width: 32px;
  height: 2px;
  flex: none;
  background: var(--gold);
}

.hero--text h1 {
  text-wrap: balance;
}

/* ------------------------------ Breadcrumbs ------------------------------ */

.breadcrumbs {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  padding: 14px 0;
  margin: 0 auto;
  font-size: 0.85rem;
}

.breadcrumbs li {
  margin: 0;
  color: var(--muted);
}

.breadcrumbs li:not(:last-child)::after {
  content: '/';
  margin: 0 6px;
  color: var(--line-strong);
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--navy);
}

/* ------------------------------ Sections ------------------------------ */

.darksection {
  position: relative;
  background: var(--dark-bg);
  color: var(--dark-ink);
  isolation: isolate;
}

/* Subtle grain instead of the old tiled pattern */
.darksection::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05;
}

.darksection h1,
.darksection h2,
.darksection h3,
.darksection h4 {
  color: var(--gold);
}

.darksection p,
.darksection li {
  color: var(--dark-ink);
}

.darksection strong {
  color: #fff;
}

.darksection a:not(.btn) {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(195, 168, 107, 0.4);
  text-underline-offset: 3px;
}

.darksection a:not(.btn):hover {
  color: #fff;
  text-decoration-color: currentColor;
}

.lightpattern {
  position: relative;
  background: linear-gradient(180deg, var(--off), #ffffff);
}

.featurecenter {
  background: linear-gradient(
    130deg,
    rgba(214, 197, 158, 0.16) 0%,
    rgba(44, 90, 124, 0.08) 100%
  );
  text-align: center;
}

.featurecenter .hairline {
  margin-inline: auto;
}

/* ------------------------------ Grids ------------------------------ */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* Centred wrapping rows so odd counts never strand a lone card:
   3 per row by default (5 → 3+2, 6 → 3+3), 4 per row for 4/7/8 items. */
.steps {
  --cols: 3;
  --gap: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
  margin-bottom: 1.5rem;
}

.steps:has(> :nth-child(4):last-child, > :nth-child(7):last-child, > :nth-child(8):last-child) {
  --cols: 4;
}

.steps > * {
  flex: 0 1 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  min-width: 0;
}

.steps.steps-3 {
  --cols: 3;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

/* ------------------------------ Melbourne section ------------------------------ */

.melbourne-section {
  position: relative;
  isolation: isolate;
  color: #fff;
  padding: clamp(4.5rem, 10vw, 7rem) 0;
  overflow: hidden;
}

.melbourne-media,
.melbourne-media::after {
  position: absolute;
  inset: 0;
}

.melbourne-media {
  z-index: -1;
}

.melbourne-media picture,
.melbourne-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* No z-index here: .melbourne-media is already a stacking context, so a
   negative value would paint this overlay *behind* the photo. */
.melbourne-media::after {
  content: '';
  background:
    linear-gradient(90deg, rgba(11, 24, 42, 0.94) 0%, rgba(14, 28, 48, 0.84) 50%, rgba(20, 38, 61, 0.62) 100%),
    linear-gradient(0deg, rgba(11, 24, 42, 0.5), transparent 40%);
}

.melbourne-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.melbourne-section h2 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 2.9rem);
}

.melbourne-section .eyebrow {
  color: var(--gold);
}

.melbourne-section .sub {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.5;
}

.melbourne-section p,
.melbourne-section li {
  color: rgba(255, 255, 255, 0.92);
}

.melbourne-section strong {
  color: #fff;
}

/* Frosted panel keeps the list legible whatever the photo behind it does. */
.melbourne-panel {
  background: rgba(11, 24, 42, 0.55);
  border: 1px solid rgba(195, 168, 107, 0.35);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}

.melbourne-panel .feature-list {
  margin-bottom: 1.25rem;
}

.melbourne-panel > p:last-child {
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.95rem;
}

/* ------------------------------ Timeline (process) ------------------------------ */

/* Heading pinned on the left while the steps scroll past on the right. */
.process-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 2fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.process-aside {
  position: sticky;
  top: calc(64px + 2rem);
}

.process-aside h2 {
  text-wrap: balance;
  hyphens: manual;
}

.timeline {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  max-width: 760px;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(var(--gold), rgba(195, 168, 107, 0.15));
}

.timeline > li {
  position: relative;
  counter-increment: step;
  padding: 0 0 2.75rem 78px;
  margin: 0;
}

.timeline > li:last-child {
  padding-bottom: 0;
}

.timeline h3 {
  margin-bottom: 0.4rem;
  padding-top: 12px;
}

.timeline p {
  color: var(--dark-muted);
}

.timeline > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -2px;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 50%;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 6px var(--dark-bg);
}

/* ------------------------------ Suburb cards ------------------------------ */

.suburbs {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}

.suburb-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.suburb-card {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--t), box-shadow var(--t);
}

.suburb-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.suburb-card picture {
  display: block;
  overflow: hidden;
}

.suburb-card picture,
.suburb-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.suburb-card img {
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.suburb-card:hover img {
  transform: scale(1.05);
}

.suburb-meta {
  padding: 18px 18px 20px;
}

.suburb-meta h3 {
  margin-bottom: 6px;
}

.suburb-meta p {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
}

/* ------------------------------ Footer ------------------------------ */

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: clamp(3rem, 6vw, 4.5rem) 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 2.5rem;
}

.footer-brand img {
  width: 120px;
  height: auto;
  margin-bottom: 1rem;
}

.footer-tagline {
  color: var(--footer-muted);
  max-width: 260px;
  font-size: 0.95rem;
}

.footer-heading {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.55rem;
}

.footer-col a {
  color: var(--footer-ink);
  font-size: 0.94rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-nap p {
  color: var(--footer-muted);
  font-size: 0.94rem;
  margin-bottom: 0.7rem;
}

.footer-link {
  display: block;
  color: var(--footer-ink);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.footer-link:hover {
  color: #fff;
}

.footer-hours {
  margin-top: 0.8rem;
  font-size: 0.85rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: var(--footer-muted);
}

.footer-bottom p {
  margin: 0;
}

/* ------------------------------ Responsive ------------------------------ */

@media (max-width: 1020px) {
  .header-phone {
    display: none;
  }
}

@media (max-width: 900px) {
  .nav-desktop {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .suburb-grid {
    grid-template-columns: 1fr 1fr;
  }
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
  .steps > * {
    flex-basis: calc((100% - var(--gap)) / 2);
  }
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
  .split,
  .melbourne-inner,
  .process-layout {
    grid-template-columns: 1fr;
  }
  .process-aside {
    position: static;
  }
}

@media (max-width: 560px) {
  .steps > * {
    flex-basis: 100%;
  }
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .suburb-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .brand-text {
    max-width: 150px;
  }
  .timeline > li {
    padding-left: 68px;
  }
  .timeline > li::before {
    width: 48px;
    height: 48px;
  }
  .timeline::before {
    left: 23px;
  }
}
