/* ---------- landing page (signed-out visitors at /) ---------- */

.app.is-public .view:has(> .landing) {
  max-width: none;
  padding: 0;
}

.landing {
  --lp-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --lp-line: color-mix(in oklab, var(--border) 75%, transparent);
  --lp-glass: color-mix(in oklab, var(--surface) 72%, transparent);
  --lp-glass-strong: color-mix(in oklab, var(--surface) 90%, transparent);
  --lp-accent-2: color-mix(in oklab, var(--accent) 50%, var(--fat));
  --lp-shadow: 0 30px 70px -28px rgb(0 0 0 / 30%), 0 10px 24px -12px rgb(0 0 0 / 12%);
  position: relative;
  isolation: isolate;
  overflow-x: clip;
}

.lp-wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right));
}

/* ---------- top bar ---------- */

.lp-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid transparent;
  transition: background-color 250ms, border-color 250ms;
}

.lp-bar.is-stuck {
  background: var(--lp-glass);
  border-bottom-color: var(--lp-line);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
}

.lp-bar-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: 64px;
}

.brand.lp-brand {
  padding: 0;
}

.lp-bar-links {
  display: none;
}

.lp-bar-links a {
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  transition: color 150ms, background-color 150ms;
}

.lp-bar-links a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.lp-bar-actions {
  display: flex;
  gap: var(--space-2);
  margin-left: auto;
}

@media (min-width: 840px) {
  .lp-bar-links {
    display: flex;
    gap: 2px;
    margin-inline: auto;
  }

  .lp-bar-actions {
    margin-left: 0;
  }
}

.lp-sentinel {
  position: absolute;
  top: 12px;
  width: 1px;
  height: 1px;
}

/* ---------- hero ---------- */

.lp-hero {
  padding-block: clamp(28px, 6vw, 84px) clamp(64px, 9vw, 128px);
}

.lp-hero-backdrop {
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: 1180px;
  pointer-events: none;
  background:
    radial-gradient(38% 34% at 76% 30%, color-mix(in oklab, var(--accent) 24%, transparent), transparent 72%),
    radial-gradient(26% 30% at 98% 58%, color-mix(in oklab, var(--fat) 16%, transparent), transparent 70%),
    radial-gradient(34% 28% at 6% 4%, color-mix(in oklab, var(--accent) 12%, transparent), transparent 70%);
}

.lp-hero-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in oklab, var(--text) 13%, transparent) 1px, transparent 0);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 72% 52% at 62% 32%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 72% 52% at 62% 32%, #000 15%, transparent 75%);
}

.lp-hero-grid {
  display: grid;
  gap: clamp(40px, 6vw, 64px);
  align-items: center;
}

@media (min-width: 1000px) {
  .lp-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }
}

.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--lp-line);
  border-radius: 999px;
  background: var(--lp-glass);
  color: var(--text-2);
  font-size: var(--text-sm);
  font-weight: 600;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.lp-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: lp-beacon 2.4s ease-in-out infinite;
}

.lp-hero h1 {
  margin-top: 22px;
  font-size: clamp(2.9rem, 1.3rem + 5.2vw, 5.5rem);
  font-weight: 760;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.lp-gradient-text {
  padding-right: 0.05em;
  background: linear-gradient(100deg, var(--accent) 15%, var(--lp-accent-2) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lp-lede {
  max-width: 35rem;
  margin-top: 24px;
  color: var(--text-2);
  font-size: clamp(1.0625rem, 0.95rem + 0.45vw, 1.25rem);
  line-height: 1.6;
  text-wrap: pretty;
}

.lp-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn.lp-btn-lg {
  min-height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  font-size: 1.0625rem;
}

.lp-btn-lg svg {
  margin-right: -6px;
  transition: transform 250ms var(--lp-ease);
}

.lp-btn-lg:hover svg {
  transform: translateX(3px);
}

.btn.lp-btn-quiet {
  border-color: var(--border);
  background: var(--lp-glass);
}

.btn.lp-btn-quiet:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}

.lp-btn-shine {
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 20%), 0 10px 28px -10px color-mix(in oklab, var(--accent) 80%, transparent);
}

.lp-btn-shine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 30%) 50%, transparent 65%);
  translate: -120% 0;
  transition: translate 750ms var(--lp-ease);
}

.lp-btn-shine:hover::after {
  translate: 120% 0;
}

.lp-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-2);
  font-size: var(--text-sm);
  font-weight: 600;
}

.lp-proof li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lp-proof svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.lp-hero-copy > * {
  animation: lp-rise 1000ms var(--lp-ease) both;
}

.lp-hero-copy > :nth-child(2) { animation-delay: 70ms; }
.lp-hero-copy > :nth-child(3) { animation-delay: 150ms; }
.lp-hero-copy > :nth-child(4) { animation-delay: 230ms; }
.lp-hero-copy > :nth-child(5) { animation-delay: 310ms; }

/* ---------- hero preview ---------- */

.lp-stage {
  --px: 0;
  --py: 0;
  position: relative;
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  padding: 58px 11% 124px 0;
  animation: lp-rise 1100ms 150ms var(--lp-ease) both;
}

.lp-stage-glow {
  position: absolute;
  inset: 12% 8% 18% 4%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--accent) 38%, transparent), transparent);
  filter: blur(36px);
}

.lp-layer {
  translate: calc(var(--px) * var(--depth, 0) * 1px) calc(var(--py) * var(--depth, 0) * 1px);
  transition: translate 700ms var(--lp-ease);
}

.lp-depth-1 { --depth: 12; }
.lp-depth-2 { --depth: 28; }
.lp-depth-3 { --depth: 44; }

.lp-chart-card {
  padding: 20px 20px 16px;
  border-radius: 24px;
  box-shadow: var(--lp-shadow);
}

.lp-chart-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.lp-chart-value {
  font-size: 2rem;
  font-weight: 720;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.lp-delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
  padding: 2px 10px 2px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: var(--text-xs);
  font-weight: 650;
}

.lp-delta svg {
  width: 14px;
  height: 14px;
}

.lp-chart {
  width: 100%;
  height: auto;
  margin-top: 6px;
  overflow: visible;
}

.lp-grid {
  stroke: var(--chart-grid);
  stroke-dasharray: 3 5;
}

.lp-axis {
  fill: var(--text-3);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.lp-dot {
  fill: var(--chart-dot);
  opacity: 0.6;
  transform-box: fill-box;
  transform-origin: center;
  animation: lp-pop 500ms var(--lp-ease) both;
  animation-delay: calc(350ms + var(--i, 0) * 20ms);
}

.lp-trend-line {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: lp-draw 1700ms 700ms var(--lp-ease) forwards;
}

.lp-trend-area {
  opacity: 0;
  animation: lp-fade 1200ms 1400ms ease forwards;
}

.lp-area-top { stop-color: var(--accent); stop-opacity: 0.24; }
.lp-area-bottom { stop-color: var(--accent); stop-opacity: 0; }
.lp-stroke-start { stop-color: var(--lp-accent-2); }
.lp-stroke-end { stop-color: var(--accent); }

.lp-end {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 3;
  opacity: 0;
  animation: lp-fade 300ms 2250ms forwards;
}

.lp-end-halo {
  fill: var(--accent);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: lp-halo 2.6s 2400ms ease-out infinite;
}

.lp-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 4px;
  color: var(--text-2);
  font-size: var(--text-xs);
  font-weight: 600;
}

.lp-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lp-legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--chart-dot);
}

.lp-legend-line {
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.lp-float-ring,
.lp-float-checkin,
.lp-float-chip {
  position: absolute;
}

.lp-float-ring {
  top: 0;
  right: 0;
  width: min(290px, 52%);
  animation: lp-bob 7s ease-in-out infinite;
}

.lp-float-checkin {
  bottom: 0;
  left: 6%;
  width: min(300px, 56%);
  animation: lp-bob 8s -3s ease-in-out infinite;
}

.lp-float-chip {
  top: 12px;
  left: 0;
}

.lp-float {
  border-radius: 20px;
  background: var(--lp-glass-strong);
  box-shadow: var(--lp-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  animation: lp-float-in 900ms var(--lp-ease) both;
}

.lp-float-ring .lp-float { animation-delay: 1000ms; }
.lp-float-checkin .lp-float { animation-delay: 1500ms; }
.lp-float-chip .lp-float { animation-delay: 2000ms; }

.card.lp-ring-card,
.card.lp-checkin {
  padding: 16px;
}

.lp-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: var(--text-sm);
  font-weight: 650;
}

.lp-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: var(--text-xs);
  font-weight: 650;
}

.lp-ring-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lp-ring-row .ring {
  width: 92px;
  height: 92px;
}

.lp-ring-row .ring-label .value {
  font-size: var(--text-base);
}

.lp-ring-row .ring-label .caption {
  font-size: 10px;
}

.lp-ring-row .ring .fill {
  animation: lp-ring 1500ms 1200ms var(--lp-ease) both;
}

.lp-ring-row .macro-bars {
  gap: 8px;
}

.lp-ring-row .macro-bar .macro-bar-label {
  margin-bottom: 2px;
  font-size: var(--text-xs);
}

.lp-ring-row .macro-bar .fill {
  transform-box: fill-box;
  transform-origin: left;
  animation: lp-grow-x 1100ms 1350ms var(--lp-ease) both;
}

.lp-checkin-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lp-checkin-head strong,
.lp-checkin-head div span {
  display: block;
}

.lp-checkin-head strong {
  font-size: var(--text-sm);
}

.lp-checkin-head div span {
  color: var(--text-2);
  font-size: var(--text-xs);
}

.lp-icon-badge {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--lp-accent-2));
  color: var(--on-accent);
}

.lp-icon-badge svg {
  width: 20px;
  height: 20px;
}

.lp-checkin-rows {
  display: grid;
  gap: 6px;
  margin: 14px 0;
}

.lp-checkin-rows div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--text-sm);
}

.lp-checkin-rows dt {
  color: var(--text-2);
}

.lp-checkin-rows dd {
  margin: 0;
  font-weight: 650;
}

.lp-checkin-rows s {
  margin-right: 4px;
  color: var(--text-3);
  font-weight: 500;
}

.lp-checkin-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 8px;
}

.lp-fake-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: var(--text-sm);
  font-weight: 600;
}

.lp-fake-btn svg {
  width: 16px;
  height: 16px;
}

.lp-fake-btn.is-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.lp-fake-btn.is-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  animation: lp-ping 2.6s 2.8s ease-out infinite;
}

.lp-ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
}

.lp-ai-chip svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.lp-chip-kcal {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--text-xs);
  font-weight: 700;
}

@media (max-width: 600px) {
  .lp-stage {
    padding: 92px 0 168px;
  }

  .lp-float-ring {
    right: -6px;
    width: auto;
  }

  .lp-ring-row .macro-bars {
    display: none;
  }

  .lp-card-title {
    gap: 12px;
  }

  .lp-float-checkin {
    left: -6px;
    width: 72%;
  }

  .lp-float-chip {
    display: none;
  }

  .lp-ring-row .ring {
    width: 72px;
    height: 72px;
  }

  .lp-ring-row .ring-label .value {
    font-size: var(--text-sm);
  }
}

/* ---------- sources strip ---------- */

.lp-strip {
  border-block: 1px solid var(--lp-line);
  background: color-mix(in oklab, var(--surface) 55%, transparent);
}

.lp-strip-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 48px;
  padding-block: 22px;
}

.lp-strip p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 24px;
}

.lp-strip span {
  color: var(--text-3);
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lp-strip strong {
  color: var(--text-2);
  font-weight: 650;
  letter-spacing: -0.01em;
}

@media (max-width: 600px) {
  .lp-strip span {
    flex-basis: 100%;
  }
}

/* ---------- sections ---------- */

.lp-section {
  padding-block: clamp(72px, 10vw, 132px);
  scroll-margin-top: -48px;
}

.lp-section + .lp-section {
  padding-top: 0;
  scroll-margin-top: 88px;
}

.lp-section-head {
  max-width: 46rem;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.lp-kicker {
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.lp-section h2 {
  margin-top: 10px;
  font-size: clamp(2.1rem, 1.2rem + 3vw, 3.5rem);
  font-weight: 740;
  line-height: 1.04;
  letter-spacing: -0.038em;
  text-wrap: balance;
}

.lp-sub {
  margin-top: 16px;
  color: var(--text-2);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.6;
  text-wrap: pretty;
}

.landing.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 900ms var(--lp-ease), transform 1000ms var(--lp-ease);
}

.landing.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- how it works ---------- */

.lp-steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 840px) {
  .lp-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

.lp-step {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--surface);
}

.lp-step::before {
  content: "";
  position: absolute;
  inset: -1px 18% auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}

.landing.reveal-ready .lp-step:nth-child(2) { transition-delay: 100ms; }
.landing.reveal-ready .lp-step:nth-child(3) { transition-delay: 200ms; }

.lp-step-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 36px;
}

.lp-step-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.lp-step-icon svg {
  width: 24px;
  height: 24px;
}

.lp-step-num {
  color: color-mix(in oklab, var(--text) 9%, transparent);
  font-size: 3.5rem;
  font-weight: 760;
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.lp-step h3 {
  font-size: var(--text-xl);
  letter-spacing: -0.02em;
}

.lp-step p {
  margin-top: 10px;
  color: var(--text-2);
}

/* ---------- the math ---------- */

.lp-math {
  display: grid;
  gap: clamp(32px, 4vw, 56px);
  overflow: hidden;
  padding: clamp(24px, 5vw, 60px);
  border: 1px solid var(--border);
  border-radius: 34px;
  background:
    radial-gradient(55% 75% at 100% 0%, color-mix(in oklab, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(40% 60% at 0% 100%, color-mix(in oklab, var(--fat) 9%, transparent), transparent 70%),
    var(--surface);
}

@media (min-width: 960px) {
  .lp-math {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
  }
}

.lp-math h2 {
  font-size: clamp(1.9rem, 1.1rem + 2.4vw, 2.9rem);
}

.lp-slider {
  margin-top: 28px;
}

.lp-slider + .lp-slider {
  margin-top: 18px;
}

.lp-slider-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-weight: 600;
}

.lp-slider-label output {
  padding: 2px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: var(--text-sm);
  font-weight: 700;
  white-space: nowrap;
}

.lp-range {
  --fill: 50%;
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.lp-range:focus-visible {
  outline: none;
}

.lp-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent) var(--fill), var(--surface-2) var(--fill));
}

.lp-range::-webkit-slider-thumb {
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  margin-top: -9px;
  border: 4px solid var(--accent);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 2px 10px rgb(0 0 0 / 22%);
  transition: transform 150ms var(--lp-ease), box-shadow 150ms;
  -webkit-appearance: none;
  appearance: none;
}

.lp-range::-moz-range-track {
  height: 8px;
  border-radius: 99px;
  background: var(--surface-2);
}

.lp-range::-moz-range-progress {
  height: 8px;
  border-radius: 99px;
  background: var(--accent);
}

.lp-range::-moz-range-thumb {
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  border: 4px solid var(--accent);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 2px 10px rgb(0 0 0 / 22%);
}

.lp-range:active::-webkit-slider-thumb {
  transform: scale(1.12);
}

.lp-range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 30%, transparent), 0 2px 10px rgb(0 0 0 / 22%);
}

.lp-range:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 30%, transparent);
}

.lp-math-result {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--bg);
}

.lp-big-number {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 6px 0 24px;
  font-size: clamp(3.25rem, 2rem + 4vw, 5rem);
  font-weight: 760;
  line-height: 1;
  letter-spacing: -0.05em;
}

.lp-big-number small {
  color: var(--text-2);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: 0;
}

.lp-balance {
  display: grid;
  gap: 10px;
}

.lp-balance-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  color: var(--text-2);
  font-size: var(--text-sm);
  font-weight: 600;
}

.lp-balance-track {
  height: 14px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-2);
}

.lp-balance-fill {
  width: var(--w, 0%);
  height: 100%;
  border-radius: inherit;
  transition: width 450ms var(--lp-ease);
}

.lp-balance-fill.is-eaten {
  background: linear-gradient(90deg, color-mix(in oklab, var(--carbs) 70%, var(--protein)), var(--carbs));
}

.lp-balance-fill.is-burned {
  background: linear-gradient(90deg, var(--lp-accent-2), var(--accent));
}

.lp-balance-note {
  margin-top: 18px;
  color: var(--accent-strong);
  font-weight: 650;
}

.lp-balance-note.is-surplus {
  color: var(--warning);
}

.lp-fineprint {
  margin-top: 10px;
  color: var(--text-3);
  font-size: var(--text-sm);
}

/* ---------- features ---------- */

.lp-bento {
  display: grid;
  gap: 16px;
}

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

  .lp-tile-ai,
  .lp-tile-body,
  .lp-tile-anywhere {
    grid-column: span 2;
  }
}

@media (min-width: 1040px) {
  .lp-bento {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
  }

  .lp-tile-ai { grid-column: span 4; }
  .lp-tile-scan,
  .lp-tile-week,
  .lp-tile-plan,
  .lp-tile-insights { grid-column: span 2; }
  .lp-tile-body,
  .lp-tile-anywhere { grid-column: span 3; }
}

.lp-tile {
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: hidden;
  padding: clamp(22px, 2.6vw, 30px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  transition: border-color 300ms;
}

.lp-tile:hover {
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
}

.lp-tile-scan,
.lp-tile-week,
.lp-tile-plan,
.lp-tile-insights {
  justify-content: space-between;
}

.lp-tile-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: 700;
}

.lp-tile-kicker svg {
  width: 16px;
  height: 16px;
}

.lp-tile h3 {
  margin-top: 8px;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lp-tile-copy p + h3 + p {
  margin-top: 8px;
  color: var(--text-2);
}

.lp-ai-demo,
.lp-scan,
.lp-week,
.lp-plan,
.lp-streak,
.lp-measures {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
}

/* AI logging */

@media (min-width: 720px) {
  .lp-tile-ai {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: center;
    gap: 32px;
  }
}

.lp-ai-demo {
  padding: 14px;
}

.lp-ai-input {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 8px 14px;
  border: 1px solid color-mix(in oklab, var(--accent) 45%, var(--border));
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 12%, transparent);
  font-weight: 550;
}

.lp-ai-input svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.lp-ai-text:empty::before {
  content: "What did you eat?";
  color: var(--text-3);
}

.lp-caret {
  flex: none;
  width: 2px;
  height: 1.25em;
  margin-left: -8px;
  border-radius: 1px;
  background: var(--accent);
  animation: lp-blink 1s steps(1) infinite;
}

[data-state="thinking"] .lp-caret,
[data-state="done"] .lp-caret {
  opacity: 0;
  animation: none;
}

[data-state="thinking"] .lp-ai-input {
  background: linear-gradient(90deg, var(--surface) 0%, var(--accent-soft) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.1s ease-in-out infinite;
}

.lp-ai-items {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.lp-ai-items li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-size: var(--text-sm);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 380ms ease, transform 500ms var(--lp-ease);
}

[data-state="done"] .lp-ai-items li {
  opacity: 1;
  transform: none;
}

[data-state="done"] .lp-ai-items li:nth-child(2) { transition-delay: 90ms; }
[data-state="done"] .lp-ai-items li:nth-child(3) { transition-delay: 180ms; }
[data-state="done"] .lp-ai-items li:nth-child(4) { transition-delay: 270ms; }
[data-state="done"] .lp-ai-items li:nth-child(5) { transition-delay: 420ms; }

.lp-ai-name {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-ai-amount {
  color: var(--text-3);
}

.lp-ai-items .num {
  font-weight: 650;
}

.lp-ai-items .lp-ai-total {
  grid-template-columns: minmax(0, 1fr) auto;
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

/* barcode */

.lp-scan {
  padding: 26px 16px 14px;
}

.lp-scan-frame {
  position: relative;
  width: min(210px, 86%);
  margin-inline: auto;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fff;
}

.lp-scan-frame::before {
  content: "";
  position: absolute;
  inset: -12px;
  background:
    linear-gradient(var(--accent), var(--accent)) top left / 22px 3px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top left / 3px 22px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top right / 22px 3px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top right / 3px 22px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom left / 22px 3px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom left / 3px 22px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 22px 3px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 3px 22px no-repeat;
}

.lp-barcode {
  width: 100%;
  height: 58px;
  fill: #16181b;
}

.lp-scan-laser {
  position: absolute;
  top: 14%;
  right: 6px;
  left: 6px;
  height: 2px;
  border-radius: 1px;
  background: #ef3b4f;
  box-shadow: 0 0 10px 2px rgb(239 59 79 / 55%);
  animation: lp-laser 1.8s ease-in-out infinite alternate;
}

.lp-scan-result {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 22px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-size: var(--text-sm);
}

.lp-scan-result span {
  color: var(--text-2);
}

/* programs */

.lp-week {
  padding: 16px;
}

.lp-week-legend {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-2);
  font-size: var(--text-xs);
}

.lp-week-legend strong {
  color: var(--text);
}

.lp-week-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  height: 120px;
  margin-top: 14px;
}

.lp-week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 650;
}

.lp-week-bar {
  width: 100%;
  height: calc((100% - 22px) * 0.72);
  border-radius: 7px;
  background: color-mix(in oklab, var(--accent) 32%, var(--surface-2));
  transform-origin: bottom;
}

.lp-week-day.is-high .lp-week-bar {
  height: calc(100% - 22px);
  background: linear-gradient(to top, var(--accent), var(--lp-accent-2));
}

.landing.reveal-ready .lp-tile-week .lp-week-bar {
  transform: scaleY(0);
  transition: transform 900ms var(--lp-ease);
}

.landing.reveal-ready .lp-tile-week.is-visible .lp-week-bar {
  transform: none;
}

.lp-week-day:nth-child(2) .lp-week-bar { transition-delay: 50ms; }
.lp-week-day:nth-child(3) .lp-week-bar { transition-delay: 100ms; }
.lp-week-day:nth-child(4) .lp-week-bar { transition-delay: 150ms; }
.lp-week-day:nth-child(5) .lp-week-bar { transition-delay: 200ms; }
.lp-week-day:nth-child(6) .lp-week-bar { transition-delay: 250ms; }
.lp-week-day:nth-child(7) .lp-week-bar { transition-delay: 300ms; }

/* meal planning */

.lp-plan {
  padding: 16px;
}

.lp-plan-left {
  display: flex;
  flex-direction: column;
}

.lp-plan-left span {
  color: var(--text-3);
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lp-plan-left strong {
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}

.lp-plan ul {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.lp-plan li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 7px 7px 7px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-size: var(--text-sm);
}

.lp-plan li > span:first-child {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-plan li .num {
  color: var(--text-2);
}

.lp-plus {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
}

.lp-plus svg {
  width: 16px;
  height: 16px;
}

/* insights */

.lp-streak {
  display: grid;
  grid-template-rows: repeat(7, auto);
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 4px;
  padding: 16px;
}

.lp-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--surface-2);
}

.lp-cell.l1 { background: color-mix(in oklab, var(--accent) 28%, var(--surface-2)); }
.lp-cell.l2 { background: color-mix(in oklab, var(--accent) 58%, var(--surface-2)); }
.lp-cell.l3 { background: var(--accent); }

/* body */

.lp-measures {
  margin: 0;
  padding: 6px 16px;
  list-style: none;
}

.lp-measures li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding-block: 10px;
  font-size: var(--text-sm);
}

.lp-measures li + li {
  border-top: 1px solid var(--border);
}

.lp-measures .sparkline {
  height: 28px;
}

.lp-measures .num {
  font-weight: 650;
}

.lp-measure-label {
  color: var(--text-2);
  font-weight: 600;
}

.lp-measures .lp-measure-change {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: var(--text-xs);
}

.lp-water-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-2);
}

.lp-water-track span {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: inherit;
  background: var(--fat);
}

.lp-water-icon {
  display: grid;
  place-items: center;
  color: var(--fat);
}

.lp-water-icon svg {
  width: 18px;
  height: 18px;
}

/* everywhere */

.lp-tile-anywhere {
  justify-content: space-between;
}

.lp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-size: var(--text-sm);
  font-weight: 600;
}

.lp-chips svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.lp-chips kbd {
  font-size: var(--text-xs);
}

/* ---------- finale & footer ---------- */

.lp-finale-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: clamp(52px, 8vw, 100px) clamp(22px, 5vw, 64px);
  border-radius: 36px;
  background: linear-gradient(135deg, #0c4f34 0%, #1b7f53 50%, #1c6a80 100%);
  color: #fff;
  text-align: center;
}

.lp-finale-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(circle at 1px 1px, rgb(255 255 255 / 16%) 1px, transparent 0);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000, transparent 75%);
}

.lp-finale-panel::after {
  content: "";
  position: absolute;
  inset: -40% 20% auto;
  z-index: -1;
  height: 80%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(160 255 210 / 35%), transparent);
  filter: blur(20px);
}

.lp-finale-mark {
  border-radius: 18px;
  box-shadow: 0 0 0 10px rgb(255 255 255 / 8%), 0 0 0 22px rgb(255 255 255 / 4%), 0 20px 40px rgb(0 0 0 / 25%);
}

.lp-finale-mark svg {
  width: 64px;
  height: 64px;
}

.lp-finale-panel h2 {
  margin-top: 36px;
  color: #fff;
}

.lp-finale-panel p {
  max-width: 34rem;
  margin-top: 14px;
  color: rgb(255 255 255 / 82%);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
}

.lp-finale-panel .lp-cta-row {
  justify-content: center;
}

.lp-finale-panel .btn-primary {
  background: #fff;
  color: #0c3f2a;
}

.lp-finale-panel .btn-primary:hover {
  background: #eafff4;
}

.lp-finale-panel .btn.lp-btn-quiet {
  border-color: rgb(255 255 255 / 28%);
  background: rgb(255 255 255 / 8%);
  color: #fff;
}

.lp-finale-panel .btn.lp-btn-quiet:hover {
  background: rgb(255 255 255 / 16%);
}

.lp-finale-panel :focus-visible {
  outline-color: #fff;
}

.lp-footer {
  border-top: 1px solid var(--lp-line);
}

.lp-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding-block: 28px calc(28px + env(safe-area-inset-bottom));
  color: var(--text-3);
  font-size: var(--text-sm);
}

.lp-footer p {
  flex: 1 1 260px;
}

.lp-footer .lp-footer-legal {
  flex-basis: 100%;
  font-size: var(--text-xs);
}

.lp-footer nav {
  display: flex;
  gap: 20px;
}

.lp-footer nav a {
  color: var(--text-2);
  font-weight: 600;
  text-decoration: none;
}

.lp-footer nav a:hover {
  color: var(--text);
}

/* ---------- motion ---------- */

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

@keyframes lp-float-in {
  from { opacity: 0; transform: translateY(26px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes lp-bob {
  50% { transform: translateY(-8px); }
}

@keyframes lp-pop {
  from { opacity: 0; transform: scale(0); }
}

@keyframes lp-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes lp-fade {
  to { opacity: 1; }
}

@keyframes lp-halo {
  from { opacity: 0.4; transform: scale(0.4); }
  to { opacity: 0; transform: scale(1.7); }
}

@keyframes lp-ring {
  from { stroke-dashoffset: 326.73; }
}

@keyframes lp-grow-x {
  from { transform: scaleX(0); }
}

@keyframes lp-beacon {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 50%, transparent); }
  60% { box-shadow: 0 0 0 7px transparent; }
}

@keyframes lp-ping {
  from { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 55%, transparent); }
  70%, to { box-shadow: 0 0 0 10px transparent; }
}

@keyframes lp-blink {
  50% { opacity: 0; }
}

@keyframes lp-laser {
  to { top: 82%; }
}

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

  .lp-trend-line { stroke-dashoffset: 0; }
  .lp-trend-area,
  .lp-end { opacity: 1; }
}
