/* ─────────────────────────────────────────────────────────────────────────────
   Homepage product lineup — index.php

   Four peer products in one repeated tile shape, then a connector that follows a
   single number across all of them. Uses only the ratified tokens and the
   canonical breakpoints (400 / 640 / 900).

   MOBILE: the tile artwork is ART-DIRECTED, not scaled. A 1000px-wide dashboard
   SVG shrunk to a 340px phone would render its 11px labels at under 4px. Each
   tile therefore ships two SVGs — a wide one and a redrawn narrow one showing
   fewer elements at a legible size — swapped at 640px. Never just let the wide
   one scale.
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Hero ─────────────────────────────────────────────────────────────────── */
/* Typographically identical to .hub-hero-title (public.css:2145), which the
   Plantbase and Blog hubs use — same four heading tokens, so all three page
   types share one control point. Only the width cap is local: it produces the
   two-line balanced break. .hero h1 is (0,1,1), hence the element in the
   selector so this wins. */
.hero h1.hero-title-lineup {
  font-size: var(--h-hero);
  font-weight: var(--fw-heading);
  letter-spacing: var(--track-hero);
  line-height: var(--lh-hero);
  text-wrap: balance;
  max-width: 16ch; margin-left: auto; margin-right: auto;
}
.hero-eyebrow-brand {
  margin: 0 0 18px; font-size: .78rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue);
}
/* .hero-inner already owns the hero's padding (120px/48px/96px from public.css).
   Adding more to .hero itself double-pads — 96px on both gutters and a 140px
   hole under the stats. One element owns it: zero the outer, tune the inner. */
.hero-plain { padding: 0; min-height: auto; }
.hero-plain .hero-inner {
  padding: clamp(3.5rem, 8vw, 5.5rem) clamp(24px, 7vw, 48px) clamp(2rem, 4vw, 2.75rem);
}
.hero-plain .hero-stats { margin-top: 0; }

.home-lineup {
  --tile-gap: 16px;
  --tile-radius: 18px;
  max-width: var(--page-width, 1100px);
  margin: 0 auto;
  /* Tighter above than below: the hero already ends with its own breathing room,
     so a full --section-y on top left too big a hole under the stats row. */
  padding: clamp(2.25rem, 4.5vw, 3.25rem) clamp(24px, 7vw, 48px) var(--section-y);
}

/* ── Tile grid ────────────────────────────────────────────────────────────── */
.hl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tile-gap); }
.hl-tile {
  --a: var(--accent-blue);
  grid-column: span 2;
  position: relative; overflow: hidden; text-align: center; min-width: 0;
  border: 1px solid var(--border); border-radius: var(--tile-radius);
  padding: clamp(2.4rem, 4.5vw, 3.4rem) clamp(20px, 3vw, 40px) 0;
  background:
    radial-gradient(90% 80% at 50% 0%, rgba(var(--a), .13), transparent 62%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
.hl-tile.is-half { grid-column: span 1; }
.hl-tile.a-amber  { --a: var(--accent-amber); }
.hl-tile.a-purple { --a: var(--accent-purple); }
.hl-tile.a-green  { --a: var(--accent-green); }
.hl-tile.a-blue   { --a: var(--accent-blue); }

.hl-name {
  margin: 0 0 12px; font-size: clamp(1.9rem, 4.2vw, 2.7rem); font-weight: 700;
  letter-spacing: -.032em; line-height: 1.05; color: var(--text);
}
.hl-tile.is-half .hl-name { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.hl-claim {
  margin: 0 auto 24px; max-width: 44ch; font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.5; color: var(--text2);
}
.hl-tile.is-half .hl-claim { font-size: .98rem; max-width: 34ch; }
.hl-actions {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin-bottom: clamp(1.8rem, 3.4vw, 2.6rem);
}
.hl-art svg { width: 100%; height: auto; display: block; }
.hl-art .art-narrow { display: none; }

/* ── Connector ────────────────────────────────────────────────────────────── */
.hl-tile.is-conn {
  text-align: left; padding-bottom: clamp(2rem, 3.6vw, 2.8rem);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.hl-conn-head { text-align: center; margin-bottom: clamp(1.8rem, 3.4vw, 2.6rem); }
.hl-conn-head h2 {
  margin: 0 0 10px; font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 700;
  letter-spacing: -.028em; color: var(--text);
}
.hl-conn-head p { margin: 0 auto; max-width: 50ch; color: var(--text2); font-size: 1.02rem; line-height: 1.6; }

/* ── "Follow one number" — a single reading travelling through the four stages.
   One continuous accent-gradient rail (one number) with four stops (all four);
   the Tools reading is the hero the copy is following. ── */
.onum { position: relative; max-width: 1000px; margin: 0 auto; padding-top: 2px; }
.onum-rail {
  position: absolute; top: 9px; left: 12.5%; right: 12.5%; height: 2px; border-radius: 2px;
  z-index: 1; opacity: .7;
  background: linear-gradient(90deg,
    rgb(var(--accent-green)), rgb(var(--accent-purple)), rgb(var(--accent-amber)), rgb(var(--accent-blue)));
}
.onum-steps {
  position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; list-style: none; margin: 0; padding: 0;
}
.onum-step { --sc: var(--accent-green); display: flex; flex-direction: column; align-items: center; text-align: center; }
.onum-step.s2 { --sc: var(--accent-purple); }
.onum-step.s3 { --sc: var(--accent-amber); }
.onum-step.s4 { --sc: var(--accent-blue); }
.onum-node {
  width: 16px; height: 16px; border-radius: 50%; background: rgb(var(--sc)); margin-bottom: 24px;
  box-shadow: 0 0 0 4px rgba(var(--sc), .14), 0 0 0 1px rgba(var(--sc), .55);
}
.onum-body { display: flex; flex-direction: column; align-items: center; }
.onum-label { font-size: .66rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgb(var(--sc)); margin-bottom: 9px; }
.onum-phrase { font-size: .95rem; font-weight: 650; color: var(--text); letter-spacing: -.01em; margin-bottom: 14px; }
.onum-val { font-size: 1.55rem; font-weight: 750; color: var(--text); letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.onum-val small { font-size: .46em; font-weight: 700; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.onum-cap { margin-top: 9px; font-size: .78rem; color: var(--muted); line-height: 1.4; max-width: 20ch; }
/* the reading being followed */
.onum-step.is-hero .onum-node { box-shadow: 0 0 0 5px rgba(var(--sc), .18), 0 0 16px 2px rgba(var(--sc), .55); }
.onum-step.is-hero .onum-val { font-size: 2.1rem; color: rgb(var(--sc)); }
.hl-conn-foot {
  margin: clamp(1.6rem, 3vw, 2.2rem) auto 0; max-width: 62ch; text-align: center;
  font-size: 1.05rem; line-height: 1.55; font-weight: 500; color: var(--text2);
}

/* ── Newsletter — centred, no box ─────────────────────────────────────────── */
.hl-news {
  max-width: var(--page-width, 1100px); margin: 0 auto;
  padding: var(--section-y) clamp(24px, 7vw, 48px);
  text-align: center;
}
.hl-news-label {
  margin: 0 0 12px; font-size: .75rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--blue);
}
.hl-news h2 {
  margin: 0 0 14px; font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 700;
  letter-spacing: -.028em; color: var(--text); text-wrap: balance;
}
.hl-news-sub { margin: 0 auto 22px; max-width: 52ch; color: var(--text2); line-height: 1.65; }
.hl-news-preview { width: 100%; max-width: 520px; margin: 4px auto 34px; pointer-events: none; }
.hl-news-preview img { width: 100%; height: auto; display: block; filter: drop-shadow(0 26px 42px rgba(0,0,0,.55)); }
.hl-news-form {
  /* nowrap is deliberate: the inputs use flex-grow, so with wrapping enabled they
     expand to exactly fill the row and always push the button onto a second line,
     whatever the max-width. nowrap makes all three share the row and shrink. */
  display: flex; flex-direction: row; gap: 10px; justify-content: center;
  flex-wrap: nowrap; margin: 0 auto; max-width: 680px;
}
.hl-news .nl-input {
  /* width:auto is required — public.css sets .nl-input{width:100%} for the old
     stacked form, which would otherwise force each field onto its own line. */
  flex: 1 1 190px; width: auto; min-width: 0; height: 46px; padding: 0 14px;
  background: var(--field-bg, var(--bg2)); color: var(--text);
  border: 1px solid var(--field-border, var(--border2)); border-radius: 8px;
  font-family: inherit; font-size: .95rem; outline: none; transition: border-color .15s;
}
.hl-news .nl-input:focus { border-color: var(--blue); box-shadow: var(--focus-ring); }
.hl-news .nl-btn { height: 46px; width: auto; flex: 0 0 auto; }
/* Signed-in-but-not-subscribed: one-click enable, centred like the form. */
.hl-news-enable { display: flex; flex-direction: column; align-items: center; gap: 0; }
.hl-news-enable .nl-btn { min-width: 240px; }
.hl-news .nl-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.hl-news .nl-msg { margin: 14px 0 0; font-size: .88rem; color: var(--text2); min-height: 1.2em; }
.hl-news .nl-legal { margin: 12px auto 0; max-width: 52ch; font-size: .76rem; line-height: 1.55; color: var(--faint); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  /* public.css left-aligns the whole hero at <=640 (the ratified mobile rule).
     The auto margins that centre the headline on desktop therefore indent it
     relative to the eyebrow, sub and stats — drop them so every left edge lines
     up, and let the headline use the full column width. */
  .hero h1.hero-title-lineup { max-width: none; margin-left: 0; margin-right: 0; }

  .home-lineup { --tile-gap: 12px; }
  .hl-grid { grid-template-columns: minmax(0, 1fr); }
  .hl-tile, .hl-tile.is-half { grid-column: span 1; }
  .hl-tile { padding: clamp(2rem, 7vw, 2.6rem) 18px 0; border-radius: 16px; }
  .hl-name, .hl-tile.is-half .hl-name { font-size: clamp(1.7rem, 7.5vw, 2.1rem); }
  .hl-claim, .hl-tile.is-half .hl-claim { font-size: 1rem; max-width: 34ch; }
  /* Full-width buttons: 44px+ touch targets that never sit half off-screen. */
  .hl-actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .hl-actions .btn-primary, .hl-actions .btn-secondary { width: 100%; justify-content: center; }
  /* Art direction: swap the wide composition for the redrawn narrow one. */
  .hl-art .art-wide { display: none; }
  .hl-art .art-narrow { display: block; }

  /* On mobile the stops stack and stay centred (matching the centred heading). */
  .onum { max-width: 440px; margin: 0 auto; padding-left: 0; }
  .onum-rail { display: none; }
  .onum-steps { grid-template-columns: 1fr; gap: 30px; }
  .onum-step { flex-direction: column; align-items: center; text-align: center; gap: 0; }
  .onum-node { margin-top: 0; margin-bottom: 12px; flex: 0 0 auto; }
  .onum-body { align-items: center; }
  .onum-phrase { margin-bottom: 10px; }
  .onum-cap { max-width: 30ch; margin-top: 8px; }
  .hl-news-form { flex-direction: column; }
  .hl-news .nl-input, .hl-news .nl-btn { width: 100%; flex: 1 1 auto; }
  /* Four hero stats wrap 3+1 on a phone, which reads as a mistake. Force a
     balanced, left-aligned 2x2 that matches the left-aligned mobile hero.
     Must be scoped .hero-split to out-specify `.hero-split .hero-stats` in
     public.css (which otherwise forces a 48px gap and shrinks the block). */
  .hero-split .hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 16px; width: 100%; justify-content: stretch; }
  .hero-split .hero-stat { text-align: left; }
}
@media (max-width: 400px) {
  .hl-tile { padding-left: 14px; padding-right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .hl-tile { transition: none; }
}

/* ── Home: "Just published" + "coming next" band ─────────────────────────── */
.hp-fresh { max-width: var(--page-width, 1100px); margin: 0 auto; padding: 0 clamp(24px,7vw,48px) clamp(32px,5vw,48px); }
.hp-fresh-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
.hp-fresh-title { font-size: clamp(22px,3vw,28px); font-weight: 700; letter-spacing: -.02em; margin: 0; }
.hp-fresh-all { color: rgb(var(--accent-blue)); font-weight: 600; font-size: .95rem; text-decoration: none; white-space: nowrap; }
.hp-fresh-all:hover { text-decoration: underline; }
/* Two feature cards — same visual language as the product lineup tiles above */
.hp-feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.hp-feat-card {
  --a: var(--accent-blue);
  position: relative; overflow: hidden; text-align: center; display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: 18px; text-decoration: none; color: inherit;
  padding: clamp(2rem,3.6vw,2.8rem) clamp(20px,3vw,36px) 0;
  background:
    radial-gradient(90% 78% at 50% 0%, rgba(var(--a),.13), transparent 62%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.hp-feat-card.is-plant { --a: var(--accent-green); }
.hp-feat-card.is-guide { --a: var(--accent-blue); }
.hp-feat-card:hover { border-color: rgb(var(--a)); transform: translateY(-4px); box-shadow: 0 24px 48px -28px rgba(0,0,0,.7); }
.hp-feat-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgb(var(--a)); margin-bottom: 12px; }
.hp-feat-title { margin: 0 0 12px; font-size: clamp(1.5rem,2.6vw,2rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.12; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hp-feat-sub { margin: 0 auto 22px; max-width: 40ch; font-size: 1rem; line-height: 1.5; color: var(--text2); }
.hp-feat-btn { display: inline-flex; align-items: center; gap: 6px; align-self: center; margin-bottom: clamp(1.8rem,3vw,2.4rem); padding: 11px 22px; border-radius: 24px; background: rgb(var(--a)); color: #0d1117; font-weight: 650; font-size: .95rem; /* token-ok */ }
.hp-feat-card:hover .hp-feat-btn { filter: brightness(1.08); }
.hp-feat-media { margin-top: auto; }
.hp-feat-media img { width: 100%; height: auto; display: block; border: 1px solid var(--border); border-bottom: none; border-radius: 14px 14px 0 0; }
.hp-fresh-next { margin: 22px 0 0; font-size: .95rem; color: var(--text2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hp-fresh-next .hp-next-tag { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgb(var(--accent-teal)); background: color-mix(in srgb, rgb(var(--accent-teal)) 14%, transparent); border-radius: 20px; padding: 3px 10px; }
.hp-fresh-next a { color: rgb(var(--accent-blue)); font-weight: 600; text-decoration: none; }
.hp-fresh-next a:hover { text-decoration: underline; }
@media (max-width: 640px) { .hp-feat-grid { grid-template-columns: 1fr; } }
