/* Landing — App Store launch page on shared botanical ledger tokens */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.landing-top {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid transparent;
}

.landing-top,
.hero-landing,
.landing-foot {
  width: min(100%, 72rem);
  margin-inline: auto;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-badge {
  display: none;
  line-height: 0;
  border-radius: 0.5rem;
}

.nav-badge .badge-img {
  width: auto;
  height: 2.25rem;
}

.nav-badge:focus-visible {
  outline: 2px solid var(--stem);
  outline-offset: 4px;
}

@media (min-width: 720px) {
  .nav-badge {
    display: inline-flex;
  }
}

/* ——— Hero ——— */
.hero-landing {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  align-items: end;
  min-height: min(100svh, 52rem);
  padding: clamp(1.5rem, 4vw, 2.5rem) var(--space) 0;
  max-width: none;
}

.hero-landing-copy {
  max-width: 34rem;
  animation: settle 900ms var(--ease-out) both;
}

.hero-brand {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.75rem, 10vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
  color: var(--ink);
  animation: brand-in 1100ms var(--ease-out) both;
}

.hero-landing h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font);
  font-weight: 500;
  font-size: clamp(1.35rem, 3.6vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink-2);
  max-width: 22ch;
  text-wrap: balance;
}

.hero-sub {
  margin: 0 0 1.5rem;
  font-size: clamp(0.98rem, 2.2vw, 1.08rem);
  color: var(--ink-3);
  max-width: 42ch;
  text-wrap: pretty;
}

.hero-cta {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}

.store-badge {
  display: inline-flex;
  line-height: 0;
  border-radius: 0.55rem;
  transition: transform 180ms var(--ease-out);
}

.store-badge:hover {
  transform: translateY(-1px);
}

.store-badge:focus-visible {
  outline: 2px solid var(--stem);
  outline-offset: 4px;
}

.store-badge .badge-img {
  width: auto;
  height: clamp(2.75rem, 8vw, 3.3rem);
}

.hero-note {
  margin: 0;
  max-width: 36ch;
  font-size: 0.85rem;
  color: var(--ink-3);
  text-wrap: pretty;
}

.hero-device {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 18rem;
  animation: device-rise 1100ms var(--ease-out) 80ms both;
  /* Real App Store shots already have full composition; no fade crop */
}

/* ——— Phone frames ——— */
.phone {
  margin: 0;
  width: min(100%, 17.5rem);
}

.phone--hero {
  width: min(100%, 19rem);
}

.phone--sm {
  width: min(100%, 11.5rem);
  margin-bottom: 1rem;
}

.phone-bezel {
  position: relative;
  background: var(--ink);
  border-radius: 1.85rem;
  padding: 0.55rem;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--ink) 35%, transparent),
    0 18px 40px color-mix(in srgb, var(--ink) 14%, transparent);
}

.phone--sm .phone-bezel {
  border-radius: 1.35rem;
  padding: 0.4rem;
}

.phone-notch {
  position: absolute;
  top: 0.7rem;
  left: 50%;
  transform: translateX(-50%);
  width: 28%;
  height: 0.55rem;
  border-radius: 999px;
  background: #0a0a0a;
  z-index: 2;
}

.phone-screen {
  position: relative;
  aspect-ratio: 9 / 17.5;
  border-radius: 1.4rem;
  background: var(--canvas);
  color: var(--ink);
  padding: 1.65rem 1rem 1rem;
  overflow: hidden;
}

.phone--sm .phone-screen {
  border-radius: 1.05rem;
  padding: 1.15rem 0.75rem 0.75rem;
}

.screen-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.screen-status-dots {
  width: 2.2rem;
  height: 0.35rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink-3) 45%, transparent);
}

.screen-kicker {
  margin: 0 0 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.screen-metric {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 8vw, 3rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.screen-metric--sm {
  font-size: 1.85rem;
}

.screen-metric span {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-2);
}

.screen-meta {
  margin: 0.4rem 0 1.1rem;
  font-size: 0.82rem;
  color: var(--ink-3);
}

.screen-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 0.3rem;
  height: 5.5rem;
  margin-bottom: 1.1rem;
  padding: 0.65rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
}

.screen-bars--tight {
  height: 3.6rem;
  margin-bottom: 0;
}

.screen-bars span {
  display: block;
  height: var(--h, 40%);
  border-radius: 999px 999px 3px 3px;
  background: color-mix(in srgb, var(--stem) 75%, var(--stem-pale));
}

.screen-favs {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.4rem;
}

.screen-favs span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 0.55rem;
  padding: 0.55rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.screen-fav-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.screen-fav-list div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 0.55rem;
  font-size: 0.72rem;
  color: var(--ink-2);
}

.screen-fav-list strong {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--stem-deep);
}

.screen-week-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin: 0.55rem 0 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-align: center;
}

.screen-nudge-time {
  margin: 0.5rem 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--ink);
}

.screen-toggle {
  width: 2.6rem;
  height: 1.45rem;
  margin-top: 0.85rem;
  border-radius: 999px;
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  padding: 0.15rem;
}

.screen-toggle span {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--ink-3);
}

/* ——— Sections ——— */
.section {
  padding: clamp(3.5rem, 9vw, 6rem) var(--space);
}

.section-inner {
  max-width: 58rem;
  margin: 0 auto;
}

.section h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.85rem, 4.5vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
  max-width: 22ch;
}

.section-lead {
  margin: 0 0 2rem;
  font-size: 1.05rem;
  color: var(--ink-3);
  max-width: 48ch;
  text-wrap: pretty;
}

/* Audience */
.audience-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 760px) {
  .audience-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
  }
}

.audience-col h3 {
  margin: 0 0 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.audience-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.audience-col li {
  position: relative;
  padding: 0.85rem 0 0.85rem 1.55rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 0.98rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.audience-col--yes li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--stem);
}

.audience-col--no li::before {
  content: "–";
  position: absolute;
  left: 0.1rem;
  top: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--ink-3);
}

.audience-exit {
  margin: 0;
  max-width: 58ch;
  font-size: 0.93rem;
  color: var(--ink-3);
  text-wrap: pretty;
}

.audience-exit a {
  color: var(--clay);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--clay) 35%, transparent);
  text-underline-offset: 0.15em;
}

.audience-exit a:hover {
  color: var(--ink-2);
  text-decoration-color: var(--clay);
}

.audience-exit a:focus-visible {
  outline: 2px solid var(--stem);
  outline-offset: 3px;
}

/* How it works */
.how-grid {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 860px) {
  .how-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
  }
}

.how-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.how-num {
  margin: 0 0 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--stem);
}

.how-step h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--ink);
  text-wrap: balance;
}

.how-step > p:last-child {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-3);
  max-width: 36ch;
  text-wrap: pretty;
}

/* Features */
.features-grid {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}

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

.features-grid li {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 760px) {
  .features-grid li:nth-child(odd) {
    padding-right: 1.5rem;
    border-right: 1px solid var(--rule);
  }

  .features-grid li:nth-child(even) {
    padding-left: 1.5rem;
  }
}

.features-grid h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  text-wrap: balance;
}

.features-grid p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-3);
  max-width: 40ch;
  text-wrap: pretty;
}

.feat-tag {
  display: inline-block;
  margin-top: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stem-deep);
}

/* Privacy — full-bleed contrast band */
.privacy {
  width: 100%;
  background: var(--ink);
  color: var(--canvas);
}

.privacy h2 {
  color: var(--canvas);
  max-width: 18ch;
}

.privacy-list {
  list-style: none;
  margin: 1.75rem 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  max-width: 48rem;
}

.privacy-list li {
  display: grid;
  gap: 0.25rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid color-mix(in srgb, var(--canvas) 14%, transparent);
  font-size: 1rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--canvas) 72%, transparent);
  text-wrap: pretty;
}

.privacy-list strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--canvas);
}

.privacy-close {
  margin: 0;
  max-width: 42ch;
  font-size: 0.98rem;
  color: color-mix(in srgb, var(--canvas) 65%, transparent);
  text-wrap: pretty;
}

/* Compare table */
.compare-banner {
  display: inline-block;
  margin: 0 0 1.5rem;
  padding: 0.35rem 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stem);
  border-bottom: 1.5px solid var(--stem);
}

.compare-table-wrap {
  overflow-x: auto;
  margin-bottom: 1.25rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  width: 100%;
  min-width: 28rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.compare-table th,
.compare-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
}

.compare-table thead th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--surface-raised);
}

.compare-table tbody th {
  font-weight: 500;
  color: var(--ink);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.compare-table td:nth-child(3) {
  color: var(--stem-deep);
  font-weight: 500;
}

.compare-note {
  margin: 0;
  max-width: 52ch;
  font-size: 0.93rem;
  color: var(--ink-3);
  text-wrap: pretty;
}

/* Pricing */
.pricing-grid {
  display: grid;
  gap: 1rem;
  margin: 2rem 0 1.5rem;
}

@media (min-width: 700px) {
  .pricing-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: stretch;
  }
}

.price-card {
  padding: 1.5rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sheet);
}

.price-card--featured {
  background: var(--stem-pale);
  border-color: color-mix(in srgb, var(--stem) 35%, var(--rule));
}

.price-label {
  margin: 0 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.price-card--featured .price-label {
  color: var(--stem-deep);
}

.price-amount {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  line-height: 1.1;
  color: var(--ink);
}

.price-amount span {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-3);
}

.price-trial {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--stem-deep);
}

.price-trial--muted {
  color: var(--ink-3);
  font-weight: 400;
}

.price-save,
.price-coffee {
  margin: 0 0 0.4rem;
  font-size: 0.93rem;
  color: var(--ink-2);
  max-width: 36ch;
  text-wrap: pretty;
}

.price-coffee {
  margin-bottom: 0;
  color: var(--ink-3);
}

.pricing-legal {
  margin: 0;
  max-width: 58ch;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ink-3);
  text-wrap: pretty;
}

/* FAQ */
.landing-faq {
  margin-top: 1.75rem;
  max-width: 42rem;
}

.landing-faq details {
  margin: 0;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--rule);
}

.landing-faq details:first-of-type {
  border-top: 1px solid var(--rule);
}

.landing-faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
  min-height: 44px;
  display: flex;
  align-items: center;
}

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

.landing-faq summary::before {
  content: "+";
  display: inline-block;
  width: 1.1em;
  margin-right: 0.4rem;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--stem);
}

.landing-faq details[open] summary::before {
  content: "–";
}

.landing-faq summary:focus-visible {
  outline: 2px solid var(--stem);
  outline-offset: 3px;
}

.landing-faq details p {
  margin: 0.65rem 0 0.1rem;
  padding-left: 1.5rem;
  font-size: 0.98rem;
  color: var(--ink-2);
  max-width: 52ch;
  text-wrap: pretty;
}

/* Final CTA */
.final-cta {
  padding-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.final-cta-inner {
  display: grid;
  gap: 1rem;
  justify-items: start;
  max-width: 34rem;
}

.final-cta .section-lead {
  margin-bottom: 0.5rem;
}

/* Footer */
.landing-foot {
  margin-top: 0;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}

.foot-resources,
.foot-disclaimer,
.foot-copy {
  margin: 0 0 0.65rem;
  max-width: 52rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ink-3);
  text-wrap: pretty;
}

.foot-resources a {
  color: var(--clay);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--clay) 35%, transparent);
  text-underline-offset: 0.15em;
}

.foot-resources a:hover {
  color: var(--ink-2);
  text-decoration-color: var(--clay);
}

.foot-resources a:focus-visible {
  outline: 2px solid var(--stem);
  outline-offset: 3px;
}

.foot-copy {
  margin-bottom: 0;
}

/* Reveal motion */
.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition:
      opacity 700ms var(--ease-out),
      transform 700ms var(--ease-out);
  }

  .reveal-ready .reveal.is-in {
    opacity: 1;
    transform: none;
  }
}

@keyframes device-rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Desktop hero split */
@media (min-width: 960px) {
  .hero-landing {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: end;
    gap: 2rem;
    padding-top: 2.5rem;
  }

  .hero-device {
    justify-content: flex-end;
    min-height: 28rem;
  }

  .phone--hero {
    width: min(100%, 21rem);
  }
}

@media (max-width: 719px) {
  .hero-landing {
    min-height: auto;
    padding-bottom: 0;
  }

  .hero-device {
    margin-inline: calc(var(--space) * -0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-landing-copy,
  .hero-brand,
  .hero-device,
  .store-badge:hover {
    animation: none !important;
    transform: none !important;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .phone-bezel {
    background: #0a0908;
  }

  :root:not([data-theme='light']) .phone-screen {
    background: var(--surface);
  }

  :root:not([data-theme='light']) .screen-bars,
  :root:not([data-theme='light']) .screen-favs span,
  :root:not([data-theme='light']) .screen-fav-list div {
    background: var(--surface-raised);
  }

  :root:not([data-theme='light']) .price-card--featured {
    background: color-mix(in srgb, var(--stem-pale) 80%, var(--surface));
  }

  :root:not([data-theme='light']) .feat-tag {
    color: var(--stem);
  }

  :root:not([data-theme='light']) .compare-table td:nth-child(3) {
    color: var(--stem);
  }
}

:root[data-theme='dark'] .phone-bezel {
  background: #0a0908;
}

:root[data-theme='dark'] .phone-screen {
  background: var(--surface);
}

:root[data-theme='dark'] .screen-bars,
:root[data-theme='dark'] .screen-favs span,
:root[data-theme='dark'] .screen-fav-list div {
  background: var(--surface-raised);
}

:root[data-theme='dark'] .price-card--featured {
  background: color-mix(in srgb, var(--stem-pale) 80%, var(--surface));
}

:root[data-theme='dark'] .feat-tag {
  color: var(--stem);
}

:root[data-theme='dark'] .compare-table td:nth-child(3) {
  color: var(--stem);
}

/* Waitlist form on homepage CTAs (APP_STORE_ID null) */
.hero-waitlist {
  width: min(100%, 22rem);
}
.hero-waitlist .form {
  margin: 0;
  gap: 0.75rem;
}
.hero-waitlist .field label {
  font-size: 0.8rem;
}
.hero-waitlist .cta {
  width: 100%;
}
.form--compact .field input {
  font-size: 1rem;
}
.landing .form-status {
  min-height: 1.25rem;
  font-size: 0.875rem;
}

/* ——— Real App Store marketing screenshots ——— */
.app-shot {
  margin: 0;
  width: min(100%, 17.5rem);
}

.app-shot--hero {
  width: min(100%, 20rem);
}

.app-shot--sm {
  width: min(100%, 13.5rem);
  margin-bottom: 1rem;
}

.app-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  /* Soft lift so the shot sits on the canvas like the old device frame */
  filter: drop-shadow(0 14px 28px color-mix(in srgb, var(--ink) 12%, transparent));
}

@media (min-width: 960px) {
  .app-shot--hero {
    width: min(100%, 22rem);
  }
}

@media (max-width: 719px) {
  .app-shot--hero {
    width: min(100%, 18rem);
    margin-inline: auto;
  }
}
