/* ==========================================================================
   BIO POD — responsive composition
   Mobile is the base layer. These rules re-compose the layout as space grows
   and fix the specific places where small screens need a different structure.
   ========================================================================== */

/* Small phones ------------------------------------------------------------- */
@media (max-width: 420px) {
  :root {
    --gutter: 1.15rem;
    --stack-xl: 3rem;
  }

  .hero__actions .btn,
  .cta-panel__actions .btn {
    width: 100%;
  }

}

/* Phones: keep the map usable --------------------------------------------- */
@media (max-width: 560px) {
  .sector-block__head .tag {
    display: none;
  }
  .map-canvas {
    min-height: 24rem;
  }

  /* Mobile: the map carries the labels, so free the lower corners. */
  .map-toolbar {
    grid-template-columns: repeat(3, auto);
    right: 0.65rem;
    top: 0.65rem;
    bottom: auto;
  }

  .map-legend {
    display: none;
  }

  .map-shell--preview .map-canvas {
    min-height: 26rem;
  }

  /* The tiny homepage preview is a teaser; names belong to the full map. */
  [data-map="preview"] .map-labels {
    display: none;
  }

  .map-shell--preview .map-toolbar {
    display: none;
  }



  .map-shell__bar {
    font-size: 0.625rem;
    padding: 0.7rem 0.9rem;
  }

  .map-shell__bar .map-shell__state {
    display: none;
  }
}

/* Stacked tables below tablet width -------------------------------------- */
@media (max-width: 760px) {
  .table-wrap--stack {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .table-wrap--stack table {
    min-width: 0;
  }

  .table-wrap--stack caption {
    padding-inline: 0;
    border-bottom: 0;
    padding-bottom: 0.75rem;
  }

  .table-wrap--stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .table-wrap--stack tbody tr {
    display: block;
    border: 1px solid var(--line-dark);
    border-radius: var(--r-md);
    padding: 0.35rem 0;
    background: var(--surface-raised);
    margin-bottom: 0.65rem;
  }

  .on-paper .table-wrap--stack tbody tr {
    border-color: var(--line-light);
    background: rgba(255, 255, 255, 0.6);
  }

  .table-wrap--stack tbody tr:last-child {
    margin-bottom: 0;
  }

  .table-wrap--stack tbody th,
  .table-wrap--stack tbody td {
    display: grid;
    gap: 0.1rem;
    padding: 0.5rem 0.9rem;
    border-bottom: 1px solid var(--line-dark);
    white-space: normal;
  }

  .table-wrap--stack tbody td:last-child,
  .table-wrap--stack tbody th:last-child {
    border-bottom: 0;
  }

  .table-wrap--stack tbody td::before {
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--stone-soft);
  }

  .table-wrap--stack tbody th {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    letter-spacing: -0.02em;
  }

  .on-paper .table-wrap--stack tbody th,
  .on-paper .table-wrap--stack tbody td {
    border-color: var(--line-light);
  }
}

/* Phablet / large phone --------------------------------------------------- */
@media (min-width: 600px) {
  .scale-marks {
    grid-template-columns: repeat(4, 1fr);
  }

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

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

  .hero__meta {
    gap: 1rem 2.5rem;
  }

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

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

/* Tablet ------------------------------------------------------------------ */
@media (min-width: 768px) {
  :root {
    --nav-h: 4.5rem;
  }

  .section-head--split {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: start;
  }

  /* Align the aside's first line with the heading, past the eyebrow line. */
  .section-head--split .section-head__aside {
    padding-top: 1.95rem;
  }

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

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

  .config {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 2rem 3rem;
  }

  .config__head {
    grid-column: 1 / -1;
  }

  .client-wall {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }


  .stat-strip--wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .cta-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .footer__top {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 2.5rem;
  }

  .footer__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 2rem;
  }

  .form__actions {
    grid-column: 1 / -1;
  }
}

/* Small laptop ------------------------------------------------------------ */
@media (min-width: 900px) {
  .split--aside {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }

  .split--visual {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
  }

  .steps {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
    gap: clamp(2.5rem, 5vw, 5rem);
  }

  .steps__visual {
    position: sticky;
    top: calc(var(--nav-h) + 2rem);
  }

  .map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.75fr);
    gap: clamp(1.25rem, 2.5vw, 2rem);
    align-items: start;
  }

  .map-shell--full {
    min-height: 100%;
  }

  .map-panel {
    position: sticky;
    top: calc(var(--nav-h) + 1.5rem);
  }

  .map-canvas {
    min-height: 38rem;
  }

  .map-shell--preview .map-canvas {
    min-height: 30rem;
  }


  .quote-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
  }
}

/* Desktop navigation ------------------------------------------------------ */
@media (min-width: 1080px) {
  .nav {
    display: block;
  }

  .nav-toggle {
    display: none;
  }

  .site-header .btn--nav {
    display: inline-flex;
  }

  .mobile-menu,
  .mobile-menu[data-open] {
    display: none;
  }

  .hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
    gap: clamp(2.5rem, 4vw, 4rem);
  }

  .hero__stage {
    margin-right: calc(var(--gutter) * -1.2);
  }

  .sector__text {
    padding-left: 0;
  }

  .map-canvas {
    min-height: 42rem;
  }
}

/* Wide footer ------------------------------------------------------------- */
@media (min-width: 1100px) {
  .footer__top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  }

  .footer__cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.75rem 1.5rem;
  }
}

/* Wide desktop ------------------------------------------------------------ */
@media (min-width: 1280px) {
  :root {
    --gutter: 3.5rem;
  }

  .hero__title {
    font-size: clamp(4.25rem, 6.4vw, 7rem);
  }


  .client-wall {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Short viewports: keep the hero readable instead of filling the screen --- */
@media (max-height: 720px) and (min-width: 1080px) {
  .hero {
    min-height: 0;
    padding-top: calc(var(--nav-h) + 3rem);
    padding-bottom: 3rem;
  }
}

/* Print ------------------------------------------------------------------- */
@media print {
  .site-header,
  .site-footer,
  .progress,
  .scroll-cue,
  .map-toolbar {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .hero,
  .page-hero,
  .section {
    background: #fff !important;
    color: #111 !important;
    padding-block: 1.5rem;
  }

  .display,
  .h1,
  .h2,
  .h3,
  .hero__title {
    color: #111;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
    color: #555;
  }
}

