/* Homepage product presentation. Legacy content keeps its existing styles. */
.home-page {
  --home-ink: #173b34;
  --home-muted: #546960;
  --home-teal: #168c80;
  --home-paper: #fbfcf8;
  --home-line: #dce5da;
}

.home-shell {
  width: min(1120px, calc(100% - 64px));
  margin-inline: auto;
}

.home-hero,
.home-pillars,
.home-chapter,
.home-day,
.home-download,
.home-nav,
.home-viewer {
  color: var(--home-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.home-hero :is(h1, p, figure),
.home-product-copy :is(h2, p),
.home-product-stage,
.home-day figure {
  margin: 0;
}

.home-hero-grid > *,
.home-chapter > *,
.home-day > *,
.home-download > *,
.home-pillars > * {
  min-width: 0;
}

.home-hero :is(h1, p, a, figcaption),
.home-product-copy :is(h2, p, a, li),
.home-pillars :is(a, strong, span),
.home-product-stage figcaption {
  overflow-wrap: anywhere;
}

.home-hero :is(a, button):focus-visible,
.home-chapter :is(a, button):focus-visible,
.home-pillars a:focus-visible,
.home-day a:focus-visible,
.home-nav :is(a, button, summary):focus-visible,
.home-viewer button:focus-visible {
  outline: 3px solid #8b65b6;
  outline-offset: 5px;
}

.home-hero {
  background: var(--home-paper);
  padding: 52px 0 42px;
  scroll-margin-top: 80px;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 38px;
}

.home-eyebrow {
  color: var(--home-teal);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.home-hero h1 {
  max-width: 570px;
  margin-top: 18px;
  font-size: clamp(40px, 3.6vw, 52px);
  line-height: 1.08;
  letter-spacing: -2.5px;
  font-weight: 750;
  text-wrap: balance;
}

.home-hero h1 span {
  color: var(--home-teal);
}

.home-hero .home-lead {
  max-width: 470px;
  margin-top: 23px;
  color: var(--home-muted);
  font-size: 18px;
  line-height: 1.65;
}

.home-store-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px 22px;
  margin-top: 27px;
}

.home-store-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  height: 52px;
  text-decoration: none;
  border-radius: 8px;
}

.home-store-badge img {
  display: block;
  width: auto;
  max-width: none;
}

.home-store-badge-ios img,
.home-store-badge[data-home-store="ios"] img {
  height: 52px;
}

.home-store-badge-android img,
.home-store-badge[data-home-store="android"] img {
  height: 78px;
  margin-inline: -13px;
}

.home-store-badge[hidden] {
  display: none;
}

.home-hero .home-note {
  margin-top: 15px;
  color: var(--home-muted);
  font-size: 12px;
  line-height: 1.6;
}

.home-explore,
.home-text-link {
  display: inline-block;
  color: var(--home-teal);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.home-explore {
  margin-top: 19px;
}

.home-hero-art {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 560px;
  height: 560px;
  padding: 12px 12px 36px;
}

.home-hero-art::before {
  position: absolute;
  z-index: -1;
  inset: 17% 0 9%;
  border-radius: 48%;
  background: #e8eee0;
  content: "";
}

.home-phone {
  width: 260px;
  max-width: 100%;
  padding: 0;
  border: 4px solid #273730;
  border-radius: 29px;
  background: #101713;
  box-shadow: 0 22px 45px #253c271c;
  overflow: hidden;
}

.home-phone img {
  display: block;
  width: 100%;
  height: auto;
}

.home-hero-art .home-phone {
  flex: 0 0 auto;
  width: auto;
  aspect-ratio: 1320 / 2868;
}

.home-hero-art .home-phone img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-hero-meal {
  z-index: 2;
  height: 100%;
  margin: 0 -7px 0 0;
  transform: rotate(-4deg);
}

.home-hero-body {
  height: 86%;
  align-self: flex-end;
  margin: 0 0 10px -7px;
  transform: rotate(3deg);
}

.home-art-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  color: var(--home-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.home-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-block: 23px;
  border-block: 1px solid var(--home-line);
  margin-top: 32px;
}

.home-pillars a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--home-ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
}

.home-pillars a > span:first-child {
  color: #72927c;
  font-size: 18px;
  font-weight: 600;
}

.home-pillars strong {
  font-weight: 500;
}

.home-chapter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 85px;
  align-items: center;
  padding-block: 84px;
  scroll-margin-top: 90px;
}

.home-product-copy h2 {
  margin-top: 14px;
  font-size: clamp(32px, 3.5vw, 46px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -1.5px;
  text-wrap: balance;
}

.home-product-copy > p:not(.home-eyebrow) {
  margin-top: 21px;
  color: var(--home-muted);
  font-size: 17px;
  line-height: 1.75;
}

.home-detail-list {
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.home-detail-list li {
  display: flex;
  gap: 11px;
  font-size: 15px;
  line-height: 1.6;
}

.home-detail-list li::before {
  flex: none;
  color: var(--home-teal);
  font-weight: 700;
  content: "✓";
}

.home-product-copy .home-text-link {
  margin-top: 25px;
}

.home-product-copy .home-note {
  font-size: 12px !important;
  line-height: 1.6 !important;
}

.home-product-stage {
  display: grid;
  justify-items: center;
  gap: 17px;
  padding: 28px 24px 22px;
  border-radius: 28px;
}

.home-product-stage figcaption {
  color: var(--home-muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.home-meal-stage {
  background: #eaf0e1;
}

.home-scan-stage {
  background: #ece7f1;
}

.home-segments {
  display: flex;
  gap: 4px;
  width: 100%;
  max-width: 305px;
  padding: 4px;
  border: 1px solid #d1c8da;
  border-radius: 28px;
}

.home-segments button {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: #564562;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.home-segments button[aria-pressed="true"],
.home-segments button[aria-selected="true"] {
  background: #4f3b60;
  color: #fff;
}

.home-screen-button {
  display: block;
  margin: 0;
  cursor: zoom-in;
}

.home-screen-button img[hidden] {
  display: none;
}

.home-js-only {
  display: none;
}

.home-ready .home-js-only,
.home-js-ready .home-js-only,
html[data-home-platform] .home-js-only {
  display: flex;
}

.home-ready .home-screen-caption .home-js-only,
.home-js-ready .home-screen-caption .home-js-only,
html[data-home-platform] .home-screen-caption .home-js-only {
  display: inline-block;
}

.home-product-stage figcaption button {
  min-height: 40px;
  padding: 7px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.home-coach-band {
  background: #153e35;
}

.home-coach-band .home-chapter {
  color: #f4f7eb;
  padding-block: 72px;
}

.home-coach-band .home-eyebrow,
.home-coach-band .home-text-link,
.home-coach-band .home-detail-list li::before {
  color: #a5ddce;
}

.home-coach-band .home-product-copy > p:not(.home-eyebrow),
.home-coach-band .home-product-stage figcaption {
  color: #d0dfd7;
}

.home-coach-band .home-product-stage {
  background: transparent;
  padding: 0;
}

.home-coach-band .home-product-copy {
  order: 2;
}

.home-coach-band .home-phone {
  width: 282px;
  border-color: #667b6c;
}

.home-day {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 90px;
  align-items: center;
  padding-block: 80px;
}

.home-day > .home-phone,
.home-day > figure {
  justify-self: center;
  width: 248px;
  max-width: 100%;
}

.home-download {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 36px;
  align-items: center;
  margin-block: 20px 72px;
  padding: 46px 48px;
  border-radius: 29px;
  background: #e8f0df;
  scroll-margin-top: 88px;
}

.home-download .home-product-copy h2 {
  margin-top: 12px;
}

.home-download .home-note a {
  color: var(--home-teal);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.home-qr {
  text-align: center;
  color: var(--home-muted);
  font-size: 12px;
  line-height: 1.6;
}

.home-qr img {
  width: 156px;
  height: 156px;
  margin: 0 auto 10px;
  padding: 7px;
  border-radius: 15px;
  background: #fff;
}

html:is([data-home-platform="ios"], [data-home-platform="android"],
  [data-download-platform="ios"], [data-download-platform="android"]) .home-qr {
  display: none;
}

html:is([data-home-platform="ios"], [data-home-platform="android"],
  [data-download-platform="ios"], [data-download-platform="android"]) .home-download {
  grid-template-columns: minmax(0, 1fr);
}

.home-viewer {
  width: min(620px, calc(100% - 24px));
  max-height: 94vh;
  max-height: 94dvh;
  padding: 58px 15px 16px;
  border: 0;
  border-radius: 20px;
  background: #14251f;
  color: #f5f8f2;
  overflow: auto;
  box-shadow: 0 24px 90px #00160d66;
}

.home-viewer::backdrop {
  background: #071d16d9;
  backdrop-filter: blur(6px);
}

.home-viewer img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(94vh - 105px);
  max-height: calc(94dvh - 105px);
  margin: auto;
  border-radius: 10px;
  object-fit: contain;
}

.home-viewer > button,
.home-viewer-close {
  position: absolute;
  top: 11px;
  right: 15px;
  min-height: 40px;
  padding: 8px 17px;
  border: 1px solid #82978a;
  border-radius: 24px;
  background: #2a4438;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.home-viewer p {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

/* The compact header retains a full, explicit current-language selector. */
.home-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-inline: 24px;
  border-bottom: 1px solid var(--home-line);
  background: #ffffffed;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.home-nav-inner,
.home-nav > .home-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  width: 100%;
  max-width: 1120px;
  min-height: 64px;
  margin-inline: auto;
  padding-block: 6px;
}

.home-brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 9px;
  color: #239d91;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.home-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.home-brand-wordmark {
  display: block;
  width: auto;
  height: 22px;
  max-width: none;
  flex: none;
}

.home-nav-links,
.home-nav-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 22px;
  min-width: 0;
  max-width: 100%;
}

.home-nav-links {
  margin-left: auto;
}

.home-nav-links > a {
  color: var(--home-muted);
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.home-nav-actions {
  gap: 8px 16px;
  justify-content: flex-end;
}

.home-nav-download,
.home-nav-actions > a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  padding: 9px 20px;
  border-radius: 24px;
  background: #228f80;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.home-nav .language-picker {
  position: relative;
  flex: none;
}

.home-nav .language-picker summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  padding: 0 4px;
  color: var(--home-ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  list-style: none;
  white-space: nowrap;
  cursor: pointer;
}

.home-nav .language-picker summary::-webkit-details-marker {
  display: none;
}

.home-nav .language-picker[open] summary svg {
  transform: rotate(180deg);
}

.home-nav .language-options {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  min-width: 150px;
  padding: 6px;
  border: 1px solid var(--home-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 28px #17342d1c;
}

.home-nav .language-options > :is(a, span) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 7px;
  color: var(--home-ink);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 400;
  text-decoration: none;
}

.home-nav .language-options > [aria-current] {
  background: #eef3e9;
  font-weight: 600;
}

.home-nav .language-options a:hover {
  background: #f3f5f0;
}

.home-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 40px;
  min-height: 44px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--home-ink);
  font: inherit;
  cursor: pointer;
}

.home-nav-toggle > svg {
  display: block;
  width: 22px;
  height: 22px;
}

@media (max-width: 1100px) {
  .home-nav-links,
  .home-nav-actions {
    gap: 10px 13px;
  }

  .home-hero-grid {
    gap: 20px;
  }

  .home-hero-art {
    height: 505px;
  }

  .home-chapter,
  .home-day {
    gap: 50px;
  }
}

@media (max-width: 900px) {
  .home-shell {
    width: calc(100% - 40px);
  }

  .home-hero {
    padding-block: 24px;
  }

  .home-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 19px;
  }

  .home-hero-copy {
    text-align: center;
  }

  .home-hero-copy > .home-eyebrow,
  .home-hero .home-explore {
    display: none;
  }

  .home-hero h1 {
    max-width: 680px;
    margin: 0 auto;
    font-size: clamp(28px, 8.2vw, 40px);
    line-height: 1.09;
    letter-spacing: -1.25px;
  }

  .home-hero .home-lead {
    max-width: 360px;
    margin: 13px auto 0;
    font-size: 15px;
    line-height: 1.5;
  }

  .home-hero .home-store-options {
    justify-content: center;
    margin-top: 19px;
  }

  .home-store-badge {
    height: 48px;
  }

  .home-store-badge-ios img,
  .home-store-badge[data-home-store="ios"] img {
    height: 48px;
  }

  .home-store-badge-android img,
  .home-store-badge[data-home-store="android"] img {
    height: 72px;
    margin-inline: -12px;
  }

  .home-hero .home-note {
    margin-top: 12px;
    font-size: 11px;
    line-height: 1.5;
  }

  .home-hero-art {
    max-width: 380px;
    height: 340px;
    height: clamp(145px, calc(100svh - 420px), 350px);
    margin: 0 auto;
    padding: 5px 12px 40px;
  }

  .home-hero-art .home-phone {
    border-width: 3px;
    border-radius: 19px;
  }

  .home-hero-meal {
    margin-right: -5px;
  }

  .home-hero-body {
    margin-left: -5px;
    margin-bottom: 7px;
  }

  .home-art-caption {
    font-size: 12px;
    line-height: 1.4;
  }

  .home-pillars {
    gap: 12px;
    padding-block: 18px;
    margin-top: 22px;
  }

  .home-pillars a {
    display: block;
    font-size: 12px;
    text-align: center;
  }

  .home-pillars a > span:first-child {
    display: block;
    margin-bottom: 3px;
    font-size: 17px;
  }

  .home-chapter,
  .home-day {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-block: 52px;
  }

  .home-product-copy {
    order: -1;
  }

  .home-coach-band .home-product-copy {
    order: -1;
  }

  .home-product-copy h2 {
    max-width: 560px;
    font-size: 34px;
    letter-spacing: -1px;
  }

  .home-product-copy > p:not(.home-eyebrow) {
    margin-top: 18px;
    font-size: 15px;
    line-height: 1.65;
  }

  .home-detail-list {
    gap: 12px;
    margin-top: 21px;
  }

  .home-detail-list li {
    font-size: 14px;
  }

  .home-product-stage {
    padding: 23px 17px 19px;
  }

  .home-product-stage .home-phone {
    width: 252px;
  }

  .home-coach-band .home-chapter {
    padding-block: 50px;
  }

  .home-coach-band .home-phone {
    width: 266px;
  }

  .home-day > .home-phone,
  .home-day > figure {
    width: 235px;
  }

  .home-download {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    margin-block: 10px 45px;
    padding: 30px 24px;
  }

  .home-nav {
    padding-inline: 16px;
  }

  .home-nav-inner,
  .home-nav > .home-shell {
    gap: 4px 8px;
  }

  .home-brand {
    gap: 7px;
    font-size: 16px;
  }

  .home-brand-icon {
    width: 27px;
    height: 27px;
  }

  .home-brand-wordmark {
    height: 18px;
  }

  .home-nav-actions {
    gap: 4px 8px;
    margin-left: auto;
  }

  .home-nav-actions > a,
  .home-nav-download {
    padding: 9px 12px;
    font-size: 12px;
  }

  .home-nav-toggle {
    display: inline-flex;
  }

  .home-nav-links {
    display: none;
    order: 3;
    flex-basis: 100%;
    margin: 0;
    padding: 8px 0 11px;
    gap: 5px 18px;
  }

  .home-nav-links:is(.is-open, .open),
  .home-nav:has(.home-nav-toggle[aria-expanded="true"]) .home-nav-links {
    display: flex;
  }

  .home-nav-links > a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }

  html:not(.home-ready) .home-nav-links {
    display: flex;
  }

  html:not(.home-ready) .home-nav-toggle {
    display: none;
  }
}

@media (max-width: 380px) {
  .home-shell {
    width: calc(100% - 32px);
  }

  .home-brand-wordmark {
    display: none;
  }

  .home-hero {
    padding-block: 20px;
  }

  .home-hero-grid {
    gap: 15px;
  }

  .home-hero h1 {
    font-size: 28px;
    letter-spacing: -1px;
  }

  .home-hero .home-lead {
    font-size: 14px;
    line-height: 1.45;
  }

  .home-hero-art {
    height: clamp(210px, calc(100svh - 345px), 310px);
  }

  html:is([data-home-platform="unknown"], :not(.home-ready)) .home-hero .home-store-options {
    gap: 14px;
  }

  html:is([data-home-platform="unknown"], :not(.home-ready)) .home-hero .home-store-badge {
    height: 40px;
  }

  html:is([data-home-platform="unknown"], :not(.home-ready)) .home-hero .home-store-badge-ios img {
    height: 40px;
  }

  html:is([data-home-platform="unknown"], :not(.home-ready)) .home-hero .home-store-badge-android img {
    height: 60px;
    margin-inline: -10px;
  }

  .home-product-copy h2 {
    font-size: 30px;
  }

  .home-download {
    padding-inline: 20px;
  }
}

@media (max-width: 600px) {
  .home-page .section :is(h1, h2, h3, p, blockquote, a, span) {
    overflow-wrap: anywhere;
  }

  /* Long existing reading links must wrap instead of widening mobile pages. */
  .home-page .section a[style*="white-space"] {
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  .home-page .pipeline-step-body {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .home-page .accuracy-data-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  }

  .home-page :is(.accuracy-metric, .testimonial-card) {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

.home-page .social-proof-item {
  min-width: 0;
  max-width: 100%;
}

.home-page .social-proof-label {
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (min-width: 600px) and (max-width: 900px) {
  .home-page .social-proof-item {
    padding-inline: 16px;
  }
}

@media (max-width: 900px) and (max-height: 500px) {
  /* Landscape can scroll: retain a useful product preview instead of shrinking it. */
  .home-hero-art {
    height: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  .home-page {
    scroll-behavior: auto;
  }

  .home-nav *,
  .home-hero *,
  .home-chapter *,
  .home-day *,
  .home-viewer * {
    animation: none !important;
    transition: none !important;
  }
}
