/*
 * Conversion-focused overrides for the revised landing page.
 * Load this file after dist/styles.css.
 *
 * Expected opt-in classes in the revised markup:
 *   - .offer-early on the offer section placed directly after .hero
 *   - .primary-metrics on the four-item .stats-grid
 *   - .compact-section on sections that should use tighter spacing
 *   - .mobile-purchase-bar on the mobile-only fixed purchase link
 */

/* Keep the sales page moving: the original vertical rhythm is too generous. */
.section {
  padding-block: clamp(4.25rem, 7vw, 6.5rem);
}

.section.compact-section {
  padding-block: clamp(3rem, 5vw, 4.5rem);
}

.section-heading h2,
.fit-copy h2,
.story-heading h2,
.quality-intro h2,
.faq-title h2,
.offer-copy h2 {
  text-wrap: balance;
}

.button-quiet {
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
}

.button-quiet:hover {
  background: rgba(255, 255, 255, 0.13);
}

button.button {
  cursor: pointer;
  font-family: inherit;
}

.purchase-note {
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.76rem;
  font-weight: 700;
}

.hero-copy h1 {
  font-size: clamp(3.1rem, 5.2vw, 5rem);
  text-wrap: balance;
}

/* The commercial offer should sit immediately after the hero in the DOM. */
.offer.offer-early {
  padding-block: clamp(2.75rem, 5vw, 4rem);
  scroll-margin-top: 5rem;
}

.offer-early .offer-card {
  padding: clamp(1.75rem, 4vw, 3.25rem);
  gap: clamp(2rem, 6vw, 5rem);
}

.offer-early .check-list {
  margin-top: 1.5rem;
}

.offer-early .price-box {
  padding: clamp(1.5rem, 3vw, 2rem);
}

.offer-early .button-navy {
  margin-top: 1.4rem;
  min-height: 3.6rem;
}

.price-box .ios-price-note {
  margin: 0.85rem 0 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(197, 154, 61, 0.34);
  border-radius: 0.75rem;
  color: #594313;
  background: var(--gold-pale);
  font-size: 0.74rem;
  line-height: 1.45;
  text-align: left;
}

.price-box .ios-price-note strong {
  display: block;
  color: var(--navy-800);
}

/* Four decision-making metrics only; secondary counts belong in methodology. */
.stats-grid.primary-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 2.75rem;
}

.primary-metrics .stat,
.primary-metrics .stat:nth-child(2n),
.primary-metrics .stat:nth-child(3n),
.primary-metrics .stat:nth-last-child(-n + 2),
.primary-metrics .stat:nth-last-child(-n + 3) {
  min-height: 9rem;
  padding: 1.4rem;
  gap: 1rem;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

.primary-metrics .stat:last-child {
  border-right: 0;
}

.primary-metrics .stat strong {
  font-size: clamp(2.15rem, 3.5vw, 3.25rem);
}

.primary-metrics .stat span {
  font-size: 0.75rem;
  letter-spacing: 0.045em;
}

.author-signature {
  margin: 2rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--navy-800) !important;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
}

.author-signature span {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 700;
}

.samples-cta {
  margin-top: 1.25rem;
  padding: 1.25rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border: 1px solid rgba(197, 154, 61, 0.26);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.62);
}

.samples-cta p {
  margin: 0;
  color: var(--navy-800);
  font-family: var(--serif);
  font-size: 1.15rem;
}

.button-inline {
  width: auto;
  flex: 0 0 auto;
}

.footer-grid-expanded {
  grid-template-columns: 0.85fr 1.25fr auto;
}

.footer-grid-expanded > span:last-child {
  grid-column: 1 / -1;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem 1rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--gold-light);
}

/* Standalone legal information page. */
.legal-body {
  background: var(--paper);
}

.legal-header {
  color: var(--white);
  background: var(--navy-950);
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.legal-header-inner {
  min-height: 5.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.legal-main {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(190px, 0.28fr) minmax(0, 1fr);
  gap: clamp(3rem, 8vw, 7rem);
}

.legal-nav {
  align-self: start;
  position: sticky;
  top: 2rem;
  display: grid;
  gap: 0.7rem;
}

.legal-nav p {
  margin-bottom: 0.35rem;
  color: var(--navy-800);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
}

.legal-nav a {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.legal-nav a:hover,
.legal-nav a:focus-visible,
.legal-content a {
  color: #80570a;
}

.legal-content {
  max-width: 780px;
}

.legal-content > h1 {
  margin-bottom: 1.25rem;
  color: var(--navy-800);
  font-size: clamp(2.75rem, 6vw, 5rem);
}

.legal-lead {
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.legal-alert {
  margin: 2rem 0 3rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid rgba(197, 154, 61, 0.42);
  border-radius: 1rem;
  color: #594313;
  background: var(--gold-pale);
}

.legal-alert strong {
  color: var(--navy-800);
}

.legal-alert p {
  margin: 0.35rem 0 0;
}

.legal-content section {
  padding: 2.25rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 2rem;
}

.legal-content section h2,
.legal-sources h2 {
  margin-bottom: 1rem;
  color: var(--navy-800);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
}

.legal-content section p {
  color: #4f6074;
}

.legal-placeholder {
  padding-left: 1rem;
  border-left: 3px solid var(--gold);
  font-weight: 700;
}

.legal-sources {
  margin-top: 1rem;
  padding: 1.5rem;
  border-radius: 1rem;
  background: var(--white);
}

.legal-sources ul {
  margin: 0;
  padding-left: 1.2rem;
}

.legal-disclosure {
  margin-top: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(197, 154, 61, 0.32);
  border-radius: 1rem;
  background: var(--white);
}

.legal-disclosure summary {
  padding: 1.15rem 3.75rem 1.15rem 1.25rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 800;
}

.legal-disclosure summary::after {
  right: 1rem;
}

.legal-disclosure .legal-sources {
  margin: 0;
  padding: 0 1.25rem 1.25rem;
  border-radius: 0;
  background: transparent;
}

/* A compact mobile purchase bar; use one concise price/value line. */
.mobile-purchase-bar {
  display: none;
}

@media (max-width: 920px) {
  .offer-early .offer-card {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
    align-items: stretch;
  }

  .offer-early .price-box {
    max-width: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .stats-grid.primary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-nav {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .legal-nav p {
    grid-column: 1 / -1;
  }

  .footer-grid-expanded {
    grid-template-columns: 1fr 1fr;
  }

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

  .footer-grid-expanded > span:last-child {
    grid-column: 1 / -1;
  }

  .primary-metrics .stat,
  .primary-metrics .stat:nth-child(2n),
  .primary-metrics .stat:nth-child(3n),
  .primary-metrics .stat:nth-last-child(-n + 2),
  .primary-metrics .stat:nth-last-child(-n + 3) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .primary-metrics .stat:nth-child(2n) {
    border-right: 0;
  }

  .primary-metrics .stat:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .section,
  .section.compact-section {
    padding-block: 3.5rem;
  }

  .offer.offer-early {
    padding-block: 2.25rem;
  }

  .offer-early .offer-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-copy h1 {
    font-size: clamp(2.45rem, 11vw, 3.5rem);
  }

  .stats-grid.primary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 2rem;
  }

  .primary-metrics .stat,
  .primary-metrics .stat:nth-child(2n),
  .primary-metrics .stat:nth-child(3n),
  .primary-metrics .stat:nth-last-child(-n + 2),
  .primary-metrics .stat:nth-last-child(-n + 3) {
    min-height: 7.25rem;
    padding: 1rem;
    gap: 0.7rem;
  }

  .primary-metrics .stat strong {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
  }

  .primary-metrics .stat span {
    font-size: 0.66rem;
    line-height: 1.35;
  }

  /* Preserve the useful 2 x 2 use-case grid instead of four tall rows. */
  .moments {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .moments div {
    min-height: 6.75rem;
    padding: 1rem;
  }

  .moments span {
    font-size: 1rem;
  }

  .area-grid {
    margin-top: 2.25rem;
  }

  .samples-cta {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
  }

  .button-inline {
    width: 100%;
  }

  .footer-links {
    justify-content: center;
  }

  .footer-grid-expanded {
    grid-template-columns: 1fr;
  }

  .footer-grid-expanded .footer-links {
    justify-content: center;
  }

  .footer-grid-expanded > span:last-child {
    grid-column: auto;
  }

  .legal-header-inner {
    min-height: 4.75rem;
  }

  .legal-header .brand span {
    display: none;
  }

  .legal-layout {
    gap: 2.5rem;
  }

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

  .mobile-purchase-bar {
    position: fixed;
    z-index: 100;
    right: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
    left: 0.75rem;
    min-height: 3.55rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 227, 154, 0.48);
    border-radius: 0.85rem;
    color: var(--navy-950);
    background: linear-gradient(135deg, #ffe39a, var(--gold));
    box-shadow: 0 14px 34px rgba(1, 15, 31, 0.32);
    font-size: 0.88rem;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
  }

  .mobile-purchase-bar > span {
    display: grid;
    text-align: left;
  }

  .mobile-purchase-bar small {
    opacity: 0.7;
    font-size: 0.66rem;
    font-weight: 700;
  }

  .mobile-purchase-bar b {
    white-space: nowrap;
  }

  .mobile-purchase-bar:focus-visible {
    outline: 3px solid rgba(46, 116, 181, 0.72);
    outline-offset: 3px;
  }

  body:has(.mobile-purchase-bar) {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom));
  }
}

@media (max-width: 390px) {
  .primary-metrics .stat {
    padding: 0.85rem;
  }

  .primary-metrics .stat strong {
    font-size: 1.7rem;
  }

  .moments span {
    font-size: 0.92rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-purchase-bar {
    transition: none;
  }
}
