/* ─────────────────────────────────────────────────────────────────────
   FlowSync — alternate home layout ("product shots" edition)
   Screenshot-led variant of the landing page. Everything is scoped to
   .home-alt so it can sit alongside landing.css without collisions.
   Design tokens (--accent, --surface, …) come from landing.css.
───────────────────────────────────────────────────────────────────── */

/* The front page borrows .ha-row / .ha-frame without the .home-alt
   wrapper, so the token is declared on both. */
.home-alt,
.ha-frame {
  --frame-radius: 14px;
}

/* App-window frame ─────────────────────────────────────────────── */
/* Wraps every screenshot so the raw PNG reads as a product surface
   rather than an image dropped on the page. */
.ha-frame {
  position: relative;
  border-radius: var(--frame-radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow:
    0 1px 0 oklch(0% 0 0 / 0.04),
    0 18px 50px oklch(0% 0 0 / 0.10),
    0 4px 12px oklch(0% 0 0 / 0.05);
  overflow: hidden;
}
.ha-frame-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--rule);
}
.ha-dots { display: flex; gap: 6px; }
.ha-dots i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--border-strong);
  display: block;
}
.ha-frame-url {
  flex: 1;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted-2);
  letter-spacing: 0.1px;
  /* Keep the fake chrome from crowding the dots on narrow screens. */
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.ha-frame img { width: 100%; height: auto; display: block; }

/* Hero ─────────────────────────────────────────────────────────── */
.ha-hero {
  position: relative;
  padding: 72px 0 0;
  overflow: hidden;
}
/* Soft accent bloom behind the hero shot. */
.ha-hero::before {
  content: "";
  position: absolute;
  top: -180px; left: 50%;
  width: 1100px; height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    color-mix(in oklch, var(--accent) 22%, transparent) 0%,
    transparent 68%
  );
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}
.ha-hero .container { position: relative; z-index: 1; }

.ha-hero-copy {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.ha-hero h1 {
  font-size: clamp(38px, 5.2vw, 62px);
  line-height: 1.04;
  letter-spacing: -1.8px;
  font-weight: 700;
  margin: 18px 0 0;
}
.ha-hero-sub {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 18px auto 0;
  max-width: 620px;
}
.ha-hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}
.ha-hero-meta {
  display: flex;
  gap: 22px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--muted);
}
.ha-hero-meta .item { display: inline-flex; align-items: center; gap: 6px; }
.ha-hero-meta svg { color: var(--success); flex-shrink: 0; }

/* The hero screenshot sits below the copy and bleeds under the fold. */
.ha-hero-shot {
  margin: 54px auto 0;
  max-width: 1120px;
  /* Slight perspective tilt — subtle enough to stay legible. */
  transform: perspective(2000px) rotateX(2.2deg);
  transform-origin: top center;
}
.ha-hero-shot .ha-frame { box-shadow: 0 1px 0 oklch(0% 0 0 / 0.04), 0 40px 90px oklch(0% 0 0 / 0.16); }
/* Fade the very bottom so the shot dissolves into the next section. */
.ha-hero-fade {
  position: relative;
  height: 90px;
  margin-top: -90px;
  background: linear-gradient(to bottom, transparent, var(--bg) 78%);
  z-index: 2;
  pointer-events: none;
}

/* Section scaffolding ──────────────────────────────────────────── */
.ha-section { padding: 86px 0; }
.ha-section.alt { background: var(--bg-2); border-block: 1px solid var(--rule); }

.ha-head { max-width: 660px; margin: 0 0 44px; }
.ha-head.center { margin-inline: auto; text-align: center; }
.ha-head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.12;
  letter-spacing: -1.1px;
  font-weight: 700;
  margin: 16px 0 0;
}
.ha-head p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 14px 0 0;
}
/* Match the shipped landing page's accent + highlight on emphasised words. */
.ha-hero h1 em,
.ha-head h2 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
}
.ha-head h2 em::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 8px;
  background: color-mix(in oklch, var(--accent) 18%, transparent);
  z-index: -1;
  border-radius: 4px;
}

/* Builder showcase ─────────────────────────────────────────────── */
/* No floating callouts here on purpose: the plugin UI already numbers
   its own three cards (1 WHEN / 2 IF / 3 DO), so overlaying more
   badges just doubles up and fights the sticky nav. The legend below
   the shot carries the explanation instead. */
.ha-builder-wrap { position: relative; }

/* Offset the anchor target so #builder doesn't land under the nav. */
#builder { scroll-margin-top: 90px; }

.ha-builder-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 46px;
}
.ha-legend-item {
  padding-top: 18px;
  border-top: 2px solid var(--accent);
}
.ha-legend-item h3 {
  font-size: 16px;
  font-weight: 650;
  margin: 0 0 6px;
  letter-spacing: -0.2px;
}
.ha-legend-item p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-2);
  margin: 0;
}
.ha-legend-item .step {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.7px;
  color: var(--accent-ink);
  display: block;
  margin-bottom: 8px;
}

/* A shot that is already its own surface (a modal, say) — no browser
   chrome, just lift it off the page. */
.ha-shot-plain { display: flex; justify-content: center; }
.ha-shot-plain img {
  width: 100%;
  /* It's a portrait dialog — left unbounded it towers over its own copy. */
  max-width: 460px;
  height: auto;
  border-radius: 12px;
  box-shadow:
    0 1px 0 oklch(0% 0 0 / 0.04),
    0 18px 50px oklch(0% 0 0 / 0.12);
}

/* Alternating feature rows ─────────────────────────────────────── */
.ha-row {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: center;
}
.ha-row + .ha-row { margin-top: 96px; }
/* Embedded in a landing directory section: it sits under an existing
   .section-head, so its own h3 is the first thing in the column and
   needs clearance before the category tabs below. */
.ha-row.dir-row { margin: 0 0 44px; }
.ha-row.dir-row .ha-row-copy h3 { margin-top: 0; }
/* Flip every other row so the eye zig-zags down the page. */
.ha-row.flip .ha-row-copy { order: 2; }
.ha-row.flip .ha-row-shot { order: 1; }

.ha-row-copy h3 {
  font-size: clamp(24px, 2.6vw, 31px);
  line-height: 1.15;
  letter-spacing: -0.8px;
  font-weight: 700;
  margin: 15px 0 0;
}
.ha-row-copy > p {
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--text-2);
  margin: 14px 0 0;
}
.ha-points {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 11px;
}
.ha-points li {
  display: flex;
  gap: 10px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-2);
}
.ha-points svg { color: var(--success); flex-shrink: 0; margin-top: 3px; }
.ha-points b { color: var(--text); font-weight: 600; }

.ha-row-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--accent-ink);
}
.ha-row-link:hover { text-decoration: underline; }

/* Responsive ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .ha-section { padding: 62px 0; }
  .ha-row {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .ha-row + .ha-row { margin-top: 64px; }
  /* Keep image-below-copy order on mobile regardless of flip. */
  .ha-row.flip .ha-row-copy { order: 1; }
  .ha-row.flip .ha-row-shot { order: 2; }
  .ha-builder-legend { grid-template-columns: 1fr; gap: 26px; }
  .ha-hero-shot { transform: none; margin-top: 40px; }
  .ha-hero { padding-top: 48px; }
}
@media (max-width: 560px) {
  .ha-frame-url { display: none; }
  .ha-hero-meta { gap: 14px; font-size: 12.5px; }
}

/* Dark-scheme courtesy: the marketing site is light-only today, but
   respect the OS preference for the frame chrome if it ever flips. */
@media (prefers-color-scheme: dark) {
  .ha-frame { border-color: var(--border); }
}
