/* ── Tablet landscape / small desktop ── */
@media (min-width: 1200px) {
  .hero-copy {
    padding-left: clamp(16px, 2vw, 32px);
  }
}

@media (min-width: 1440px) {
  .container {
    width: min(1380px, calc(100% - 120px));
  }
}

/* ── Tablet + mobile (≤1023px) ── */
@media (max-width: 1023px) {
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #fff;
  }

  .container {
    width: 100%;
    max-width: 980px;
    padding-inline: clamp(20px, 4vw, 40px);
  }

  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand cta";
    justify-content: space-between;
    min-height: 64px;
    gap: 8px;
  }

  .header-inner > .brand {
    grid-area: brand;
    min-width: 0;
  }

  .header-inner > .nav-cta {
    grid-area: cta;
  }

  :root {
    --nav-fab-size: 56px;
    --fab-gap: 12px;
  }

  .nav-fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 45;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    width: var(--nav-fab-size);
    height: var(--nav-fab-size);
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    box-shadow: 0 10px 24px rgba(26, 26, 46, 0.18);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(227, 38, 32, 0.12);
    transition:
      background-color var(--motion-med, 450ms) var(--ease-cinematic, cubic-bezier(0.32, 0.72, 0, 1)),
      transform var(--motion-fast, 280ms) var(--ease-cinematic, cubic-bezier(0.32, 0.72, 0, 1));
  }

  .nav-fab:hover,
  .nav-fab:focus-visible {
    background: var(--red-dark);
  }

  .nav-fab:active {
    transform: scale(0.96);
  }

  .nav-fab:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
  }

  .nav-fab-icon {
    width: 22px;
    height: 22px;
    pointer-events: none;
  }

  .nav-fab-icon svg {
    display: block;
    width: 22px;
    height: 22px;
  }

  .nav-fab-icon--close {
    display: none;
  }

  .nav-fab.is-open .nav-fab-icon--menu {
    display: none;
  }

  .nav-fab.is-open .nav-fab-icon--close {
    display: block;
  }

  .scroll-fab {
    bottom: calc(max(20px, env(safe-area-inset-bottom)) + var(--nav-fab-size) + var(--fab-gap));
  }

  .mobile-sheet {
    position: fixed;
    top: var(--header-lock-height, var(--header-height));
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    pointer-events: none;
  }

  .mobile-sheet[hidden] {
    display: none !important;
  }

  .mobile-sheet.is-open {
    pointer-events: auto;
  }

  .mobile-sheet-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(26, 26, 46, 0.42);
    opacity: 0;
    cursor: pointer;
    transition: opacity var(--motion-med, 450ms) var(--ease-cinematic, cubic-bezier(0.32, 0.72, 0, 1));
  }

  .mobile-sheet.is-open .mobile-sheet-backdrop {
    opacity: 1;
  }

  .mobile-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(72dvh, 440px);
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 40px rgba(26, 26, 46, 0.16);
    transform: translateY(100%);
    transition: transform var(--motion-med, 450ms) var(--ease-cinematic, cubic-bezier(0.32, 0.72, 0, 1));
    overflow: hidden;
  }

  .mobile-sheet.is-open .mobile-sheet-panel {
    transform: translateY(0);
  }

  .mobile-sheet .site-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 0 calc(16px + env(safe-area-inset-bottom));
    max-height: min(72dvh, 440px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-sheet .site-nav .nav-link {
    width: 100%;
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 56px;
    padding: 0 clamp(20px, 4vw, 40px);
    font-family: var(--font-display);
    font-size: clamp(18px, 4.6vw, 22px);
    letter-spacing: 0.06em;
    border-bottom: 1px solid #e6e6e3;
  }

  .mobile-sheet .site-nav span {
    padding-bottom: 0;
  }

  :root {
    --header-bar-height: 64px;
    --header-tagline-height: 50px;
    --header-height: calc(var(--header-bar-height) + var(--header-tagline-height));
    --section-y: var(--space-10);
  }

  .site-header {
    padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
  }

  body.nav-open .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 52;
    background: #fff;
    box-shadow: 0 1px 0 rgba(26, 26, 46, 0.08);
    isolation: isolate;
  }

  body.nav-open .header-inner {
    background: #fff;
  }

  .header-inner > .nav-cta {
    display: inline-flex;
    flex-shrink: 0;
    width: auto;
    max-width: none;
    min-height: 32px;
    padding: 0 10px;
    font-size: 9px;
    letter-spacing: 0.04em;
    white-space: nowrap;
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
  }

  .header-inner > .nav-cta .btn-icon {
    display: none;
  }

  .header-inner > .nav-cta:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
  }

  .header-tagline-inner {
    padding: 8px clamp(16px, 4vw, 24px) 11px;
  }

  .header-tagline-text {
    font-size: clamp(12px, 3.4vw, 15px);
    letter-spacing: 0.08em;
    line-height: 1.35;
  }

  .brand-full {
    min-width: 0;
    overflow: hidden;
  }

  .brand-lines {
    min-width: 0;
    overflow: hidden;
  }

  .brand-mark {
    font-size: clamp(22px, 4.2vw, 28px);
    letter-spacing: 0.006em;
  }

  .brand-sub {
    font-size: clamp(8px, 2.1vw, 10px);
    letter-spacing: 0.12em;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .hero-grid,
  .two-col {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  /* Hero: copy, carousel, meta stripe */
  .hero.section {
    margin-top: calc(-1 * var(--header-height));
    padding: 0;
    border-top: 0;
  }

  .hero {
    overflow-x: clip;
    overflow-y: visible;
  }

  .hero-side-list,
  .hero-media,
  .hero-stage {
    display: none;
  }

  .hero .hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "visual"
      "meta";
    width: 100%;
    max-width: none;
    padding-inline: 0;
    gap: 0;
    min-height: auto;
  }

  .hero-copy {
    grid-area: copy;
    position: relative;
    z-index: 2;
    margin-top: 0;
    padding: calc(var(--header-height) + var(--space-9)) clamp(20px, 4vw, 40px) var(--space-5);
    max-width: none;
    align-items: flex-start;
  }

  .hero-banner-visual {
    grid-area: visual;
  }

  .hero-meta {
    grid-area: meta;
    position: relative;
    z-index: 2;
    margin-top: var(--hero-banner-inset, var(--space-9));
    background: #fff;
    border-top: 1px solid #e0e0de;
    padding: var(--space-3) clamp(12px, 3.5vw, 28px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }

  .hero-meta > div {
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 12px 10px;
    border-right: 0;
    border-bottom: 1px solid #e0e0de;
  }

  .hero-meta > div p {
    margin: 0;
    min-width: 0;
  }

  .hero-meta > div:nth-child(odd) {
    padding-right: 12px;
    border-right: 1px solid #e0e0de;
  }

  .hero-meta > div:nth-child(even) {
    padding-left: 12px;
  }

  .hero-meta > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .hero-meta strong {
    font-size: clamp(16px, 4vw, 21px);
    line-height: 1.08;
  }

  .hero-meta > div p span {
    display: block;
    margin-top: 2px;
    font-size: clamp(9px, 2.2vw, 10px);
    line-height: 1.3;
    letter-spacing: 0.03em;
  }

  .hero-meta .meta-icon {
    width: 30px;
    height: 30px;
  }

  .hero-meta .meta-icon img,
  .hero-meta .meta-icon .icon {
    width: 18px;
    height: 18px;
  }

  h1 {
    font-size: clamp(48px, 9vw, 72px);
    margin-right: 0;
  }

  .hero-copy h1 {
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 700;
    max-width: 100%;
    line-height: 0.84;
  }

  .hero-copy h1.hero-title--fit {
    max-width: min(100%, 15ch);
  }

  .hero-text {
    font-size: clamp(15px, 2.4vw, 17px);
    max-width: none;
  }

  .eyebrow {
    font-size: 13px;
    margin-bottom: var(--space-4);
  }

  .eyebrow::after {
    width: clamp(40px, 12vw, 80px);
  }

  .card-grid,
  .feature-row,
  .section-dark .quality-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: var(--space-4);
  }

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

/* ── Mobile (≤767px) ── */
@media (max-width: 767px) {
  :root {
    --section-y: var(--space-8);
    --section-head-gap: var(--space-4);
    --header-tagline-height: 56px;
  }

  .header-inner > .nav-cta {
    min-height: 30px;
    padding: 0 8px;
    font-size: 8px;
    letter-spacing: 0.03em;
  }

  :root {
    --nav-fab-size: 52px;
  }

  .container {
    width: 100%;
    max-width: 680px;
    padding-inline: clamp(16px, 4vw, 24px);
  }

  .section:not(.hero) {
    padding: var(--space-8) 0;
  }

  .btn {
    min-height: 44px;
    padding: 0 16px;
    width: 100%;
    max-width: 320px;
  }

  .hero-cta {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: clamp(12px, 3vw, 20px);
  }

  .hero-cta .btn {
    width: auto;
    max-width: none;
    flex-shrink: 0;
    padding-inline: clamp(12px, 3vw, 16px);
    font-size: clamp(9px, 2.4vw, 11px);
  }

  .hero-cta .btn-text {
    min-height: 44px;
    width: auto;
    flex-shrink: 0;
    white-space: nowrap;
    font-size: clamp(9px, 2.4vw, 11px);
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-inline: clamp(16px, 4vw, 24px);
    padding-bottom: var(--space-5);
    max-width: none;
  }

  .hero-meta {
    padding: 10px clamp(10px, 3vw, 16px);
  }

  .hero-meta > div {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 7px;
    padding: 10px 8px;
  }

  .hero-meta > div:nth-child(odd) {
    padding-right: 10px;
  }

  .hero-meta > div:nth-child(even) {
    padding-left: 10px;
  }

  .hero-meta strong {
    font-size: clamp(14px, 3.6vw, 17px);
    line-height: 1.1;
  }

  .hero-meta > div p span {
    font-size: clamp(9px, 2.1vw, 10px);
    line-height: 1.35;
    letter-spacing: 0.025em;
  }

  .hero-meta .meta-icon {
    width: 28px;
    height: 28px;
  }

  .hero-meta .meta-icon img,
  .hero-meta .meta-icon .icon {
    width: 16px;
    height: 16px;
  }

  .card-grid,
  .feature-row,
  .section-dark .quality-grid,
  .metric-row,
  .logo-strip,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    gap: var(--space-3);
    align-items: flex-start;
  }

  h1 {
    font-size: clamp(40px, 11.5vw, 56px);
    line-height: 0.88;
  }

  .hero-copy h1 {
    font-size: clamp(28px, 7vw, 40px);
    font-weight: 700;
    line-height: 0.84;
    max-width: 100%;
  }

  .hero-copy h1.hero-title--fit {
    max-width: min(100%, 16ch);
  }

  h2 {
    font-size: clamp(32px, 9.5vw, 44px);
  }

  .image-card {
    min-height: 280px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-4) 0;
  }
}

/* ── Tablet portrait (768–1023px) ── */
@media (min-width: 768px) and (max-width: 1023px) {
  h1 {
    font-size: clamp(52px, 7vw, 68px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-sheet-panel,
  .mobile-sheet-backdrop {
    transition: none;
  }
}

/* ── Body scroll lock when mobile nav open ── */
body.nav-open {
  touch-action: none;
  overscroll-behavior: none;
  padding-top: var(--header-lock-height, var(--header-height));
}

body.nav-open .scroll-fab {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
