/* Touch-first safeguards for compact phones and iOS browsers. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

button,
a {
  touch-action: manipulation;
}

.language-switch {
  align-items: center;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  display: inline-flex;
  font-size: .68rem;
  font-weight: 750;
  justify-content: center;
  letter-spacing: .1em;
  margin-left: .8rem;
  min-height: 2.25rem;
  min-width: 2.25rem;
  text-decoration: none;
}

.language-switch:hover,
.language-switch:focus-visible {
  border-color: var(--gold);
  color: var(--ink);
}

input,
textarea,
select {
  /* Prevents Safari from zooming when a form field receives focus. */
  font-size: 16px;
}

@media (max-width: 620px) {
  .section {
    padding-block: clamp(4.5rem, 16vw, 6rem);
  }

  .hero h1 {
    font-size: clamp(3.05rem, 15vw, 4.1rem);
  }

  .hero__grid {
    gap: 2.5rem;
  }

  .button-row .button {
    flex: 1 1 10rem;
  }

  .cover-stage {
    width: min(100%, 32rem);
  }

  .nav-links {
    max-height: calc(100dvh - 4.8rem);
    overflow-y: auto;
  }

  .trust-band > div {
    scroll-snap-type: x proximity;
  }

  .trust-band > div > span {
    scroll-snap-align: start;
  }

  .dialog {
    max-height: calc(100dvh - 1rem);
    width: calc(100% - 1rem);
  }

  .dialog__content {
    padding: 1.35rem;
  }

  .dialog__content blockquote {
    margin-inline: 0;
  }

  .checkout-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: .35rem;
  }
}

@media (max-width: 390px) {
  .container {
    width: min(100% - 1.5rem, 1180px);
  }

  .wordmark {
    font-size: 1rem;
  }

  .wordmark__glyph {
    font-size: 1.65rem;
    margin-right: .35rem;
  }

  .language-switch {
    margin-left: .4rem;
  }

  .button-row {
    gap: .65rem;
  }

  .button-row .button {
    flex-basis: 100%;
  }

  .chapter-card {
    padding: .95rem;
  }
}
