/* Bonsai landing page layout. Reuses brand tokens, fonts, and button
 * styles from app.css — no duplication. Sets only the landing-specific
 * layout: nav, hero, feature grid, step list, FAQ, footer. */

/* JS handles nav-anchor smooth scroll with a uniform 800ms duration so
 * long jumps through the 320vh categories track don't drift slowly. */

.landing-page {
  background: var(--bg);
  color: var(--ink);
}

/* Anchor targets sit under the sticky nav — push them down so the
 * heading isn't hidden after a smooth-scroll. */
#features,
#categories,
#faq {
  scroll-margin-top: 72px;
}

/* The SPA's `.brand` rule pads its bottom (sidebar context). Reset that
 * for landing where the wordmark sits in nav rows / hero / footer. */
.landing-brand {
  padding: 0;
  text-decoration: none;
  color: inherit;
}

/* ─── Nav ─────────────────────────────────────────────────── */

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 250, 247, 0.88);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.landing-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}
.landing-nav-links {
  display: flex;
  justify-content: center;
  gap: 28px;
}
.landing-nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
}
.landing-nav-links a:hover { color: var(--ink); }
.landing-nav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}
.landing-signin {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
}
.landing-signin:hover { color: var(--ink); }

/* The dark pill anchor needs the same look as `.btn.btn-primary.btn-lg`,
 * which is a button rule. Anchors don't get button height/centering by
 * default, but `.btn` is `display: inline-flex` so the anchor inherits
 * that visually — no extra rules needed. */
a.btn { text-decoration: none; }

/* ─── Hero ────────────────────────────────────────────────── */

.landing-hero {
  padding: 96px 20px 88px;
  border-bottom: 1px solid var(--line);
}
.landing-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
}
.landing-hero-text { text-align: left; }

.landing-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 22px;
  padding: 6px 10px 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
}
.landing-hero-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(139, 94, 20, 0.18);
}

.landing-headline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 6.4vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.026em;
  color: var(--ink);
  margin: 0 0 22px;
}
.landing-headline-line {
  display: table;
  white-space: nowrap;
}
.landing-headline-line--mark {
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-decoration-thickness: 0.045em;
  text-underline-offset: 0.07em;
  text-decoration-skip-ink: auto;
}
.landing-headline em {
  font-style: normal;
  font-family: var(--font-display);
  font-size: inherit;
  letter-spacing: -0.018em;
}
.landing-headline-sm {
  font-size: 48px;
  margin-bottom: 28px;
  line-height: 1.05;
}
.landing-sub {
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0 0 32px;
}
.landing-cta-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 14px 0 24px;
}
.landing-proof {
  font-size: 13.5px;
  color: var(--ink-mute);
  margin: 0;
}

/* ─── Hero art (bill mockup) ─────────────────────────────── */

.landing-hero-art {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.landing-hero-art svg {
  width: 100%;
  max-width: 560px;
  height: auto;
  filter: drop-shadow(0 18px 32px rgba(14, 14, 12, 0.06))
          drop-shadow(0 4px 8px rgba(14, 14, 12, 0.04));
  transform: rotate(-2.5deg);
  transform-origin: center;
}
.hero-stamp {
  transform-box: fill-box;
  transform-origin: center;
  transform: rotate(-11deg);
  transition: transform 0.55s cubic-bezier(0.34, 1.4, 0.6, 1);
  cursor: default;
}
.landing-hero-art:hover .hero-stamp {
  transform: rotate(-7deg) scale(1.06);
}
@media (prefers-reduced-motion: reduce) {
  .hero-stamp { transition: none; }
  .landing-hero-art:hover .hero-stamp { transform: rotate(-11deg); }
}

/* ─── Marquee ────────────────────────────────────────────── */

.landing-marquee {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 22px 0;
}
.landing-marquee-track {
  display: flex;
  gap: 28px;
  white-space: nowrap;
  width: max-content;
  animation: marquee 50s linear infinite;
  will-change: transform;
}
.landing-marquee-track span {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  color: var(--ink-soft);
  letter-spacing: -0.012em;
}
.landing-marquee-track span.dot {
  color: var(--amber);
  opacity: 0.6;
  font-style: italic;
}
/* Track holds 4 identical copies of the category list. Scrolling the
 * track left by 25% (one full copy) lands the next copy in the same
 * spot the previous one occupied — seamless loop, with copies 2-4
 * trailing right of viewport so there's no empty gap on wide screens. */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-25%); }
}
@media (prefers-reduced-motion: reduce) {
  .landing-marquee-track { animation: none; }
}

/* ─── Section scaffolding ────────────────────────────────── */

.landing-features,
.landing-how,
.landing-faq,
.landing-final-cta {
  padding: 88px 20px;
  border-bottom: 1px solid var(--line);
}
.landing-features-inner,
.landing-how-inner,
.landing-faq-inner,
.landing-final-cta-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.landing-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 14px;
}
.landing-section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0 0 48px;
  max-width: 720px;
}

/* ─── Features (asymmetric grid, animated) ────────────── */

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
}
.landing-feature {
  background: var(--surface-alt);
  border-radius: 16px;
  padding: 36px;
  position: relative;
  overflow: hidden;
  min-height: 320px;
}
.landing-feature:nth-child(1) { grid-column: 1 / 5; grid-row: 1; }
.landing-feature:nth-child(2) { grid-column: 5 / 8; grid-row: 1; }
.landing-feature:nth-child(3) { grid-column: 1 / 4; grid-row: 2; }
.landing-feature:nth-child(4) { grid-column: 4 / 8; grid-row: 2; }

.landing-feature--wide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}
.landing-feature--narrow {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.landing-feature-text { max-width: 360px; }
.landing-feature h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0 0 12px;
}
.landing-feature p {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}

.landing-feature-visual {
  position: relative;
  height: 100%;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === Card 1: Upload — bill slides into the dropzone on hover === */
.feature-vis-upload {
  flex-direction: column;
  gap: 0;
  position: relative;
}
.dropzone-frame {
  width: 88%;
  max-width: 240px;
  height: 180px;
  border: 1.5px dashed rgba(14, 14, 12, 0.22);
  border-radius: 10px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dropzone-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--ink-mute);
  text-transform: uppercase;
  font-weight: 600;
  transition: opacity 0.4s ease-out;
}
.landing-feature[data-anim="upload"]:hover .dropzone-label {
  opacity: 0;
}
.dropping-bill {
  position: absolute;
  top: 50%;
  left: 50%;
  margin-left: -56px;
  margin-top: -75px;
  width: 112px;
  height: 150px;
  background: var(--surface);
  border: 1px solid rgba(14, 14, 12, 0.1);
  border-radius: 6px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  box-shadow: 0 12px 28px rgba(14, 14, 12, 0.1);
  transform: translateY(-110px) rotate(-8deg) scale(0.9);
  opacity: 0;
  transition: transform 0.7s cubic-bezier(0.34, 1.3, 0.6, 1),
              opacity 0.5s ease-out;
}
.landing-feature[data-anim="upload"]:hover .dropping-bill {
  transform: translateY(0) rotate(-3deg) scale(1);
  opacity: 1;
}
.db-line {
  height: 3px;
  background: rgba(14, 14, 12, 0.18);
  border-radius: 2px;
}
.db-line.short { width: 60%; }

/* === Card 2: Scan — scanner bar sweeps down, tags pop in === */
.feature-vis-scan { align-items: stretch; }
.scan-bill {
  width: 100%;
  background: var(--surface);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 6px 20px rgba(14, 14, 12, 0.04);
  position: relative;
  overflow: hidden;
}
/* Scanner bar — invisible by default, sweeps down on hover */
.scan-bill::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 14px;
  background: linear-gradient(180deg,
    rgba(139, 94, 20, 0) 0%,
    rgba(139, 94, 20, 0.18) 50%,
    rgba(139, 94, 20, 0) 100%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}
.landing-feature[data-anim="scan"]:hover .scan-bill::before {
  animation: scan-sweep 2.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes scan-sweep {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(220px); opacity: 0; }
}
.scan-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 12.5px;
  color: var(--ink);
  padding: 8px 8px;
  border-radius: 6px;
  position: relative;
  z-index: 2;
}
.scan-row-strong {
  background: rgba(139, 94, 20, 0.1);
  color: var(--amber);
  font-weight: 600;
}
.scan-label { letter-spacing: -0.005em; }
.scan-tag {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-block;
}
.scan-tag-sm {
  font-size: 11px;
  color: var(--ink-mute);
}
.scan-tag-lg {
  font-size: 14px;
  color: var(--amber);
}
.scan-tag-none {
  font-size: 12px;
  color: var(--ink-mute);
  opacity: 0.5;
}
/* Tags pop in as scanner passes (staggered) */
.landing-feature[data-anim="scan"]:hover .scan-tag {
  animation: scan-tag-pop 2.6s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}
.landing-feature[data-anim="scan"]:hover .scan-row:nth-child(1) .scan-tag { animation-delay: 0.2s; }
.landing-feature[data-anim="scan"]:hover .scan-row:nth-child(2) .scan-tag { animation-delay: 0.6s; }
.landing-feature[data-anim="scan"]:hover .scan-row:nth-child(3) .scan-tag { animation-delay: 1.0s; }
.landing-feature[data-anim="scan"]:hover .scan-row:nth-child(4) .scan-tag { animation-delay: 1.4s; }
@keyframes scan-tag-pop {
  0%, 6% { transform: scale(1); }
  10% { transform: scale(1.4); }
  18%, 100% { transform: scale(1); }
}

/* === Card 3: Recover — connected timeline w/ traveling progress === */
.feature-vis-recover { align-items: stretch; }
.recover-stack {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  position: relative;
}
/* Vertical connector line behind the icons */
.recover-stack::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  background: rgba(14, 14, 12, 0.08);
  z-index: 0;
}
/* Traveling progress fill — green, grows on hover */
.recover-stack::after {
  content: "";
  position: absolute;
  left: 28px;
  top: 28px;
  width: 2px;
  height: 0;
  background: var(--green);
  z-index: 1;
  transition: height 1.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.landing-feature[data-anim="recover"]:hover .recover-stack::after {
  height: calc(100% - 56px);
}
.recover-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink);
  box-shadow: 0 3px 10px rgba(14, 14, 12, 0.03);
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease-out;
}
.recover-step-final {
  background: rgba(23, 114, 69, 0.08);
  border: 1px solid rgba(23, 114, 69, 0.18);
  transition: transform 0.4s ease-out, box-shadow 0.6s ease-out;
}
.landing-feature[data-anim="recover"]:hover .recover-step-final {
  box-shadow: 0 6px 18px rgba(23, 114, 69, 0.18);
}
.recover-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 13px;
  flex-shrink: 0;
  font-weight: 700;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.recover-icon-1 { background: rgba(14, 14, 12, 0.06); color: var(--ink); }
.recover-icon-2 { background: rgba(139, 94, 20, 0.15); color: var(--amber); }
.recover-icon-3 { background: var(--green); color: var(--bg); }
.landing-feature[data-anim="recover"]:hover .recover-icon-1 { animation: recover-pop 1.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both; }
.landing-feature[data-anim="recover"]:hover .recover-icon-2 { animation: recover-pop 1.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.7s both; }
.landing-feature[data-anim="recover"]:hover .recover-icon-3 { animation: recover-pop-final 1.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.3s both; }
@keyframes recover-pop {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.25); }
}
@keyframes recover-pop-final {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(23, 114, 69, 0); }
  40% { transform: scale(1.35); box-shadow: 0 0 0 8px rgba(23, 114, 69, 0.18); }
}
.recover-text-strong {
  color: var(--green);
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.012em;
}

/* === Card 4: Compare — stacked, wider cards === */
.feature-vis-compare {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  max-width: 320px;
}
.compare-card {
  width: 100%;
  background: var(--surface);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(14, 14, 12, 0.04);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.compare-card-better {
  background: var(--green);
  color: var(--bg);
  box-shadow: 0 8px 24px rgba(23, 114, 69, 0.25);
}
.compare-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.65;
}
.compare-card-better .compare-eyebrow { color: var(--bg); opacity: 0.85; }
.compare-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.compare-name {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
}
.compare-price {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.018em;
  white-space: nowrap;
}
.compare-unit {
  font-size: 13px;
  font-family: var(--font-ui);
  font-weight: 400;
  margin-left: 2px;
  opacity: 0.6;
}
.compare-arrow {
  align-self: center;
  font-size: 22px;
  color: var(--ink-mute);
  font-family: var(--font-ui);
  line-height: 1;
}
.compare-card-current {
  transition: opacity 0.4s, transform 0.4s;
}
.compare-card-better {
  transition: transform 0.4s, box-shadow 0.4s;
}
.landing-feature[data-anim="compare"]:hover .compare-card-current {
  opacity: 0.55;
  transform: scale(0.97);
}
.landing-feature[data-anim="compare"]:hover .compare-card-better {
  animation: compare-better 2.4s ease-in-out infinite;
  box-shadow: 0 14px 36px rgba(23, 114, 69, 0.35),
              0 0 0 4px rgba(23, 114, 69, 0.18);
}
@keyframes compare-better {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.04); }
}
.landing-feature[data-anim="compare"]:hover .compare-arrow {
  color: var(--green);
}
.compare-savings-pill {
  align-self: center;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(23, 114, 69, 0.1);
  color: var(--green);
  border: 1px solid rgba(23, 114, 69, 0.22);
  border-radius: 999px;
  margin-top: 4px;
}
.compare-savings-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--green);
  opacity: 0.7;
}
.compare-savings-amt {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.012em;
  color: var(--green);
}

@media (prefers-reduced-motion: reduce) {
  .landing-feature *,
  .landing-feature *::before,
  .landing-feature *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ─── How it works (sticky scroll, scroll-driven steps) ── */

.landing-how {
  background: var(--amber-tint);
  padding: 0;
  border-bottom: 1px solid var(--line);
}
.landing-how-track {
  position: relative;
  height: 320vh;
}
.landing-how-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0 20px;
}

.landing-how-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 80px;
  align-items: stretch;
}

/* Scroll markers — invisible, drive the active state */
.how-marker {
  position: absolute;
  left: 50%;
  width: 1px;
  height: 80vh;
  pointer-events: none;
}
.how-marker[data-step="1"] { top: 0; }
.how-marker[data-step="2"] { top: 80vh; }
.how-marker[data-step="3"] { top: 160vh; }
.how-marker[data-step="4"] { top: 240vh; }

/* Side: eyebrow + keyword stack + descriptions */
.landing-how-side .landing-eyebrow { margin-bottom: 12px; }
.landing-how-lead {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0 0 12px;
  max-width: 480px;
}
.landing-how-sublead {
  font-family: var(--font-ui);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 28px;
  max-width: 460px;
}
.landing-how-lead em {
  font-style: normal;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-decoration-thickness: 0.045em;
  text-underline-offset: 0.07em;
  text-decoration-skip-ink: auto;
}

.landing-how-keywords {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.how-keyword {
  --kw-fs: clamp(40px, 5.4vw, 72px);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--kw-fs);
  line-height: 1.05;
  letter-spacing: -0.024em;
  color: var(--ink-mute);
  opacity: 0.32;
  transition: opacity 0.5s, color 0.5s;
  display: flex;
  align-items: center;
  gap: 14px;
}
.how-arrow {
  font-size: 0.5em;
  line-height: 1;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.4s, transform 0.4s;
  color: var(--amber);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  height: 1em;
}
.how-word { font-style: normal; line-height: 1; }
/* Saved-amount pill that sits next to the active keyword */
.how-keyword-stat {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(23, 114, 69, 0.1);
  border: 1px solid rgba(23, 114, 69, 0.25);
  border-radius: 999px;
  padding: 6px 12px;
  line-height: 1;
  opacity: 0;
  transform: translateX(-8px) translateY(0) scale(0.9);
  transform-origin: left center;
  transition: opacity 0.4s, transform 0.4s;
  white-space: nowrap;
  align-self: center;
}
.landing-how-sticky[data-active-step="1"] .how-keyword[data-step="1"],
.landing-how-sticky[data-active-step="2"] .how-keyword[data-step="2"],
.landing-how-sticky[data-active-step="3"] .how-keyword[data-step="3"],
.landing-how-sticky[data-active-step="4"] .how-keyword[data-step="4"] {
  opacity: 1;
  color: var(--ink);
}
.landing-how-sticky[data-active-step="1"] .how-keyword[data-step="1"] .how-arrow,
.landing-how-sticky[data-active-step="2"] .how-keyword[data-step="2"] .how-arrow,
.landing-how-sticky[data-active-step="3"] .how-keyword[data-step="3"] .how-arrow,
.landing-how-sticky[data-active-step="4"] .how-keyword[data-step="4"] .how-arrow {
  opacity: 1;
  transform: translateX(0);
}
.landing-how-sticky[data-active-step="1"] .how-keyword[data-step="1"] .how-keyword-stat,
.landing-how-sticky[data-active-step="2"] .how-keyword[data-step="2"] .how-keyword-stat,
.landing-how-sticky[data-active-step="3"] .how-keyword[data-step="3"] .how-keyword-stat,
.landing-how-sticky[data-active-step="4"] .how-keyword[data-step="4"] .how-keyword-stat {
  opacity: 1;
  transform: translateX(0) translateY(0) scale(1);
  transition-delay: 0.15s;
}

.landing-how-descs {
  position: relative;
  min-height: 96px;
}
.how-desc {
  position: absolute;
  inset: 0;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 460px;
}
.landing-how-sticky[data-active-step="1"] .how-desc[data-step="1"],
.landing-how-sticky[data-active-step="2"] .how-desc[data-step="2"],
.landing-how-sticky[data-active-step="3"] .how-desc[data-step="3"],
.landing-how-sticky[data-active-step="4"] .how-desc[data-step="4"] {
  opacity: 1;
  transform: translateY(0);
}

/* Visual frame (right column) — fills full grid row height */
.landing-how-visuals {
  position: relative;
  height: 100%;
  min-height: 520px;
  background: transparent;
  transform: translateY(19px);
}
.how-visual {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  padding: 0;
}
.landing-how-sticky[data-active-step="1"] .how-visual[data-step="1"],
.landing-how-sticky[data-active-step="2"] .how-visual[data-step="2"],
.landing-how-sticky[data-active-step="3"] .how-visual[data-step="3"],
.landing-how-sticky[data-active-step="4"] .how-visual[data-step="4"] {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Category visual — image absolutely centered in the frame so its
   vertical midpoint matches the left column's vertical midpoint.
   Chips are pinned to the bottom of the frame and don't affect the
   image's centering. */
.cat-illust {
  position: absolute;
  inset: 0;
}
.cat-illust-art {
  position: absolute;
  bottom: 106px;
  left: 50%;
  width: 100%;
  max-width: 600px;
  height: 440px;
  display: block;
  border-radius: 18px;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 24px 56px rgba(14, 14, 12, 0.1),
              0 8px 20px rgba(14, 14, 12, 0.04);
  transform: translateX(-50%) scale(0.96);
  transition: transform 0.7s cubic-bezier(0.34, 1.3, 0.6, 1);
}
.landing-how-sticky[data-active-step="1"] .how-visual[data-step="1"] .cat-illust-art,
.landing-how-sticky[data-active-step="2"] .how-visual[data-step="2"] .cat-illust-art,
.landing-how-sticky[data-active-step="3"] .how-visual[data-step="3"] .cat-illust-art,
.landing-how-sticky[data-active-step="4"] .how-visual[data-step="4"] .cat-illust-art {
  transform: translateX(-50%) scale(1);
  transition-delay: 0.1s;
}

.cat-chips {
  position: absolute;
  bottom: 48px;
  left: 0;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.cat-chip {
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid rgba(14, 14, 12, 0.08);
  border-radius: 999px;
  padding: 7px 14px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.landing-how-sticky[data-active-step="1"] .how-visual[data-step="1"] .cat-chip,
.landing-how-sticky[data-active-step="2"] .how-visual[data-step="2"] .cat-chip,
.landing-how-sticky[data-active-step="3"] .how-visual[data-step="3"] .cat-chip,
.landing-how-sticky[data-active-step="4"] .how-visual[data-step="4"] .cat-chip {
  opacity: 1;
  transform: translateY(0);
}
.landing-how-sticky[data-active-step="1"] .how-visual[data-step="1"] .cat-chip:nth-child(1),
.landing-how-sticky[data-active-step="2"] .how-visual[data-step="2"] .cat-chip:nth-child(1),
.landing-how-sticky[data-active-step="3"] .how-visual[data-step="3"] .cat-chip:nth-child(1),
.landing-how-sticky[data-active-step="4"] .how-visual[data-step="4"] .cat-chip:nth-child(1) { transition-delay: 0.25s; }
.landing-how-sticky[data-active-step="1"] .how-visual[data-step="1"] .cat-chip:nth-child(2),
.landing-how-sticky[data-active-step="2"] .how-visual[data-step="2"] .cat-chip:nth-child(2),
.landing-how-sticky[data-active-step="3"] .how-visual[data-step="3"] .cat-chip:nth-child(2),
.landing-how-sticky[data-active-step="4"] .how-visual[data-step="4"] .cat-chip:nth-child(2) { transition-delay: 0.4s; }
.landing-how-sticky[data-active-step="1"] .how-visual[data-step="1"] .cat-chip:nth-child(3),
.landing-how-sticky[data-active-step="2"] .how-visual[data-step="2"] .cat-chip:nth-child(3),
.landing-how-sticky[data-active-step="3"] .how-visual[data-step="3"] .cat-chip:nth-child(3),
.landing-how-sticky[data-active-step="4"] .how-visual[data-step="4"] .cat-chip:nth-child(3) { transition-delay: 0.55s; }

/* Reduced motion: skip the stagger but still show end states */
@media (prefers-reduced-motion: reduce) {
  .landing-how *,
  .landing-how *::before,
  .landing-how *::after {
    animation: none !important;
    transition: none !important;
  }
  .cat-illust-art { transform: scale(1); }
  .cat-chip { opacity: 1; transform: none; }
}

/* Mobile-only stacked categories — hidden on desktop, shown <=760px.
   Photo above, single-row chips below (horizontal scroll if overflow). */
.landing-cats-mobile { display: none; }

/* ─── FAQ (2-column, brand-book) ────────────────────────── */

.landing-faq-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  align-items: start;
}
.landing-faq-side .landing-section-title {
  margin: 0 0 16px;
}
.landing-faq-aside-sub {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 8px;
  max-width: 320px;
}
.landing-faq-aside-link {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  transition: color 0.15s;
}
.landing-faq-aside-link:hover { color: var(--amber); }

.landing-faq-list {
  border-top: 1px solid var(--line);
}
.landing-faq-list details {
  border-bottom: 1px solid var(--line);
}
.landing-faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px 4px 24px 0;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  list-style: none;
}
.landing-faq-list summary::-webkit-details-marker { display: none; }
.landing-faq-list summary::after {
  content: "";
  flex-shrink: 0;
  width: 11px;
  height: 11px;
  border-right: 1.75px solid var(--ink-mute);
  border-bottom: 1.75px solid var(--ink-mute);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform 0.22s ease;
}
.landing-faq-list details[open] summary::after {
  transform: rotate(-135deg) translate(-3px, -3px);
}
.landing-faq-list summary:hover { color: var(--amber); }
.landing-faq-list summary:hover::after { border-color: var(--amber); }
.landing-faq-list details p {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 720px;
}
.landing-faq-list details a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

/* ─── Final CTA — primary amber (logo color) ──────── */

.landing-final-cta {
  background: var(--amber);
  border-bottom: none;
  padding: 96px 20px;
}
.landing-final-cta-inner {
  text-align: center;
  padding: 48px 0;
}
.landing-final-cta-inner .landing-headline-sm {
  margin: 0 auto 28px;
  max-width: 720px;
  color: var(--bg);
}
.landing-final-cta .landing-headline-line--mark {
  text-decoration-color: var(--bg);
}
.landing-final-cta .btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.landing-final-cta .btn-primary:hover {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--bg);
}

/* ─── Footer (dark finale, brand-book) ──────────────────── */

.landing-footer {
  background: var(--ink);
  color: var(--bg);
  padding: 80px 20px 32px;
  position: relative;
  overflow: hidden;
  border-bottom: none;
}
.landing-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.landing-footer-top {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 64px;
}

.landing-footer-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--font-ui);
}
.landing-footer-nav a {
  color: var(--bg);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.15s, color 0.15s;
}
.landing-footer-nav a:hover {
  opacity: 1;
  color: var(--amber-light);
}

.landing-footer-cta {
  justify-self: end;
  max-width: 360px;
}
.landing-footer-cta h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.018em;
  margin: 0 0 10px;
  color: var(--bg);
}
.landing-footer-cta p {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 22px;
  color: var(--bg);
  opacity: 0.7;
}
.landing-footer-cta-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.landing-footer-cta .btn-primary {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--bg);
}
.landing-footer-cta .btn-primary:hover {
  background: var(--amber-light);
  color: var(--ink);
  border-color: var(--amber-light);
}
.landing-footer-signin {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--bg);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.15s;
}
.landing-footer-signin:hover { opacity: 1; }

/* Giant footer wordmark — tree icon + cream "Bonsai" + cream underline */
.landing-footer-mark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(80px, 20vw, 240px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  white-space: nowrap;
  user-select: none;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.16em;
}
.landing-footer-mark-icon {
  width: 0.72em;
  height: 0.72em;
  object-fit: contain;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
  /* Baseline-aligned via flex parent; with the img's bottom anchored at
     the text baseline (= bottom of B), height of 0.72em ≈ Instrument Serif
     cap-height. Result: icon spans exactly baseline → cap-top of "B". */
}
.landing-footer-mark-text {
  display: inline-block;
}
.landing-footer-mark .wm-lead { color: var(--bg); font-style: normal; }
.landing-footer-mark .wm-tail {
  color: var(--bg);
  font-style: normal;
  margin-left: 0;
  position: relative;
  display: inline-block;
  text-decoration: none;
  letter-spacing: 0;
}
.landing-footer-mark .wm-tail::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.04em;
  height: 0.045em;
  background: var(--bg);
}

/* Footer brand — small, exactly like the nav, just colored for dark bg */
.landing-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.landing-footer-brand .brand-mark img {
  filter: brightness(0) invert(1);
}
.landing-footer-brand .wordmark { color: var(--bg); }
.landing-footer-brand .wordmark .wm-lead { color: var(--bg); }

.landing-footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(250, 250, 247, 0.12);
}
.landing-footer-bottom .landing-disclaimer {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 12px;
  color: var(--bg);
  opacity: 0.5;
  letter-spacing: 0.01em;
}
.landing-footer-social {
  display: flex;
  gap: 16px;
}
.landing-footer-social a {
  color: var(--bg);
  opacity: 0.55;
  transition: opacity 0.15s, color 0.15s;
  display: inline-flex;
}
.landing-footer-social a:hover {
  opacity: 1;
  color: var(--amber-light);
}
.landing-footer-social svg {
  width: 18px;
  height: 18px;
}

/* ─── Responsive ─────────────────────────────────────────── */

@media (max-width: 960px) {
  .landing-hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .landing-hero-text { text-align: center; }
  .landing-headline-line { margin-left: auto; margin-right: auto; }
  .landing-sub { margin-left: auto; margin-right: auto; }
  .landing-hero-art svg { transform: rotate(-2deg); max-width: 380px; }
}

@media (max-width: 760px) {
  .landing-nav-inner {
    grid-template-columns: auto auto;
    gap: 14px;
    padding: 12px 18px;
  }
  .landing-nav-links { display: none; }
  .landing-nav-cta { gap: 10px; justify-self: end; }
  .landing-hero { padding: 48px 20px 56px; }
  .landing-headline-sm { font-size: 32px; }
  .landing-sub { font-size: 16px; }
  .landing-marquee-track span { font-size: 22px; }
  .landing-features,
  .landing-cats-mobile,
  .landing-faq,
  .landing-final-cta { padding: 56px 20px; }
  .landing-section-title { font-size: 28px; margin-bottom: 28px; }
  .landing-feature-grid { grid-template-columns: 1fr; gap: 12px; }
  .landing-feature:nth-child(1),
  .landing-feature:nth-child(2),
  .landing-feature:nth-child(3),
  .landing-feature:nth-child(4) { grid-column: 1; grid-row: auto; min-height: 280px; padding: 28px; }
  .landing-feature--wide { grid-template-columns: 1fr; gap: 20px; }
  .landing-feature h3 { font-size: 24px; }
  .landing-faq-inner { grid-template-columns: 1fr; gap: 32px; }

  /* Categories on mobile: hide the desktop sticky scrolljack and show
     the stacked layout — title, desc, photo, then chips in a single
     non-wrapping row (horizontal scroll if they overflow). */
  .landing-how { display: none; }
  .landing-cats-mobile {
    display: block;
    background: var(--amber-tint);
    border-bottom: 1px solid var(--line);
  }
  .landing-cats-intro { margin-bottom: 24px; }
  .landing-cats-lead {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 32px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0 0 10px;
  }
  .landing-cats-lead em {
    font-style: normal;
    text-decoration: underline;
    text-decoration-color: var(--amber);
    text-decoration-thickness: 0.045em;
    text-underline-offset: 0.07em;
  }
  .landing-cats-sublead {
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-soft);
    margin: 0;
  }
  .landing-cats-mobile .landing-cat {
    display: block;
    padding: 32px 0;
    border-top: 1px solid rgba(14, 14, 12, 0.08);
    margin: 0;
  }
  .landing-cats-mobile .landing-cat-name {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 30px;
    line-height: 1.05;
    letter-spacing: -0.022em;
    color: var(--ink);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  .landing-cats-mobile .landing-cat-word { font-style: normal; line-height: 1; }
  .landing-cats-mobile .landing-cat-stat {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green);
    background: rgba(23, 114, 69, 0.1);
    border: 1px solid rgba(23, 114, 69, 0.25);
    border-radius: 999px;
    padding: 5px 10px;
    line-height: 1;
    white-space: nowrap;
  }
  .landing-cats-mobile .landing-cat-desc {
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-soft);
    margin: 0 0 18px;
  }
  .landing-cats-mobile .landing-cat-photo { margin: 0 0 16px; }
  .landing-cats-mobile .landing-cat-photo img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
    box-shadow: 0 18px 32px rgba(14, 14, 12, 0.08),
                0 4px 8px rgba(14, 14, 12, 0.04);
  }
  /* Single-row chips, never wrap. Sized to fit the chip counts on mobile. */
  .cat-chips--row {
    position: static;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 0;
    margin: 0;
  }
  .cat-chips--row .cat-chip {
    position: static;
    flex: 0 0 auto;
    font-size: 11.5px;
    padding: 5px 10px;
    opacity: 1;
    transform: none;
    transition: none;
  }
  .landing-faq-list summary { font-size: 17px; padding: 20px 4px 20px 0; }
  .landing-feature-num { font-size: 28px; margin-bottom: 14px; }
  .landing-steps li { grid-template-columns: 56px 1fr; gap: 18px; }
  .landing-step-num { font-size: 24px; }
  .landing-footer { padding: 56px 20px 24px; }
  .landing-footer-inner { gap: 40px; }
  .landing-footer-top { grid-template-columns: 1fr; gap: 40px; }
  .landing-footer-cta { justify-self: start; max-width: 100%; }
  .landing-footer-bottom { flex-direction: column; align-items: flex-start; gap: 14px; }
}
