/* Shared responsive foundation for the Jadis marketing site. */
:root {
  --page-gutter: clamp(20px, 5vw, 80px);
  --mobile-nav-surface: #f4f1eb;
  --mobile-nav-ink: #1c1a17;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.site-nav {
  position: relative;
}

.site-nav-menu {
  display: none;
}

.site-contact-content .form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-contact-content .form-field label {
  color: #c9c2b6;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-contact-content .form-field input,
.site-contact-content .form-field select {
  width: 100%;
}

@media (max-width: 767px) {
  .site-shell {
    padding-left: var(--page-gutter) !important;
    padding-right: var(--page-gutter) !important;
  }

  .site-footer {
    padding-left: var(--page-gutter) !important;
    padding-right: var(--page-gutter) !important;
  }

  .site-nav {
    min-height: 72px;
    padding: 20px 0 !important;
  }

  .site-nav-brand {
    font-size: 24px !important;
    line-height: 1;
  }

  .site-nav-links,
  .site-nav-cta {
    display: none !important;
  }

  .site-nav-menu {
    display: block;
  }

  .site-nav-menu summary {
    align-items: center;
    background: var(--mobile-nav-ink);
    color: var(--mobile-nav-surface);
    cursor: pointer;
    display: inline-flex;
    font: 600 16px/1 "Work Sans", sans-serif;
    justify-content: center;
    list-style: none;
    min-height: 44px;
    min-width: 78px;
    padding: 12px 16px;
  }

  .site-nav-menu summary::-webkit-details-marker {
    display: none;
  }

  .site-nav-menu summary:focus-visible,
  .site-nav-menu a:focus-visible {
    outline: 3px solid oklch(55% 0.14 55);
    outline-offset: 3px;
  }

  .site-nav-menu-close-label {
    display: none;
  }

  .site-nav-menu[open] .site-nav-menu-label {
    display: none;
  }

  .site-nav-menu[open] .site-nav-menu-close-label {
    display: inline;
  }

  .site-nav-panel {
    background: var(--mobile-nav-surface);
    border: 1px solid #d8d2c4;
    box-shadow: 0 18px 40px rgb(28 26 23 / 0.16);
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: min(280px, calc(100vw - (var(--page-gutter) + var(--page-gutter))));
    padding: 8px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 20;
  }

  .site-nav-panel a {
    color: var(--mobile-nav-ink);
    font-size: 18px;
    min-height: 44px;
    padding: 12px;
  }

  .site-nav-panel .site-nav-panel-cta {
    background: var(--mobile-nav-ink);
    color: var(--mobile-nav-surface);
    margin-top: 6px;
  }

  .site-shell > section[data-screen-label="Hero"] {
    gap: 36px !important;
    grid-template-columns: 1fr !important;
    padding: 40px 0 64px !important;
  }

  section[data-screen-label="Hero"] h1 {
    font-size: clamp(44px, 13vw, 56px) !important;
  }

  section[data-screen-label="Hero"] p {
    font-size: 18px !important;
    line-height: 1.55 !important;
  }

  section[data-screen-label="Hero"] > div:first-child > div:last-child {
    flex-wrap: wrap;
  }

  section[data-screen-label="Proof bar"] {
    padding: 48px 0 !important;
  }

  section[data-screen-label="Capabilities"],
  section[data-screen-label="Work"],
  section[data-screen-label="Approach"],
  section[data-screen-label="Contact"] {
    padding-top: 72px !important;
    padding-bottom: 72px !important;
  }

  section[data-screen-label="Capabilities"] > div[style*="grid-template-columns: repeat(3"],
  section[data-screen-label="Work"] div[style*="grid-template-columns: repeat(2"],
  section[data-screen-label="Approach"] > div[style*="grid-template-columns: repeat(4"],
  .site-shell > section[data-screen-label="About"],
  .site-contact-content,
  section[data-screen-label="Case study hero"] > div[style*="grid-template-columns: 1.3fr"],
  section[data-screen-label="Challenge"],
  section[data-screen-label="Approach"],
  section[data-screen-label="Outcome"],
  section[data-screen-label="Approach"] div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  section[data-screen-label="Capabilities"] > div[style*="grid-template-columns: repeat(3"],
  section[data-screen-label="Work"] div[style*="grid-template-columns: repeat(2"],
  section[data-screen-label="Approach"] > div[style*="grid-template-columns: repeat(4"] {
    gap: 28px !important;
  }

  .site-shell > section[data-screen-label="About"],
  .site-contact-content,
  section[data-screen-label="Case study hero"] > div[style*="grid-template-columns: 1.3fr"],
  section[data-screen-label="Challenge"],
  section[data-screen-label="Approach"],
  section[data-screen-label="Outcome"] {
    gap: 28px !important;
  }

  section[data-screen-label="Work"] > .site-shell > div:first-child {
    gap: 20px !important;
    margin-bottom: 36px !important;
  }

  section[data-screen-label="Work"] h2,
  section[data-screen-label="Capabilities"] h2,
  section[data-screen-label="Approach"] h2,
  section[data-screen-label="About"] h2 {
    font-size: 34px !important;
    line-height: 1.15;
  }

  section[data-screen-label="Case study hero"] {
    padding: 40px 0 56px !important;
  }

  section[data-screen-label="Case study hero"] h1 {
    font-size: clamp(46px, 13vw, 54px) !important;
  }

  section[data-screen-label="Case study hero"] p {
    font-size: 20px !important;
    line-height: 1.5 !important;
  }

  section[data-screen-label="Challenge"] {
    padding: 64px 0 !important;
  }

  section[data-screen-label="Approach"],
  section[data-screen-label="Outcome"] {
    padding-bottom: 64px !important;
  }

  section[data-screen-label="Challenge"] h2,
  section[data-screen-label="Approach"] h2,
  section[data-screen-label="Outcome"] h2 {
    font-size: 30px !important;
  }

  section[data-screen-label="Challenge"] p,
  section[data-screen-label="Approach"] p,
  section[data-screen-label="Outcome"] p {
    font-size: 18px !important;
    line-height: 1.6 !important;
  }

  section[data-screen-label="Approach"] div[style*="grid-template-columns: 1fr 1fr"] {
    gap: 16px !important;
  }

  section[data-screen-label="Approach"] div[style*="grid-template-columns: 1fr 1fr"] > div {
    padding: 24px !important;
  }

  section[data-screen-label="Case study hero"] + div,
  section[data-screen-label="Outcome"] + div {
    aspect-ratio: 4 / 3 !important;
  }

  section[data-screen-label="Next case study"] {
    margin-top: 64px !important;
    padding: 64px 0 !important;
  }

  section[data-screen-label="Next case study"] .site-shell {
    align-items: stretch !important;
    flex-direction: column !important;
    gap: 24px !important;
  }

  section[data-screen-label="Next case study"] .site-shell > a {
    text-align: center;
  }

  .site-contact-content form {
    gap: 18px !important;
  }

  .site-contact-content .form-field input,
  .site-contact-content .form-field select,
  .site-contact-content form button {
    min-height: 48px;
    width: 100% !important;
  }

  .site-contact-content form button {
    margin-top: 4px !important;
  }

  .site-footer {
    flex-direction: column !important;
    gap: 8px;
    padding-bottom: 32px !important;
    padding-top: 32px !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .site-shell {
    padding-left: clamp(32px, 5vw, 48px) !important;
    padding-right: clamp(32px, 5vw, 48px) !important;
  }

  .site-footer {
    padding-left: clamp(32px, 5vw, 48px) !important;
    padding-right: clamp(32px, 5vw, 48px) !important;
  }

  section[data-screen-label="Hero"] {
    gap: 48px !important;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) !important;
  }

  section[data-screen-label="Hero"] h1 {
    font-size: clamp(52px, 7vw, 60px) !important;
  }

  .site-shell > section[data-screen-label="About"] {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }

  section[data-screen-label="Hero"] > image-slot,
  .site-shell > section[data-screen-label="About"] > image-slot {
    display: block;
    max-width: 100%;
    min-width: 0 !important;
  }

  section[data-screen-label="Capabilities"] > div[style*="grid-template-columns: repeat(3"],
  section[data-screen-label="Approach"] > div[style*="grid-template-columns: repeat(4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .site-contact-content {
    gap: 48px !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }
}
