/* Site-wide responsive corrections for phone, tablet and laptop */

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

body {
  font-size: clamp(0.98rem, 0.25vw + 0.92rem, 1.06rem);
  line-height: 1.58;
}

main,
section,
article,
header,
footer,
nav,
div,
figure,
form {
  min-width: 0;
}

p,
li,
blockquote,
h1,
h2,
h3,
h4,
a,
span {
  overflow-wrap: break-word;
}

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

video,
iframe {
  display: block;
  width: 100%;
}

.display {
  max-width: 100%;
  font-size: clamp(3rem, 6.2vw, 6.2rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.section-title {
  max-width: 100%;
  font-size: clamp(2.65rem, 4.8vw, 5rem);
  line-height: 0.94;
  text-wrap: balance;
}

.hero-lead,
.lead,
.section p,
.card p,
.profile p,
.split p,
.next-grid p,
.contact-grid p {
  max-width: 100%;
}

.intro-grid > *,
.split > *,
.profile > *,
.next-grid > *,
.contact-grid > *,
.card-grid > *,
.schedule-grid > *,
.section-head > *,
.footer-grid > * {
  min-width: 0;
}

.page-hero-content {
  width: 100%;
  max-width: min(790px, 100%);
}

.photo-frame,
.portrait-frame,
.image-card,
.card,
.schedule-card,
.review,
.stat {
  min-width: 0;
  max-width: 100%;
}

.photo-frame img,
.portrait-frame img,
.image-card img {
  max-width: 100%;
}

.quote {
  max-width: 100%;
  font-size: clamp(1.3rem, 2.3vw, 1.9rem);
  overflow-wrap: break-word;
}

.card h3,
.schedule-card h3,
.review blockquote {
  overflow-wrap: break-word;
}

/* Laptop and smaller desktop */
@media (max-width: 1200px) {
  :root {
    --max: 1080px;
  }

  .wrap {
    width: min(var(--max), calc(100% - 36px));
  }

  .display {
    font-size: clamp(3rem, 5.8vw, 5.4rem);
  }

  .section-title {
    font-size: clamp(2.6rem, 4.7vw, 4.6rem);
  }

  .intro-grid,
  .split,
  .profile,
  .next-grid,
  .contact-grid {
    gap: clamp(30px, 5vw, 64px);
  }

  .card {
    padding: 26px;
  }
}

/* Tablet */
@media (max-width: 900px) {
  .page-hero {
    min-height: 62svh;
  }

  .page-hero.compact {
    min-height: 46svh;
  }

  .page-hero-content {
    padding: 68px 0 50px;
  }

  .display {
    font-size: clamp(2.7rem, 7.5vw, 4.5rem);
  }

  .section-title {
    font-size: clamp(2.35rem, 6.5vw, 4rem);
  }

  .section {
    padding: clamp(56px, 8vw, 78px) 0;
  }

  .card-grid,
  .card-grid.three,
  .card-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-trio {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-trio > :last-child {
    grid-column: 1 / -1;
  }
}

/* Phones */
@media (max-width: 760px) {
  body {
    font-size: 1rem;
    line-height: 1.55;
  }

  .wrap {
    width: calc(100% - 32px);
  }

  .site-header,
  .nav-shell,
  .nav-links {
    max-width: 100vw;
  }

  .nav-shell {
    min-height: 64px;
    gap: 12px;
  }

  .wordmark {
    max-width: calc(100% - 92px);
    font-size: clamp(1.3rem, 6vw, 1.65rem);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .menu-toggle {
    flex: 0 0 auto;
    padding: 9px 12px;
  }

  .nav-links {
    top: 64px;
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    padding: 16px;
    gap: 4px;
  }

  .nav-links.open {
    display: grid;
    grid-template-columns: 1fr;
  }

  .nav-links a {
    width: 100%;
    padding: 13px 4px;
    border-bottom: 1px solid rgba(241, 231, 213, 0.15);
    font-size: 0.7rem;
  }

  .page-hero,
  .page-hero.compact {
    min-height: auto;
  }

  .page-hero {
    padding-top: 0;
  }

  .page-hero > img,
  .page-hero .hero-image {
    object-position: center center;
  }

  .page-hero-content {
    padding: 64px 0 44px;
  }

  .eyebrow,
  .entry-kicker {
    margin-bottom: 10px;
    font-size: 0.62rem;
    line-height: 1.45;
    letter-spacing: 0.16em;
  }

  .display {
    width: 100%;
    font-size: clamp(2.15rem, 10.4vw, 3.25rem);
    line-height: 0.98;
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  .section-title {
    width: 100%;
    font-size: clamp(2rem, 9.5vw, 2.9rem);
    line-height: 1;
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  .gothic {
    line-height: 0.98;
  }

  .hero-lead {
    margin: 20px 0 24px;
    font-size: 1.02rem;
    line-height: 1.55;
  }

  .lead {
    font-size: 1.05rem;
    line-height: 1.55;
  }

  .section {
    padding: 50px 0;
  }

  .intro-grid,
  .split,
  .split.even,
  .profile,
  .next-grid,
  .contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .section-head {
    display: grid;
    gap: 18px;
    margin-bottom: 28px;
  }

  .rule {
    margin: 18px 0;
  }

  .quote {
    margin: 24px 0;
    padding-left: 18px;
    font-size: clamp(1.25rem, 6vw, 1.65rem);
    line-height: 1.3;
  }

  .card-grid,
  .card-grid.three,
  .card-grid.two,
  .image-card-grid,
  .tile-gallery,
  .schedule-grid,
  .stats,
  .check-list,
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .card,
  .schedule-card,
  .review,
  .enquiry-panel {
    padding: 22px;
  }

  .card h3 {
    font-size: 1.4rem;
  }

  .photo-pair,
  .photo-trio {
    grid-template-columns: minmax(0, 1fr);
  }

  .photo-trio > :last-child {
    grid-column: auto;
  }

  .photo-pair .photo-frame,
  .photo-trio .photo-frame,
  .portrait-frame {
    width: 100%;
    aspect-ratio: 4 / 5;
  }

  .actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .actions .btn,
  .btn {
    width: 100%;
    min-width: 0;
    white-space: normal;
    text-align: center;
  }

  .ticker {
    white-space: normal;
    line-height: 1.45;
  }

  .reviews-track {
    grid-auto-columns: min(88%, 340px);
    max-width: 100%;
    padding-bottom: 8px;
  }

  .review blockquote {
    font-size: 1rem;
    line-height: 1.55;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .contact-links a {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .form-submit {
    align-items: stretch;
  }

  .form-submit .btn {
    width: 100%;
  }

  table {
    width: 100%;
    font-size: 0.86rem;
  }

  th,
  td {
    padding: 10px 7px;
    overflow-wrap: anywhere;
  }

  .table-wrap,
  .schedule-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .cta {
    padding: 58px 0;
  }

  .cta p:not(.eyebrow) {
    margin: 18px auto 24px;
  }
}

/* Narrow phones */
@media (max-width: 430px) {
  .wrap {
    width: calc(100% - 26px);
  }

  .display {
    font-size: clamp(2rem, 10vw, 2.75rem);
  }

  .section-title {
    font-size: clamp(1.9rem, 9vw, 2.55rem);
  }

  .page-hero-content {
    padding: 50px 0 38px;
  }

  .section {
    padding: 44px 0;
  }

  .card,
  .schedule-card,
  .review,
  .enquiry-panel {
    padding: 18px;
  }

  .quote {
    padding-left: 14px;
    font-size: 1.3rem;
  }

  .wordmark {
    font-size: 1.3rem;
  }

  .menu-toggle {
    font-size: 0.64rem;
  }
}
