/* CohortHive — static marketing site */
:root {
  --green-dark: #1B5E20;
  --green-mid: #2E7D32;
  --green-light: #E8F5E9;
  --text: #212121;
  --text-muted: #555;
  --bg: #f5f5f5;
  --white: #fff;
  --radius: 12px;
  --max: 720px;
  --max-wide: 900px;
  /* Header row — full width, no artificial narrowing */
  --header-inner-max: min(960px, 100%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  /* Fixed header — in-page anchors land below the bar */
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  padding-top: 78px;
  overflow-x: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--green-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  background: #C8E6C9;
  color: var(--green-dark);
  padding: 0.6rem 1.5rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.site-header__inner {
  max-width: var(--header-inner-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 0 1.5rem;
  /* Allow the nav to shrink on narrow phones so horizontal scroll can activate */
  min-width: 0;
}

.site-header__inner > .site-logo {
  flex: 0 0 auto;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--green-dark);
  text-decoration: none;
  white-space: nowrap;
}

.site-logo__img {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: block;
  vertical-align: middle;
  object-fit: contain;
}

.site-logo:hover {
  text-decoration: none;
  opacity: 0.95;
}

.site-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  /* Many links + logo: swipe/drag horizontally to reach Privacy, Terms, FAQ, Contact */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
  padding-bottom: 2px;
}

.site-nav a {
  color: var(--green-mid);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--green-dark);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--green-dark);
  font-weight: 700;
  border-bottom: 2px solid var(--green-dark);
  padding-bottom: 2px;
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 128px;
  }

  body {
    padding-top: 118px;
  }

  .site-header {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .site-header__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem 0;
  }

  .site-header__inner > .site-logo {
    align-self: flex-start;
  }

  .site-logo {
    font-size: 1.2rem;
  }

  .site-logo__img {
    width: 38px;
    height: 38px;
  }

  .site-nav {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
    min-width: 0;
    gap: 0.65rem;
  }

  .site-nav a {
    font-size: 0.88rem;
  }
}

/* Hero */
.hero {
  background: var(--green-light);
  color: var(--green-dark);
  padding: 3rem 1.25rem 4rem;
  text-align: center;
}

.hero__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
}

.hero p {
  margin: 0 auto 1.75rem;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.hero p.hero__lead {
  max-width: min(52rem, 95vw);
  margin-bottom: 1.5rem !important;
  line-height: 1.55;
}

/* Home hero story carousel — portrait assets; cap height so slides aren’t screen-tall */
.hero-carousel {
  position: relative;
  max-width: min(26rem, calc(100vw - 2rem));
  margin: 0 auto 2rem;
  padding: 0 2.75rem;
}

.hero-carousel__viewport {
  overflow: hidden;
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  background: var(--white);
}

.hero-carousel__track {
  display: flex;
  flex-wrap: nowrap;
  width: 400%;
  transition: transform 0.35s ease;
  will-change: transform;
}

.hero-carousel__slide {
  flex: 0 0 25%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.hero-carousel__slide img {
  display: block;
  max-width: 100%;
  /* 900×1200 sources: without a cap, width:100% makes the slide taller than the viewport */
  max-height: min(75vh, 682px);
  width: auto;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
}


.hero-carousel__zoom {
  cursor: zoom-in;
}

.hero-carousel__zoom:focus {
  outline: 2px solid var(--green-dark);
  outline-offset: 2px;
}

.hero-carousel__zoom:focus:not(:focus-visible) {
  outline: none;
}

/* Full-size slide viewer (click carousel image) */
.hero-lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-sizing: border-box;
}

.hero-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.88);
}

.hero-lightbox__title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-lightbox__shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
}

.hero-lightbox__scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-out;
}

.hero-lightbox__frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 3.5rem;
  box-sizing: border-box;
  pointer-events: none;
}

.hero-lightbox__img {
  display: block;
  max-width: min(900px, calc(100vw - 7rem));
  max-height: calc(100vh - 6rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.hero-lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
}

.hero-lightbox__close:hover {
  background: var(--white);
}

.hero-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: auto;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: var(--green-dark);
  color: var(--white);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.hero-lightbox__nav:hover {
  background: var(--green-mid);
}

.hero-lightbox__nav--prev {
  left: 0.5rem;
}

.hero-lightbox__nav--next {
  right: 0.5rem;
}

@media (max-width: 520px) {
  .hero-lightbox__frame {
    padding: 2.75rem 0.25rem 2rem;
  }

  .hero-lightbox__img {
    max-width: calc(100vw - 1rem);
  }

  .hero-lightbox__nav {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 1.25rem;
  }

  .hero-lightbox__nav--prev {
    left: 0.15rem;
  }

  .hero-lightbox__nav--next {
    right: 0.15rem;
  }
}

.hero-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: var(--green-dark);
  color: var(--white);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.hero-carousel__btn:hover {
  background: var(--green-mid);
}

.hero-carousel__btn--prev {
  left: 0;
}

.hero-carousel__btn--next {
  right: 0;
}

.hero-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.hero-carousel__dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #a5d6a7;
  cursor: pointer;
}

.hero-carousel__dot[aria-selected="true"] {
  background: var(--green-dark);
  transform: scale(1.15);
}

/* Home: story carousel + app overview graphic (tap to enlarge) */
.hero-media {
  /* Same max height for slide PNG and promo PNG so the pair lines up */
  --hero-pair-img-max-h: min(56vh, 480px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 1.25rem 1.75rem;
  max-width: min(58rem, 100%);
  margin: 0 auto 2rem;
  padding: 0 0.25rem;
}

.hero-media .hero-carousel__slide img {
  max-height: var(--hero-pair-img-max-h);
}

.hero-media .hero-carousel {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
  max-width: min(27.5rem, calc(100vw - 2rem));
}

.hero-promo {
  flex: 1 1 min(20rem, 100%);
  max-width: min(22rem, 100%);
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-promo__trigger {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  /* Match hero section — avoids harsh white “pillars” when PNG is narrower than the box */
  background: var(--green-light);
  cursor: zoom-in;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.hero-promo__trigger:focus {
  outline: 2px solid var(--green-dark);
  outline-offset: 3px;
}

.hero-promo__trigger:focus:not(:focus-visible) {
  outline: none;
}

.hero-promo__img {
  display: block;
  width: auto;
  max-width: min(17.5rem, 88vw);
  max-height: var(--hero-pair-img-max-h);
  height: auto;
  object-fit: contain;
  vertical-align: middle;
}

.hero-promo__hint {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.hero-lightbox__img--feature {
  max-width: min(1100px, calc(100vw - 3.5rem));
}

@media (max-width: 720px) {
  .hero-media {
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
  }

  .hero-promo {
    max-width: min(22rem, calc(100vw - 2rem));
  }
}

@media (max-width: 520px) {
  .hero-lightbox__img--feature {
    max-width: calc(100vw - 1rem);
  }
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--green-dark);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.btn--primary:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.btn--ghost {
  background: transparent;
  color: var(--green-dark);
  border: 2px solid var(--green-mid);
  margin-left: 0.5rem;
}

.btn--ghost:hover {
  background: rgba(27, 94, 32, 0.08);
}

@media (max-width: 520px) {
  .btn--ghost {
    margin-left: 0;
    margin-top: 0.75rem;
  }

  .hero .btn-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* Sections */
.section {
  padding: 2.5rem 1.25rem;
  max-width: var(--max-wide);
  margin: 0 auto;
}

.section--card {
  background: var(--white);
  margin: -2rem auto 2rem;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  max-width: calc(var(--max-wide) - 2rem);
}

.section h2 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  color: var(--green-dark);
}

.section p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.card-mini {
  background: var(--green-light);
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid rgba(27, 94, 32, 0.15);
}

.card-mini h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--green-dark);
}

.card-mini p {
  margin: 0;
  font-size: 0.9rem;
}

/* Legal pages */
.legal {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  background: var(--white);
  min-height: 60vh;
}

.legal h1 {
  font-size: 1.75rem;
  color: var(--green-dark);
  margin: 0 0 0.5rem;
}

.legal .meta {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 2rem;
}

.legal h2 {
  font-size: 1.15rem;
  margin: 2rem 0 0.75rem;
  color: var(--text);
}

.legal .membership-lead {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

/* Membership page — major sections */
.legal h2#free,
.legal h2#pro,
.legal h2#premium-listing,
.legal h2#badges {
  color: var(--green-dark);
  font-size: 1.25rem;
  scroll-margin-top: 88px;
}

.legal h2#free {
  margin-top: 1rem;
}

.legal h3 {
  font-size: 1.05rem;
  margin: 1.35rem 0 0.5rem;
  color: var(--green-dark);
}

.legal h4 {
  font-size: 1rem;
  margin: 1rem 0 0.35rem;
  color: var(--green-dark);
  font-weight: 700;
}

.membership-rule {
  border: none;
  border-top: 1px solid #dcedc8;
  margin: 1.25rem 0;
}

.legal ul.membership-list {
  margin-bottom: 1rem;
}

.legal ul.free-tier-list {
  list-style: none;
  padding-left: 0;
  margin: 0 0 1.25rem;
}

.legal ul.free-tier-list li {
  margin: 0.5rem 0;
  padding-left: 0;
}

.legal ol.membership-why-pro {
  padding-left: 1.35rem;
  margin: 0 0 1rem;
}

.legal ol.membership-why-pro li {
  margin-bottom: 0.45rem;
}

.membership-billing-note {
  font-size: 0.85rem;
  color: #666;
  margin: 1rem 0 1.5rem;
  line-height: 1.45;
}

.referral-terms {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
  font-size: 0.8rem;
  color: #888;
  line-height: 1.6;
  max-width: 48rem;
}

.legal p,
.legal li {
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.legal ul {
  padding-left: 1.25rem;
}

.legal ul.pro-perks {
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.legal ul.pro-perks li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0;
}

.legal ul.pro-perks li::before {
  content: "✓";
  color: var(--green-dark);
  font-weight: 800;
  flex-shrink: 0;
  line-height: 1.6;
}

.legal .notice {
  background: #fff8e1;
  border-left: 4px solid #ffc107;
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  color: #5d4037;
}

/* Footer */
.site-footer {
  background: #263238;
  color: #b0bec5;
  padding: 2rem 1.25rem;
  margin-top: auto;
  font-size: 0.9rem;
}

.site-footer__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.site-footer a {
  color: #cfd8dc;
}

.site-footer a:hover {
  color: var(--white);
}

/* Contact */
.contact-box {
  background: var(--green-light);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-top: 1rem;
}

.contact-box code {
  background: rgba(255, 255, 255, 0.8);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.95rem;
}
