/*
Theme Name: MarbLayer
Theme URI: https://marblayer.com.au
Author: MarbLayer
Author URI: https://marblayer.com.au
Description: A premium, editorial WordPress theme built for MarbLayer — a Brisbane-based studio that transforms ordinary walls into handcrafted marble-effect architectural surfaces. Features a draggable before/after hero slider, a custom Transformations post type, and Customizer-editable brand content. Built with clean PHP, CSS and JavaScript — no page builders, no paid plugins.
Version: 2.5.31
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: marblayer
Tags: custom-menu, featured-images, threaded-comments, translation-ready, one-column, e-commerce-ready
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */
:root {
  /* MarbLayer Brand Guidelines v1.0 — exact palette */
  --ml-charcoal: #1D1D1F;
  --ml-structural-grey: #3E3F43;
  --ml-warm-stone: #D3CAC0;
  --ml-marble-white: #F9F4F2;
  --ml-marble-black: #161819;
  --ml-warm-taupe: #A89D92;
  --ml-soft-taupe: #C9BFB4;

  /* Legacy aliases kept so existing selectors below don't need a full rename */
  --ml-charcoal-soft: var(--ml-structural-grey);
  --ml-offwhite: var(--ml-marble-white);
  --ml-offwhite-soft: var(--ml-warm-stone);
  --ml-stone: var(--ml-warm-stone);
  --ml-taupe: var(--ml-warm-taupe);
  --ml-taupe-soft: var(--ml-soft-taupe);
  --ml-line: rgba(29, 29, 31, 0.12);
  --ml-line-light: rgba(249, 244, 242, 0.18);

  /* Brand type: Neue Haas Grotesk Display (Light for headlines, Roman for body).
     The only supplied font files came from a font-conversion site with no confirmed
     web-embedding licence, so they are not shipped — using the guideline's own approved
     fallback stack instead (Helvetica Neue, then Inter loaded via Google Fonts, then Arial). */
  --ml-font-display: "Helvetica Neue", "Inter", Arial, sans-serif;
  --ml-font-body: "Helvetica Neue", "Inter", Arial, sans-serif;

  --ml-container: 1240px;
  --ml-gutter: clamp(1.5rem, 5vw, 5rem);
  --ml-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   2. Reset & base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ml-offwhite);
  color: var(--ml-charcoal);
  font-family: var(--ml-font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}

.screen-reader-text:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1.25rem;
  background: var(--ml-charcoal);
  color: var(--ml-offwhite);
  z-index: 10000;
  clip: auto;
}

h1, h2, h3, h4 {
  font-family: var(--ml-font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
}

.ml-eyebrow {
  font-family: var(--ml-font-body);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ml-taupe);
  display: inline-block;
  margin-bottom: 1.25rem;
}

.ml-container {
  max-width: var(--ml-container);
  margin: 0 auto;
  padding-left: var(--ml-gutter);
  padding-right: var(--ml-gutter);
}

.ml-section {
  padding: clamp(4rem, 9vw, 8.5rem) 0;
}

.ml-section--charcoal {
  background: var(--ml-charcoal);
  color: var(--ml-offwhite-soft);
}

.ml-section--charcoal .ml-eyebrow {
  color: var(--ml-taupe-soft);
}

.ml-lede {
  max-width: 640px;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: rgba(21, 19, 15, 0.72);
}

.ml-section--charcoal .ml-lede {
  color: rgba(246, 242, 234, 0.7);
}

/* Reveal-on-scroll */
.ml-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ml-ease), transform 0.9s var(--ml-ease);
}

.ml-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .ml-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   3. Buttons
   ========================================================================== */
.ml-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.05rem 2.1rem;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.45s var(--ml-ease), background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
  white-space: nowrap;
}

.ml-btn:hover {
  transform: translateY(-2px);
}

.ml-btn--primary {
  background: var(--ml-charcoal);
  color: var(--ml-offwhite);
}

.ml-btn--primary:hover {
  background: var(--ml-taupe);
  color: var(--ml-charcoal);
}

.ml-btn--ghost {
  background: transparent;
  color: var(--ml-charcoal);
  border-color: rgba(21, 19, 15, 0.35);
}

.ml-btn--ghost:hover {
  border-color: var(--ml-charcoal);
}

.ml-section--charcoal .ml-btn--ghost {
  color: var(--ml-offwhite);
  border-color: rgba(246, 242, 234, 0.35);
}

.ml-section--charcoal .ml-btn--ghost:hover {
  border-color: var(--ml-offwhite);
}

.ml-btn--on-dark.ml-btn--primary {
  background: var(--ml-offwhite);
  color: var(--ml-charcoal);
}

.ml-btn--on-dark.ml-btn--primary:hover {
  background: var(--ml-taupe);
}

/* ==========================================================================
   4. Header / Navigation
   ========================================================================== */
.ml-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  padding: 1.35rem 0;
  transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

.ml-header.is-scrolled,
.ml-header.is-open {
  background: rgba(246, 242, 234, 0.92);
  backdrop-filter: blur(14px);
  padding: 0.9rem 0;
  box-shadow: 0 1px 0 var(--ml-line);
}

body.ml-dark-hero .ml-header:not(.is-scrolled):not(.is-open) {
  color: var(--ml-offwhite);
}

.ml-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.ml-logo {
  display: inline-flex;
  align-items: center;
}

.ml-logo img {
  height: 56px;
  width: auto;
  display: block;
}

@media (min-width: 900px) {
  .ml-logo img {
    height: 64px;
  }
}

.ml-header__brand {
  flex-shrink: 0;
  min-width: 0;
}

.ml-nav {
  min-width: 0;
}

.ml-mobile-nav__brand {
  margin-bottom: 2.5rem;
}

.ml-mobile-nav__brand .ml-logo img {
  height: 56px;
}

.ml-nav {
  display: flex;
  align-items: center;
  gap: 2.4rem;
}

.ml-nav ul {
  display: flex;
  gap: 2.2rem;
}

.ml-nav a {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, opacity 0.3s ease;
}

.ml-nav a:hover,
.ml-nav .current-menu-item > a {
  border-color: currentColor;
}

.ml-header__cta {
  display: none;
}

@media (min-width: 900px) {
  .ml-header__cta {
    display: inline-flex;
  }
}

/* Contact button must contrast against the dark header — Marble White
   background, Charcoal text — never Charcoal-on-Charcoal. */
.ml-header__cta.ml-btn--primary {
  background: var(--ml-marble-white);
  color: var(--ml-charcoal);
  padding: 0.7rem 1.4rem;
  border-radius: 4px;
}

.ml-header__cta.ml-btn--primary:hover {
  background: var(--ml-warm-taupe);
  color: var(--ml-charcoal);
}

.ml-header__cta.ml-btn--primary:focus-visible {
  outline: 2px solid var(--ml-marble-white);
  outline-offset: 3px;
}

/* Tighten nav spacing at narrower tablet widths so links never collide
   with the larger header logo. */
@media (min-width: 900px) and (max-width: 1099px) {
  .ml-header__row {
    gap: 1.1rem;
  }
  .ml-nav {
    gap: 1.3rem;
  }
  .ml-nav ul {
    gap: 1.2rem;
  }
  .ml-nav a {
    font-size: 0.75rem;
  }
  .ml-header__cta.ml-btn--primary {
    padding: 0.6rem 1.1rem;
  }
}


/* Header navigation resilience: keep concise labels on one line and let the
   navigation flex before the logo or enquiry CTA become cramped. */
@media (min-width: 900px) {
  .ml-header__row {
    gap: clamp(0.8rem, 1.6vw, 1.5rem);
  }

  .ml-nav {
    flex: 1 1 auto;
    justify-content: center;
  }

  .ml-nav ul {
    gap: clamp(0.8rem, 1.7vw, 1.8rem);
    flex-wrap: nowrap;
    align-items: center;
  }

  .ml-nav li,
  .ml-nav a {
    white-space: nowrap;
  }

  .ml-header__brand,
  .ml-header__cta {
    flex: 0 0 auto;
  }
}

@media (min-width: 900px) and (max-width: 1180px) {
  .ml-logo img {
    height: 54px;
  }

  .ml-nav a {
    font-size: 0.72rem;
    letter-spacing: 0.055em;
  }

  .ml-header__cta.ml-btn--primary {
    padding: 0.62rem 1rem;
  }
}

.ml-menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  padding: 0;
}

.ml-menu-toggle span {
  display: block;
  height: 1px;
  width: 100%;
  background: currentColor;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

@media (min-width: 900px) {
  .ml-menu-toggle {
    display: none;
  }
}

.ml-mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--ml-charcoal);
  color: var(--ml-offwhite);
  z-index: 998;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem var(--ml-gutter) 3rem;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.5s var(--ml-ease), opacity 0.5s var(--ml-ease), visibility 0s linear 0.5s;
}

.ml-mobile-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform 0.5s var(--ml-ease), opacity 0.5s var(--ml-ease);
}

.ml-mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 2.5rem;
}

.ml-mobile-nav a {
  font-family: var(--ml-font-display);
  font-size: clamp(1.8rem, 8vw, 2.6rem);
}

/* ==========================================================================
   5. Hero + Before/After slider
   ========================================================================== */
.ml-hero {
  position: relative;
  height: auto;
  min-height: 0;
  color: var(--ml-charcoal);
  background: var(--ml-charcoal);
  overflow: hidden;
}

/* Fix 1: the slider keeps a real, fixed aspect ratio at every breakpoint
   instead of a hard pixel height, so the source image is never stretched
   or cropped by an unrelated container height. */
.ml-hero__slider {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

@media (min-width: 700px) {
  .ml-hero__slider {
    aspect-ratio: 16 / 7;
  }
}

@media (min-width: 1100px) {
  .ml-hero__slider {
    aspect-ratio: 1672 / 470;
  }
}

.ml-compare {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
}

.ml-compare__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.ml-compare__after-wrap {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 50%);
}

.ml-compare__after-wrap .ml-compare__after {
  position: absolute;
  inset: 0;
}

.ml-compare__label {
  position: absolute;
  bottom: 1.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(246, 242, 234, 0.85);
  background: rgba(21, 19, 15, 0.35);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
}

.ml-compare__label--before {
  left: 1.5rem;
}

.ml-compare__label--after {
  right: 1.5rem;
}

.ml-compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(246, 242, 234, 0.85);
  transform: translateX(-50%);
  cursor: ew-resize;
}

.ml-compare__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(246, 242, 234, 0.95);
  color: var(--ml-charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.ml-compare__grip svg {
  width: 20px;
  height: 20px;
}

/* Fix 2: the hero content panel is a small, restrained card so the transformation slider
   stays the dominant element — no full-bleed scrim, no covering most of the wall.
   On mobile/tablet it sits below the slider in normal flow; on desktop (>=1100px)
   it overlays the bottom-left corner of the slider. */
.ml-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 1.25rem 1.25rem 1.75rem;
  display: flex;
  justify-content: flex-start;
}

.ml-hero__panel {
  width: 100%;
  max-width: 100%;
  background: transparent;
  padding: 0;
}

.ml-hero__heading {
  font-size: clamp(1.4rem, 5vw, 2rem);
  line-height: 1.1;
  max-width: 18ch;
  margin-bottom: 0.5rem;
  font-weight: 300;
}

.ml-hero__sub {
  max-width: 42ch;
  font-size: 0.92rem;
  color: var(--ml-structural-grey);
  margin-bottom: 0.85rem;
}

.ml-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

/* Secondary CTA reads as a lighter text link (underline + arrow), not a
   second boxed button competing with the primary action. */
.ml-hero__cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ml-charcoal);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0.5rem 0;
}

.ml-hero__cta-secondary:hover,
.ml-hero__cta-secondary:focus-visible {
  color: var(--ml-warm-taupe);
}

.ml-hero__cta-secondary__arrow {
  transition: transform 0.2s var(--ml-ease);
}

.ml-hero__cta-secondary:hover .ml-hero__cta-secondary__arrow {
  transform: translateX(3px);
}

.ml-hero__hint {
  display: none; /* the drag hint lives inside the compare component itself, not the content panel */
}

@media (min-width: 700px) {
  .ml-hero__panel {
    background: rgba(249, 244, 242, 0.92);
    padding: 1rem 1.2rem;
  }
}

@media (min-width: 1100px) {
  .ml-hero__content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 0 var(--ml-gutter) 2rem;
    pointer-events: none;
  }

  .ml-hero__panel {
    max-width: 400px;
    pointer-events: auto;
  }

  .ml-hero__heading {
    font-size: clamp(1.7rem, 2.4vw, 2.4rem);
  }
}

/* ==========================================================================
   6. Positioning / two-column statement
   ========================================================================== */
.ml-statement {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .ml-statement {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 6rem;
  }
}

.ml-statement__heading {
  font-size: clamp(2rem, 4vw, 3.1rem);
  max-width: 14ch;
}

/* ==========================================================================
   7. System steps
   ========================================================================== */
.ml-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 4rem;
  border-top: 1px solid var(--ml-line-light);
}

@media (min-width: 800px) {
  .ml-steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.ml-step {
  padding: 2.75rem 1.75rem 2.75rem 0;
  border-bottom: 1px solid var(--ml-line-light);
}

@media (min-width: 800px) {
  .ml-step {
    border-right: 1px solid var(--ml-line-light);
    padding-right: 2rem;
  }
  .ml-step:last-child {
    border-right: none;
  }
}

.ml-step__index {
  font-family: var(--ml-font-display);
  font-size: 1.2rem;
  color: var(--ml-taupe-soft);
  margin-bottom: 1.5rem;
  display: block;
}

.ml-step__title {
  font-size: 1.35rem;
  margin-bottom: 0.85rem;
}

.ml-step__desc {
  color: rgba(246, 242, 234, 0.68);
  font-size: 0.95rem;
  max-width: 28ch;
}

/* ==========================================================================
   8. Applications grid
   ========================================================================== */
.ml-apps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 3.5rem;
}

@media (min-width: 700px) {
  .ml-apps {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ml-app-card {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4 / 5;
}

.ml-app-card:nth-child(1),
.ml-app-card:nth-child(4) {
  aspect-ratio: 4 / 5;
}

@media (min-width: 700px) {
  .ml-app-card:nth-child(odd) {
    margin-top: 3rem;
  }
}

.ml-app-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ml-ease);
}

.ml-app-card:hover img {
  transform: scale(1.06);
}

.ml-app-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(21, 19, 15, 0.78) 0%, rgba(21, 19, 15, 0) 55%);
}

.ml-app-card__label {
  position: absolute;
  left: 1.75rem;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 2;
  color: var(--ml-offwhite);
}

.ml-app-card__label .ml-eyebrow {
  color: var(--ml-taupe-soft);
  margin-bottom: 0.6rem;
}

.ml-app-card__label h3 {
  font-size: 1.5rem;
}

.ml-app-card__description {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: rgba(246, 242, 234, 0.85);
  max-width: 34ch;
}

/* ==========================================================================
   9. Transformations grid
   ========================================================================== */
.ml-transformations {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 3.5rem;
}

@media (min-width: 720px) {
  .ml-transformations {
    grid-template-columns: repeat(3, 1fr);
  }
}

.ml-t-card {
  display: block;
}

.ml-t-card__media {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4 / 5;
  margin-bottom: 1.25rem;
}

.ml-t-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ml-ease);
}

.ml-t-card:hover .ml-t-card__media img {
  transform: scale(1.05);
}

.ml-t-card__badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ml-offwhite);
  background: rgba(21, 19, 15, 0.72);
  border-radius: 2px;
}

.ml-t-card__title {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.ml-t-card__excerpt {
  color: rgba(21, 19, 15, 0.6);
  font-size: 0.92rem;
  max-width: 34ch;
}

.ml-archive-header {
  padding-top: 9rem;
}

/* ==========================================================================
   10. Why section
   ========================================================================== */
.ml-why {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--ml-line);
  margin-top: 3.5rem;
  border: 1px solid var(--ml-line);
}

@media (min-width: 720px) {
  .ml-why {
    grid-template-columns: repeat(3, 1fr);
  }
}

.ml-why__item {
  background: var(--ml-offwhite);
  padding: 2.5rem 2rem;
}

.ml-why__item h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.ml-why__item p {
  color: rgba(21, 19, 15, 0.62);
  font-size: 0.95rem;
}

/* ==========================================================================
   11. Final CTA
   ========================================================================== */
.ml-final-cta {
  text-align: center;
}

.ml-final-cta__inner {
  max-width: 760px;
  margin: 0 auto;
}

.ml-final-cta h2 {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  margin-bottom: 1.5rem;
}

.ml-final-cta__actions {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
}

/* ==========================================================================
   12. Footer
   ========================================================================== */
.ml-footer {
  background: var(--ml-charcoal);
  color: rgba(246, 242, 234, 0.7);
  padding: 5rem 0 2.5rem;
}

.ml-footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--ml-line-light);
}

@media (min-width: 800px) {
  .ml-footer__top {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

.ml-footer__brand .ml-logo {
  margin-bottom: 1.1rem;
  display: inline-flex;
}

.ml-footer__brand .ml-logo img {
  height: 72px;
}

.ml-footer__brand p {
  max-width: 32ch;
  font-size: 0.92rem;
}

.ml-footer h4 {
  font-family: var(--ml-font-body);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(246, 242, 234, 0.45);
  margin-bottom: 1.25rem;
}

.ml-footer ul {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.92rem;
}

.ml-footer a:hover {
  color: var(--ml-offwhite);
}

.ml-footer__bottom {
  padding-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(246, 242, 234, 0.4);
}

.ml-footer__bottom ul {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
}

/* ==========================================================================
   13. Inner pages / content
   ========================================================================== */
.ml-page-hero {
  padding: 10.5rem 0 3rem;
}

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

.ml-page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  max-width: 18ch;
}

.ml-content {
  max-width: 760px;
}

.ml-content > * + * {
  margin-top: 1.4rem;
}

.ml-content h2 {
  font-size: 1.9rem;
  margin-top: 2.5rem;
}

.ml-content h3 {
  font-size: 1.4rem;
}

.ml-content img {
  border-radius: 4px;
  margin: 2rem 0;
}

.ml-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2.5rem 0;
}

@media (min-width: 700px) {
  .ml-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

.ml-gallery img {
  aspect-ratio: 1;
  object-fit: cover;
  margin: 0;
}

.ml-t-hero-compare {
  margin-bottom: 3rem;
}

.ml-single-nav {
  display: flex;
  justify-content: space-between;
  padding: 3rem 0;
  border-top: 1px solid var(--ml-line);
  margin-top: 3rem;
}

/* ==========================================================================
   14. Contact form
   ========================================================================== */
.ml-form-page {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
}

@media (min-width: 900px) {
  .ml-form-page {
    grid-template-columns: 0.9fr 1.1fr;
  }
}

.ml-form-side h2 {
  font-size: 1.4rem;
  margin: 2rem 0 0.75rem;
}

.ml-form-side ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: rgba(21, 19, 15, 0.68);
}

.ml-field {
  margin-bottom: 1.4rem;
}

.ml-field label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(21, 19, 15, 0.6);
  margin-bottom: 0.5rem;
}

.ml-field input,
.ml-field select,
.ml-field textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  background: var(--ml-offwhite-soft);
  border: 1px solid var(--ml-line);
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ml-charcoal);
  transition: border-color 0.3s ease;
}

.ml-field input:focus,
.ml-field select:focus,
.ml-field textarea:focus {
  outline: none;
  border-color: var(--ml-taupe);
}

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

@media (min-width: 620px) {
  .ml-form-row--two {
    grid-template-columns: 1fr 1fr;
  }
}

.ml-form-note {
  font-size: 0.82rem;
  color: rgba(21, 19, 15, 0.5);
  margin-top: 1rem;
}

/* ==========================================================================
   15. Blog
   ========================================================================== */
.ml-posts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 700px) {
  .ml-posts {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ml-post-card__media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 1.2rem;
}

.ml-post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ml-post-card__meta {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ml-taupe);
  margin-bottom: 0.5rem;
  display: block;
}

.ml-pagination {
  display: flex;
  gap: 1rem;
  margin-top: 4rem;
  justify-content: center;
}

.ml-pagination a,
.ml-pagination span {
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--ml-line);
  border-radius: 999px;
  font-size: 0.85rem;
}

/* ==========================================================================
   15b. Enquiry modal
   ========================================================================== */
.ml-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 4vh 1.25rem;
}

.ml-modal[hidden] {
  display: none;
}

.ml-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(22, 24, 25, 0.72);
}

.ml-modal__panel {
  position: relative;
  z-index: 1;
  background: var(--ml-marble-white);
  color: var(--ml-charcoal);
  width: 100%;
  max-width: 640px;
  border-radius: 4px;
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.ml-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(29, 29, 31, 0.2);
  background: transparent;
  color: var(--ml-charcoal);
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
}

.ml-modal__close:focus-visible,
.ml-field input:focus-visible,
.ml-field select:focus-visible,
.ml-field textarea:focus-visible {
  outline: 2px solid var(--ml-charcoal);
  outline-offset: 2px;
}

.ml-field--checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.ml-field--checkbox input {
  width: auto;
  margin-top: 0.2rem;
}

.ml-field--checkbox label {
  margin-bottom: 0;
}

body.ml-modal-open {
  overflow: hidden;
}

.ml-modal__success,
.ml-modal__error {
  padding: 1.5rem;
  border-radius: 4px;
  margin-top: 1rem;
}

.ml-modal__success {
  background: rgba(168, 157, 146, 0.15);
  border: 1px solid var(--ml-warm-taupe);
}

.ml-modal__error {
  background: rgba(29, 29, 31, 0.06);
  border: 1px solid var(--ml-charcoal);
}

@media (prefers-reduced-motion: no-preference) {
  .ml-modal__panel {
    animation: ml-modal-in 0.2s ease-out;
  }
}

@keyframes ml-modal-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   16. 404
   ========================================================================== */
.ml-404 {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 6rem;
}

.ml-404 h1 {
  font-size: clamp(4rem, 12vw, 8rem);
  color: var(--ml-taupe);
  margin-bottom: 1rem;
}

/* ==========================================================================
   17. WordPress core alignment helpers
   ========================================================================== */
.alignwide {
  width: 100%;
}

.alignfull {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.wp-caption-text {
  font-size: 0.8rem;
  color: rgba(21, 19, 15, 0.55);
  margin-top: 0.5rem;
}


/* ==========================================================================
   18. Final launch overrides (v2.3.0)
   ========================================================================== */
.ml-header,
.ml-header.is-scrolled,
.ml-header.is-open {
  background: var(--ml-charcoal);
  color: var(--ml-marble-white);
  padding: 0.75rem 0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

body.ml-header-static .ml-header {
  position: static;
}

body.ml-header-static .ml-hero,
body.ml-header-static main {
  margin-top: 0;
}

.ml-header .ml-nav a {
  color: var(--ml-marble-white);
}

.ml-header .ml-nav a:hover {
  color: var(--ml-warm-stone);
}

.ml-menu-toggle span {
  background: var(--ml-marble-white);
}

body.ml-dark-hero .ml-header:not(.is-scrolled):not(.is-open) {
  color: var(--ml-marble-white);
}

/* Fix 3: header logo sized to spec — ~165-180px on mobile, ~225-240px on
   desktop — replacing the earlier undersized clamp(). */
.ml-logo--header img,
.ml-logo--mobile img {
  width: 172px;
  height: auto;
}

@media (min-width: 900px) {
  .ml-logo--header img {
    width: 232px;
  }
}

.ml-mobile-nav__brand .ml-logo--mobile img {
  width: 172px;
  height: auto;
}

.ml-footer__brand .ml-logo--footer img {
  width: min(190px, 100%);
  height: auto;
}

.ml-hero {
  margin-top: 78px;
}

body.ml-page-offset main {
  padding-top: 78px;
}

.ml-section__image {
  width: 100%;
  height: auto;
  margin-top: 2rem;
  border-radius: 2px;
}

@media (max-width: 700px) {
  .ml-hero {
    margin-top: 70px;
  }

  body.ml-page-offset main {
    padding-top: 70px;
  }
}

[id] {
  scroll-margin-top: 96px;
}

/* ========================================================================== 
   19. Critical responsive corrections (v2.3.2)
   ========================================================================== */
/* The desktop navigation must never remain visible beside the mobile menu
   toggle. At tablet/mobile widths the dedicated full-screen navigation is used. */
@media (max-width: 899px) {
  .ml-header .ml-nav {
    display: none;
  }
}

/* Below 700px the hero copy sits beneath the image. Give that content its own
   light surface so dark text and the secondary link remain fully legible. */
@media (max-width: 699px) {
  .ml-hero__content {
    background: var(--ml-marble-white);
    color: var(--ml-charcoal);
  }

  .ml-hero__panel {
    color: var(--ml-charcoal);
  }

  .ml-hero__heading,
  .ml-hero__sub,
  .ml-hero__cta-secondary {
    color: var(--ml-charcoal);
  }
}

/* v2.5.1 mobile menu refinement: the fixed site header already carries the
   brand, so the overlay does not repeat a second logo. */
@media (max-width: 899px) {
  .ml-mobile-nav {
    padding-top: 7.5rem;
  }

  .ml-mobile-nav > nav {
    width: 100%;
  }
}

/* ========================================================================== 
   20. Nested primary navigation / dropdowns (v2.5.11)
   ========================================================================== */
@media (min-width: 900px) {
  .ml-nav > ul > .menu-item-has-children {
    position: relative;
  }

  .ml-nav > ul > .menu-item-has-children > a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
  }

  .ml-nav > ul > .menu-item-has-children > a::after {
    content: '';
    width: 0.42rem;
    height: 0.42rem;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg) translateY(-0.12rem);
    transform-origin: center;
    opacity: 0.78;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .ml-nav .sub-menu {
    position: absolute;
    top: calc(100% + 0.8rem);
    left: 50%;
    z-index: 1002;
    display: block;
    min-width: 210px;
    margin: 0;
    padding: 0.65rem;
    background: rgba(29, 29, 31, 0.98);
    border: 1px solid rgba(249, 244, 242, 0.14);
    border-radius: 4px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }

  .ml-nav .sub-menu::before {
    content: '';
    position: absolute;
    top: -0.85rem;
    left: 0;
    width: 100%;
    height: 0.9rem;
  }

  .ml-nav .sub-menu li {
    display: block;
    width: 100%;
  }

  .ml-header .ml-nav .sub-menu a {
    display: block;
    width: 100%;
    padding: 0.72rem 0.82rem 0.64rem;
    border-bottom: 1px solid transparent;
    border-radius: 2px;
    font-size: 0.72rem;
    line-height: 1.35;
    letter-spacing: 0.065em;
    color: var(--ml-marble-white);
    background: transparent;
    transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
  }

  /* Match the visible desktop top-level hover treatment: white at rest,
     warm-stone text plus an underline on hover/focus. The more specific
     selector prevents older header link rules from flattening this state. */
  .ml-header .ml-nav .sub-menu a:hover,
  .ml-header .ml-nav .sub-menu a:focus-visible {
    color: var(--ml-warm-stone);
    border-bottom-color: currentColor;
    background: rgba(249, 244, 242, 0.055);
    outline: none;
  }

  .ml-header .ml-nav .sub-menu .current-menu-item > a {
    color: var(--ml-warm-stone);
    border-bottom-color: currentColor;
  }

  .ml-nav .menu-item-has-children:hover > .sub-menu,
  .ml-nav .menu-item-has-children:focus-within > .sub-menu,
  .ml-nav .menu-item-has-children.is-submenu-open > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
    transition-delay: 0s;
  }

  .ml-nav .menu-item-has-children:hover > a::after,
  .ml-nav .menu-item-has-children:focus-within > a::after,
  .ml-nav .menu-item-has-children.is-submenu-open > a::after {
    transform: rotate(225deg) translate(-0.05rem, -0.02rem);
    opacity: 1;
  }
}

@media (max-width: 899px) {
  .ml-mobile-nav {
    justify-content: flex-start;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .ml-mobile-nav > nav {
    margin-top: auto;
    margin-bottom: auto;
  }

  .ml-mobile-nav ul {
    margin: 0 0 2.5rem;
  }

  .ml-mobile-nav .menu-item-has-children {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.8rem;
  }

  .ml-mobile-nav .menu-item-has-children > a {
    min-width: 0;
  }

  .ml-mobile-nav .ml-submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    padding: 0;
    border: 1px solid rgba(249, 244, 242, 0.24);
    border-radius: 50%;
    background: transparent;
    color: var(--ml-marble-white);
  }

  .ml-mobile-nav .ml-submenu-toggle::before {
    content: '';
    width: 0.58rem;
    height: 0.58rem;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg) translate(-0.08rem, -0.08rem);
    transition: transform 0.25s ease;
  }

  .ml-mobile-nav .menu-item-has-children.is-submenu-open > .ml-submenu-toggle::before {
    transform: rotate(225deg) translate(-0.08rem, -0.08rem);
  }

  .ml-mobile-nav .sub-menu {
    grid-column: 1 / -1;
    display: none;
    gap: 0;
    margin: 0.65rem 0 0.35rem;
    padding: 0.35rem 0 0.2rem 1.1rem;
    border-left: 1px solid rgba(249, 244, 242, 0.22);
  }

  .ml-mobile-nav .menu-item-has-children.is-submenu-open > .sub-menu {
    display: flex;
  }

  .ml-mobile-nav .sub-menu li {
    width: 100%;
  }

  .ml-mobile-nav .sub-menu a {
    display: block;
    padding: 0.55rem 0;
    font-family: var(--ml-font-body);
    font-size: clamp(1rem, 4.6vw, 1.25rem);
    line-height: 1.35;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    color: var(--ml-warm-stone);
  }
}

/* ========================================================================== 
   v2.5.26 — Footer nested navigation + legal pages
   ========================================================================== */
.ml-footer__nav .menu-item-has-children {
  display: grid;
  grid-template-columns: max-content 1.8rem;
  align-items: center;
  justify-content: start;
  column-gap: 0.35rem;
}

.ml-footer__nav .menu-item-has-children > a {
  grid-column: 1;
}

.ml-footer__nav .ml-footer-submenu-toggle {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  padding: 0;
  border: 1px solid rgba(246, 242, 234, 0.18);
  border-radius: 50%;
  background: transparent;
  color: rgba(246, 242, 234, 0.72);
  cursor: pointer;
}

.ml-footer__nav .ml-footer-submenu-toggle::before {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translate(-0.05rem, -0.05rem);
  transition: transform 0.2s ease;
}

.ml-footer__nav .menu-item-has-children.is-submenu-open > .ml-footer-submenu-toggle::before {
  transform: rotate(225deg) translate(-0.05rem, -0.05rem);
}

.ml-footer__nav .sub-menu {
  grid-column: 1 / -1;
  display: none;
  margin: 0.3rem 0 0.1rem 0.25rem;
  padding: 0.25rem 0 0.15rem 0.85rem;
  border-left: 1px solid rgba(246, 242, 234, 0.16);
  gap: 0.5rem;
}

.ml-footer__nav .menu-item-has-children.is-submenu-open > .sub-menu {
  display: flex;
}

.ml-footer__nav .sub-menu a {
  color: rgba(246, 242, 234, 0.58);
  font-size: 0.86rem;
}

.ml-footer__nav .sub-menu a:hover,
.ml-footer__nav .sub-menu a:focus-visible {
  color: var(--ml-offwhite);
}

.ml-legal {
  max-width: 860px;
  color: var(--ml-charcoal);
}

.ml-legal__lead {
  font-size: clamp(1.08rem, 1.8vw, 1.25rem);
  line-height: 1.7;
  color: rgba(29, 29, 31, 0.82);
}

.ml-legal__updated {
  display: inline-flex;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(29, 29, 31, 0.14);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(29, 29, 31, 0.62);
}

.ml-content .ml-legal > h2 {
  margin-top: 2.8rem;
  padding-top: 0.2rem;
  font-size: clamp(1.35rem, 2.3vw, 1.8rem);
  line-height: 1.2;
}

.ml-content .ml-legal > h2 + p,
.ml-content .ml-legal > h2 + ul {
  margin-top: 1rem;
}

.ml-legal ul {
  padding-left: 1.25rem;
}

.ml-legal li + li {
  margin-top: 0.55rem;
}

.ml-legal a {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}
