/* Responsive refinements for Mission 90+ */

html {
  scroll-behavior: smooth;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

.container {
  width: min(100% - 40px, 1200px);
  margin-inline: auto;
}

/* Header */
.site-header > .container {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-header .brand {
  flex-shrink: 0;
}

.site-header .brand img {
  width: clamp(120px, 12vw, 175px);
  height: auto;
  object-fit: contain;
}

.main-nav {
  min-width: 0;
  margin-inline: auto;
}

.main-nav ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
}

.header-cta {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Hero */
.hero > .container {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: clamp(30px, 5vw, 80px);
}

.hero-copy,
.hero-visual {
  min-width: 0;
}

.hero-heading {
  font-size: clamp(3rem, 6vw, 6rem);
  line-height: 0.98;
}

.hero-heading .mission {
  display: block;
  font-size: clamp(2.2rem, 4.5vw, 4.6rem);
  line-height: 1.1;
}

.hero-bn,
.hero-sub,
.hero-subjects,
.hero-price-note {
  overflow-wrap: anywhere;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-visual-frame {
  width: min(100%, 440px);
  margin-inline: auto;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.22);
}

.hero-visual-frame img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Subject cards: show the full book cover without cropping */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.subject-card {
  min-width: 0;
  overflow: hidden;
}

.subject-card-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 330px;
  padding: 22px;
  overflow: hidden;
  background: #f1f5fa;
}

.subject-card-media img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 290px;
  object-fit: contain;
  filter: drop-shadow(0 12px 14px rgba(20, 35, 60, 0.15));
}

.subject-card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.subject-card-body .btn {
  align-self: flex-start;
  margin-top: auto;
}

/* Subject detail sections */
.subject-detail > .container {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(30px, 6vw, 85px);
}

.subject-detail-media {
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
  padding: 18px;
  border-radius: 22px;
  background: #f2f6fb;
}

.subject-detail-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 490px;
  object-fit: contain;
  border-radius: 9px;
  box-shadow: 0 16px 30px rgba(20, 35, 60, 0.14);
}

.subject-detail > .container > div:last-child {
  min-width: 0;
}

/* Other content grids */
.feature-grid,
.trust-grid,
.audience-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.feature-card,
.trust-card,
.audience-card {
  min-width: 0;
}

.equation,
.intro-flow,
.mock-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Guide previews */
.tabs-bar {
  display: flex;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
}

.tabs-bar .tab-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.preview-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 200px;
  overflow: hidden;
}

.preview-thumb img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
}

.placeholder-label {
  max-width: 100%;
  padding: 12px;
  overflow-wrap: anywhere;
  font-size: 12px;
  text-align: center;
}

/* Prevent long text and buttons from pushing the viewport wider */
.section-head,
.pricing-card,
.footer-top,
.footer-cols,
.subject-detail-list,
.mock-features {
  min-width: 0;
}

.btn {
  max-width: 100%;
  text-align: center;
}

/* Tablet */
@media (max-width: 1023px) {
  .main-nav,
  .header-cta {
    display: none;
  }

  .hamburger {
    display: flex;
    margin-left: auto;
  }

  .hero > .container {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.75fr);
    gap: 30px;
  }

  .subject-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid,
  .trust-grid,
  .audience-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile */
@media (max-width: 767px) {
  .container {
    width: min(100% - 32px, 560px);
  }

  .hero > .container,
  .subject-detail > .container {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-heading {
    font-size: clamp(2.8rem, 12vw, 4.7rem);
  }

  .hero-heading .mission {
    font-size: clamp(2rem, 9vw, 3.5rem);
  }

  .hero-ctas,
  .hero-price-row,
  .hero-trust {
    justify-content: center;
  }

  .hero-visual {
    width: 100%;
    max-width: 350px;
    margin-inline: auto;
  }

  .hero-visual-frame {
    width: min(78%, 280px);
  }

  .subject-grid {
    grid-template-columns: 1fr;
  }

  .subject-card-media {
    min-height: 300px;
  }

  .subject-card-media img {
    height: 260px;
  }

  .subject-detail-media {
    max-width: 280px;
  }

  .subject-detail-media img {
    max-height: 370px;
  }

  .preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid,
  .trust-grid,
  .audience-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .footer-top,
  .footer-cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .mobile-sticky-cta {
    z-index: 50;
  }

  body {
    padding-bottom: 72px;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 28px, 420px);
  }

  .hero-ctas .btn {
    width: 100%;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .trust-grid,
  .audience-grid {
    grid-template-columns: 1fr;
  }

  .subject-card-media {
    min-height: 270px;
  }

  .subject-card-media img {
    height: 235px;
  }
}