* {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    body {
      margin: 0;
      font-family: 'IBM Plex Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      background-color: #ffffff;
      color: #1a1a1a;
      line-height: 1.6;
    }
    .container {
      width: 90%;
      max-width: 1100px;
      margin: 0 auto;
      padding: 2rem 0;
    }
    header {
      position: sticky;
      top: 0;
      z-index: 1000;
      background-color: #f8f8f3;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    .nav-container {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 1rem 2rem;
    }
    .logo {
      font-weight: bold;
      font-size: 1.5rem;
      color: #0a0a23;
    }
    nav ul {
      display: flex;
      list-style: none;
      gap: 2rem;
    }
    nav ul li {
      position: relative;
    }
    nav ul li a {
      text-decoration: none;
      color: #1a1a1a;
      font-weight: 500;
      font-size: 0.9rem;
      padding: 0.5rem;
    }
    .nav-right a {
      margin-left: 1.5rem;
      text-decoration: none;
      color: #1a1a1a;
      font-weight: 500;
      font-size: 0.9rem;
    }
    .dropdown {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      background-color: rgba(248, 248, 243, 0.95);
      min-width: 600px;
      max-width: 900px;
      padding: 2rem;
      border: 1px solid #ddd;
      border-radius: 8px;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }
    nav ul li:hover .dropdown {
      display: flex;
      gap: 4rem;
      justify-content: flex-start;
    }
    .dropdown-column {
      display: flex;
      flex-direction: column;
    }
    .dropdown-column h4 {
      margin-bottom: 0.5rem;
      font-size: 1rem;
      color: #111;
    }
    .dropdown-column a {
      color: #1a1a1a;
      text-decoration: none;
      margin: 0.25rem 0;
      font-size: 0.9rem;
    }
    .dropdown-column a:hover {
      text-decoration: underline;
    }
    .step button {
      background-color: #0a0a23;
      color: white;
      border: none;
      padding: 0.6rem 1.2rem;
      font-size: 0.9rem;
      cursor: pointer;
      border-radius: 4px;
      margin-top: 1.5rem;
      align-self: center;
      width: fit-content;
    }
    .tagline {
      font-style: italic;
      font-size: 1.2rem;
      color: #ffc107;
    }
    .hero {
      background: url('images/hero.png') center/cover no-repeat;
      color: white;
      text-align: center;
      padding: 15rem 2rem;
    }
    .hero .container {
      background-color: rgba(0, 0, 0, 0.4);
      padding: 0.5rem 1.5rem 1.25rem 1.5rem;
      border-radius: 12px;
      display: inline-block;
      max-width: 600px;
    }
    .hero h2 {
      font-size: 2rem;
      margin: 0.5rem 0;
    }
    .hero button,
    .cta button,
    .fixtures-preview button,
    .card button {
      background-color: #0a0a23;
      color: white;
      border: none;
      padding: 0.75rem 1.5rem;
      font-size: 1rem;
      cursor: pointer;
      border-radius: 4px;
      margin: 0.5rem;
    }
    .how-it-works {
      background-color: #ffffff;
      padding: 2rem 0;
    }
    .how-it-works h2 {
      text-align: center;
      margin-bottom: 2rem;
    }
    .steps-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 2rem;
    }
    .step {
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      height: 100%;
      padding-bottom: 1rem;
    }
    .step img {
      width: 100px;
      height: 100px;
      margin-bottom: 1rem;
    }
    .step h3 {
      margin-bottom: 0.5rem;
    }
    .step p {
      flex-grow: 1;
    }
    .cta {
      background: url('images/cta-lighting.png') center/cover no-repeat;
      color: white;
      text-align: center;
      padding: 3rem 2rem;
    }
    .blog-preview {
      background-color: #f8f8f3;
      padding: 2rem 0;
    }
    .blog-preview h2 {
      text-align: center;
      margin-bottom: 2rem;
    }
    .cards {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 2rem;
    }
    .card {
      background: white;
      border: 1px solid #ddd;
      padding: 1.5rem;
      border-radius: 8px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }
    .card h3 {
      margin-top: 0;
    }
    .card p {
      font-size: 0.9rem;
    }
    .fixtures-preview {
  background-color: #ffffff;
  padding: 2rem 0;
  text-align: center;
}
    .fixtures-preview h2 {
      margin-bottom: 1rem;
    }
    .fixtures-preview p {
      margin-bottom: 1.5rem;
    }
    footer {
      background-color: #f0f0f0;
      text-align: center;
      padding: 1rem 0;
      font-size: 0.9rem;
      color: #666;
    }
    @media (max-width: 768px) {
      .nav-container {
        flex-direction: column;
        align-items: flex-start;
      }
      nav ul {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
      }
      .nav-right {
        margin-top: 1rem;
      }
    }
    footer a {
      color: #1a1a1a;
      text-decoration: none;
    }
    footer a:hover {
      text-decoration: underline;
    }
    footer h4 {
      font-weight: 600;
      font-size: 1rem;
      margin-bottom: 1rem;
    }
    footer p {
      margin: 0.3rem 0;
    }

/* Inline style replacements */

.header-flex {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}
.logo-align {
  flex: 0;
  text-align: center;
}
.logo-img {
  height: 50px;
  width: auto;
  vertical-align: middle;
}
.nav-flex {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}
.footer-main {
  background-color: #f8f8f3;
  padding: 2.5rem 1.5rem;
  font-size: 0.9rem;
  color: #111;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
}
.footer-heading {
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
}


/* Explore Fixtures section */

.explore-fixtures {
  background-color: #ffffff;
  padding: 3rem 0;
}
.explore-fixtures h2 {
  text-align: center;
  margin-bottom: 2rem;
}
.fixture-type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.fixture-type {
  text-align: center;
  padding: 1rem 0;
}

.fixture-type img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.fixture-type h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}
.fixture-type p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.fixture-type button {
  background-color: #0a0a23;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 4px;
}
.fixture-type button:hover {
  background-color: #333;
}


/* Final tweaks to fixture preview */

.fixture-type {
  text-align: center;
  padding: 1rem 0;
}


.fixture-button-wrap {
  margin-top: 2rem;
  text-align: center;
}


/* Expanded fixture preview grid */

.explore-wide {
  width: 100%;
  padding: 0 3vw;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}


/* Background highlight only for top Explore section */
.fixtures-preview.featured {
  background-color: #f8f8f3;
}



/* Builder Packages Section */

.builder-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-top: 2rem;
}

.builder-text p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  text-align: left;
}

.builder-text button {
  display: inline-block;
}

.builder-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* === Phase 3 Additions === */

:root{
  --bg: #ffffff;
  --ink: #1a1a1a;
  --ink-strong:#0a0a23;
  --paper:#f8f8f3;
  --border:#ddd;
}

.btn{
  background-color: var(--ink-strong);
  color: #fff;
  border: none;
  padding: .75rem 1.25rem;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn:hover{ opacity:.9; }
.btn:focus-visible{ outline:2px solid currentColor; outline-offset:2px; }

.nav-primary{ flex:1; }

nav ul li:focus-within .dropdown{ 
  display:flex; gap:4rem; justify-content:flex-start;
}
nav a:focus-visible{ outline:2px solid currentColor; outline-offset:2px; }

.hero h1{
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin: .25rem 0 .5rem;
  line-height: 1.2;
}
@media (max-width: 600px){
  .hero{ padding: 8rem 1rem; }
  .hero .container{ max-width: 92vw; }
}

@media (max-width: 1024px){
  .explore-wide,
  .fixture-type-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px){
  .explore-wide,
  .fixture-type-grid{ grid-template-columns: 1fr; }
}

.step img{
  width: clamp(90px, 20vw, 140px);
  height: auto;
}

footer{ /* minimize generic footer rules; specific styles on .footer-main */ }

/* === Fixtures Landing (Phase 3) === */
.fixtures-landing .subtitle{ color:#555; margin-top:.25rem; }
.tabs{ margin:1rem 0 0; display:flex; gap:1rem; justify-content:center; flex-wrap:wrap; }
.tab{ background:transparent; border:none; padding:.5rem .75rem; cursor:pointer; font-weight:600; border-bottom:2px solid transparent; }
.tab.active{ border-color: var(--ink-strong); }
.subfilters{ margin: .5rem 0 1.25rem; }
.filters{ display:flex; gap:.75rem; justify-content:center; flex-wrap:wrap; }
.filters.hidden{ display:none; }
.filter-btn{ background:#f3f3f3; border:1px solid #e5e5e5; padding:.4rem .7rem; border-radius:999px; cursor:pointer; }
.filter-btn.active{ background: var(--ink-strong); color:#fff; border-color: var(--ink-strong); }

.product-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 1024px){ .product-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px){ .product-grid{ grid-template-columns: 1fr; } }

.card{ background:#fff; border:1px solid var(--border); border-radius:12px; padding:1rem; text-align:center; box-shadow: 0 4px 12px rgba(0,0,0,.04); }
.card-media{ position:relative; display:block; width:100%; aspect-ratio: 4/3; overflow:hidden; border-radius:8px; margin-bottom:.75rem; }
.card-media img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transition:opacity .3s ease; }
.card-media .img-on{ opacity:0; }
.card:hover .card-media .img-off{ opacity:0; }
.card:hover .card-media .img-on{ opacity:1; }

.card-title{ font-size:1.1rem; margin: .25rem 0 0; }
.card-title a{ text-decoration:none; color:inherit; }
.card-title a:hover{ text-decoration:underline; }

/* === Fixture Detail (Mira) — Phase 3 === */
.product-detail{
  display:grid; grid-template-columns: 1.5fr 1fr; gap:2rem; margin-top:2rem; align-items:start;
}
@media (max-width: 900px){ .product-detail{ grid-template-columns: 1fr; } }

.gallery-stage{ position:relative; border:1px solid var(--border); border-radius:12px; overflow:hidden; aspect-ratio: 4/3; background:#fff; }
.gallery-stage img{ width:100%; height:100%; object-fit:cover; display:block; }
.gallery-arrow{ position:absolute; top:50%; transform:translateY(-50%); border:none; background:rgba(255,255,255,.85); padding:.4rem .6rem; border-radius:999px; cursor:pointer; }
.gallery-arrow-left{ left:.5rem; } .gallery-arrow-right{ right:.5rem; }
.thumbs{ display:flex; gap:.5rem; margin-top:.5rem; flex-wrap:wrap; }
.thumbs img{ width:80px; height:80px; object-fit:cover; border-radius:8px; border:2px solid transparent; cursor:pointer; opacity:.7; }
.thumbs img.is-active{ border-color: var(--ink-strong); opacity:1; }

.sidebar .product-title{ font-size: clamp(1.4rem, 3vw, 2rem); margin:0 0 .25rem; }
.sidebar .sku{ color:#666; font-size:.9rem; margin-bottom:1rem; }

.options{ display:grid; gap:1rem; }
.option h3{ font-size:.95rem; margin:0 0 .4rem; color:#444; }

.pills{ display:flex; gap:.5rem; flex-wrap:wrap; }
.pill{ background:#f3f3f3; border:1px solid #e5e5e5; padding:.35rem .7rem; border-radius:999px; cursor:pointer; font-size:.9rem; }
.pill.is-active{ background: var(--ink-strong); color:#fff; border-color: var(--ink-strong); }

.qty-wrap{ display:flex; align-items:center; gap:.75rem; }
.qty{ display:inline-flex; align-items:center; border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.qty button{ background:#f3f3f3; border:none; padding:.4rem .7rem; cursor:pointer; }
.qty span{ min-width:2rem; text-align:center; display:inline-block; }

.product-tabs{ margin: 2rem auto; }
.product-tabs .tabs{ justify-content:flex-start; gap:1rem; }
#tabContent{ background:#fff; border:1px solid var(--border); border-radius:12px; padding:1rem 1.25rem; margin-top:.75rem; }
#tabContent ul{ padding-left:1rem; }
.hidden{ display:none; }

.btn-block{ display:block; width:100%; text-align:center; margin-top:.5rem; }

/* =========================
   Mobile Header Clean-up
   ========================= */
header .nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 20px;
}

.nav-primary ul,
.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

8px;
  width: auto;
  display: block;

/* Hide large dropdown by default on touch */
.nav-primary .dropdown { display: none; }

/* --- Phones & small tablets --- */
@media (max-width: 768px) {
  header .nav-container {
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px;
  }

  .logo,
  .logo-align {
    order: -1;               /* logo on top */
    margin: 0 auto;
  }

  .nav-primary ul,
  .nav-right {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 14px;
    line-height: 1.2;
  }

  .nav-primary li { margin: 0; }
  .nav-primary .dropdown { display: none !important; } /* disable mega menu */
}

/* --- Very small phones --- */
@media (max-width: 420px) {
  .nav-primary ul,
  .nav-right { gap: 12px; font-size: 13px; }
}

/* Mobile Nav Panel */
.hamburger, .search-btn {
  display: none;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  padding: 6px 8px;
  cursor: pointer;
}
.hamburger { margin-right: auto; }  /* sits left */
.search-btn { margin-left: auto; }  /* sits right */

@media (max-width: 768px) {
  /* Place buttons + center logo */
  .hamburger, .search-btn { display: inline-block; }
  header .nav-container {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
  }
  .logo, .logo-align { grid-column: 2; justify-self: center; }

  /* Panel overlay */
  #mobileMenu {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
    z-index: 9999;
  }
  #mobileMenu.open { opacity: 1; visibility: visible; }
  #mobileMenu .mobile-menu-inner {
    position: absolute;
    top: 0; left: 0;
    width: min(85vw, 360px);
    height: 100%;
    background: #ffffff;
    padding: 18px 16px;
    overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0,0,0,0.12);
  }
  #mobileMenu h4 { margin: 12px 0 8px; font-size: 14px; letter-spacing: .02em; color: #444; }
  #mobileMenu ul { list-style: none; margin: 0; padding: 0; }
  #mobileMenu li { margin: 0; }
  #mobileMenu a { display: block; padding: 10px 6px; text-decoration: none; color: #111; }
  #mobileMenu a:hover { background: #f3f3f3; }

  html.no-scroll, body.no-scroll { overflow: hidden; }
}

/* Homepage Mobile Header */
@media (max-width: 768px) {
  .page-home .hamburger,
  .page-home .search-btn {
    display: inline-block;
    border: 0;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    padding: 6px 8px;
    cursor: pointer;
  }
  .page-home header .nav-container,
  .page-home header .header-flex {
    display: grid;
    grid-template-columns: 40px 1fr 40px; /* burger | logo | search */
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
  }
  .page-home .logo,
  .page-home .logo-align { grid-column: 2; justify-self: center; }
  .page-home .nav-primary,
  .page-home .nav-right,
  .page-home .dropdown { display: none !important; } /* hide big menus on mobile only */
  .page-home .logo .logo-img,
  .page-home .logo-align .logo-img { height: 34px; } /* logo size ONLY on mobile homepage */

  /* Slide-over panel */
  .page-home #mobileMenuHome {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0; visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
    z-index: 9999;
  }
  .page-home #mobileMenuHome.open { opacity: 1; visibility: visible; }
  .page-home #mobileMenuHome .mobile-menu-inner {
    position: absolute; top: 0; left: 0;
    width: min(85vw, 360px); height: 100%;
    background: #fff; padding: 18px 16px; overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0,0,0,0.12);
  }
  .page-home #mobileMenuHome h4 { margin: 12px 0 8px; font-size: 14px; color: #444; }
  .page-home #mobileMenuHome ul { list-style: none; margin: 0; padding: 0; }
  .page-home #mobileMenuHome li { margin: 0; }
  .page-home #mobileMenuHome a { display: block; padding: 10px 6px; text-decoration: none; color: #111; }
  .page-home #mobileMenuHome a:hover { background: #f3f3f3; }

  html.no-scroll, body.no-scroll { overflow: hidden; }
}

/* Increase gap above How It Works buttons (desktop + mobile) */
.how-it-works .btn-row,
.how-it-works .cta-row {
  margin-top: 1.5rem; /* ~24px */
}

/* Increase gap above How It Works buttons further */
.how-it-works .btn-row,
.how-it-works .cta-row {
  margin-top: 2.5rem; /* ~40px */
}

/* Increase gap above How It Works buttons (direct targeting) */
.how-it-works button,
.how-it-works .btn {
  margin-top: 3rem; /* ~48px */
}

/* Align Smart Lighting Insights buttons horizontally with gap from text */
.smart-lighting-insights .card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.smart-lighting-insights .card .btn,
.smart-lighting-insights .card button {
  margin-top: 2rem; /* ~32px gap from text */
  align-self: flex-start;
}

/* Smart Lighting Insights: align buttons & add gap */
.blog-preview .cards .card {
  display: flex;
  flex-direction: column;        /* stack title, text, button */
}
.blog-preview .cards .card .btn {
  margin-top: auto;              /* push button to bottom for alignment */
  align-self: flex-start;        /* keep button left-aligned inside card */
  padding-top: 0.75rem;          /* visual gap from paragraph above */
}

/* Blog preview: center buttons and match How It Works spacing */
.blog-preview .cards .card {
  display: flex;
  flex-direction: column;
  align-items: center; /* center all content horizontally */
  text-align: center;  /* center text too */
}
.blog-preview .cards .card .btn {
  margin-top: 3rem;    /* match How It Works section gap */
  align-self: center;  /* center the button in the flex column */
}

/* Blog preview: reduce top margin on buttons */
.blog-preview .cards .card .btn {
  margin-top: 1.5rem !important;
}

/* How It Works: match 1.5rem gap */
.how-it-works button,
.how-it-works .btn {
  margin-top: 1.5rem !important;
}

/* Blog preview: ensure all card buttons align horizontally */
.blog-preview .cards {
  display: flex;
  align-items: stretch; /* make all cards equal height */
}
.blog-preview .cards .card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1; /* equal width and height for all cards */
}
.blog-preview .cards .card .btn {
  margin-top: auto; /* push buttons to bottom evenly */
}

/* Blog preview: equal card height for button alignment */
.blog-preview .cards {
  display: flex;
  align-items: stretch; /* same height for all cards */
}
.blog-preview .cards .card {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* space out text and button */
}
.blog-preview .cards .card .btn {
  margin-top: auto; /* push button to bottom */
  align-self: center; /* center button horizontally */
}

/* ===== Contact Section ===== */
.contact-section { padding: 4rem 0; background: #fff; }
.contact-grid { display: grid; gap: 2rem; align-items: start; }
.contact-left h2 { margin-bottom: .75rem; }
.contact-left .big { font-size: 1.125rem; margin: .25rem 0 .75rem; }
.map-wrap { margin-top: 1rem; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,.06); }
.map-wrap iframe { width: 100%; height: 260px; border: 0; }

.contact-right .contact-form { width: 100%; }
.contact-form .form-row { display: grid; gap: 1rem; }
.contact-form .form-row.two-col { grid-template-columns: 1fr 1fr; }
.contact-form .field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.contact-form label { font-weight: 600; }
.contact-form .req { color: #d33; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  padding: .85rem 1rem;
  font: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  background: #fff;
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: #b7c0ff;
  box-shadow: 0 0 0 3px rgba(60, 80, 255, .12);
}
.contact-form .actions { margin-top: 1rem; }
.contact-form .fine-print { margin-top: .75rem; font-size: .85rem; color: #666; }

/* Stack on smaller screens */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-form .form-row.two-col { grid-template-columns: 1fr; }
}
@media (min-width: 901px) {
  .contact-grid { grid-template-columns: 1.1fr 1fr; } /* left a hair wider */
}

/* Tighten space below Contact Us section */
.contact-section {
  padding-bottom: 2rem !important; /* smaller bottom padding */
}
.contact-section + .cta,
.contact-section + footer {
  margin-top: 0 !important; /* remove gap between sections */
}

/* Remove excessive bottom gap after Contact Us section */
.contact-section {
  padding-bottom: 0 !important; /* no extra padding below */
  margin-bottom: 0 !important;  /* ensure no margin below */
}
.contact-section .fine-print {
  margin-bottom: 0 !important;  /* remove gap from disclaimer text */
}
.contact-section + footer {
  margin-top: 0 !important; /* footer hugs contact section */
}

/* Test: remove gap under Contact Us section */
.contact-section {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}
.contact-section + footer {
  margin-top: 0 !important;
}

/* ===== Mobile menu a11y helpers ===== */
body.no-scroll { overflow: hidden !important; }
.mobile-nav-panel[aria-hidden="true"] { visibility: hidden; }
.mobile-nav-panel[aria-hidden="false"] { visibility: visible; }
.mobile-nav-panel :focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .mobile-nav-panel, .mobile-nav-overlay { transition: none !important; }
}

/* ===== Hamburger button (visible on mobile only) ===== */
.hamburger-btn {
  display: none; /* default hidden, shown via media query */
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: transparent;
  color: #111; /* fallback; inherits if header sets a color */
  cursor: pointer;
  z-index: 1002;
}
.hamburger-btn .hamburger-box { display: inline-block; line-height: 0; }
.hamburger-btn .hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background: currentColor;
  border-radius: 2px;
}

/* Position inside header when injected there */
header.has-hamburger-injected { position: relative; }
header.has-hamburger-injected .hamburger-btn {
  position: absolute;
  left: 12px;
  top: 12px;
}

/* Fallback fixed-position if no header is found */
.hamburger-fixed { position: fixed; left: 12px; top: 12px; }

/* Show on mobile, hide on desktop */
@media (max-width: 1023.98px) {
  .hamburger-btn { display: inline-flex; }
  /* If an existing toggle element is present, ensure it's not accidentally hidden */
  [data-mobile-nav-toggle], .mobile-nav-toggle, #mobileMenuButton, .hamburger {
    display: inline-flex !important;
  }
}
@media (min-width: 1024px) {
  .hamburger-btn,
  [data-mobile-nav-toggle], .mobile-nav-toggle, #mobileMenuButton, .hamburger {
    display: none !important;
  }
}

/* Overlay (if we auto-create one) */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 1001;
}
.mobile-nav-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Honor reduced motion */
@media (prefers-reduced-motion: reduce) {
  .mobile-nav-overlay { transition: none !important; }
}

/* ====== Mobile hamburger (TOP-LEFT, mobile only) ====== */
.hamburger-btn {
  display: none; /* shown via media query */
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: transparent;
  color: #111; /* inherits from header if set */
  cursor: pointer;
  z-index: 1002;
}
.hamburger-btn .hamburger-box { display: inline-block; line-height: 0; }
.hamburger-btn .hamburger-line {
  display: block; width: 22px; height: 2px; margin: 4px 0;
  background: currentColor; border-radius: 2px;
}

/* Place inside header at top-left */
header.has-hamburger-injected { position: relative; }
header.has-hamburger-injected .hamburger-btn {
  position: absolute; left: 12px; top: 12px;
}

/* Fallback fixed placement if no header found */
.hamburger-fixed { position: fixed; left: 12px; top: 12px; }

/* Show ONLY on mobile; hide on desktop */
@media (max-width: 1023.98px) {
  .hamburger-btn { display: inline-flex !important; }
  header .hamburger, header .mobile-nav-toggle, header #mobileMenuButton, header [data-mobile-nav-toggle] {
    display: inline-flex !important; position: absolute !important; left: 12px !important; top: 12px !important; z-index: 1002 !important;
  }
}
@media (min-width: 1024px) {
  .hamburger-btn,
  header .hamburger, header .mobile-nav-toggle, header #mobileMenuButton, header [data-mobile-nav-toggle] {
    display: none !important;
  }
}

/* ====== Off-canvas panel + overlay (baseline styles) ====== */
.mobile-nav-panel {
  position: fixed; inset: 0 auto 0 0;  /* top 0, left 0, bottom 0 */
  width: 82vw; max-width: 360px;
  background: #fff;
  transform: translateX(-100%);
  transition: transform 250ms ease;
  z-index: 1003;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.mobile-nav-panel[aria-hidden="false"] { transform: translateX(0); }

.mobile-nav-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  opacity: 0; pointer-events: none;
  transition: opacity 200ms ease; z-index: 1001;
}
.mobile-nav-overlay.is-active { opacity: 1; pointer-events: auto; }

body.no-scroll { overflow: hidden !important; }
.mobile-nav-panel :focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .mobile-nav-panel, .mobile-nav-overlay { transition: none !important; }
}

/* Force hamburger visible top-left on mobile */
@media (max-width: 1023.98px) {
  header.has-hamburger-injected .hamburger-btn,
  header .hamburger-btn,
  [data-mobile-nav-toggle].hamburger-btn {
    display: inline-flex !important;
    position: absolute !important;
    left: 12px !important;
    top: 12px !important;
    z-index: 1002 !important;
  }
}

/* ===== Mobile header UI – overrides (final) ===== */
@media (max-width: 1023.98px){
  /* Use a 3-column grid: [hamburger] [logo] [login] */
  header .nav-container,
  header .header-flex{
    display: grid !important;
    grid-template-columns: 44px 1fr 44px !important;
    align-items: center !important;
    position: relative !important;
    gap: 8px !important;
    padding: 10px 14px !important;
  }
  /* Center the logo */
  .logo, .logo-align{ grid-column: 2 !important; justify-self: center !important; }
  .logo .logo-img, .logo-align .logo-img{ height: 34px !important; width: auto !important; }

  /* Hide big nav and dropdowns on mobile */
  .nav-primary, .nav-right, .dropdown{ display: none !important; }

  /* Left hamburger: borderless, floating */
  .hamburger-btn{
    display: inline-flex !important;
    position: absolute !important;
    left: 12px !important;
    top: 12px !important;
    width: 44px !important;
    height: 44px !important;
    padding: 8px !important;
    background: transparent !important;
    border: 0 !important;
    color: #111 !important;
    z-index: 1002 !important;
  }
  .hamburger-btn .hamburger-lines{ position: relative; width: 24px; height: 2px; background: currentColor; border-radius: 2px; }
  .hamburger-btn .hamburger-lines span{
    position: absolute; left: 0; width: 24px; height: 2px; background: currentColor; border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease, background .2s ease;
  }
  .hamburger-btn .hamburger-lines span:nth-child(1){ top: -6px; }
  .hamburger-btn .hamburger-lines span:nth-child(2){ top: 0; }
  .hamburger-btn .hamburger-lines span:nth-child(3){ top: 6px; }
  .hamburger-btn.is-open .hamburger-lines{ background: transparent; }
  .hamburger-btn.is-open .hamburger-lines span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
  .hamburger-btn.is-open .hamburger-lines span:nth-child(2){ opacity: 0; }
  .hamburger-btn.is-open .hamburger-lines span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }
  .hamburger-btn:focus-visible,
  .login-icon-btn:focus-visible{ outline: 2px solid currentColor; outline-offset: 3px; }

  /* Right login icon */
  .icon-btn.login-icon-btn{
    display: inline-flex !important;
    position: absolute !important;
    right: 12px !important;
    top: 12px !important;
    width: 28px !important;
    height: 28px !important;
    align-items: center; justify-content: center;
    color: #111 !important;
    text-decoration: none;
    z-index: 1002 !important;
  }

  /* Panel + overlay (baseline—keeps your earlier a11y helpers) */
  .mobile-nav-panel{
    position: fixed; inset: 0 auto 0 0;
    width: 82vw; max-width: 360px;
    background: #fff;
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 1003;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
    padding: 18px 16px;
  }
  .mobile-nav-panel[aria-hidden="false"]{ transform: translateX(0); }
  .mobile-nav-overlay{
    position: fixed; inset: 0;
    background: rgba(0,0,0,.35);
    opacity: 0; pointer-events: none;
    transition: opacity .2s ease; z-index: 1001;
  }
  .mobile-nav-overlay.is-active{ opacity: 1; pointer-events: auto; }
  body.no-scroll{ overflow: hidden !important; }
}
@media (prefers-reduced-motion: reduce){
  .mobile-nav-panel, .mobile-nav-overlay{ transition: none !important; }
}

/* ===== Login icon base (desktop & mobile) ===== */
.icon-btn.login-icon-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  color: #111 !important;           /* unify color to black */
  text-decoration: none;
}

/* Mobile-only clone is pinned top-right; hide desktop icon on mobile */
@media (max-width: 1023.98px){
  .nav-right .login-icon-btn{ display: none !important; }      /* desktop icon hidden on mobile */
  .login-icon-btn.login-mobile-only{
    display: inline-flex !important;
    position: absolute !important;
    right: 12px !important;
    top: 12px !important;
    z-index: 1002 !important;
  }
}

/* Hide the mobile clone on desktop; keep desktop icon inline in .nav-right */
@media (min-width: 1024px){
  .login-icon-btn.login-mobile-only{ display: none !important; }
}

/* ===== Header: Search control (desktop) ===== */
.search-control{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-direction: row-reverse;            /* icon on the RIGHT, input expands LEFT */
  position: relative;
}
.search-toggle.icon-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  color: #111 !important;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.search-input{
  width: 0;
  opacity: 0;
  border: 1px solid #ddd;
  border-radius: 999px;
  padding: 6px 10px;
  font: 14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  transition: width .18s ease, opacity .18s ease, margin .18s ease;
  margin-right: 0;
}
.search-control.is-open .search-input{
  width: 180px;           /* expands left due to row-reverse */
  opacity: 1;
}

/* Icons unified color */
.icon-btn.login-icon-btn{ color: #111 !important; }

/* Hide the desktop search control + desktop login icon on mobile;
   show the mobile login clone pinned top-right (already styled earlier) */
@media (max-width: 1023.98px){
  .search-control{ display: none !important; }
  .nav-right .login-icon-btn{ display: none !important; }
  .login-icon-btn.login-mobile-only{
    display: inline-flex !important;
    position: absolute !important;
    right: 12px !important; top: 12px !important;
    z-index: 1002 !important;
  }
}

/* ===== Desktop search (modern pill) ===== */
@media (min-width: 1024px){
  .nav-right{ display: flex; align-items: center; gap: 16px; }
  .nav-right .search-control{
    display: flex !important;
    width: 220px !important;              /* reserve max width so it expands to the LEFT */
    justify-content: flex-end !important; /* anchor input to the right */
  }
  .nav-right .search-input{
    width: 120px;
    color: #111;
    background: rgba(255,255,255,.75);
    border: 1px solid rgba(17,17,17,.18);
    border-radius: 999px;
    padding: 8px 12px;
    outline: none;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
    transition: width .22s ease, background-color .22s ease, border-color .22s ease, box-shadow .22s ease;
    margin-left: auto;  /* ensures it grows left */
    -webkit-backdrop-filter: saturate(160%) blur(6px);
    backdrop-filter: saturate(160%) blur(6px);
  }
  .nav-right .search-input::placeholder{ color: rgba(17,17,17,.55); }
  .nav-right .search-input:focus{
    width: 220px;
    background: rgba(255,255,255,.9);
    border-color: rgba(17,17,17,.28);
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
  }
  /* Collapse back when empty + not focused (nice without JS) */
  .nav-right .search-input:placeholder-shown:not(:focus){ width: 120px; }
}

/* Icons unified color */
.icon-btn.login-icon-btn{ color: #111 !important; }

/* ===== Search pill: black focus ring (desktop) ===== */
@media (min-width: 1024px){
  .nav-right .search-input{
    outline: none;
    -webkit-appearance: none; /* remove iOS/Chrome default search styling */
    appearance: none;
    caret-color: #111;
  }
  .nav-right .search-input:focus,
  .nav-right .search-input:focus-visible{
    border-color: #111 !important;
    /* crisp black ring + subtle depth */
    box-shadow: 0 0 0 1.5px #111, 0 2px 10px rgba(0,0,0,.05) !important;
  }
  /* Hide WebKit's built-in search decorations to keep the pill clean */
  .nav-right .search-input::-webkit-search-decoration,
  .nav-right .search-input::-webkit-search-cancel-button{
    -webkit-appearance: none;
  }
}

/* ===== Search pill: decorative icon (desktop) ===== */
@media (min-width: 1024px){
  .nav-right .search-input{
    /* black magnifier icon, not clickable */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px 18px;
    padding-right: 36px; /* space so text doesn't overlap the icon */
  }
}

/* === Fix: desktop search pill is always visible (and keeps black icon) === */
@media (min-width: 1024px){
  .nav-right{ display: flex !important; align-items: center !important; gap: 16px !important; }

  .nav-right .search-input{
    opacity: 1 !important;
    width: 120px !important;                  /* default width */
    color: #111 !important;
    background-color: rgba(255,255,255,.85) !important;
    border: 1px solid rgba(17,17,17,.28) !important;
    border-radius: 999px !important;
    padding: 8px 12px !important;
    margin-left: auto !important;             /* expands to the LEFT */
    outline: none !important;
    -webkit-appearance: none; appearance: none;
    caret-color: #111;

    /* decorative black magnifier on the RIGHT */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 18px 18px !important;
    padding-right: 36px !important;           /* keep text off the icon */
    -webkit-backdrop-filter: saturate(160%) blur(6px);
    backdrop-filter: saturate(160%) blur(6px);
  }
  .nav-right .search-input::placeholder{ color: rgba(17,17,17,.55) !important; }
  .nav-right .search-input:focus, .nav-right .search-input:focus-visible{
    width: 220px !important;                  /* expand LEFT */
    border-color: #111 !important;
    box-shadow: 0 0 0 1.5px #111, 0 2px 10px rgba(0,0,0,.05) !important;
  }
  .nav-right .search-input::-webkit-search-decoration,
  .nav-right .search-input::-webkit-search-cancel-button{ -webkit-appearance: none; }
}

/* === Sticky header on scroll (both desktop and mobile) === */
header{
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.95);          /* light, on-brand glass */
  -webkit-backdrop-filter: saturate(160%) blur(6px);
  backdrop-filter: saturate(160%) blur(6px);
}

/* ===== Sticky header override (wins over older rules) ===== */
header.has-hamburger-injected,
header {
  position: -webkit-sticky !important; /* iOS Safari */
  position: sticky !important;
  top: 0 !important;
  z-index: 1005 !important;
}

/* Ensure the inner container is the positioning context for the icons */
header .nav-container,
header .header-flex {
  position: relative !important;
}

/* ===== Explore Fixtures image row: uniform ratio & clean crop ===== */
section:has(> h2#explore-fixtures) .fixture-slice{
  aspect-ratio: 2 / 3;            /* ↓ make shorter/tighter by changing to 3/4 or 1/1 */
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
}
section:has(> h2#explore-fixtures) .fixture-slice-img{
  display: block;
  width: 100%;
  height: 100%;                   /* fill the ratio box */
  object-fit: cover;              /* crop, no distortion */
  object-position: center;
}

/* Optional: make sure the four images line up nicely */
section:has(> h2#explore-fixtures) .fixture-slices-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1023.98px){
  section:has(> h2#explore-fixtures) .fixture-slices-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  section:has(> h2#explore-fixtures) .fixture-slice{ border-radius: 10px; }
}

/* ===== Explore Fixtures: use 3:4 aspect ratio (w:h) + fallback ===== */
section:has(> h2#explore-fixtures) .fixture-slice,
.fixture-slices-grid .fixture-slice {
  aspect-ratio: 3 / 4 !important;   /* was 2/3; 3/4 is a bit shorter and cleaner */
}

section:has(> h2#explore-fixtures) .fixture-slice-img,
.fixture-slices-grid .fixture-slice-img {
  width: 100%;
  height: 100%;
  object-fit: cover;                 /* crop, no distortion */
  object-position: center;           /* tweak per-image later if needed */
}

/* ===== Explore Fixtures image tiles: uniform 3:4 ratio + clean crop ===== */
.fixture-slice{
  aspect-ratio: 3 / 4 !important;
  width: 100% !important;
  overflow: hidden !important;
  border-radius: 12px;
}
.fixture-slice-img{
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;     /* crop without distortion */
  object-position: center;          /* tweak per-tile later if needed */
}
/* ===== Daliant header — floating, rounded container (2025‑08‑14) ===== */
:root{
  --header-max: 1240px;                   /* tune width cap */
  --header-gutter: clamp(8px, 3vw, 24px); /* side & top breathing room */
  --header-radius: 14px;                  /* corner roundness */
}
/* Make the top-of-page header a centered container that doesn't span full width */
body > header:first-of-type{
  position: sticky;
  top: 0;
  z-index: 1000;
  width: min(var(--header-max), calc(100% - (var(--header-gutter) * 2))) !important;
  margin: 0 auto;
  border-radius: var(--header-radius);
  transition: margin-top .25s ease, box-shadow .25s ease, border-radius .25s ease;
  /* Keep your existing background; if you want a frosted look, uncomment:
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  background-color: rgba(255,255,255,.75);  (or a dark theme equivalent)
  */
}
/* When scrolled, lift the header off the very top so the rounded corners are visible */
body.is-scrolled > header:first-of-type{
  margin-top: var(--header-gutter);
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
}
/* ===== /Daliant header ===== */
/* ===== Header polish — gap on scroll, blend at top (2025‑08‑14) ===== */
:root{
  /* distance from top when sticky on scroll (tweak to your taste) */
  --header-gap: clamp(12px, 2.2vw, 22px);
  /* iOS safe area (ignored elsewhere) */
  --safe-top: env(safe-area-inset-top);
}

/* Top-of-page: blend perfectly — no shadow, no top rounding */
body > header:first-of-type{
  /* Ensure sticky header is centered and not full-width (from earlier rules) */
  /* Key overrides for blend: */
  top: 0;
  margin-top: 0 !important; /* cancel earlier margin-based lift */
  border-radius: 0 0 var(--header-radius) var(--header-radius);
  box-shadow: none !important;
}

/* Scrolled state: create a clean gap and show full rounding + shadow */
body.is-scrolled > header:first-of-type{
  top: calc(var(--safe-top) + var(--header-gap));
  margin-top: 0 !important; /* ensure we rely on top, not margin */
  border-radius: var(--header-radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
}
/* ===== /Header polish ===== */
/* ===== Header gap & fixed-on-scroll (2025‑08‑14) ===== */
:root{
  /* Bigger visible gap above header when scrolled */
  --header-gap: clamp(28px, 6vw, 64px);
}
/* Add top padding only while scrolled so content doesn't jump when header becomes fixed */
body.is-scrolled{ padding-top: var(--header-h, 0px); }

/* When scrolled: make header fixed, centered, rounded, and lifted */
body.is-scrolled > header:first-of-type{
  position: fixed;
  left: 0; right: 0;
  top: calc(env(safe-area-inset-top) + var(--header-gap));
  border-radius: var(--header-radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
  z-index: 1000;
}
/* (Top-of-page behavior from earlier stays: no shadow, no top rounding) */
/* ===== /Header gap & fixed-on-scroll ===== */
/* ===== Header: gap only when scrolled (2025‑08‑14) ===== */
/* Larger visible gap above header when scrolled */
:root{ --header-gap: clamp(28px, 6vw, 64px); }

/* Kill any earlier margin-based lift if some script toggles .is-scrolled */
body.is-scrolled > header:first-of-type{ margin-top: 0 !important; }

/* Top-of-page (not scrolled): header blends with page */
body:not(.has-gap) > header:first-of-type{
  position: sticky;
  top: 0;
  border-radius: 0 0 var(--header-radius) var(--header-radius);
  box-shadow: none !important; /* ensure no shadow at top */
}

/* When scrolled: create a real gap and keep rounded 'pill' */
body.has-gap > header:first-of-type{
  position: fixed;
  left: 0; right: 0;
  top: calc(env(safe-area-inset-top) + var(--header-gap));
  border-radius: var(--header-radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
  z-index: 1000;
}

/* Add top padding only when we switch to fixed, preventing content jump */
body.has-fixed-header{ padding-top: var(--header-h, 0px); }
/* ===== /Header: gap only when scrolled ===== */
/* ===== DMF-style header behavior (2025‑08‑14) ===== */
:root{
  --header-max: 1240px;
  --header-gutter: clamp(8px, 3vw, 24px);
  --header-radius: 14px;
  /* Visible gap when scrolled */
  --header-gap: clamp(32px, 7vw, 80px);
}

/* Base: centered container & width cap (keep existing look) */
body > header:first-of-type{
  width: min(var(--header-max), calc(100% - (var(--header-gutter) * 2))) !important;
  margin: 0 auto;
}

/* Neutralize any older scroll classes so they don't create a gap at the top */
body.is-scrolled > header:first-of-type{ margin-top: 0 !important; }
body.has-gap:not(.dl-has-gap) > header:first-of-type{
  position: sticky !important; top: 0 !important;
  box-shadow: none !important;
  border-radius: 0 0 var(--header-radius) var(--header-radius) !important;
}
body.has-fixed-header:not(.dl-fixed-header){ padding-top: 0 !important; }

/* TOP OF PAGE (no gap, blends perfectly) */
body:not(.dl-has-gap) > header:first-of-type{
  position: sticky; top: 0;
  border-radius: 0 0 var(--header-radius) var(--header-radius);
  box-shadow: none !important;
}

/* SCROLLED (re-appears with a visible gap; hero peeks through) */
body.dl-has-gap > header:first-of-type{
  position: fixed;
  left: 0; right: 0;
  top: calc(env(safe-area-inset-top) + var(--header-gap));
  border-radius: var(--header-radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
  z-index: 1000;
}
/* Add padding only when header is fixed to prevent layout jump */
body.dl-fixed-header{ padding-top: var(--header-h, 0px) !important; }
/* ===== /DMF-style header behavior ===== */
/* ==== DMF-style reveal header (2025-08-14) ================================= */
:root{
  --header-max: 1240px;
  --header-gutter: clamp(8px, 3vw, 24px);
  --header-radius: 14px;
  /* Gap visible ABOVE the header once it reappears after scroll */
  --header-gap: clamp(36px, 7vw, 88px);
}

/* Keep header as a centered, capped-width container */
body > header:first-of-type{
  width: min(var(--header-max), calc(100% - (var(--header-gutter) * 2))) !important;
  margin-left: auto; margin-right: auto;
}

/* RESET old behaviors so there's NO GAP at the top of the page */
body.is-scrolled > header:first-of-type,
body.has-gap > header:first-of-type,
body.dl-has-gap > header:first-of-type{
  margin-top: 0 !important;
  box-shadow: none !important;
}

/* TOP OF PAGE: header participates in normal flow (not sticky/fixed) */
body:not(.dl-float) > header:first-of-type{
  position: static !important;              /* overrides any previous sticky */
  border-radius: 0 0 var(--header-radius) var(--header-radius) !important;
  box-shadow: none !important;
}

/* AFTER SCROLL PAST HEADER: floating pill with gap above it */
body.dl-float > header:first-of-type{
  position: fixed !important;
  left: 0; right: 0;
  top: calc(env(safe-area-inset-top) + var(--header-gap)) !important;
  border-radius: var(--header-radius) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.14) !important;
  z-index: 1000;
}

/* Ensure old padding-compensation hacks are neutralized */
body.has-fixed-header, body.dl-fixed-header{ padding-top: 0 !important; }
/* ========================================================================== */
/* ==== Daliant header — reveal after scroll (v3, 2025‑08‑14) ================ */
:root{
  --header-max: 1240px;
  --header-gutter: clamp(8px, 3vw, 24px);
  --header-radius: 14px;
  /* Gap above floating header when it reappears */
  --header-gap: clamp(36px, 7vw, 88px);
}

/* Keep centered, capped width */
body > header:first-of-type{
  width: min(var(--header-max), calc(100% - (var(--header-gutter) * 2))) !important;
  margin-left: auto; margin-right: auto;
}

/* Reset any prior sticky/gap rules at top-of-page */
body.is-scrolled > header:first-of-type,
body.has-gap > header:first-of-type,
body.dl-has-gap > header:first-of-type{ margin-top:0 !important; box-shadow:none !important; }
body.has-fixed-header, body.dl-fixed-header{ padding-top:0 !important; }

/* TOP (no gap, blends perfectly). Header scrolls away with page. */
body:not(.dl-reveal) > header:first-of-type{
  position: static !important;        /* force non-sticky at top */
  top: auto !important;
  border-radius: 0 0 var(--header-radius) var(--header-radius) !important;
  box-shadow: none !important;
}

/* AFTER SCROLL PAST HEADER: floating pill with gap + soft fade */
body.dl-reveal > header:first-of-type{
  position: fixed !important;
  left: 0; right: 0;
  top: calc(env(safe-area-inset-top) + var(--header-gap)) !important;
  border-radius: var(--header-radius) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.14) !important;
  z-index: 1000;
  /* Fade-in baseline (starts hidden, then we add .dl-reveal-show) */
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .25s ease, transform .25s ease, top .2s ease;
  pointer-events: auto;
}
body.dl-reveal.dl-reveal-show > header:first-of-type{
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce){
  body.dl-reveal > header:first-of-type{
    transition: none;
    opacity: 1; transform: none;
  }
}
/* ========================================================================= */
/* ==== Header: upward-only reveal (v4, 2025‑08‑14) ========================== */
/* Smaller gap above floating header */
:root{ --header-gap: clamp(20px, 5vw, 44px); }

/* Neutralize earlier 'dl-reveal' rules so they don't force fixed header */
body.dl-reveal > header:first-of-type{
  position: static !important; top: auto !important;
  box-shadow: none !important; opacity: 1 !important; transform: none !important;
  border-radius: 0 0 var(--header-radius) var(--header-radius) !important;
}

/* New upward-reveal classes */
body.dl-reveal-up > header:first-of-type{
  position: fixed !important; left: 0; right: 0;
  top: calc(env(safe-area-inset-top) + var(--header-gap)) !important;
  border-radius: var(--header-radius) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.14) !important;
  z-index: 1000;
  opacity: 0; transform: translateY(-10px);
  transition: opacity .22s ease, transform .22s ease, top .18s ease;
  pointer-events: none; /* don't block clicks when hidden */
}
body.dl-reveal-up.dl-show > header:first-of-type{
  opacity: 1; transform: translateY(0); pointer-events: auto;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  body.dl-reveal-up > header:first-of-type{ transition: none; opacity: 1; transform: none; }
}
/* ========================================================================== */
/* ==== Header: upward-only reveal (v4, 2025‑08‑14) ========================== */
/* Smaller gap above floating header */
:root{ --header-gap: clamp(20px, 5vw, 44px); }

/* Neutralize earlier 'dl-reveal' rules so they don't force fixed header */
body.dl-reveal > header:first-of-type{
  position: static !important; top: auto !important;
  box-shadow: none !important; opacity: 1 !important; transform: none !important;
  border-radius: 0 0 var(--header-radius) var(--header-radius) !important;
}

/* New upward-reveal classes */
body.dl-reveal-up > header:first-of-type{
  position: fixed !important; left: 0; right: 0;
  top: calc(env(safe-area-inset-top) + var(--header-gap)) !important;
  border-radius: var(--header-radius) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.14) !important;
  z-index: 1000;
  opacity: 0; transform: translateY(-10px);
  transition: opacity .22s ease, transform .22s ease, top .18s ease;
  pointer-events: none; /* don't block clicks when hidden */
}
body.dl-reveal-up.dl-show > header:first-of-type{
  opacity: 1; transform: translateY(0); pointer-events: auto;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  body.dl-reveal-up > header:first-of-type{ transition: none; opacity: 1; transform: none; }
}
/* ========================================================================== */
/* ==== Header: always-stick after header (v5, 2025-08-14) =================== */
:root{
  /* Halved gap vs previous: was ~20/44, now ~10/22 */
  --header-gap: clamp(10px, 2.5vw, 22px);
  --header-max: 1240px;
  --header-gutter: clamp(8px, 3vw, 24px);
  --header-radius: 14px;
}

/* Keep centered, capped width */
body > header:first-of-type{
  width: min(var(--header-max), calc(100% - (var(--header-gutter) * 2))) !important;
  margin-left: auto; margin-right: auto;
}

/* Neutralize earlier reveal/hide rules & animations everywhere */
body.dl-reveal > header:first-of-type,
body.dl-reveal-up > header:first-of-type,
body.has-gap > header:first-of-type,
body.is-scrolled > header:first-of-type,
body.dl-has-gap > header:first-of-type{
  position: static !important; top: auto !important;
  opacity: 1 !important; transform: none !important;
  box-shadow: none !important; pointer-events: auto !important;
  transition: none !important;
}

/* TOP OF PAGE: header is part of normal flow (blends, no gap) */
body:not(.dl-stick) > header:first-of-type{
  position: static !important; top: auto !important;
  border-radius: 0 0 var(--header-radius) var(--header-radius) !important;
  box-shadow: none !important;
  opacity: 1 !important; transform: none !important; transition: none !important;
}

/* AFTER SCROLL PAST HEADER: fixed pill with small gap; no fade */
body.dl-stick > header:first-of-type{
  position: fixed !important; left: 0; right: 0;
  top: calc(env(safe-area-inset-top) + var(--header-gap)) !important;
  border-radius: var(--header-radius) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.14) !important;
  z-index: 1000;
  opacity: 1 !important; transform: none !important; transition: none !important;
  pointer-events: auto !important;
}
/* ========================================================================== */
/* ===== Header v6 — Lutron-style always-floating (2025-08-14) ================
   Always show the pill header with the existing gap, overlaying the hero.
   This block overrides prior reveal/stick experiments.
==============================================================================*/
:root{
  /* Keep your current "perfect" gap value (tweak if desired) */
  --header-gap: clamp(10px, 2.5vw, 22px);
  --header-max: 1240px;
  --header-gutter: clamp(8px, 3vw, 24px);
  --header-radius: 14px;
}

/* Base header — fixed from first paint, centered, rounded, shadowed */
html body > header:first-of-type{
  position: fixed !important;
  left: 0; right: 0;
  top: calc(env(safe-area-inset-top) + var(--header-gap)) !important;
  width: min(var(--header-max), calc(100% - (var(--header-gutter) * 2))) !important;
  margin-left: auto; margin-right: auto;
  border-radius: var(--header-radius) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.14) !important;
  z-index: 1000;
  opacity: 1 !important;
  transform: none !important;
  transition: none !important; /* no animation */
}

/* Neutralize ALL previous scroll/reveal variants so nothing can flip it */
body:not(.dl-stick) > header:first-of-type,
body.dl-stick > header:first-of-type,
body.dl-reveal > header:first-of-type,
body.dl-reveal-up > header:first-of-type,
body.has-gap > header:first-of-type,
body.is-scrolled > header:first-of-type,
body.dl-has-gap > header:first-of-type{
  position: fixed !important;
  left: 0; right: 0;
  top: calc(env(safe-area-inset-top) + var(--header-gap)) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.14) !important;
  border-radius: var(--header-radius) !important;
  opacity: 1 !important; transform: none !important; transition: none !important;
}

/* Ensure no padding compensation is applied from earlier scripts */
body, body.has-fixed-header, body.dl-fixed-header{ padding-top: 0 !important; }
/* ========================================================================== */
/* ===== Header v7 — hard-lock Lutron style (2025-08-14) ===================== */
:root{
  --header-gap: clamp(10px, 2.5vw, 22px); /* keep your preferred small gap */
  --header-max: 1240px;
  --header-gutter: clamp(8px, 3vw, 24px);
  --header-radius: 14px;
}
/* When <html> has dl-force-fixed, the header is ALWAYS fixed with the gap */
html.dl-force-fixed body > header:first-of-type{
  position: fixed !important;
  left: 0; right: 0;
  top: calc(env(safe-area-inset-top) + var(--header-gap)) !important;
  width: min(var(--header-max), calc(100% - (var(--header-gutter) * 2))) !important;
  margin-left: auto; margin-right: auto;
  border-radius: var(--header-radius) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.14) !important;
  z-index: 1000;
  opacity: 1 !important; transform: none !important; transition: none !important;
}
/* Neutralize any legacy top-of-page sticky rules */
html.dl-force-fixed body > header:first-of-type{ position: fixed !important; }
/* ========================================================================= */
