/* Mobile overrides — MUST load last (950px and 640px breakpoints) */

/* Homepage photo hero — wins over v2.css .hero background reset */
.hero.hero--photo-bg {
  background: var(--navy-deep);
}

.hero.hero--photo-bg .wrap {
  width: min(1180px, calc(100% - 40px));
  max-width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  grid-template-columns: minmax(0, .92fr);
  justify-items: start;
}

/* Light-surface buttons: avoid pale btn.light on cream/paper cards */
.cream-section .btn.light,
.card-body .btn.light,
.product-card .btn.light,
.story-panel .btn.light,
.social-card .btn.light,
.route-card .btn.light {
  background: var(--navy);
  color: var(--cream-light);
  border-color: var(--navy);
  box-shadow: 0 12px 24px rgba(23, 57, 73, .18);
}

.cream-section .btn.light:hover,
.card-body .btn.light:hover,
.product-card .btn.light:hover,
.story-panel .btn.light:hover,
.social-card .btn.light:hover,
.route-card .btn.light:hover {
  background: var(--navy-deep);
  transform: translateY(-2px);
}

.card-body .button,
.card-body .add_to_cart_button,
.product-card .button,
.product-card .add_to_cart_button {
  background: var(--navy);
  color: var(--cream-light);
  border-color: var(--navy);
  box-shadow: 0 12px 24px rgba(23, 57, 73, .18);
}

/* Founder tier cards on navy sections */
.founders .membership-card:not(.featured),
.bundle-section .membership-card:not(.featured) {
  background: rgba(14, 43, 56, .42);
  color: var(--cream-light);
  border-color: rgba(240, 228, 208, .24);
}

.founders .membership-card:not(.featured) h3,
.bundle-section .membership-card:not(.featured) h3,
.founders .membership-card:not(.featured) p,
.bundle-section .membership-card:not(.featured) p,
.founders .membership-card:not(.featured) .benefits li,
.bundle-section .membership-card:not(.featured) .benefits li {
  color: var(--cream-light);
}

.founders .membership-card:not(.featured) .member-limit,
.bundle-section .membership-card:not(.featured) .member-limit {
  color: var(--tan);
}

.founders .membership-card:not(.featured) .member-price,
.bundle-section .membership-card:not(.featured) .member-price {
  color: var(--tan);
}

.founders .membership-card.featured,
.bundle-section .membership-card.featured {
  background: var(--cream);
  color: var(--navy);
}

.founders .membership-card.featured h3,
.bundle-section .membership-card.featured h3 {
  color: var(--navy);
}

/* Brand story split — two-column layout inside standard .wrap boundary */
section.burlap > .wrap.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 36px;
  align-items: stretch;
  width: min(1180px, calc(100% - 40px));
  max-width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  box-sizing: border-box;
}

section.burlap > .wrap.split > * {
  min-width: 0;
  max-width: 100%;
}

/* Logbook hub vs dock feed — distinct section backgrounds */
.section--logbook-hub {
  background: var(--cream-light);
}

.section--dock-feed {
  border-top: 1px solid rgba(23, 57, 73, .12);
  box-shadow: inset 0 12px 24px rgba(23, 57, 73, .04);
}

.section--dock-feed .social-feed-split,
.section--dock-feed .social-feed-stack {
  margin-top: 4px;
}

/* Header nav — wins over legacy v2 bundle rules */
.site-header .nav {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 20px;
}

.site-header .primary-nav a,
.site-header .primary-menu a {
  font-size: 12px;
  letter-spacing: .07em;
  line-height: 1.1;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .site-header .primary-nav ul,
  .site-header .primary-menu {
    gap: 14px;
  }

  .site-header .primary-nav a,
  .site-header .primary-menu a {
    font-size: 11px;
    letter-spacing: .06em;
  }
}

@media (max-width: 950px) {
  .primary-nav { display: none; }
  .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; }
  .nav-cta-desktop { display: none !important; }

  .hero .wrap,
  .split,
  .membership-grid,
  .newsletter-box,
  .bundle-grid,
  .featured-grid,
  .submit-grid,
  .sg-logbook-archive .hero-inner,
  .final-cta,
  .story-grid,
  section.burlap > .wrap.split,
  .progress-grid {
    grid-template-columns: 1fr;
  }

  .product-grid,
  .post-grid,
  .social-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero { padding-top: 54px; }

  .hero--photo-bg {
    min-height: 480px;
    padding: 72px 0;
  }

  .hero--photo-bg::before {
    background:
      linear-gradient(180deg, rgba(14,43,56,.9) 0%, rgba(14,43,56,.78) 55%, rgba(14,43,56,.86) 100%),
      linear-gradient(90deg, rgba(14,43,56,.88) 0%, rgba(14,43,56,.5) 100%);
  }

  .hero__backdrop {
    background-position: center center;
  }
  .photo-scene,
  .ocean-photo { height: 480px; min-height: 480px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .bundle-card.featured { transform: none; }
  .merch-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .wrap,
  .container,
  .narrow {
    width: min(100% - 28px, 1180px);
  }

  .topbar .wrap {
    justify-content: center;
    text-align: center;
  }

  .brand { min-width: 0; }
  .brand-logo,
  .footer-logo,
  .brand--logo-only .brand-logo,
  .brand--logo-only .sg-logo--light { max-width: 64px; }

  h1 { font-size: clamp(52px, 16vw, 64px); }

  .section,
  section,
  .content-band { padding: 64px 0; }

  .section-head { display: block; }
  .section-head p { margin-top: 12px; }

  .product-grid,
  .story-grid,
  .merch-grid,
  .footer-grid,
  .post-grid,
  .social-grid {
    grid-template-columns: 1fr;
  }

  .photo-scene,
  .ocean-photo { height: 420px; min-height: 420px; }

  .b1 { left: 30px; top: 258px; }
  .b2 { left: 140px; top: 210px; }
  .b3 { left: 250px; top: 284px; }
  .b4 { display: none; }

  .signup { flex-direction: column; }
  .newsletter-copy { padding: 34px 24px; }

  .sg-logbook-archive .hero-inner {
    min-height: auto;
    padding: 48px 0 58px;
  }

  .sg-logbook-archive .hero-visual { min-height: 390px; }

  .copyright {
    flex-direction: column;
    text-align: center;
  }
}