/* =====================================================
   SERAPH Construction — Responsive Styles
   Layout 13 (Blur to Focus) only
   Breakpoints:
     1920+  → large / ultra-wide displays
     <=1280 → laptops & tablets (filter rail, tighter grids)
     <=1100 → small laptop / tablet → hamburger nav
     <=1024 → tablet (side nav off, 2-col grids, compact carousel)
     <=768  → mobile (1-col stacks, hamburger quote off)
     <=480/414/390/375/360/320 → phones
     max-height → short viewports, landscape phones, mobile menu
   ===================================================== */

/* ============ DESKTOPS / LAPTOPS (>= 1025) ============ */
@media (min-width: 1025px) {
  /* Ensure hero content stays right-middle on desktops and laptops */
  .blur-panel__content.hero__content {
    margin: auto 8vw auto auto;
    text-align: left;
  }
}

/* ============ MEDIUM DESKTOPS (1025px - 1279px) ============ */
@media (min-width: 1025px) and (max-width: 1279px) {
  .blur-panel__content.hero__content h1,
  .blur-panel__content.hero__content h2 {
    font-size: clamp(21px, 3.3vw, 34px);
  }

  .blur-panel__content.hero__content p {
    font-size: 14px;
  }

  .blur-panel__content.hero__content .eyebrow {
    font-size: 10px;
  }
}

/* ============ STANDARD DESKTOPS (1280px - 1439px) ============ */
@media (min-width: 1280px) and (max-width: 1439px) {
  .blur-panel__content.hero__content h1,
  .blur-panel__content.hero__content h2 {
    font-size: clamp(22px, 3.3vw, 36px);
  }

  .blur-panel__content.hero__content p {
    font-size: 14px;
  }

  .blur-panel__content.hero__content .eyebrow {
    font-size: 10px;
  }
}

/* ============ LARGE DESKTOPS (1440px - 1919px) ============ */
@media (min-width: 1440px) and (max-width: 1919px) {
  .blur-panel__content.hero__content h1,
  .blur-panel__content.hero__content h2 {
    font-size: clamp(24px, 3.2vw, 38px);
  }

  .blur-panel__content.hero__content p {
    font-size: 15px;
  }

  .blur-panel__content.hero__content .eyebrow {
    font-size: 10px;
  }
}

/* ============ LARGE / ULTRA-WIDE (>= 1920) ============ */
@media (min-width: 1920px) {
  .container,
  .blur-panel__content,
  .blur-card {
    width: min(1440px, 92%);
  }

  .blur-card {
    gap: 80px;
  }

  .blur-panel__content h1,
  .blur-panel__content h2 {
    max-width: 860px;
  }

  .blur-panel__content p {
    max-width: 520px;
  }

  /* Constrain hero content on ultra-wide screens */
  .blur-panel__content.hero__content {
    width: min(720px, 46%);
    max-width: 820px;
    margin: auto 10vw auto auto;
    padding: clamp(2rem, 6vh, 4rem) 0 clamp(6vh, 12vw, 12rem) 0;
  }

  /* Decrease hero text for ultra-wide screens */
  .blur-panel__content.hero__content h1,
  .blur-panel__content.hero__content h2 {
    font-size: clamp(26px, 2.8vw, 40px);
    max-width: 96%;
  }

  .blur-panel__content.hero__content p {
    font-size: 15px;
    max-width: 96%;
  }

  .blur-panel__content.hero__content .eyebrow {
    font-size: 11px;
    max-width: 96%;
  }
}

/* ============ LAPTOPS & TABLETS (<= 1280) ============ */
@media (max-width: 1280px) {
  .topbar {
    padding: 14px 24px;
  }

  /* Filter buttons become a horizontal scroll rail so the
     heading column never grows too tall on shorter screens */
  .materials-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 0.25rem 1.5rem;
    padding: 0 0 0.5rem;
    scrollbar-width: none;
  }

  .materials-filter::-webkit-scrollbar {
    display: none;
  }

  .materials-filter__btn {
    flex-shrink: 0;
    padding: 0.5rem 0.75rem;
  }

  .materials-section .h-head {
    flex-basis: 44vw;
    min-width: 0;
  }

  /* Keep hero content right-middle on laptops */
  .blur-panel__content.hero__content {
    margin: auto 7vw auto auto;
    text-align: left;
  }

  /* Decrease hero text for laptops */
  .blur-panel__content.hero__content h1,
  .blur-panel__content.hero__content h2 {
    font-size: clamp(22px, 3.4vw, 36px);
  }

  .blur-panel__content.hero__content p {
    font-size: 14px;
  }

  .blur-panel__content.hero__content .eyebrow {
    font-size: 10px;
  }
}

/* ============ MEDIUM LAPTOPS (1100px - 1279px) ============ */
@media (min-width: 1100px) and (max-width: 1279px) {
  .blur-panel__content.hero__content h1,
  .blur-panel__content.hero__content h2 {
    font-size: clamp(20px, 3.1vw, 32px);
  }

  .blur-panel__content.hero__content p {
    font-size: 13px;
  }
}

/* ============ SMALL LAPTOP / TABLET — HAMBURGER (<= 1100) ============ */
/* ============ TIGHT DESKTOP BAND (1360px - 1699px) ============ */
/* This is where nine labels, the brand and the sign-in/CTA block all share
   one row, so the leftover gutter is single-digit px at 1360-1440. The band
   funds the 42px lockup and the ExtraBold labels by tightening the nav gap
   and the bar padding. Measured gutter at 1360 is ~29px, up from 4.8px
   before either change. */
@media (min-width: 1360px) and (max-width: 1699px) {
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .topbar__nav {
    gap: 0.8rem;
  }
}

/* ============ WIDE DESKTOP (>= 1700) ============ */
/* Only here is there room for both the 1.75rem nav gap and a lockup that
   scales with the viewport instead of sitting at the 42px band ceiling. */
@media (min-width: 1700px) {
  .topbar .brand img {
    height: clamp(42px, 2.7vw, 56px);
    max-width: min(296px, 19vw);
  }
}

/* ============ HAMBURGER (<= 1359px) ============ */
/* The nav is 9 links wide (Home, Interiors, Home Plan, Materials,
   Services, Packages, Projects, About, Testimonials). Measured against
   the brand and the sign-in/CTA block, the row needs ~897px at the
   1.75rem gap, and only ~820px once the gap is tightened to 1.15rem.
   The available width inside the topbar is ~870px at 1366 and only
   ~791px at 1280 — so 1280 genuinely cannot hold nine labels, and
   below 1360 the hamburger is the correct answer rather than letting
   the nav collide with the CTA. */
@media (max-width: 1359px) {
  .topbar__nav {
    display: none;
  }

  .topbar__menu {
    display: flex;
  }

  /* With the labels collapsed into the hamburger there is ~700px of free
     space on the right, so the lockup can be much larger here than in the
     tight desktop band. */
  .topbar .brand img {
    height: clamp(40px, 5vw, 50px);
    max-width: min(265px, 46vw);
  }
}

/* ============ SMALL LAPTOP / TABLET (<= 1100px) ============ */
@media (max-width: 1100px) {
  .topbar__actions {
    gap: 1rem;
  }

  .topbar__login,
  .topbar__actions .topbar__quote {
    text-align: center;
    justify-content: center;
  }

  .mobile-menu nav {
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .mobile-menu__link,
  .mobile-menu__login {
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  /* Decrease hero text for small laptops */
  .blur-panel__content.hero__content h1,
  .blur-panel__content.hero__content h2 {
    font-size: clamp(20px, 3vw, 30px);
  }

  .blur-panel__content.hero__content p {
    font-size: 13px;
  }

  .blur-panel__content.hero__content .eyebrow {
    font-size: 9px;
  }
}

/* ============ TABLET (<= 1024) ============ */
@media (max-width: 1024px) {
  .side-nav {
    display: none;
  }

  .blur-panel__no {
    display: none;
  }

  .blur-card {
    gap: 32px;
  }

  /* Hero section tablet responsive text */
  .hero__content .eyebrow {
    font-size: 10px;
    letter-spacing: 2px;
  }

  .hero__title .line-inner {
    font-size: clamp(24px, 4.5vw, 36px);
  }

  .hero__content p {
    font-size: 13px;
  }

  /* Keep hero content right-middle on tablet */
  .blur-panel__content.hero__content {
    margin: auto 6vw auto auto;
    text-align: left;
  }

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

  .projects-story__inner {
    gap: 32px;
    padding: 70px 5vw 48px;
  }

  .footer-grid {
    grid-template-columns: 0.85fr 0.95fr minmax(17.5rem, 1.35fr);
    gap: 2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .split {
    gap: 40px;
  }

  .split__media img {
    height: 380px;
  }

  /* Compact split carousel — keep the portrait fully inside its column */
  .carousel .slide {
    grid-template-columns: 240px 1fr;
    gap: 48px;
  }

  .slide__portrait {
    width: 240px;
    height: 340px;
  }

  /* Testimonials grid: 2 columns */
  .testimonial-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }

  /* Stat grid: 2 columns on tablet */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============ LARGE PHONES LANDSCAPE / SMALL TABLETS (<= 900) ============ */
@media (max-width: 900px) {
  .materials-section .h-head {
    flex-basis: 52vw;
    min-width: 0;
  }

  .materials-section .h-track {
    gap: 28px;
    padding: 0 8vw;
  }

  .materials-section .material-card {
    flex-basis: 72vw;
  }
}

/* ============ MOBILE (<= 767) ============ */
@media (max-width: 767px) {
  .topbar {
    padding: max(12px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 12px max(18px, env(safe-area-inset-left));
  }

  .topbar .brand img {
    height: 36px;
    max-width: min(190px, 46vw);
  }

  .topbar__quote {
    display: none;
  }

  .topbar__login {
    display: none;
  }

  .blur-panel {
    height: 100vh;
    height: 100dvh;
  }

  /* =====================================================
     HERO SECTION — MOBILE FULL BACKGROUND IMAGE & OVERLAID CONTENT (<= 767px)
     100% complete image visible as background with 0 cropping (aspect-ratio: 1672/941)
     and text contents overlaid above with positive z-index: 10
     ===================================================== */
  #hero.blur-panel {
    position: relative;
    width: 100%;
    height: auto;
    min-height: auto;
    aspect-ratio: 1672 / 941;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg);
    padding: 0;
  }

  #hero .blur-panel__media {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: block;
    margin: 0;
  }

  #hero .blur-panel__media img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1672 / 941;
    object-fit: contain;
    object-position: center center;
    display: block;
    transform: none !important;
  }

  #hero .blur-panel__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 20, 49, 0.52) 0%, rgba(0, 20, 49, 0.28) 45%, rgba(0, 20, 49, 0.65) 100%);
    display: block;
    z-index: 2;
  }

  #hero .blur-panel__content.hero__content,
  .blur-panel__content.hero__content {
    order: unset;
    position: relative;
    z-index: 10;
    width: min(100%, 94%);
    max-width: 540px;
    text-align: center;
    margin: auto;
    padding: 0.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .blur-panel__content h1,
  .blur-panel__content h2 {
    font-size: clamp(16px, 4.2vw, 30px);
  }

  .blur-panel__content p {
    font-size: clamp(10px, 2.5vw, 13px);
  }

  /* Hero section responsive text sizing */
  .hero__content .eyebrow {
    font-size: clamp(8px, 2.2vw, 11px);
    letter-spacing: 1.2px;
    margin-bottom: 4px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  }

  .hero__title .line-inner {
    font-size: clamp(14px, 3.8vw, 24px);
    line-height: 1.18;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
  }

  .hero__content p {
    font-size: clamp(9px, 2.4vw, 13px);
    line-height: 1.35;
    margin-bottom: 8px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  }

  .hero__content .btn {
    padding: 6px 18px;
    font-size: clamp(9px, 2.3vw, 12px);
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  }

  #hero .hero__content *,
  .blur-panel__content.hero__content h1,
  .blur-panel__content.hero__content h2,
  .blur-panel__content.hero__content p,
  .blur-panel__content.hero__content .eyebrow,
  .blur-panel__content.hero__content .btn {
    position: relative;
    z-index: 10;
    margin-left: auto;
    margin-right: auto;
  }

  #hero .hero__scroll {
    display: none;
  }

  /* =====================================================
     INTERIORS SECTION (<= 767px) — REDUCED TOP PADDING
     ===================================================== */
  #interior.blur-panel,
  #interior.blur-panel--split {
    height: auto;
    min-height: auto;
    padding-top: 1rem;
    padding-bottom: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
  }

  #interior .blur-card {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding-top: 0;
    margin-top: 0;
  }

  #interior .blur-card img {
    height: auto;
    max-height: 280px;
    object-fit: cover;
    transform: none;
  }

  /* =====================================================
     MATERIALS SECTION (<= 767px) — FULL UNVEILED IMAGES
     Display full images without any crop or obscuring text/gradients
     ===================================================== */
  /* ── Materials: top-centre header + horizontal card scroll ── */
  #materials.materials-section,
  .materials-section {
    padding-top: 0;
  }

  /* Pin panel becomes a column: header on top, cards below */
  .materials-section .h-pin {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: max(64px, env(safe-area-inset-top));
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    box-sizing: border-box;
  }

  /* Header: centred, full width, sits above the card track */
  .materials-section .h-head {
    flex: 0 0 auto;
    width: 100%;
    max-width: 440px;
    padding: 0 16px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 5;
  }

  .materials-section .h-head .eyebrow {
    font-size: 9px;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
    text-align: center;
  }

  .materials-section .h-head h2 {
    font-size: clamp(18px, 4.5vw, 24px);
    line-height: 1.2;
    margin-bottom: 6px;
    text-align: center;
  }

  .materials-section .h-head p {
    font-size: 11px;
    line-height: 1.4;
    max-width: 320px;
    margin: 0 auto 8px;
    text-align: center;
  }

  .materials-section__cta {
    margin: 0 auto 10px;
    padding: 6px 18px;
    font-size: 10px;
    min-height: 34px;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Filter pills: centred wrap */
  .materials-section .h-head .materials-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 6px;
    margin: 0 auto;
    padding: 0;
    overflow-x: visible;
  }

  .materials-section .h-head .materials-filter__btn {
    flex-shrink: 0;
    min-height: 30px;
    min-width: 30px;
    padding: 3px 7px;
    font-size: 8px;
    gap: 2px;
  }

  .materials-section .h-head .materials-filter__btn i {
    font-size: 11px;
  }

  /* Card track: horizontal flex row, GSAP translates this.
     MUST span the full viewport width — otherwise the centred, content-sized
     track overflows both edges and only ~half the cards are ever reachable. */
  .materials-section .h-track {
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: stretch;
    gap: 14px;
    padding: 10px 16px 26px;
    margin-top: 10px;
    box-sizing: border-box;
    will-change: transform;
    z-index: 2;
  }

  /* Cards — one at a time, always fully inside the pinned panel */
  .materials-section .material-card {
    flex: 0 0 min(300px, 78vw);
    width: min(300px, 78vw);
    height: auto;
    max-height: 100%;
    align-self: center;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: rgba(4, 28, 64, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }

  /* Remove dark gradient overlay so the image is fully visible */
  .materials-section .material-card::after {
    display: none;
  }

  .materials-section .material-card__img-wrap {
    position: relative;
    inset: auto;
    width: 100%;
    flex: 1 1 auto;
    min-height: 92px;
    aspect-ratio: 16 / 10;
    background: rgba(0, 15, 38, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-sizing: border-box;
    overflow: hidden;
  }

  .materials-section .material-card__img-wrap img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
    transform: none !important;
  }

  .materials-section .material-card__body {
    position: relative;
    inset: auto;
    left: auto;
    right: auto;
    bottom: auto;
    flex: 0 0 auto;
    padding: 14px 16px 16px;
    z-index: 2;
    text-align: left !important;
    background: transparent;
  }

  .materials-section .material-card__body h3 {
    font-size: clamp(16px, 4vw, 20px);
    margin-bottom: 2px;
    color: var(--white);
    text-align: left;
  }

  .materials-section .material-card__type {
    font-size: 10px;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    color: var(--gold);
    text-align: left;
  }

  .materials-section .material-card__specs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
  }

  .materials-section .material-card__specs li {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.82);
    padding-left: 12px;
    position: relative;
    text-align: left;
  }

  .materials-section .material-card__specs li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold);
  }

  /* Progress bar anchored at bottom of pin panel */
  .materials-section .progress-bar {
    bottom: 12px;
    left: 16px;
    width: calc(100% - 32px);
  }
}

/* ============ SMALL PHONES (<= 576) ============ */
@media (max-width: 576px) {
  .topbar {
    padding: 10px 16px;
  }

  /* Larger tap target for the hamburger on small screens */
  .topbar__menu {
    width: 44px;
    height: 44px;
  }

  .topbar__menu-icon {
    width: 20px;
    height: 14px;
  }

  .topbar__menu-line {
    height: 2px;
  }

  .topbar__menu-line:nth-child(2) {
    top: 6px;
  }

  .topbar__menu-line:nth-child(3) {
    top: 12px;
  }

  .topbar__menu[aria-expanded="true"] .topbar__menu-line:nth-child(1),
  .topbar__menu[aria-expanded="true"] .topbar__menu-line:nth-child(3) {
    top: 6px;
  }

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

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

  /* Hero section responsive text for small phones */
  .hero__content .eyebrow {
    font-size: clamp(9px, 2.5vw, 10px);
    letter-spacing: 1.2px;
    margin-bottom: 8px;
  }

  .hero__title .line-inner {
    font-size: clamp(18px, 5.2vw, 24px);
    line-height: 1.25;
  }

  .hero__content p {
    font-size: clamp(12px, 3.2vw, 13px);
    line-height: 1.45;
    margin-bottom: 16px;
  }

  .projects-story__inner {
    gap: 24px;
    padding: 72px 5vw 48px;
  }

  .projects-story__text {
    min-height: 42vh;
  }

  .projects-story__visual {
    height: 32vh;
    min-height: 220px;
  }
}

/* ============ TABLET PORTRAIT (768px - 1024px) ============ */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Keep hero content right-middle on tablet portrait */
  .blur-panel__content.hero__content {
    width: min(420px, 48%);
    max-width: 480px;
    margin: auto 6vw auto auto;
    padding: clamp(2rem, 6vh, 4rem) 0 clamp(6vh, 12vw, 12rem) 0;
    text-align: left;
  }

  /* Decrease hero text for tablet portrait */
  .blur-panel__content.hero__content h1,
  .blur-panel__content.hero__content h2 {
    font-size: clamp(19px, 3vw, 28px);
  }

  .blur-panel__content.hero__content p {
    font-size: 12px;
  }

  .blur-panel__content.hero__content .eyebrow {
    font-size: 9px;
  }

  /* Split interior card stacks vertically */
  .blur-card {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .blur-card img {
    height: 280px;
  }

  .blur-card h2 {
    font-size: 28px;
  }

  .ticker__row {
    gap: 32px;
    padding-right: 32px;
    font-size: 11px;
    letter-spacing: 2px;
  }

  .ticker-band {
    padding: 14px 0;
  }

  /* Kitchen — keep the pinned content inside short viewports */
  .kitchen-sequence__copy-stack {
    min-height: 26vh;
  }

  .kitchen-sequence__content p {
    max-width: 320px;
  }

  .kitchen-sequence__progress {
    margin-top: 1.5rem;
  }

  .kitchen-sequence__dots span {
    width: 20px;
  }

  /* Materials — smaller phones: slightly narrower cards */
  .materials-section .material-card {
    flex: 0 0 min(280px, 82vw);
    width: min(280px, 82vw);
  }

  .services-section {
    padding: 80px 0;
  }

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

  .projects-section {
    padding: 80px 0 0;
  }

  .projects-section__head {
    padding: 80px 0 40px;
  }

  /* Projects — single column, tuned for short phones */
  .projects-story__inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 72px 5vw 48px;
  }

  .projects-story__text {
    order: 1;
    text-align: center;
    margin: 0 auto;
    min-height: 42vh;
  }

  .projects-story__visual {
    order: 2;
    height: 30vh;
    min-height: 200px;
  }

  .projects-story__rail {
    left: 6px;
  }

  .projects-story__dots {
    left: 6px;
  }

  .about-section {
    padding: 80px 0 0;
  }

  .about-head {
    margin-bottom: 56px;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 80px;
  }

  .split--flip .split__media {
    order: 0;
  }

  .split__media img {
    height: 280px;
  }

  .stats {
    padding-bottom: 80px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 1.5rem;
    padding-top: 2.5rem;
  }

  /* Testimonials — stacked slide */
  .testimonials-section {
    padding: 80px 0;
  }

  .testimonial-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

  .carousel {
    height: auto;
  }

  .carousel .slide {
    grid-template-columns: 1fr;
    gap: 32px;
    position: relative;
    inset: auto;
    display: none;
  }

  .carousel .slide.is-active {
    display: grid;
  }

  .slide__portrait {
    width: 100%;
    height: 280px;
  }

  .slide__quote {
    padding-left: 0;
  }

  .slide__quote::before {
    display: none;
  }

  .controls {
    justify-content: center;
    margin-top: 32px;
  }

  .footer__split {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 72px 0 56px;
  }

  .site-footer {
    padding: 64px 0 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-legal {
    gap: 1.25rem;
  }

  .marquee {
    padding: 44px 0;
  }

  .footer__bottom-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ============ SMALL PHONES (<= 480) ============ */
@media (max-width: 480px) {
  .topbar .brand img {
    height: 32px;
    max-width: min(169px, 44vw);
  }

  .footer-brand .brand img {
    width: min(100%, 220px);
  }

  /* Hamburger fully tappable on small phones */
  .topbar__menu {
    width: 48px;
    height: 48px;
  }

  .topbar__menu-icon {
    width: 22px;
    height: 16px;
  }

  .blur-panel__content h1,
  .blur-panel__content h2 {
    font-size: clamp(28px, 9vw, 30px);
  }

  .blur-panel__content p {
    font-size: 14px;
  }

  .btn {
    padding: 11px 22px;
    font-size: 11px;
  }

  .hero__scroll {
    bottom: 1.25rem;
  }

  .blur-card {
    gap: 16px;
  }

  .blur-card img {
    height: 220px;
  }

  .blur-card h2 {
    font-size: 26px;
  }

  .blur-card p {
    font-size: 14px;
  }

  .materials-section .material-card {
    flex-basis: 86vw;
  }

  .materials-section .material-card__body h3 {
    font-size: 22px;
  }

  .service-card {
    padding: 1.5rem;
  }

  .split__media img {
    height: 240px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1rem;
  }

  .stat .num {
    font-size: clamp(36px, 10vw, 44px);
  }

  .stat p {
    font-size: 11px;
    letter-spacing: 1px;
  }

  /* Stat grid (4-col default) collapses on small phones */
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1rem;
  }

  .testimonial-card {
    padding: 1.5rem;
  }

  .slide__portrait {
    height: 220px;
  }

  .slide__portrait i {
    font-size: 80px;
  }

  .about-features {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
  }

  .newsletter-form input {
    padding: 11px 16px;
    font-size: 13px;
  }

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

  .footer-social a {
    width: 40px;
    height: 40px;
  }
}

/* ============ TINY PHONES (<= 414 / 390 / 375 / 360 / 320) ============ */
@media (max-width: 414px) {
  .blur-panel__content h1,
  .blur-panel__content h2 {
    font-size: clamp(24px, 8.5vw, 27px);
  }

  .stats-grid {
    gap: 1.75rem 1rem;
  }

  /* Mobile menu spacing */
  .mobile-menu nav {
    padding: 88px 20px;
  }

  /* Testimonial carousel portrait */
  .slide__portrait {
    height: 240px;
  }

  .slide__portrait i {
    font-size: 70px;
  }
}

@media (max-width: 390px) {
  .blur-card h2 {
    font-size: 24px;
  }

  .projects-story__text {
    min-height: 40vh;
  }

  .footer-social a {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 375px) {
  .materials-section .material-card {
    flex-basis: 90vw;
  }

  .stat .num {
    font-size: clamp(30px, 9vw, 38px);
  }

  .slide__portrait {
    height: 200px;
  }
}

@media (max-width: 360px) {
  .topbar {
    padding: 8px 12px;
  }

  .topbar__actions {
    gap: 0.5rem;
  }

  /* Mobile menu: reduce vertical padding so all links fit on short screens */
  .mobile-menu nav {
    padding: 72px 16px;
    gap: 0.3rem;
  }

  .mobile-menu__link {
    font-size: 22px;
  }

  .mobile-menu__quote {
    font-size: 18px;
    padding: 12px 24px;
  }

  .blur-panel__content h1,
  .blur-panel__content h2 {
    font-size: 24px;
  }

  /* Projects — keep every step (incl. the CTA on the last one) inside
     the pinned frame without clipping */
  .projects-story__inner {
    padding: 56px 5vw 32px;
  }

  .projects-story__step .no {
    margin-bottom: 10px;
  }

  .projects-story__step h2 {
    font-size: 24px;
    margin-bottom: 12px;
  }

  .projects-story__step p {
    margin-bottom: 14px;
  }

  .projects-story__step .btn {
    margin-top: 4px;
  }

  /* Hero content bottom padding on very short phones */
  .blur-panel__content.hero__content {
    width: min(1200px, 92%);
    max-width: 480px;
    padding: 2rem 5vw 12vh 5vw;
  }

  /* Kitchen copy stack on short viewports */
  .kitchen-sequence__copy-stack {
    min-height: 32vh;
  }

  .kitchen-sequence__content p {
    max-width: 280px;
  }

  /* Very small phones (<= 360px): hero content */
  .hero__content .eyebrow {
    font-size: 7px;
    letter-spacing: 0.8px;
  }

  .hero__title .line-inner {
    font-size: clamp(16px, 5vw, 20px);
  }

  .hero__content p {
    font-size: 10px;
    line-height: 1.3;
  }

  .hero__content .btn {
    padding: 7px 14px;
    font-size: 9px;
  }
}

@media (max-width: 320px) {
  .container {
    width: 94%;
  }

  .blur-panel__content h1,
  .blur-panel__content h2 {
    font-size: 22px;
  }

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

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

/* Short viewports: the kitchen copy column is taller than its 30vh/26vh
   stack, so text would overlap the CTA button below. Give the stack room. */
@media (max-height: 850px) {
  .kitchen-sequence__copy-stack {
    min-height: 40vh;
  }
}

/* ============ SHORT VIEWPORTS & LANDSCAPE PHONES ============ */

/* Mobile menu: keep all links reachable on short screens */
@media (max-height: 640px) {
  .mobile-menu nav {
    gap: 0.4rem;
  }

  .mobile-menu__link {
    font-size: 20px;
  }

  .mobile-menu__quote {
    margin-top: 0.5rem;
  }
}

/* Landscape phones & short viewports: relax pinned-section heights */
@media (max-height: 500px) and (orientation: landscape) {
  .blur-panel {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 96px 0 64px;
  }

  .hero__content {
    margin: auto 6vw auto auto;
    padding: 0 0 24vh 0;
    text-align: left;
    width: min(420px, 52%);
    max-width: 480px;
  }

  .hero__content .eyebrow {
    font-size: 8px;
    margin-bottom: 6px;
  }

  .hero__title .line-inner {
    font-size: clamp(16px, 3.5vw, 20px);
  }

  .hero__content p {
    font-size: 10px;
    margin-bottom: 10px;
  }

  .hero__scroll {
    display: none;
  }

  .kitchen-sequence__copy-stack {
    min-height: 60vh;
  }

  /* Materials: landscape phones — same top-centre layout, compact cards */
  .materials-section .h-pin {
    padding-top: max(40px, env(safe-area-inset-top));
  }

  .materials-section .h-head {
    max-width: 100%;
    padding: 0 12px;
  }

  .materials-section .h-head h2 {
    font-size: clamp(14px, 3.5vw, 18px);
    margin-bottom: 2px;
  }

  .materials-section .h-head p {
    font-size: 10px;
    margin-bottom: 4px;
  }

  .materials-section__cta {
    min-height: 28px;
    padding: 4px 14px;
    font-size: 9px;
    margin-bottom: 6px;
  }

  .materials-section .material-card {
    flex: 0 0 min(240px, 46vw);
    width: min(240px, 46vw);
  }

  .materials-section .material-card__img-wrap {
    max-height: 120px;
    padding: 6px;
  }

  .materials-section .material-card__body {
    padding: 8px 12px 10px;
  }

  .materials-section .material-card__body h3 {
    font-size: 15px;
  }

  .materials-section .material-card__type {
    font-size: 9px;
    margin-bottom: 4px;
  }

  .materials-section .material-card__specs li {
    font-size: 10px;
  }

  .projects-story__inner {
    padding: 40px 4vw 32px;
    gap: 12px;
  }

  .projects-story__text {
    min-height: 30vh;
  }

  .projects-story__visual {
    height: 30vh;
    min-height: 100px;
  }
}

/* Short phones in portrait: keep hero + kitchen content in view */
@media (max-height: 700px) and (max-width: 480px) and (orientation: portrait) {
  .hero__content {
    padding-bottom: 12vh;
  }

  .hero__title .line-inner {
    font-size: clamp(18px, 5vw, 24px);
  }

  .hero__content .eyebrow {
    font-size: 7px;
    letter-spacing: 0.8px;
  }

  .hero__content p {
    font-size: 10px;
  }

  /* Keep centered on mobile portrait */
  .blur-panel__content.hero__content {
    width: min(1200px, 92%);
    max-width: 480px;
    text-align: center;
    margin: 0 auto;
  }

  .kitchen-sequence__copy-stack {
    min-height: 40vh;
  }

  /* Materials: the header competes with the cards for height on short phones.
     Drop the intro copy so each material card keeps a usable image. */
  .materials-section .h-head p {
    display: none;
  }

  .materials-section .h-head h2 {
    margin-bottom: 4px;
  }

  .materials-section__cta {
    margin-bottom: 6px;
  }

  .materials-section .h-head .materials-filter {
    gap: 2px 4px;
  }

  .materials-section .material-card__img-wrap {
    min-height: 110px;
  }
}

/* =====================================================
   MOBILE + TABLET RESPONSIVE PASS (Aug 2026)
   Scoped to <=1023px only — desktop/laptop (1024px+) unchanged
   ===================================================== */

/* ---------- Mobile layout stacks (<=767) ---------- */
@media (max-width: 767px) {
  .container {
    width: min(1200px, 92%);
    min-width: 0;
  }

  .blur-card {
    grid-template-columns: 1fr;
    gap: 20px;
    width: min(1200px, 92%);
  }

  .blur-card img {
    height: 220px;
    max-height: none;
    transform: none;
  }

  .blur-card h2 {
    font-size: 26px;
  }

  .kitchen-sequence__copy-stack {
    min-height: 28vh;
  }

  .kitchen-sequence__content p {
    max-width: 100%;
  }

  .kitchen-sequence__progress {
    margin-top: 1.25rem;
  }

  /* Materials: ensure top-centre layout rules apply from this pass too */
  .materials-section .h-head {
    flex: 0 0 auto;
  }

  .materials-section .h-track {
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    align-items: stretch;
    gap: 14px;
    padding: 10px 16px 26px;
    box-sizing: border-box;
  }

  .materials-section .material-card {
    flex: 0 0 min(290px, 80vw);
    width: min(290px, 80vw);
    height: auto;
    max-height: 100%;
    align-self: center;
    min-height: 0;
  }

  .materials-section .progress-bar {
    bottom: 12px;
    left: 16px;
    width: calc(100% - 32px);
  }

  .materials-filter__btn {
    min-height: 44px;
    padding: 0.55rem 0.85rem;
  }

  .materials-section__cta {
    display: block;
    text-align: center;
    width: 100%;
    max-width: 320px;
  }

  .projects-story__inner {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 64px 5vw 40px;
    min-width: 0;
  }

  .projects-story__text {
    order: 1;
    min-height: 38vh;
    max-width: none;
    margin-left: 0;
  }

  .projects-story__visual {
    order: 2;
    height: 28vh;
    min-height: 200px;
  }

  .projects-story__rail,
  .projects-story__dots {
    left: 8px;
  }

  .projects-section__head {
    padding-left: 4vw;
    padding-right: 4vw;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 64px;
  }

  .split--flip .split__media {
    order: 0;
  }

  .split__media img {
    height: 240px;
  }

  .about-head {
    margin-bottom: 48px;
    padding: 0 4vw;
  }

  .testimonials-section {
    padding: 72px 0;
  }

  .carousel {
    height: auto;
    overflow: visible;
  }

  .carousel .slide {
    position: relative;
    inset: auto;
    grid-template-columns: 1fr;
    gap: 24px;
    display: none;
  }

  .carousel .slide.is-active {
    display: grid;
  }

  .slide__portrait {
    width: 100%;
    max-width: 280px;
    height: 220px;
    margin: 0 auto;
  }

  .slide__quote {
    padding-left: 0;
    text-align: center;
  }

  .slide__quote::before {
    display: none;
  }

  .slide__quote blockquote {
    font-size: clamp(17px, 4.5vw, 22px);
  }

  .controls {
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .controls button {
    min-width: 44px;
    min-height: 44px;
    padding: 0 14px;
  }

  .site-footer {
    padding: 56px 0 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-brand p {
    max-width: none;
  }

  .footer-bottom__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 0 1rem;
  }

  .footer-legal {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .newsletter-form {
    max-width: 100%;
  }

  .newsletter-form input {
    min-width: 0;
  }

  .newsletter-form button {
    min-width: 44px;
    min-height: 44px;
  }

  .contact-page {
    padding: 2rem 1.25rem 3rem;
    text-align: center;
  }

  .contact-page__head {
    margin-bottom: 2rem;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }

  .contact-page__info,
  .contact-page__form-wrap {
    padding: 1.75rem 1.5rem;
    text-align: center;
  }

  .contact-page__info h2,
  .contact-page__info-lead {
    text-align: center;
  }

  .contact-page__details {
    gap: 1.35rem;
    align-items: center;
  }

  .contact-page__details li {
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .contact-page__detail-body {
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .contact-page__detail-value {
    text-align: center;
  }

  .contact-page__social {
    flex-wrap: wrap;
    gap: 0.75rem;
    text-align: center;
  }

  .contact-page__social-links {
    justify-content: center;
  }

  .contact-form__field {
    text-align: center;
  }

  .contact-form__field label {
    text-align: center;
  }

  .contact-form__field input,
  .contact-form__field select,
  .contact-form__field textarea {
    text-align: center;
  }

  .contact-form__field select {
    text-align-last: center;
  }

  .contact-form__meta {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .contact-form__count {
    margin-left: 0;
  }

  .contact-form__note,
  .contact-alert,
  .contact-page .alert {
    text-align: center;
  }

  .contact-alert ul {
    padding-left: 0;
    list-style: none;
  }

  .contact-form__row {
    gap: 0;
  }

  .contact-form__submit {
    width: 100%;
    min-height: 44px;
  }

  .login-modal {
    padding: 12px;
    align-items: flex-end;
  }

  .login-modal__panel {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .login-modal__tab {
    min-height: 44px;
  }

  .login-form__submit {
    min-height: 44px;
  }

  .mobile-menu__link {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  .mobile-menu__login,
  .mobile-menu__quote {
    min-height: 44px;
    justify-content: center;
    text-align: center;
  }

  .h-track,
  .h-pin,
  .projects-story__inner,
  .topbar,
  .marquee__track {
    min-width: 0;
  }

  .service-card {
    min-width: 0;
  }

  .projects-story__step h2 {
    font-size: clamp(22px, 6vw, 28px);
    word-wrap: break-word;
  }
}

/* ---------- Tablet refinements (768–1023) ---------- */
@media (min-width: 768px) and (max-width: 1023px) {
  .contact-page {
    padding: 6rem 1.5rem 4rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

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

  .materials-section .h-head {
    flex-basis: 46vw;
  }

  .materials-section .material-card {
    flex-basis: 68vw;
  }

  .login-modal__panel {
    max-width: min(480px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
  }

  .newsletter-form {
    max-width: 100%;
  }

  .controls button {
    min-width: 44px;
    min-height: 44px;
  }
}

/* =====================================================
   GLOBAL MOBILE — centered text & flex content
   Public marketing pages only; desktop/tablet unchanged
   ===================================================== */
@media (max-width: 767px) {
  #main-content,
  #main-content section,
  .site-footer .footer-grid,
  .site-footer .footer-brand,
  .site-footer .footer-col {
    text-align: center;
  }

  /* Override section-specific left alignments on small screens */
  #main-content .hero__content,
  #main-content .blur-panel__content.hero__content,
  #main-content .kitchen-sequence__content,
  #main-content .kitchen-sequence__copy,
  #main-content .blur-card,
  #main-content .split__body,
  #main-content .about-head,
  #main-content .projects-section__head,
  #main-content .projects-story__text,
  #main-content .projects-story__step,
  #main-content .materials-section .h-head,
  #main-content .material-card__body,
  #main-content .service-card,
  #main-content .testimonial-card,
  #main-content .slide__quote,
  #main-content .about-features li,
  #main-content .testimonials-section .container,
  #main-content .testimonials-section__cta {
    text-align: center;
  }

  #main-content .testimonials-section__cta {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #main-content .hero__content,
  #main-content .blur-panel__content.hero__content {
    margin-left: auto;
    margin-right: auto;
  }

  #main-content .about-head,
  #main-content .projects-section__head,
  #main-content .projects-section__intro {
    margin-left: auto;
    margin-right: auto;
  }

  #main-content .blur-card,
  #main-content .split {
    justify-items: center;
  }

  #main-content .split__body .btn,
  #main-content .blur-card .btn,
  #main-content .kitchen-sequence__content .btn,
  #main-content .projects-story__step .btn,
  #main-content .materials-section__cta,
  #main-content .service-card .btn,
  #main-content .testimonials-section .btn,
  .contact-page .btn,
  .contact-page .btn--gold,
  .projects-page .btn--gold,
  .mobile-menu .btn,
  .mobile-menu__login,
  .mobile-menu__quote {
    margin-left: auto;
    margin-right: auto;
  }

  /* Buttons — centered label text on mobile */
  #main-content .btn,
  #main-content .btn--solid,
  #main-content .btn--gold,
  #main-content .materials-section__cta,
  #main-content .materials-filter__btn,
  #main-content .controls button,
  .contact-page .btn,
  .contact-page .btn--gold,
  .contact-page .contact-form__submit,
  .projects-page .btn--gold,
  .projects-page .projects-filter__btn,
  .projects-page .project-card__download,
  .mobile-menu .btn,
  .mobile-menu__login,
  .mobile-menu__quote {
    text-align: center;
    align-items: center;
    justify-content: center;
  }

  #main-content .btn,
  #main-content .btn--solid,
  #main-content .btn--gold,
  #main-content .materials-section__cta,
  .contact-page .btn,
  .contact-page .btn--gold,
  .projects-page .btn--gold,
  .mobile-menu .btn,
  .mobile-menu__login,
  .mobile-menu__quote,
  #main-content .materials-filter__btn,
  #main-content .controls button,
  .projects-page .projects-filter__btn {
    display: inline-flex;
  }

  .contact-page .contact-form__submit,
  .contact-form__submit {
    display: flex;
  }

  .projects-page .project-card__download {
    display: flex;
  }

  /* Projects page — card content stays left-aligned like desktop */
  .projects-page .project-card,
  .projects-page .project-card__body,
  .projects-page .project-card__title,
  .projects-page .project-card__text,
  .projects-page .project-card__no,
  .projects-page .project-card__link .project-card__title,
  .projects-page .project-card__desc-toggle {
    text-align: left;
  }

  .projects-page .project-card__spec {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    text-align: left;
  }

  .projects-page .project-card__spec-value {
    text-align: right;
  }

  #main-content .materials-filter,
  #main-content .about-features {
    justify-content: center;
    justify-items: center;
  }

  #main-content .about-features li {
    justify-content: center;
  }

  #main-content .services-grid,
  #main-content .testimonial-grid {
    justify-items: center;
  }

  .site-footer .footer-social,
  .site-footer .footer-legal {
    justify-content: center;
  }

  .site-footer .footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .site-footer .footer-brand .brand,
  .site-footer .footer-brand p {
    margin-left: auto;
    margin-right: auto;
  }

  .site-footer .footer-contact li {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .site-footer .footer-contact li > a,
  .site-footer .footer-contact li > span {
    text-align: center;
  }

  .contact-page__form-wrap {
    margin-left: auto;
    margin-right: auto;
  }

  /* Top navigation — mobile menu */
  .mobile-menu nav {
    align-items: center;
    width: 100%;
  }

  .mobile-menu__link,
  .mobile-menu__login {
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  /* Prevent iOS automatic viewport zoom & improve touch ergonomics */
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  select,
  textarea,
  .newsletter-form input,
  .contact-form__field input,
  .contact-form__field select,
  .contact-form__field textarea,
  .sk-search input,
  .sk-input {
    font-size: 16px !important;
    min-height: 48px;
    box-sizing: border-box;
  }

  textarea,
  .contact-form__field textarea {
    min-height: 110px;
  }

  /* Touch target standards (min 44px-48px) */
  .btn,
  .btn--solid,
  .btn--gold,
  .sk-btn,
  .contact-form__submit,
  .login-form__submit,
  .calcOpen {
    min-height: 48px;
    box-sizing: border-box;
  }

  .login-modal__close {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .toggle-password {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .footer-social a {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  #projectsDots button {
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
    box-sizing: border-box;
  }

  .site-footer .footer-links a {
    display: inline-block;
    padding: 8px 0;
    min-height: 38px;
  }

  /* Safe area insets for notched phones */
  .mobile-menu {
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .site-footer {
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }
}

