/* ========================================
   LANDL responsive common stylesheet
   ======================================== */

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

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

iframe {
  width: 100%;
}

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

body {
  overflow-wrap: break-word;
  word-break: normal;
}

a,
button {
  touch-action: manipulation;
}

table {
  width: 100%;
  border-collapse: collapse;
}

/* Generic containers */
[class*="container"],
[class*="__container"] {
  max-width: 100%;
}

/* Generic grids */
@media (max-width: 1024px) {
  [class*="__grid"] {
    gap: 20px;
  }
}

/* Tablet */
@media (max-width: 960px) {
  h1,
  .page-title,
  .entry-title {
    font-size: clamp(28px, 4.6vw, 40px);
    line-height: 1.25;
  }

  h2 {
    font-size: clamp(24px, 3.8vw, 32px);
    line-height: 1.35;
  }

  h3 {
    font-size: clamp(20px, 3vw, 26px);
    line-height: 1.4;
  }

  p,
  li,
  dt,
  dd {
    line-height: 1.85;
  }

  .results-hero__container,
  .front-hero__container,
  .highschool-hero__container,
  .juniorhighschool-hero__container,
  .contact-hero__container,
  .access-hero__container,
  .founder-hero__container {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .results-summary__grid,
  .results-cards,
  .results-instagram__grid,
  .blog-grid,
  .post-grid,
  .pricing-grid,
  .features-grid,
  .course-grid,
  .faq-grid,
  .contact-grid,
  .access-grid,
  .story-grid {
    grid-template-columns: 1fr !important;
  }

  .results-cta__inner,
  .front-cta__inner,
  .contact-cta__inner,
  .access-cta__inner,
  .founder-cta__inner {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
}

/* Mobile */
@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  h1,
  .page-title,
  .entry-title {
    font-size: 30px;
    line-height: 1.2;
  }

  h2 {
    font-size: 24px;
  }

  h3 {
    font-size: 20px;
  }

  .site-header,
  .site-footer {
    overflow-x: clip;
  }

  [class*="container"],
  [class*="__container"] {
    width: min(100% - 24px, 1180px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Buttons full width on mobile */
  .results-button,
  .front-button,
  .contact-button,
  .access-button,
  .founder-button,
  .site-footer__ctaButton,
  .site-footer__subButton,
  .site-header__ctaButton,
  .wp-block-button__link,
  .button,
  .btn {
    width: 100%;
    justify-content: center;
  }

  .results-hero__actions,
  .front-hero__actions,
  .contact-hero__actions,
  .access-hero__actions,
  .founder-hero__actions,
  .site-footer__ctaActions {
    width: 100%;
    flex-direction: column;
  }

  /* Card padding */
  .results-card,
  .results-summary__card,
  .results-instagram__card,
  .blog-card,
  .post-card,
  .faq-card,
  .access-card,
  .story-card,
  .pricing-card {
    padding: 20px !important;
    border-radius: 18px !important;
  }

  /* Tables to horizontal scroll */
  .table-wrap,
  .results-table-wrap,
  .pricing-table-wrap,
  .compare-table-wrap,
  .wp-block-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap table,
  .results-table-wrap table,
  .pricing-table-wrap table,
  .compare-table-wrap table,
  .wp-block-table table {
    min-width: 640px;
  }

  /* Blog single readability */
  .entry-content {
    font-size: 15px;
    line-height: 1.95;
  }

  .entry-content img {
    border-radius: 16px;
  }

  /* Embedded maps / forms */
  .landl-map-embed iframe,
  .wpcf7-form,
  .wp-block-embed iframe {
    width: 100%;
  }

  /* Reduce large section padding */
  section,
  .section,
  [class*="section"] {
    padding-top: min(56px, 10vw);
    padding-bottom: min(56px, 10vw);
  }
}

/* Small phones */
@media (max-width: 480px) {
  h1,
  .page-title,
  .entry-title {
    font-size: 26px;
  }

  h2 {
    font-size: 22px;
  }

  .site-header__title {
    font-size: 18px !important;
  }

  .site-footer__siteName {
    font-size: 22px !important;
  }

  .results-hero,
  .front-hero,
  .contact-hero,
  .access-hero,
  .founder-hero {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }
}
