/* Landing — the front door: hero band, the three group tiles, buyer guide.
   Split out of app.css when the shell sheet hit its ceiling (#324). */

/* ---------- hero (landing) ---------- */
/* The full-bleed sky band escapes the .page column with the
   50%-50vw trick, then re-centres its content with padding. html/body have
   overflow-x: clip, so the negative margins cannot pan the page sideways. */
.hero {
  position: relative;
  margin-top: -12px;
  margin-inline: calc(50% - 50vw);
  padding: clamp(28px, 5vw, 64px) max(20px, calc(50vw - 620px)) clamp(28px, 4vw, 52px);
  display: flex;
  align-items: flex-end;
  gap: 44px;
  background: var(--surface-sky);
  color: var(--text-primary);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: color-mix(in srgb, var(--surface-lilac) 22%, transparent);
}
.hero > * { position: relative; }
.hero-txt { flex: 1; min-width: 0; }

/* With a photograph the band becomes the picture (#367): the register's newest
   bird fills the viewport width and the headline sits on it. The washed band
   above is the fallback for an instance whose register still holds no photo. */
.hero.has-photo {
  min-height: clamp(380px, 46vw, 560px);
  padding-block: clamp(56px, 9vw, 120px) clamp(28px, 4vw, 52px);
  background: var(--surface-sky);
  color: var(--text-primary);
}
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 32%;
}
/* One pale, solid wash keeps the words readable without compiling a gradient
   shader as the hero first enters the viewport. It is ::after rather than
   ::before because the photo is a real element between the two. */
.hero.has-photo::before { display: none; }
.hero.has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: color-mix(in srgb, var(--surface-page) 78%, transparent);
}
/* A denser phone wash keeps text readable over the narrow crop. */
@media (max-width: 559px) {
  .hero.has-photo::after {
    background: color-mix(in srgb, var(--surface-page) 86%, transparent);
  }
}
.hero.has-photo .hero-txt { z-index: 1; max-width: 660px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  margin: 0;
  height: 34px; padding: 0 16px;
  border-radius: var(--radius-pill);
  background: var(--surface-frost);
  font-family: var(--font-ui);
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-muted);
}
.hero-badge-dot { width: 7px; height: 7px; border-radius: var(--radius-pill); background: var(--surface-meadow); }
.hero-title {
  margin: 26px 0 0;
  font-family: var(--font-marketing);
  font-weight: 400;
  font-size: clamp(44px, 5.4vw, 80px);
  line-height: .94;
  letter-spacing: -.048em;
  color: var(--text-primary);
  text-wrap: balance;
}
/* The one claim the page is allowed to make, and it is about the price, not
   about a bird or a breeder (ADR 0022). */
.hero-pledge {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 28px 0 0;
  padding: 10px 18px 10px 14px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--state-success-bg) 86%, transparent);
  color: var(--state-success);
  font-size: 14px; font-weight: 600;
}
/* The picture names itself, low in its own corner: it is one listing from the
   register, not a stock photograph of what the register might hold. */
.hero-caption {
  position: absolute; z-index: 1;
  inset-block-end: 28px; inset-inline-end: 28px;
  max-width: min(46ch, calc(100% - 40px));
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface-frost);
  border: 1px solid var(--border-frost);
  font-size: 12.5px; color: var(--text-muted);
}
.hero-sub { margin: 24px 0 0; color: var(--text-secondary); max-width: 46ch; font-size: 17.5px; line-height: 1.6; }
.hero-cta { display: flex; gap: 10px; margin-top: 36px; flex-wrap: wrap; }
.hero-cta .btn { min-height: 54px; padding: 14px 30px; font-size: 15px; }
.hero-cta .btn.primary { background: var(--action-primary); color: var(--action-ink); }
.hero-cta .btn.ghost { color: var(--text-primary); border-color: var(--border-strong); }
.hero-cta .btn.ghost:hover { background: var(--surface-card); }
/* Two counters, never three (ADR 0007). Since #367 they are a band running
   under the photograph rather than tiles floating inside the hero: the picture
   owns the top of the page, and the register's own measurement is the line
   drawn under it. */
.hero-stats {
  margin-inline: calc(50% - 50vw);
  padding: 0 max(20px, calc(50vw - 620px));
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--surface-page);
  gap: var(--space-3);
}
.hero-stats .stat-card {
  padding: 28px 30px; text-align: start;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-frost);
  background: color-mix(in srgb, var(--surface-sky) 62%, transparent);
}
.hero-stats .stat-card:nth-child(2) { background: color-mix(in srgb, var(--surface-lilac) 62%, transparent); }
.hero-stats .stat-card-value { font-size: 48px; }
@media (min-width: 900px) { .page.landing { padding-inline: 0; } .page.landing .hero.has-photo { min-height: min(80vh, 740px); } }

/* The phone's only way into the register: above 900px the header carries its
   own search box with suggestions and this one is hidden by .mobile-only. */
.home-search {
  display: flex; align-items: center; gap: var(--space-2);
  margin-top: var(--space-5);
  padding: 6px 6px 6px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface-frost);
  border: 1px solid var(--border-frost);
  box-shadow: var(--shadow-control);
}
.home-search input { flex: 1; min-width: 0; border: 0; background: none; box-shadow: none; font-size: 15px; }
.home-search input:focus { outline: none; }

/* ---------- landing sections ---------- */
.landing-section { display: flex; flex-direction: column; gap: var(--space-5); margin-top: var(--space-12); }
/* the three roots of the taxonomy, above the paid surfaces (#305) */
.group-tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 760px) { .group-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.group-tile {
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  display: block;
  padding: 10px;
  border-radius: var(--radius-card);
}
.group-tile:hover { border-color: var(--border-strong); }
.group-tile-photo {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 16 / 11;
  border-radius: var(--radius-media);
  background: var(--surface-lilac);
}
.group-tile-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
/* The count is a frosted pill in the corner, not a caption burnt into a dark
   gradient: the tile reads as glass over a photograph either way. */
.group-tile-count {
  position: absolute; z-index: 1;
  inset-block-start: 16px; inset-inline-start: 16px;
  display: inline-flex; align-items: center;
  height: 32px; padding: 0 15px;
  border-radius: var(--radius-pill);
  background: var(--surface-frost);
  border: 1px solid var(--border-frost);
  font-size: 12.5px; font-weight: 600;
  color: var(--text-primary);
}
.group-tile-body { display: block; padding: 20px 16px 16px; }
.group-tile-h { margin: 0; font-family: var(--font-product); font-weight: 700; font-size: 22px; letter-spacing: -.02em; }
.group-tile-sub { margin: 6px 0 0; color: var(--text-secondary); font-size: 14px; line-height: 1.5; }

.steps-section {
  display: flex; flex-direction: column; gap: var(--space-6);
  margin-top: var(--space-12);
  padding: clamp(28px, 4vw, 56px);
  border-radius: var(--radius-hero);
  background: var(--surface-warm);
}
.steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.step-card {
  background: var(--surface-card);
  padding: 24px;
  display: flex; flex-direction: column;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.step-card h3 { margin: 20px 0 0; font-weight: 700; font-size: 18px; letter-spacing: -.015em; }
.step-card p { margin: 8px 0 0; color: var(--text-secondary); font-size: 14.5px; line-height: 1.5; }
/* Four pastels, one per step, so the row reads as a sequence rather than four
   copies of the same card. */
.step-n {
  width: 44px; height: 44px;
  border-radius: var(--radius-pill);
  display: grid; place-items: center;
  font-family: var(--font-ui); font-weight: 700; font-size: 17px;
  background: var(--surface-sky);
}
.step-card:nth-child(2) .step-n { background: var(--surface-lilac); }
.step-card:nth-child(3) .step-n { background: var(--surface-butter); }
.step-card:nth-child(4) .step-n { background: var(--surface-meadow); }
/* Launch day, said in its own panel instead of a hole where two sections
   were (#372). */
.start-panel {
  margin-top: var(--space-12);
  padding: clamp(36px, 5vw, 64px);
  text-align: center;
  border-radius: var(--radius-hero);
  background: var(--surface-frost);
  border: 1px solid var(--border-frost);
}
.start-panel-h { margin: 0; font-family: var(--font-marketing); font-weight: 400; font-size: var(--type-h2); line-height: 1.08; letter-spacing: -.03em; }
.start-panel-body { margin: 14px auto 0; max-width: 52ch; color: var(--text-secondary); font-size: 16px; line-height: 1.6; }
.start-panel .btn { margin-top: 28px; }
.join-band {
  margin-top: var(--space-12);
  background: color-mix(in srgb, var(--surface-sky) 58%, var(--surface-lilac));
  color: var(--text-primary);
  padding: clamp(30px, 4vw, 52px) clamp(24px, 4vw, 56px);
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  flex-wrap: wrap;
  border-radius: var(--radius-hero);
}
.join-band-title { font-family: var(--font-marketing); font-weight: 400; font-size: var(--type-h2); line-height: 1.08; letter-spacing: -.03em; }
.join-band-sub { opacity: .85; margin-top: 5px; font-size: 14.5px; }
.join-band .btn { background: var(--action-primary); color: var(--action-ink); white-space: nowrap; font-weight: 700; }
.landing-cta { display: flex; flex-direction: column; gap: 10px; max-width: 480px; margin: 8px auto 0; width: 100%; }

/* Transparency is optional: when it is reduced, every translucent pill becomes
   the opaque card it is imitating. */
@media (prefers-reduced-transparency: reduce) {
  .hero-badge,
  .hero-caption,
  .home-search,
  .group-tile-count,
  .start-panel {
    background: var(--surface-card);
  }
  .hero-stats .stat-card { background: var(--surface-sky); }
  .hero-stats .stat-card:nth-child(2) { background: var(--surface-lilac); }
}
