/* ================================================================
   home.css — styles for the single-page marketing homepage.
   Extends styles.css (design tokens live there). Loaded only by
   the homepage; every other page keeps the shared stylesheet only.
   ================================================================ */

/* ---- Shared section rhythm ---- */
.home {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

.home section {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 40em;
  margin: 0 auto 36px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  letter-spacing: -0.01em;
  margin: 0 0 0.4em;
}

.section-head p {
  color: var(--ink-soft);
  font-size: 1rem;
  margin: 0;
}

/* ---- Hero (top of page; not forced full-height) ---- */
.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 56px 20px 60px;
  max-width: 40em;
  margin: 0 auto;
}

.home-hero .v-mark {
  width: 56px;
  height: 56px;
  font-size: 28px;
  border-radius: 14px;
}

.home-hero h1 {
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  margin: 4px 0 0;
  letter-spacing: -0.01em;
}

.home-hero h2 {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 500;
  margin: 0;
  max-width: 30em;
}

.home-hero p {
  margin: 0;
  max-width: 34em;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* ---- Primary / secondary CTA buttons ---- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn-primary {
  background: var(--azzurro);
  color: #fff;
}

.btn-primary:hover {
  background: var(--azzurro-dark);
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--azzurro-dark);
  outline-offset: 2px;
}

/* Mid-page CTA: same button, one size down so it sits inside a content box. */
.btn-compact {
  padding: 10px 20px;
  font-size: 0.95rem;
}

.beta-box-cta {
  margin: 24px 0 0;
}

.micro {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin: 2px 0 0;
}

.hero-cta {
  margin-top: 6px;
}

.hero-status {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 4px 0 0;
}

.hero-status strong {
  color: var(--ink);
}

/* ---- Capability blocks (text + phone screenshot) ---- */
.caps-list {
  display: grid;
  gap: 56px;
}

.cap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}

.cap-copy h3 {
  font-size: 1.2rem;
  margin: 0 0 0.4em;
}

.cap-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 34em;
}

/* Placeholder screenshot slot — a phone frame the founder drops an image into. */
.shot {
  width: 100%;
  max-width: 248px;
  margin: 0 auto;
  aspect-ratio: 9 / 19.5;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    repeating-linear-gradient(
      45deg,
      #f5f8fd,
      #f5f8fd 12px,
      #eef3fb 12px,
      #eef3fb 24px
    );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  gap: 6px;
  color: var(--ink-soft);
}

.shot .shot-label {
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--azzurro-dark);
}

.shot .shot-caption {
  font-size: 0.86rem;
  line-height: 1.4;
}

/* A slot with a real screenshot: image fills the phone frame, corners clipped. */
.shot.has-img {
  padding: 0;
  background: #fff;
  overflow: hidden;
}
.shot.has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}
/* A wider-than-phone shot (e.g. a cropped activity/map view): fit fully, no side crop. */
.shot.has-img.fit-contain img {
  object-fit: contain;
}

/* A shot cropped to a single band of a screen (the Apple Health connect row):
   the frame takes the crop's own aspect ratio instead of the full-phone one, so
   `cover` has nothing to cut off and the card is never letterboxed. */
.shot.shot-wide {
  aspect-ratio: 560 / 452;
  border-radius: 14px;
}

@media (min-width: 720px) {
  .cap {
    grid-template-columns: 1fr 260px;
    gap: 44px;
  }
  .cap:nth-child(even) {
    grid-template-columns: 260px 1fr;
  }
  .cap:nth-child(even) .cap-copy {
    order: 2;
  }

  /* A capability block with no screenshot (e.g. audio cues) keeps the full
     column width instead of reserving an empty phone slot, and never takes
     the even-row column swap. */
  .cap.cap-no-shot,
  .cap.cap-no-shot:nth-child(even) {
    grid-template-columns: 1fr;
  }
  .cap.cap-no-shot:nth-child(even) .cap-copy {
    order: 0;
  }
}

/* ---- How it works (3 steps) ---- */
.steps {
  display: grid;
  gap: 24px;
}

.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step .num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--azzurro);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.step h3 {
  font-size: 1.05rem;
  margin: 4px 0 0.3em;
}

.step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
  .step {
    flex-direction: column;
  }
}

/* ---- Ownership principle (standalone line under "How it works") ---- */
.ownership-line {
  max-width: 34em;
  margin: 36px auto 0;
  padding: 18px 22px;
  border-left: 3px solid var(--azzurro);
  background: #f5f8fd;
  border-radius: 0 12px 12px 0;
  text-align: left;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
}

/* ---- Who it's for ---- */
.audience {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin: 0 auto;
}

.audience .who {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
}

.audience .who h3 {
  font-size: 1.02rem;
  margin: 0 0 0.3em;
}

.audience .who p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

@media (min-width: 640px) {
  .audience {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---- Honest beta box ---- */
.beta-box {
  background: #f5f8fd;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 28px;
  max-width: 760px;
  margin: 0 auto;
}

.beta-box h2 {
  margin: 0 0 0.4em;
  font-size: 1.3rem;
}

.beta-box > p {
  color: var(--ink-soft);
  margin: 0 0 1.2em;
}

.beta-cols {
  display: grid;
  gap: 22px;
}

.beta-cols h3 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--azzurro-dark);
  margin: 0 0 0.6em;
}

.beta-cols ul {
  margin: 0;
  padding-left: 1.2em;
}

.beta-cols li {
  font-size: 0.94rem;
  margin-bottom: 0.4em;
}

@media (min-width: 640px) {
  .beta-cols {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

/* ---- FAQ ---- */
.faq {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 6px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 18px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--azzurro);
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "\2212"; /* minus */
}

.faq summary:focus-visible {
  outline: 2px solid var(--azzurro-dark);
  outline-offset: 2px;
  border-radius: 6px;
}

.faq details p {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

/* ---- Closing CTA ---- */
.closing {
  text-align: center;
}

.closing h2 {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  margin: 0 0 0.4em;
}

.closing p {
  color: var(--ink-soft);
  max-width: 34em;
  margin: 0 auto 24px;
}

/* ---- Footer (page-level, reused pattern) ---- */
.home-footer {
  border-top: 1px solid var(--line);
  padding: 28px 20px 40px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.home-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: center;
  margin-bottom: 10px;
}

.home-footer nav a {
  color: var(--ink);
}

.home-footer nav a.chd-link {
  color: var(--azzurro);
}
