/* ==========================================================================
   Responsive refinements (mobile-first: base styles are in global.css and
   components.css; everything here enhances larger screens).
   Breakpoints: 640 (large phone), 900 (tablet / nav switch), 1100 (desktop).
   ========================================================================== */

@media (min-width: 640px) {
  .logo__mark { width: 56px; height: 56px; }
  .logo__name { font-size: 1.15rem; }
  .logo__tag img { max-width: 190px; }

  .metrics { grid-template-columns: repeat(3, 1fr); }
  .metric { border-bottom: 0; border-right: 1px solid rgba(255, 255, 255, 0.1); }
  .metric:last-child { border-right: 0; }

  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid--3, .card-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .facilities { grid-template-columns: repeat(2, 1fr); }
  .certs { grid-template-columns: repeat(2, 1fr); }
  .logo-grid { grid-template-columns: repeat(3, 1fr); }
  .reach { grid-template-columns: repeat(2, 1fr); }
  .form-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .form-grid .field--full { grid-column: 1 / -1; }
  .enquiry-types { grid-template-columns: repeat(2, 1fr); }
  .related { grid-template-columns: repeat(2, 1fr); }
  .strip__inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .site-footer__bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

@media (min-width: 900px) {
  /* ---- Header switches to two rows ---- */
  :root { --brand-row-h: 88px; }
  .site-header {
    /* Slide the brand row out of view; keep only the nav row pinned. */
    top: calc(var(--brand-row-h) * -1);
  }
  .site-header__brand { min-height: var(--brand-row-h); }
  .logo__mark { width: 68px; height: 68px; }
  .logo__name { font-size: clamp(1.3rem, 1.9vw, 1.7rem); }
  .logo__tag img { max-width: 250px; }
  .header-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .site-nav { display: block; }
  .site-nav__list {
    flex-direction: row;
    justify-content: center;
    gap: 0.1rem;
    padding-block: 0;
  }
  .site-nav a {
    justify-content: center;
    min-height: var(--nav-row-h);
    padding: 0 0.9rem;
    border-left: 0;
    border-bottom: 3px solid transparent;
    font-size: 0.78rem;
  }
  .site-nav a:hover,
  .site-nav a[aria-current="page"] { border-bottom-color: var(--gold-500); }

  .hero { min-height: 580px; }
  .tile-grid--4 { grid-template-columns: repeat(4, 1fr); }
  .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .split--wide-copy { grid-template-columns: 1.15fr 0.85fr; }
  .director { grid-template-columns: 320px 1fr; gap: var(--space-8); }
  .director--flip { grid-template-columns: 1fr 320px; }
  .director--flip .director__photo { order: 2; }
  .journey { padding-left: 0; }
  .journey::before, .journey::after { left: calc(50% - 1.5px); }
  .journey__item { width: calc(50% - 3rem); }
  .journey__item:nth-child(even) { margin-left: auto; }
  .journey__item::after { left: auto; right: calc(-3rem - 9px); }
  .journey__item:nth-child(even)::after { right: auto; left: calc(-3rem - 9px); }
  .mission-cards { grid-template-columns: repeat(4, 1fr); }
  /* Stagger only while the cards sit side by side. */
  .mission-cards li:nth-child(2) { --reveal-delay: 0.15s; }
  .mission-cards li:nth-child(3) { --reveal-delay: 0.3s; }
  .mission-cards li:nth-child(4) { --reveal-delay: 0.45s; }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .facilities { grid-template-columns: repeat(4, 1fr); }
  .certs { grid-template-columns: repeat(3, 1fr); }
  .logo-grid { grid-template-columns: repeat(4, 1fr); }
  .reach { grid-template-columns: repeat(3, 1fr); }
  .contact-layout { grid-template-columns: 0.8fr 1.2fr; align-items: start; gap: var(--space-8); }
  .enquiry-types { grid-template-columns: repeat(4, 1fr); }
  .timeline { grid-template-columns: repeat(5, 1fr); gap: var(--space-3); }
  .timeline__item { border-left: 1px solid var(--line); border-top: 4px solid var(--gold-500); padding: var(--space-5) var(--space-4); }
  .values { grid-template-columns: repeat(4, 1fr); }
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1.2fr; gap: var(--space-8); }
  .related { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1100px) {
  .logo-grid { grid-template-columns: repeat(6, 1fr); }
  .site-nav a { padding: 0 1.05rem; font-size: 0.8rem; }
}

/* ---- Small screens: stack the recommendation tables ---- */
@media (max-width: 719px) {
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { padding: var(--space-4); border-bottom: 1px solid var(--line); }
  .data-table tbody tr:last-child { border-bottom: 0; }
  .data-table td { padding: 0; border: 0; }
  .data-table .col-no { display: none; }
  .data-table .col-product { width: 100%; margin-bottom: var(--space-2); }
  .data-table .subhead { padding: var(--space-3) var(--space-4); }
  .data-table .subhead th, .data-table .subhead td { display: block; width: 100%; padding: 0; }
}

/* ---- Home client cards: three across, appearing in turn ---- */
@media (min-width: 720px) {
  .client-cards { grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
  .client-card { height: 160px; padding: 1.75rem 2rem; }
  .client-card img { height: 96px; }
  .client-cards li:nth-child(3n+2) { --reveal-delay: 0.15s; }
  .client-cards li:nth-child(3n) { --reveal-delay: 0.3s; }
}

/* ---- Very narrow phones: give the name and tagline room (Contact Us stays in the menu) ---- */
@media (max-width: 379px) {
  .site-header .header-cta { display: none; }
}

/* ---- Phones: centre section labels and headings; paragraphs and lists stay left ---- */
@media (max-width: 639px) {
  :is(.split__copy, .band__grid > div:first-child, .why__intro, .contact-layout > div:first-child, .section-head--left) > .eyebrow {
    display: flex;
    justify-content: center;
    width: 100%;
    text-align: center;
  }
  /* Headings stay ordinary blocks so their words wrap normally. */
  :is(.split__copy, .band__grid > div:first-child, .why__intro, .contact-layout > div:first-child, .section-head--left) > h2 { text-align: center; }
  /* Same line on both sides of every one of these labels. */
  :is(.why__intro, .section-head--left) > .eyebrow::before { display: block !important; }

  /* Header: keep the company name to two lines, with space above and below. */
  .site-header__brand { gap: 0.6rem; padding-block: 0.6rem; }
  .site-header .logo { gap: 0.5rem; }
  .site-header .logo__mark { width: 40px; height: 40px; }
  .site-header .logo__name { font-size: 0.85rem; }
  .site-header .logo__tag img { max-width: 120px; }
  .site-header .header-cta { padding-inline: 0.6rem; font-size: 0.65rem; letter-spacing: 0.04em; }

  /* Home banner buttons: stacked, with room at the sides. */
  .hero .btn-row { flex-direction: column; align-items: stretch; width: 100%; max-width: 17rem; margin-inline: auto; }
}

/* ---- Print: keep the content, drop chrome ---- */
@media print {
  .site-header, .skip-link, .cta-band, .chip-nav, .nav-toggle { display: none !important; }
  body { background: #fff; }
  .hero, .page-hero, .section--dark, .site-footer { background: #fff !important; color: #000 !important; }
  .page-hero h1, .hero h1, .section--dark h2 { color: #000 !important; }
  .reveal-ready { opacity: 1 !important; transform: none !important; }
  .journey::after { transform: none; }
  .finder, .sheet-close { display: none !important; }
  .js-sheets #recommendations, .js-sheets #recommendations .sheet:not(.is-shown) { display: block !important; }
  .hero-dots { display: none; }
  .globe figcaption { color: #000; }
  #vision-mission :is(h2, h2 em, h3, h4, p, span) { color: #000 !important; }
}
