/* Layout overrides live last in the cascade. Breakpoints follow the space the
   content needs: compact phones, phones, portrait tablets, and wide tablets. */
:root {
  --page-gutter: clamp(20px, 3.5vw, 56px);
}

.container {
  --safe-gutter: max(var(--page-gutter), env(safe-area-inset-left), env(safe-area-inset-right));
  width: min(var(--rail), calc(100% - var(--safe-gutter) * 2));
}

.editorial-split > *,
.service-grid > *,
.industry-grid > *,
.insight-grid > *,
.footer-grid > *,
.audience-routes article > div {
  min-width: 0;
}

.media-hero h1,
.section-heading h2,
.service-copy h3,
.industry-copy h3,
.insight-card h3 {
  text-wrap: balance;
}

.proof-grid strong {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.service-tags span,
.enterprise-footer a,
.enterprise-footer button {
  overflow-wrap: anywhere;
}

.enterprise-menu,
.dialog-close,
.drawer-top .icon-button,
.hero-mode-switch button,
.film-control {
  min-width: 44px;
  min-height: 44px;
}

.hero-film-controls {
  max-width: 100%;
}

.enterprise-drawer {
  height: 100dvh;
  padding: max(24px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
  scroll-padding-block: 24px;
}

.enterprise-drawer > * {
  flex-shrink: 0;
}

.enquiry-dialog {
  overscroll-behavior: contain;
  scroll-padding-block: 24px;
}

@media (pointer: coarse) {
  .enquiry-dialog input,
  .enquiry-dialog select,
  .enquiry-dialog textarea { font-size: 16px; }
  .text-link,
  .industry-copy button { min-height: 44px; }
}

@media (max-width: 1199px) {
  .enterprise-nav nav,
  .mega-menu {
    display: none;
  }
  .enterprise-menu {
    display: inline-flex;
  }
  .enterprise-cta {
    margin-left: auto;
  }
  .enterprise-nav {
    min-height: 82px;
    gap: 20px;
  }
  :root { --nav-height: 83px; }
  .proof-grid strong { font-size: clamp(30px, 3.3vw, 40px); }
  .service-grid,
  .industry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .service-0,
  .service-1 {
    grid-column: auto;
  }
  .editorial-split,
  .home-section .editorial-split {
    gap: 36px;
  }
  .media-hero-film .hero-film-wash {
    background: linear-gradient(90deg, #fffffff7, #ffffffeb 44%, #ffffff88 75%, #ffffff33),
      linear-gradient(0deg, #f9fbfd, transparent 30%);
  }
  .enterprise-footer .footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
  }
  .enterprise-footer .footer-brand {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

@media (max-width: 899px) {
  .media-hero-image .media-hero-inner,
  .network-section .editorial-split,
  .projects-section .editorial-split,
  .home-section .editorial-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .media-hero h1 {
    font-size: clamp(34px, 5vw, 44px);
    letter-spacing: -1.6px;
  }
  .media-hero .hero-copy > p {
    font-size: 15px;
    max-width: 57ch;
  }
  .hero-media {
    max-width: 640px;
    margin-inline: auto;
  }
  .media-hero .proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }
  .proof-grid > div,
  .proof-grid > div:first-child {
    padding: 22px 0;
    border: 0;
  }
  .proof-grid > div:nth-child(even) {
    padding-left: 24px;
    border-left: 1px solid var(--line);
  }
  .proof-grid > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .proof-grid strong { font-size: 36px; }
  .proof-grid span { font-size: 12px; }
  .network-panel {
    width: 100%;
    max-width: 640px;
    margin-inline: auto;
  }
  .network-orbit {
    height: 330px;
  }
  .orbit-ring { width: 65%; height: 65%; }
  .orbit-ring-2 { width: 88%; height: 82%; }
  .network-capacity span { font-size: 12px; }
  .insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
  .insight-card:last-child { grid-column: 1 / -1; }
  .insight-card h3 { max-width: 32ch; }
  .home-summary.home-visual { order: 2; }
  .enterprise-footer .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .enterprise-footer .footer-grid > div:last-child { grid-column: auto; }
  .section-heading p,
  .service-card .service-copy p,
  .industry-copy p,
  .audience-routes p {
    font-size: 14px;
    line-height: 1.75;
  }
  .enterprise-footer .footer-grid > div > a:not(.brand),
  .enterprise-footer .footer-grid > div > button {
    min-height: 44px;
    font-size: 13px;
    margin-block: 4px;
  }
}

@media (max-width: 599px) {
  :root {
    --page-gutter: 20px;
    --nav-height: 77px;
  }
  html { scroll-padding-top: 96px; }
  .enterprise-nav {
    min-height: 76px;
    gap: 12px;
  }
  .enterprise-brand img { width: 140px; }
  .enterprise-cta {
    padding: 10px 12px;
    min-height: 44px;
    font-size: 12px;
    gap: 8px;
  }
  .hero-toolbar { min-height: 64px; }
  .media-hero-film .hero-stage { margin-top: -64px; padding-top: 64px; }
  .media-hero h1 {
    font-size: clamp(30px, 7.6vw, 43px);
    line-height: 1.14;
    letter-spacing: -1.3px;
    margin-inline: 0;
  }
  .media-hero .hero-copy > p { font-size: 14px; line-height: 1.75; }
  .media-hero-film .media-hero-inner {
    min-height: 0;
    padding-block: 28px 88px;
  }
  .media-hero-film .hero-film-wash {
    background: linear-gradient(90deg, #fffffff5, #ffffffdf 70%, #ffffffb8),
      linear-gradient(0deg, #f9fbfd, transparent 30%);
  }
  .media-hero .hero-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .media-hero .hero-actions .button {
    justify-content: space-between;
    min-height: 48px;
    font-size: 13px;
    padding: 14px 18px;
    white-space: normal;
    text-align: left;
  }
  .media-hero .home-route {
    font-size: 13px;
    min-height: 44px;
    gap: 12px;
  }
  .proof-grid strong { font-size: clamp(27px, 7.8vw, 36px); letter-spacing: -1.1px; }
  .proof-grid small { font-size: 12px; margin-left: 3px; }
  .proof-grid > div:nth-child(even) { padding-left: 12px; }
  .proof-grid span { font-size: 11px; }
  .audience-routes { grid-template-columns: minmax(0, 1fr); }
  .audience-routes article,
  .audience-routes article + article { gap: 16px; padding-inline: 0; }
  .audience-routes .text-link { font-size: 13px; min-height: 44px; gap: 10px; }
  .client-logos { gap: 12px; }
  .client-logos img,
  .client-logos > div:nth-child(5) img { width: 100%; max-width: 103px; height: auto; }
  .service-grid,
  .industry-grid,
  .insight-grid { grid-template-columns: minmax(0, 1fr); }
  .service-card:not(.service-0):not(.service-1) { display: flex; }
  .service-grid .service-card .service-copy h3 button { min-height: 44px; }
  .service-copy h3,
  .service-0 h3,
  .service-1 h3 { font-size: 25px; }
  .service-tags span { font-size: 11px; }
  .industry-photo { height: auto; aspect-ratio: 3 / 2; }
  .industry-copy button { min-height: 44px; }
  .insight-card:last-child { grid-column: auto; }
  .insight-card .text-link { font-size: 13px; min-height: 44px; }
  .ecosystem-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .ecosystem-divider { display: none; }
  .ecosystem-brand {
    position: static;
    transform: none;
    grid-row: 1;
    margin: 0 auto 24px;
  }
  .ecosystem-pillar,
  .ecosystem-pillar:nth-of-type(n + 3) {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    column-gap: 18px;
    min-height: 0;
    padding: 24px 0;
    text-align: left;
    border-top: 1px solid var(--line);
  }
  .ecosystem-pillar > .line-icon { grid-row: span 2; margin: 0; }
  .ecosystem-pillar h3 { max-width: none; margin: 0 0 10px; font-size: 22px; }
  .ecosystem-pillar p { max-width: none; margin: 0; font-size: 14px; }
  .ecosystem-credentials span { font-size: 12px; }
  .project-summary .city-stat { flex-wrap: wrap; gap: 12px 20px; }
  .project-summary .city-stat p { flex: 1 1 110px; font-size: 14px; }
  .home-summary .home-mode-controls button { min-width: 0; font-size: 12px; }
  .faq-list summary { min-height: 60px; font-size: 15px; }
  .faq-list details p { font-size: 14px; }
  .contact-scroll-scene.contact h2 { font-size: clamp(30px, 8.5vw, 40px); }
  .contact-scroll-scene.contact p { font-size: 14px; padding: 0; }
  .contact-links { font-size: 13px; }
  .contact-links a { min-height: 44px; }
  .enterprise-footer .footer-grid { gap: 24px 20px; }
  .enquiry-dialog {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
    padding: 36px 20px 24px;
  }
  .enquiry-dialog h2 { font-size: 30px; padding-right: 20px; }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .enquiry-dialog input,
  .enquiry-dialog select,
  .enquiry-dialog textarea { min-width: 0; font-size: 16px; }
  .enquiry-dialog select { height: auto; min-height: 48px; }
  .dialog-contact { flex-wrap: wrap; }
}

@media (max-width: 374px) {
  :root { --page-gutter: 16px; }
  .enterprise-brand img { width: 120px; }
  .enterprise-nav { gap: 8px; }
  .enterprise-cta { font-size: 11px; padding-inline: 10px; }
  .enterprise-cta svg { display: none; }
  .proof-grid strong { font-size: 27px; }
  .service-grid .service-card .service-copy { padding: 20px !important; }
  .service-icon { padding-inline: 20px; }
  .network-panel { padding-inline: 16px; }
  .network-capacity strong { font-size: 25px; }
}

/* Keep controls reachable on phones in landscape and above the software keyboard. */
@media (max-height: 600px) and (max-width: 1199px) {
  .enterprise-nav { min-height: 64px; }
  .enterprise-brand img { max-height: 44px; width: auto; }
  .enquiry-dialog { top: 12px; transform: translateX(-50%); max-height: calc(100dvh - 24px); }
  .enterprise-drawer { padding-block: 16px; }
  .drawer-top { padding-bottom: 16px; }
}
