﻿/* ==================================================================
   HERO: home, page, post
   Single source of truth. No competing rules, no !important.
   Spacing comes from three variables, type scales fluidly with clamp().
   ================================================================== */

/* ---------- SPACING VARIABLES ---------- */
:root {
  --hero-x: 20px;
  --hero-top: calc(88px + env(safe-area-inset-top));
  --hero-bottom: 40px;
}
@media (min-width: 768px) {
  :root { --hero-top: 140px; --hero-bottom: 56px; }
  .home-hero { --hero-bottom: 80px; }
}
@media (min-width: 1024px) {
  :root { --hero-x: 70px; --hero-bottom: 80px; }
}

/* ---------- SHARED HERO BOX ---------- */
.home-hero,
.page-hero,
.post-hero {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: 100%;
  margin-inline: auto;
  padding: var(--hero-top) var(--hero-x) var(--hero-bottom);
}
.home-hero { max-width: 100%; text-align: center; }
.page-hero,
.post-hero { max-width: 1200px; text-align: left; }

/* ---------- HEADLINES ---------- */
.home-hero h1,
.page-hero h1,
.post-hero h1 {
  font-weight: 300;
  line-height: 1.1;
  color: var(--text);
  text-wrap: balance;
}
.home-hero h1 {
  font-size: clamp(2rem, 1rem + 3.5vw, 3.5rem);
  letter-spacing: -.02em;
  max-width: 820px;
  width: 100%;
  margin: 0 auto 22px;
}
.page-hero h1,
.post-hero h1 {
  font-size: clamp(2.25rem, 1.4rem + 3.5vw, 3.75rem);
  letter-spacing: -.015em;
  margin: 0 0 22px;
}
.home-hero h1 span {
  display: block;
  margin-top: .5em;
  font-size: .5em;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--text-muted);
}

/* ---------- TAG, LEDE, PARAGRAPHS ---------- */
.home-hero .tag {
  display: inline-block;
  background: var(--fill-1);
  border: 1px solid var(--line);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: clamp(12px, 11px + .25vw, 14px);
  font-weight: 500;
  margin-bottom: 20px;
}
.home-hero p,
.page-hero .lede,
.post-hero .lede {
  font-size: clamp(1rem, .9rem + .5vw, 1.25rem);
  line-height: 1.55;
  text-wrap: pretty;
}
.home-hero p {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
}
.page-hero .lede {
  color: var(--text-2);
  max-width: 640px;
  margin: 0 0 clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
}
.post-hero .lede {
  color: var(--text-2);
  font-size: clamp(1.125rem, 1rem + .5vw, 1.25rem);
  margin: 0 0 36px;
}

/* ---------- HERO BUTTONS ---------- */
.hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin: 0;
}
.hero-actions .btn {
  min-width: 0;
  height: auto;
  min-height: 46px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}
@media (min-width: 640px) {
  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
  .hero-actions .btn {
    min-height: 48px;
    padding: 0 24px;
    font-size: 14.5px;
    white-space: nowrap;
  }
}

/* ---------- SECTION HEADINGS ---------- */
.sec-head,
.sh {
  box-sizing: border-box;
  max-width: 1280px;
  margin: 0 auto clamp(1.75rem, 1rem + 2vw, 3rem);
  padding-inline: var(--hero-x);
  text-align: center;
}
.sec-head h2,
.sh h2 {
  font-size: clamp(1.75rem, 1rem + 2.5vw, 3rem);
  font-weight: 300;
  letter-spacing: -.02em;
  line-height: 1.12;
  margin-bottom: 12px;
  margin-inline: auto;
  max-width: 780px;
  color: var(--text);
  text-wrap: balance;
}
.sec-head p,
.sh p {
  font-size: clamp(.9375rem, .85rem + .4vw, 1.125rem);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.55;
  text-wrap: pretty;
}

/* ---------- LOGOS STRIP ---------- */
.home-hero-logos,
.logos {
  box-sizing: border-box;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px var(--hero-x);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px 28px;
  border-top: 1px solid var(--line);
  font-size: clamp(11px, .65rem + .3vw, 13px);
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--text-muted);
  text-align: center;
}
@media (min-width: 1024px) {
  .home-hero-logos,
  .logos { padding-block: 32px 48px; gap: 40px 48px; }
}

/* ---------- ANCHOR OFFSET FOR THE FIXED NAV ---------- */
section[id] { scroll-margin-top: calc(76px + env(safe-area-inset-top)); }

/* ---------- MOBILE — smaller H1, balanced h2 ---------- */
@media (max-width: 640px) {
  .home-hero {
    padding-top: calc(88px + env(safe-area-inset-top));
    padding-bottom: 40px;
  }
  .home-hero h1 {
    font-size: 1.5rem;          /* was 1.75rem — smaller on mobile */
    line-height: 1.18;
    letter-spacing: -.02em;
    max-width: 300px;           /* slightly tighter column */
    margin: 0 auto 18px;
  }
  .home-hero h1 span {
    font-size: .7em;
    margin-top: .3em;
  }
  .sec-head,
  .sh {
    padding-inline: 16px;
    margin-bottom: 32px;
  }
  .sec-head h2,
  .sh h2 {
    font-size: clamp(1.5rem, 6vw, 1.875rem);
    max-width: 100%;
    letter-spacing: -.02em;
    line-height: 1.15;
  }
  .sec-head p,
  .sh p {
    font-size: 14px;
    max-width: 100%;
  }
}