/* ==========================================================================
   Responsive — mobile-last overrides (desktop-first base in style.css)
   Breakpoints: 1440 · 1200 · 992 · 768 · 560 · 380
   ========================================================================== */

/* ---------- Large screens ---------- */
@media (min-width: 1600px) {
  :root { --shell: 1360px; --sec-y: 128px; }
  .hero__frame { width: 470px; }
}

/* ---------- Laptop ---------- */
@media (max-width: 1200px) {
  :root { --sec-y: 92px; --gutter: 22px; }
  .hero__inner { gap: 40px; }
  .split { gap: 46px; }
  .nav__link { padding: 10px 11px; font-size: .82rem; }
  .footer__top { grid-template-columns: 1.3fr 1fr 1.3fr; gap: 40px; }
}

/* ---------- Tablet ---------- */
@media (max-width: 992px) {
  :root { --nav-h: 74px; }

  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .masonry { columns: 2; }
  .counters { grid-template-columns: repeat(2, 1fr); gap: 30px; padding: 38px 26px; }
  .efacts { grid-template-columns: repeat(2, 1fr); }

  /* Hero stacks, portrait first-class */
  .hero { min-height: auto; padding: calc(var(--nav-h) + 54px) 0 70px; }
  .hero__inner { grid-template-columns: 1fr; gap: 46px; text-align: center; }
  .hero__text { margin-inline: auto; }
  .hero__actions, .hero__tagline, .hero__stats { justify-content: center; }
  .hero__stats { gap: 30px; }
  .hero__figure { order: -1; }
  .hero__motif { right: -30%; opacity: .35; }
  .hero__scroll { display: none; }

  .split { grid-template-columns: 1fr; gap: 54px; }
  .split__media::after { inset: 16px -16px -16px 16px; }
  .split--flip .split__media { order: -1; }

  /* Detail layout drops the sticky aside */
  .detail-grid { grid-template-columns: 1fr !important; }
  .aside { position: static; }

  /* Timeline goes single-rail */
  .tl::before, .tl__fill { left: 18px; transform: none; }
  .tl__item,
  .tl__item:nth-child(even),
  .tl__item:nth-child(odd) {
    width: 100%;
    margin-left: 0;
    padding: 0 0 0 52px;
    text-align: left;
  }
  .tl__item:nth-child(odd) .tl__dot,
  .tl__item:nth-child(even) .tl__dot { left: 10px; right: auto; }
  .js .tl__item:nth-child(odd),
  .js .tl__item:nth-child(even) { transform: translateX(38px); }
  .js .tl__item.is-in { transform: none; }

  /* Mobile menu drawer */
  .burger { display: block; }
  .nav__cta { display: none; }
  .nav__menu {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(340px, 84vw);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    padding: calc(var(--nav-h) + 24px) 22px 34px;
    background: rgba(253, 251, 247, .97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(201, 162, 39, .3);
    box-shadow: -20px 0 60px rgba(42, 33, 24, .16);
    transform: translateX(100%);
    transition: transform .42s var(--ease-out);
    overflow-y: auto;
  }
  .nav__menu.is-open { transform: none; }
  .nav__link {
    padding: 14px 12px;
    font-size: .96rem;
    border-bottom: 1px solid rgba(201, 162, 39, .18);
    border-radius: 0;
  }
  .nav__link::after { display: none; }
  .nav__link[aria-current="page"] { color: var(--maroon); background: var(--gold-pale); }

  /* Dropdown becomes inline accordion */
  .nav__panel {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    min-width: 0;
    margin: 0 0 6px;
    padding: 4px 0 4px 12px;
    background: transparent;
    border: 0;
    border-left: 2px solid var(--gold-pale);
    border-radius: 0;
    box-shadow: none;
    display: none;
  }
  .nav__item.is-open .nav__panel { display: block; animation: fade-up .3s var(--ease-out) both; }
  .nav__caret { margin-left: auto; }
  .nav__item > .nav__link { display: flex; align-items: center; gap: 8px; }

  .nav__scrim {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(42, 33, 24, .42);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t-mid) var(--ease), visibility var(--t-mid);
  }
  .nav__scrim.is-on { opacity: 1; visibility: visible; }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  :root { --sec-y: 72px; --gutter: 18px; }

  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .grid { gap: 20px; }
  .masonry { columns: 1; }
  .section-head { margin-bottom: 42px; }

  .hero__frame { width: min(330px, 78vw); }
  .hero__plaque { left: 50%; bottom: -22px; transform: translateX(-50%); }
  .hero__plaque { animation: none; }
  .hero__stats { gap: 22px 34px; }
  .hero__tagline { gap: 10px; letter-spacing: .18em; }

  .card { padding: 28px 24px; }
  .quote { padding: 42px 26px; }
  .counters { padding: 32px 20px; }
  .efacts { grid-template-columns: 1fr; gap: 14px; padding: 20px; }

  .ebanner { min-height: 52vh; }
  .ebanner h1 { max-width: none; }

  .press { flex-direction: column; align-items: flex-start; gap: 14px; text-align: left; }
  .press:hover { transform: none; }

  .footer { padding-top: 58px; }
  .footer__top { grid-template-columns: 1fr; gap: 34px; padding-bottom: 40px; }
  .footer__col--contact { grid-column: auto; }
  .footer__bar { flex-direction: column; text-align: center; gap: 10px; }

  .lb { padding: 16px; }
  .lb__btn { width: 44px; height: 44px; }
  .lb__close { top: 14px; right: 14px; }
  .lb__prev { left: 10px; }
  .lb__next { right: 10px; }
  .lb__img { max-height: 70vh; }

  .wa { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  .wa__tip { display: none; }
  .totop { right: 16px; bottom: 78px; width: 42px; height: 42px; }

  /* Disable parallax on touch — jank + battery */
  [data-parallax] { transform: none !important; }
}

/* ---------- Small mobile ---------- */
@media (max-width: 560px) {
  .btn { width: 100%; }
  .hero__actions { flex-direction: column; width: 100%; }
  .hero__stats { justify-content: space-between; width: 100%; }
  .stat { flex: 1 1 40%; }
  .filters { gap: 7px; }
  .filter { padding: 8px 15px; font-size: .74rem; }
  .tl__item { padding-left: 44px; }
  .tl__card { padding: 20px 18px; }
}

@media (max-width: 380px) {
  :root { --gutter: 14px; }
  .brand__sub { display: none; }
  .hero__badge { font-size: .64rem; letter-spacing: .1em; }
}

/* ---------- Print ---------- */
@media print {
  .nav, .wa, .totop, .loader, .hero__scroll, .veil, .lb { display: none !important; }
  body { background: #fff; color: #000; }
  body::before { display: none; }
  .footer { background: #fff; color: #000; }
  [data-reveal], [data-reveal-group] > * { opacity: 1 !important; transform: none !important; }
  a { color: #000; text-decoration: underline; }
  .section { padding: 24px 0; page-break-inside: avoid; }
}
