/* Public site (marketing, content, legal): light ground, Roboto headings, ink footer */

body.public {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.site-main { flex: 1 1 auto; outline: none; }

/* Header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  border-bottom: 1px solid var(--color-border);
  padding-top: var(--safe-top);
}

/* The frosted ground sits on a pseudo-element: a backdrop-filter on the header itself would make
   the header the containing block of the fixed drawer and backdrop below. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 64px;
}

.site-header__brand { display: inline-flex; align-items: center; }
.site-header__logo { height: 32px; width: auto; }

.site-header__logo--dark { display: none; }
html[data-resolved-theme="dark"] .site-header__logo--light { display: none; }

html[data-resolved-theme="dark"] .site-header__logo--dark { display: block; }
.site-header__toggle { margin-left: 0; }

/* Sign in / Open app stays visible on every width: this compact button sits beside the menu
   toggle below 900px; from 900px the nav carries its own. */
.site-header__signin { margin-left: auto; }

/* Phone and tablet nav: a drawer that slides in from the right (80% of the width, 320px at most),
   behind a backdrop. Closed, it sits off-screen and is invisible to the tab order; app.js adds
   .is-open to the nav and the backdrop, locks the body and traps focus inside. */
.site-nav__backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: var(--color-surface-overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration) var(--ease), visibility 0s linear var(--duration);
}

.site-nav__backdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--duration) var(--ease);
}

.site-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: min(80vw, 320px);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: calc(var(--safe-top) + var(--space-3)) var(--space-3) calc(var(--safe-bottom) + var(--space-4));
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform var(--duration-slow) var(--ease-out), visibility 0s linear var(--duration-slow);
}

/* Opening transitions the transform only: visibility flips at once (a 0s visibility transition
   still leaves the panel unfocusable for a frame in Chromium), so focus can move inside. */
.site-nav.is-open {
  transform: none;
  visibility: visible;
  transition: transform var(--duration-slow) var(--ease-out);
}

.site-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: var(--touch-target);
  margin-bottom: var(--space-2);
  padding-left: var(--space-3);
}

.site-nav__title {
  font-family: var(--font-display);
  font-size: var(--text-heading);
  line-height: var(--leading-heading);
  font-weight: var(--weight-display);
}

/* Text links only: the "Get started"/"Open app" CTA keeps the .button--primary colours. */
.site-nav > a:not(.button) {
  display: flex;
  align-items: center;
  min-height: var(--touch-target);
  padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-weight: var(--weight-medium);
  text-decoration: none;
}

.site-nav > a:not(.button):hover { background: var(--color-surface-sunken); text-decoration: none; }
.site-nav > a.is-active { color: var(--color-primary-text); }

/* Sign in / Get started stacked at the foot of the drawer. */
.site-nav__actions {
  display: grid;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.site-nav__actions > .button { justify-content: center; }

body.has-drawer { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .site-nav,
  .site-nav.is-open,
  .site-nav__backdrop,
  .site-nav__backdrop.is-open { transition: none; }
}

@media (min-width: 900px) {
  .site-header__toggle,
  .site-header__signin,
  .site-nav__backdrop,
  .site-nav__head { display: none; }

  .site-nav {
    position: static;
    width: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-1);
    padding: 0;
    background: none;
    box-shadow: none;
    overflow: visible;
    transform: none;
    visibility: visible;
    transition: none;
  }

  .site-nav > a:not(.button) { font-size: var(--text-sm); }

  .site-nav__actions {
    display: flex;
    gap: var(--space-2);
    margin: 0 0 0 var(--space-2);
    padding: 0;
    border: 0;
  }
}

/* Hero ---------------------------------------------------------------- */

/* On the public site the hero is a flat band on the ground, not the app's surface card. */
.hero {
  display: block;
  padding: var(--space-12) 0 var(--space-10);
  background: var(--color-bg);
  border: 0;
  border-radius: 0;
}

.hero__inner {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-primary-soft);
  color: var(--color-primary-soft-text);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: var(--weight-display);
  line-height: 1.12;
  letter-spacing: var(--tracking-tight);
  max-width: 16ch;
}

.hero__title em {
  font-style: normal;
  color: var(--color-primary-text);
}

.hero__lead {
  margin-top: var(--space-4);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 52ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.hero__note {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
}

.hero__visual { position: relative; }

.hero__visual img,
.hero__visual svg {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

@media (min-width: 900px) {
  .hero { padding: var(--space-20) 0 var(--space-16); }
  .hero__inner { grid-template-columns: 1.1fr 0.9fr; }
}

/* Sections, feature grids, pricing ----------------------------------- */

.site-section { padding: var(--space-10) 0; }

@media (min-width: 900px) {
  .site-section { padding: var(--space-12) 0; }
}

.site-section--alt {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.site-section__header { max-width: 60ch; margin-bottom: var(--space-6); }
.site-section__header--center { text-align: center; margin-inline: auto; }

.site-section__eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-primary-text);
  margin-bottom: var(--space-2);
}

.site-section__title {
  font-family: var(--font-display);
  font-size: var(--text-display);
  line-height: var(--leading-display);
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-tight);
}

.site-section__lead {
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}

.feature-grid { display: grid; gap: var(--space-4); }

.feature {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.feature__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-soft);
  color: var(--color-primary-text);
  margin-bottom: var(--space-3);
}

.feature--green .feature__icon { background: var(--color-success-soft); color: var(--color-success); }
.feature--purple .feature__icon,
.feature--teal .feature__icon { background: var(--color-teal-soft); color: var(--color-teal-soft-text); }
.feature--amber .feature__icon { background: var(--color-warning-soft); color: var(--color-warning); }
.feature__title { font-size: var(--text-lg); margin-bottom: var(--space-2); }

.feature__body { color: var(--color-text-muted); font-size: var(--text-sm); }

.feature__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

@media (min-width: 640px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .feature-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* A quieter card for lists of facts (security page): no icon, muted body, same frame. */
.feature--quiet .feature__title { font-size: var(--text-body); }

.split {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

.split__media img,
.split__media svg {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--reverse .split__media { order: -1; }
}

.checklist {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.checklist li {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
}

.checklist .icon {
  color: var(--color-success);
  flex-shrink: 0;
  margin-top: 3px;
}

.stats-band {
  display: grid;
  gap: var(--space-4);
  text-align: center;
}

.stats-band__value {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: var(--weight-display);
  color: var(--color-primary-text);
}

.stats-band__label { color: var(--color-text-muted); font-size: var(--text-sm); }

@media (min-width: 640px) {
  .stats-band { grid-template-columns: repeat(3, 1fr); }
}

.pricing-grid {
  display: grid;
  gap: var(--space-4);
  align-items: stretch;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.pricing-card--featured {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  position: relative;
}

.pricing-card__badge {
  position: absolute;
  top: -12px;
  left: var(--space-6);
}

.pricing-card__name { font-size: var(--text-lg); }

.pricing-card__price {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-tight);
  font-variant-numeric: tabular-nums;
}

.pricing-card__price small {
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  color: var(--color-text-muted);
}

.pricing-card__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-sm);
  flex: 1 1 auto;
}

.pricing-card__features li { display: flex; gap: var(--space-2); }
.pricing-card__features .icon { color: var(--color-success); flex-shrink: 0; }

@media (min-width: 900px) {
  .pricing-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

/* CTA band ------------------------------------------------------------ */

/* CTA band: the deep teal hero surface (the hero-card tokens), white primary action. */
.cta-band {
  margin: var(--space-12) 0;
  padding: var(--space-10) var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-hero-bg);
  color: var(--color-hero-text);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-band > * { position: relative; }

.cta-band__title {
  color: var(--color-hero-text);
  font-size: var(--text-display);
  line-height: var(--leading-display);
  font-weight: var(--weight-display);
}

.cta-band__lead {
  margin-top: var(--space-3);
  color: var(--color-hero-text-muted);
  max-width: 50ch;
  margin-inline: auto;
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.cta-band .button--primary {
  --button-bg: var(--color-hero-text);
  --button-fg: var(--color-hero-bg);
  --button-border: var(--color-hero-text);
}

.cta-band .button--primary:hover { background: var(--color-surface-sunken); }
.cta-band .button--ghost,
.cta-band .button--secondary { --button-bg: transparent; --button-fg: var(--color-hero-text); --button-border: var(--color-hero-text-subtle); }

.cta-band .button--ghost:hover,
.cta-band .button--secondary:hover { background: var(--overlay-light); }

/* FAQ accordion ------------------------------------------------------- */

.faq {
  max-width: 68ch;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.faq__item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 52px;
  padding: var(--space-3) var(--space-4);
  font-weight: var(--weight-semibold);
}

.faq__item summary::after {
  content: "+";
  font-size: var(--text-xl);
  color: var(--color-primary-text);
  line-height: 1;
  flex-shrink: 0;
}

.faq__item[open] summary::after { content: "−"; }

.faq__body {
  padding: 0 var(--space-4) var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* Contact & misc ------------------------------------------------------ */

/* minmax(0, …) so a form control's intrinsic width never widens the track past the
   16px gutters at 320px (a bare 1fr is minmax(auto, 1fr)). */
.contact-grid { display: grid; gap: var(--space-8); grid-template-columns: minmax(0, 1fr); }
.contact-grid > * { min-width: 0; }

@media (min-width: 900px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
}

.values-grid { display: grid; gap: var(--space-4); }

@media (min-width: 640px) {
  .values-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1200px) {
  .values-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Footer -------------------------------------------------------------- */

.site-footer {
  margin-top: var(--space-12);
  padding: var(--space-10) 0 calc(var(--space-8) + var(--safe-bottom));
  background: var(--color-surface-inverse);
  color: var(--color-hero-text-muted);
  font-size: var(--text-sm);
}

/* The footer stays ink in both themes: in dark the inverse surface is light, which would put the
 * white hero text and the light wordmark on a pale ground, so it takes the sunken surface instead. */
html[data-resolved-theme="dark"] .site-footer { background: var(--color-surface-sunken); border-top: 1px solid var(--color-border); }

.site-footer__inner { display: grid; gap: var(--space-8); }

.site-footer__brand img {
  height: 32px;
  width: auto;
  margin-bottom: var(--space-3);
}

.site-footer__brand p { margin-top: var(--space-1); }
.site-footer__message { color: var(--color-hero-text); font-weight: var(--weight-medium); }

.site-footer__links {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.site-footer__links h3 {
  color: var(--color-hero-text);
  font-family: var(--font-sans);
  font-size: var(--text-caption);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-3);
}

.site-footer__links a,
.site-footer__links span {
  display: block;
  color: var(--color-hero-text-muted);
  min-height: 32px;
  line-height: 32px;
}

.site-footer__links a:hover { color: var(--color-hero-text); }
.site-footer__links [aria-current="true"] { color: var(--color-hero-text); font-weight: var(--weight-medium); }

.site-footer__legal {
  border-top: 1px solid var(--color-hero-border);
  padding-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-hero-text-subtle);
}

@media (min-width: 900px) {
  .site-footer__inner { grid-template-columns: 1.2fr 2fr; }
  .site-footer__legal { grid-column: 1 / -1; }
}

/* Marketing: proof chips, device frames, showcases ------------------------ */

/* Device frames are CSS only; the images are plain screenshots. */
.device { margin: 0; position: relative; }

.device img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
  background: var(--color-bg);
}

.device--phone {
  width: min(100%, 300px);
  margin-inline: auto;
  padding: 10px;
  border-radius: 44px;
  background: var(--color-surface-inverse);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--color-hero-border) inset;
}

.device--phone img { border-radius: 34px; }
.device--phone.device--sm { width: min(100%, 260px); }

.device--desktop {
  padding: 8px;
  border-radius: var(--radius-lg);
  background: var(--color-surface-inverse);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--color-hero-border) inset;
}

.device--desktop img { border-radius: var(--radius-lg); }

.device__bar {
  display: flex;
  gap: 6px;
  padding: 4px 6px 10px;
}

.device__bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-hero-border);
}

/* In the dark theme the bezel colour equals the page background, so keep a faint edge. */
html[data-resolved-theme="dark"] .device--phone,
html[data-resolved-theme="dark"] .device--desktop {
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--color-hero-border);
}

/* Feature / pricing heroes: short "good to know" checks under the lead (icon · one line each). */
.hero__checks { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; gap: var(--space-2); font-size: var(--text-label); line-height: var(--leading-label); font-weight: var(--weight-medium); color: var(--color-text); }
.hero__check { display: flex; align-items: center; gap: var(--space-2); }
.hero__check .icon { color: var(--color-success); flex-shrink: 0; }

/* Showcase: one real screen beside its explanation; sides alternate on desktop (product pages). */
.showcase {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

.showcase__title {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-display);
}

.showcase__lead {
  margin-top: var(--space-3);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

.showcase__note {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
}

.showcase__copy > .checklist { margin-top: var(--space-5); }
.showcase__copy .checklist li { color: var(--color-text-muted); }
.showcase__copy .checklist strong { color: var(--color-text); }

@media (min-width: 900px) {
  .showcase { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-12); }
  .showcase--reverse .showcase__media { order: -1; }
}

#how-it-works { scroll-margin-top: calc(var(--space-16) + var(--safe-top)); }

/* FAQ on the landing page: two columns from 900px. */
.faq-home { max-width: none; }

@media (min-width: 900px) {
  .faq-home { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); align-items: start; }
}

/* Full-width desktop screenshot under a page hero or section. Hidden on narrow phones, where a
   1366px-wide screen is unreadable; a hidden lazy image is never downloaded. */
.hero__screen { display: none; margin-top: var(--space-8); max-width: 1040px; margin-inline: auto; }

@media (min-width: 640px) {
  .hero__screen { display: block; }
}

/* Language column in the footer: the language switcher's text buttons, styled as the links. */
.site-footer__languages { display: flex; flex-direction: column; }
.site-footer__languages .language-switcher__option { color: var(--color-hero-text-muted, inherit); }
.site-footer__languages .language-switcher__option:hover,
.site-footer__languages .language-switcher__option[aria-current="true"] { color: var(--color-hero-text); }

/* Landing page (round 24) ----------------------------------------------------------------- */

/* The public site reads at 1200px: header, sections, CTA band and footer share the measure. */
body.public .container { max-width: 1200px; }

/* Eyebrow: one short uppercase label above a title; on the teal it takes the muted white. */
.lp-eyebrow {
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-text);
}

.lp-eyebrow--on-teal { color: var(--color-hero-teal); }

/* Hero: the deep teal surface, one line on what Moneva does, two actions, the real Home screen
   rising from the bottom edge (clipped, so the band keeps a fixed, calm height). */
.lp-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--color-hero-bg) 0%, var(--color-hero-bg-end) 100%);
  color: var(--color-hero-text);
}

.lp-hero::after {
  /* a faint lift towards the top-right so the band is not a flat slab */
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--overlay-light), transparent);
  pointer-events: none;
}

.lp-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-8);
  padding-top: var(--space-10);
}

.lp-hero__copy { max-width: 36rem; }

.lp-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.125rem, 4.2vw + 1rem, 3.625rem);
  font-weight: var(--weight-display);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--color-hero-text);
  text-wrap: balance;
}

.lp-hero__title em {
  display: block;
  font-style: normal;
  color: var(--color-hero-teal);
}

.lp-hero__lead {
  margin-top: var(--space-4);
  max-width: 40ch;
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--color-hero-text-muted);
  text-wrap: pretty;
}

.lp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

/* Landing buttons: a size up from the app's 44px controls. */
.lp-button--lg {
  min-height: 52px;
  padding-inline: var(--space-6);
  font-size: var(--text-body);
  border-radius: var(--radius-md);
}

/* On the teal the primary action is white with teal text (as in the CTA band); the secondary is a
   translucent white outline. Both keep AA: teal on white 5.7:1, white on the teal 5.5:1. */
.lp-hero .button--primary {
  --button-bg: var(--color-hero-text);
  --button-fg: var(--color-hero-bg);
  --button-border: var(--color-hero-text);
  box-shadow: var(--shadow-md);
}

.lp-hero .button--primary:hover { background: var(--color-hero-teal); }

.lp-hero .button--secondary {
  --button-bg: var(--color-hero-surface);
  --button-fg: var(--color-hero-text);
  --button-border: var(--color-hero-border);
}

.lp-hero .button--secondary:hover { background: var(--color-hero-border); }

.lp-hero__install { margin-top: var(--space-4); }

/* A text button that reads as a quiet link (the install prompt / guide, static/js/pwa.js). */
.lp-textbutton {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--touch-target);
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-hero-text-muted);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--color-hero-border);
  text-underline-offset: 4px;
}

.lp-textbutton:hover { color: var(--color-hero-text); text-decoration-color: currentcolor; }

.lp-textbutton:focus-visible,
.lp-feature:focus-visible,
.lp-arrowlink:focus-visible { outline: 3px solid var(--color-hero-teal); outline-offset: 3px; border-radius: var(--radius-sm); }

/* The phone: a fixed-height window the device rises into; its lower third is clipped by the band. */
.lp-hero__visual {
  position: relative;
  height: 400px;
  overflow: hidden;
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
}

.lp-hero__visual .device--phone {
  width: min(100%, 300px);
  margin-inline: auto;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--color-hero-border) inset;
}

@media (min-width: 640px) {
  .lp-hero__inner { padding-top: var(--space-12); }
  .lp-hero__visual { height: 460px; }
  .lp-hero__visual .device--phone { width: min(100%, 320px); }
}

@media (min-width: 900px) {
  .lp-hero__inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: end;
    gap: var(--space-10);
    padding-top: var(--space-16);
  }

  .lp-hero__copy { padding-bottom: var(--space-16); }
  .lp-hero__visual { height: 520px; margin: 0; padding: 0; }
  .lp-hero__visual .device--phone { width: min(100%, 340px); }
}

/* Sections: alternating ground / surface / teal, generous but even rhythm. */
.lp-section { padding: var(--space-12) 0; }

.lp-section--surface {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.lp-section--teal {
  background: linear-gradient(160deg, var(--color-hero-bg) 0%, var(--color-hero-bg-end) 100%);
  color: var(--color-hero-text);
}

.lp-section--teal .lp-section__title { color: var(--color-hero-text); }

.lp-section__head { max-width: 40rem; margin-bottom: var(--space-8); }
.lp-section__head--center { margin-inline: auto; text-align: center; }

.lp-section__head--row {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
}

.lp-section__title {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 1.6vw + 1.05rem, 2.375rem);
  font-weight: var(--weight-display);
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lp-section__lead {
  margin-top: var(--space-3);
  max-width: 44ch;
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  text-wrap: pretty;
}

.lp-arrowlink {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--touch-target);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-primary-text);
}

.lp-arrowlink:hover { text-decoration: underline; text-underline-offset: 4px; }
.lp-arrowlink--on-teal { color: var(--color-hero-text); }

@media (min-width: 900px) {
  .lp-section { padding: var(--space-20) 0; }
  .lp-section__head { margin-bottom: var(--space-10); }
}

/* Feature tour: six cards, each a real screenshot crop above an icon tile, a title and a line. */
.lp-tour {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

.lp-feature {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  color: inherit;
  text-decoration: none;
  transition: transform var(--duration) var(--ease-out), border-color var(--duration), box-shadow var(--duration);
}

.lp-feature:hover { text-decoration: none; border-color: var(--color-border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* The crop: a sunken window the screen rises into, clipped at a fixed height so every card
   is the same size whatever the capture shows. */
.lp-feature__shot {
  position: relative;
  display: block;
  height: 220px;
  overflow: hidden;
  background: var(--color-surface-sunken);
  border-bottom: 1px solid var(--color-border);
}

.lp-feature__shot img {
  display: block;
  width: 78%;
  height: auto;
  margin: var(--space-6) auto 0;
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--color-border);
  background: var(--color-bg);
}

.lp-feature__shot--middle img { margin-top: -40%; }

.lp-feature__body {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: var(--space-3);
  row-gap: var(--space-1);
  padding: var(--space-5);
}

.lp-feature__icon { grid-row: 1 / span 2; }

.lp-feature__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-display);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.lp-feature__text { font-size: var(--text-sm); line-height: 1.5; color: var(--color-text-muted); }

/* Phones: one snap-scrolling row, the next card peeking in from the right edge; the row bleeds
   to the viewport edges but scrolls inside itself, so the page never grows sideways. */
@media (max-width: 639.98px) {
  .lp-tour {
    grid-auto-flow: column;
    grid-auto-columns: min(78%, 320px);
    gap: var(--space-3);
    margin-inline: calc(-1 * var(--gutter));
    padding: var(--space-1) var(--gutter) var(--space-4);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    -webkit-overflow-scrolling: touch;
  }

  .lp-tour__item { scroll-snap-align: start; }
  .lp-feature__shot { height: 200px; }
}

@media (min-width: 640px) {
  .lp-tour { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
}

@media (min-width: 1024px) {
  .lp-tour { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
  .lp-feature__shot { height: 240px; }
}

/* How it works: three numbered steps. */
.lp-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
  counter-reset: lp-steps;
}

.lp-step {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: var(--space-4);
  row-gap: var(--space-1);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-bg);
}

.lp-step__number {
  position: absolute;
  top: var(--space-4);
  right: var(--space-5);
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: var(--weight-display);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-border-strong);
}

.lp-step__icon { grid-row: 1 / span 2; }
.lp-step__title { font-size: var(--text-lg); font-weight: var(--weight-display); line-height: 1.3; }
.lp-step__body { font-size: var(--text-sm); line-height: 1.5; color: var(--color-text-muted); }

@media (min-width: 900px) {
  .lp-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
  .lp-step { grid-template-columns: minmax(0, 1fr); padding: var(--space-6); }
  .lp-step__icon { grid-row: auto; margin-bottom: var(--space-3); }
}

/* Split sections (households and groups, prices): copy beside a tinted panel holding the phone. */
.lp-split {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

.lp-checks {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

.lp-check { display: flex; gap: var(--space-3); align-items: flex-start; }
.lp-check__icon { flex-shrink: 0; }
.lp-check__body { display: block; }
.lp-check__title { display: block; font-weight: var(--weight-display); line-height: 1.4; }
.lp-check__text { display: block; font-size: var(--text-sm); line-height: 1.5; color: var(--color-text-muted); }
.lp-split__more { margin-top: var(--space-4); }

.lp-split__visual {
  position: relative;
  height: 380px;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  padding: var(--space-8) var(--space-4) 0;
}

.lp-split__visual--mint { background: var(--tile-mint); }
.lp-split__visual--yellow { background: var(--tile-yellow); }

.lp-split__visual .device--phone {
  width: min(100%, 280px);
  margin-inline: auto;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--color-hero-border) inset;
}

@media (min-width: 900px) {
  .lp-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-12); }
  .lp-split--reverse .lp-split__visual { order: -1; }
  .lp-split__visual { height: 460px; padding-top: var(--space-10); }
  .lp-split__visual .device--phone { width: min(100%, 300px); }
}

/* Trust: four facts on the teal, an install button on the PWA one. */
.lp-trust {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

.lp-trust__item {
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  background: var(--color-hero-surface);
  border: 1px solid var(--color-hero-border);
}

.lp-trust__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-hero-text);
  color: var(--color-hero-bg);
}

.lp-trust__title { font-size: var(--text-lg); font-weight: var(--weight-display); line-height: 1.3; color: var(--color-hero-text); }
.lp-trust__body { margin-top: var(--space-1); font-size: var(--text-sm); line-height: 1.5; color: var(--color-hero-text-muted); }
.lp-trust__action { margin-top: var(--space-4); --button-bg: var(--color-hero-text); --button-fg: var(--color-hero-bg); --button-border: var(--color-hero-text); }
.lp-trust__action:hover { background: var(--color-hero-teal); }
.lp-trust__more { margin-top: var(--space-6); text-align: center; }

@media (min-width: 640px) {
  .lp-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lp-trust { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); }
}

/* The CTA band follows the trust section closely; the landing keeps less air above it. */
.lp-section + .container > .cta-band { margin-top: 0; }

/* Motion: an entrance for the hero only, and only when the visitor allows it. */
@media (prefers-reduced-motion: no-preference) {
  .lp-hero__copy > * { animation: lp-rise 600ms var(--ease-out) both; }
  .lp-hero__copy > :nth-child(2) { animation-delay: 60ms; }
  .lp-hero__copy > :nth-child(3) { animation-delay: 120ms; }
  .lp-hero__copy > :nth-child(4) { animation-delay: 180ms; }
  .lp-hero__copy > :nth-child(5) { animation-delay: 240ms; }
  .lp-hero__visual .device { animation: lp-rise 800ms var(--ease-out) 150ms both; }
}

@keyframes lp-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
