/* Responsive layer for the DC-exported pages.
   Everything else on these pages is inline-styled (desktop layout),
   so overrides here need !important to win the cascade. */

/* ---------- horizontal page padding ---------- */
@media (max-width: 900px) {
  .pad-x { padding-left: 28px !important; padding-right: 28px !important; }
}
@media (max-width: 560px) {
  .pad-x { padding-left: 18px !important; padding-right: 18px !important; }
}

/* ---------- mobile nav (checkbox-driven, no JS) ---------- */
.nav-toggle { display: none; }
.nav-toggle-label { display: none; }

@media (max-width: 860px) {
  .site-header { position: relative; flex-wrap: nowrap !important; }

  .nav-toggle-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 30px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 30;
  }
  .nav-toggle-label span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: oklch(0.22 0.01 60);
  }

  .site-nav {
    display: none !important;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    background: oklch(0.99 0.004 60);
    border-top: 1px solid oklch(0.9 0.005 60);
    border-bottom: 1px solid oklch(0.9 0.005 60);
    padding: 8px 24px 18px !important;
    box-shadow: 0 16px 28px oklch(0 0 0 / 0.1);
    z-index: 25;
  }
  .nav-toggle:checked ~ .site-nav {
    display: flex !important;
  }
  .site-nav a {
    font-size: 16px !important;
    padding: 13px 0 !important;
    border-bottom: 1px solid oklch(0.92 0.005 60);
    width: 100%;
  }
  .site-nav a:last-child {
    text-align: center;
    border-bottom: none !important;
    margin-top: 14px !important;
    padding: 14px 22px !important;
    width: auto;
  }
}

/* ---------- fluid headings ----------
   Scoped to the breakpoint only, so desktop keeps its original inline
   font-size exactly and these purely shrink things on small screens. */
@media (max-width: 900px) {
  .fluid-h1    { font-size: clamp(34px, 6.6vw, 68px) !important; }
  .fluid-h1-sm { font-size: clamp(30px, 6vw, 56px) !important; }
  .fluid-h2    { font-size: clamp(24px, 4.4vw, 42px) !important; }
  .fluid-h2-sm { font-size: clamp(22px, 3.6vw, 34px) !important; }
}
@media (max-width: 560px) {
  .fluid-price { font-size: clamp(28px, 9vw, 44px) !important; }
}

/* ---------- grid collapses ---------- */
@media (max-width: 900px) {
  .grid-2   { grid-template-columns: 1fr !important; }
  .grid-3   { grid-template-columns: repeat(2, 1fr) !important; }
  .grid-4   { grid-template-columns: repeat(2, 1fr) !important; }
  .split    { grid-template-columns: 1fr !important; gap: 32px !important; }
  .work-case{ grid-template-columns: 1fr !important; gap: 24px !important; }
  .work-case > * { order: initial !important; }
}
@media (max-width: 640px) {
  .grid-3 { grid-template-columns: 1fr !important; }
  .grid-4 { grid-template-columns: 1fr !important; }
}

/* ---------- misc section-level fixes ---------- */
@media (max-width: 900px) {
  .hero-section {
    padding-top: 32px !important;
    padding-bottom: 40px !important;
  }
  .rounded-panel {
    margin-left: 12px !important;
    margin-right: 12px !important;
    padding-left: 28px !important;
    padding-right: 28px !important;
  }
}
@media (max-width: 560px) {
  .rounded-panel {
    margin-left: 8px !important;
    margin-right: 8px !important;
    border-radius: 24px !important;
    padding: 40px 20px !important;
  }
}
