/* Responsive layer.
 *
 * Every page is inline-styled by the artifact bundler, so these rules need
 * !important to win. They only apply below the desktop breakpoint -- above it
 * the original design is untouched, which is why nothing here sets a rule
 * outside a media query except the safety nets below.
 */

img,
iframe,
svg,
video {
  max-width: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
}

/* Long unbroken strings (emails, URLs) must not force the page wider. */
a,
p,
h1,
h2,
h3,
li {
  overflow-wrap: break-word;
}

/* The hamburger only exists below the nav breakpoint. */
.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid #e2e4ec;
  background: #ffffff;
  border-radius: 2px;
  padding: 10px;
  cursor: pointer;
  line-height: 0;
  color: #10121a;
}

/* ------------------------------------------------------------------ tablet */
@media (max-width: 1024px) {
  /* Two-column editorial grids: stack. Their minmax() floors add up to more
     than the viewport, which is what pushed content off-screen. */
  [style*="grid-template-columns: minmax"] {
    grid-template-columns: 1fr !important;
  }

  [style*="repeat(4, 1fr)"],
  [style*="repeat(3, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  section,
  header > div {
    padding-left: 28px !important;
    padding-right: 28px !important;
  }

  /* Fixed type sizes were the other half of the overflow. */
  h1 {
    font-size: clamp(30px, 6.4vw, 56px) !important;
    line-height: 1.16 !important;
  }

  h2 {
    font-size: clamp(23px, 4.2vw, 34px) !important;
  }

  h3 {
    font-size: clamp(20px, 3.2vw, 26px) !important;
  }

  /* The hero reserves desktop height it does not need once the type shrinks. */
  [style*="min-height: 640px"] {
    min-height: 0 !important;
  }
}

/* --------------------------------------------------------- nav breakpoint */
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  header > div {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  header img[alt="Ventcore Global Corporation"] {
    height: 44px !important;
  }

  #site-nav {
    display: none !important;
    order: 3;
    width: 100%;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding-bottom: 8px;
  }

  #site-nav[data-open] {
    display: flex !important;
  }

  #site-nav a {
    width: 100%;
    box-sizing: border-box;
    padding: 15px 0 !important;
    border-bottom: 1px solid #e2e4ec !important;
  }

  /* The call-to-action keeps its filled style but spans the drawer. */
  #site-nav a[href$="inquiry.html"] {
    text-align: center;
    margin-top: 12px;
    padding: 15px 24px !important;
    border-bottom: 0 !important;
  }
}

/* ------------------------------------------------------------------ phone */
@media (max-width: 768px) {
  [style*="repeat(4, 1fr)"],
  [style*="repeat(3, 1fr)"],
  [style*="repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* Desktop vertical rhythm is roughly double what a phone needs. */
  section {
    padding-top: 56px !important;
    padding-bottom: 56px !important;
  }

  /* Hero copy sits in an inner div whose own 120px padding is not covered by
     the section rule above, and it leaves a dead band on a short screen. */
  [style*="padding: 120px 40px"] {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }

  /* Rows that were side-by-side on desktop read better stacked. */
  section > div[style*="justify-content: space-between"] {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
}

@media (max-width: 480px) {
  section,
  header > div {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  /* Wide letter-spacing on small type overflows narrow screens. */
  [style*="letter-spacing: 0.28em"],
  [style*="letter-spacing: 0.24em"] {
    letter-spacing: 0.16em !important;
  }
}
