/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  /* Clip only sideways, where the waves overhang, so the sinking phone’s shadow isn’t cut off at the bottom.
     clip, unlike hidden, isn’t a scroll container, so the phone’s view timeline follows the page scroll. */
  overflow: clip visible;
}

.waves {
  --waves-overhang: 60px;
  position: absolute;
  left: -10%;
  bottom: calc(-1 * var(--waves-overhang));
  width: 130%;
  height: 440px;
  /* The hero clips only sideways, so cut the overhang here; the intro rise starts 40px lower. */
  clip-path: inset(0 0 var(--waves-overhang));
  pointer-events: none;
}

.wave {
  animation: wave-rise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.wave-peach-b { animation-delay: 90ms; }
.wave-sage { animation-delay: 180ms; }
.wave-teal { animation-delay: 270ms; }

@keyframes wave-rise {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}

.hero-inner {
  --hero-pad-bottom: clamp(64px, 8vw, 104px);
  container: hero / inline-size;
  position: relative;
  display: grid;
  /* Two columns fit from 2 × 400px + 56px gap = 856px: keep @container hero below in sync. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  align-items: center;
  gap: 56px;
  max-width: var(--frame);
  margin-inline: auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter) var(--hero-pad-bottom);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 560px;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-deep);
  font: 500 0.9375rem var(--sans);
}

.hero-badge .icon {
  font-size: 18px;
}

.hero-title {
  font: 600 clamp(2.875rem, 6.4vw, 4.875rem) / 1 var(--serif);
  letter-spacing: -0.015em;
}

.hero-lead {
  max-width: 470px;
  color: var(--text-secondary);
  font-size: clamp(1.125rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.hero-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 420px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.hero-note .icon {
  margin-top: 1px;
  color: var(--primary-deep);
  font-size: 18px;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

/* Phone mock: drawn at the app’s 390×844 pt and scaled down as a whole. */

.phone {
  --phone-scale: 0.8;
  --phone-lift: 0px;
  /* Sinks into the room below it in the hero, less the 9px ring and a little air, so it never reaches the next section. */
  --phone-drop: calc(var(--hero-pad-bottom) + var(--phone-lift) - 16px);
  position: relative;
  top: calc(-1 * var(--phone-lift));
  flex: none;
  width: calc(390px * var(--phone-scale));
  height: calc(844px * var(--phone-scale));
  border-radius: calc(48px * var(--phone-scale));
  box-shadow:
    0 0 0 8px var(--surface),
    0 0 0 9px var(--outline),
    0 30px 70px rgba(60, 50, 30, 0.18);
}

/* Side by side (two 400px columns plus the 56px gap fit in .hero-inner), the phone sits a little higher.
   Stacked under the copy it stays put, so it doesn’t crowd the text above it. */

@container hero (min-width: 856px) {
  .phone {
    --phone-lift: 40px;
  }
}

/* Parallax: while the phone scrolls out of view it lags behind the page, sinking by --phone-drop.
   Starting on exit keeps it at rest on load. Without scroll timelines the phone stays still. */

@supports (animation-timeline: view()) and (animation-range: exit) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-visual {
      view-timeline: --phone-track block;
    }

    .phone {
      animation: phone-sink linear both;
      animation-timeline: --phone-track;
      animation-range: exit;
    }
  }
}

@keyframes phone-sink {
  to {
    translate: 0 var(--phone-drop);
  }
}

.phone-screen {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: 390px;
  height: 844px;
  overflow: hidden;
  border-radius: 48px;
  background: var(--background);
  font-size: 16px;
  transform: scale(var(--phone-scale));
  transform-origin: 0 0;
}

.phone-status {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 30px 0 44px;
  font: 600 17px var(--sans);
}

.phone-status-icons {
  display: flex;
  gap: 6px;
  font-size: 18px;
}

.phone-greeting {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 24px 0;
}

.phone-title {
  font: 600 34px / 1.1 var(--serif);
}

.phone-date {
  color: var(--text-secondary);
  font-size: 15px;
}

.phone-quote {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 22px 24px 0;
  padding-left: 15px;
}

.phone-quote::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  border-radius: 2px;
  background: var(--scale-6);
}

.phone-quote-text {
  font: 600 19px / 1.35 var(--serif);
}

.phone-quote-link {
  color: var(--primary-deep);
  font-size: 14px;
  font-weight: 500;
}

.phone-start {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 16px 0;
  padding: 22px 22px 20px;
  border-radius: 28px;
  background: var(--primary);
  color: var(--surface);
}

.phone-start-title {
  font: 600 28px / 1.1 var(--serif);
}

.phone-start-caption {
  margin-top: 6px;
  color: var(--on-primary-muted);
  font-size: 15.5px;
  line-height: 1.4;
}

.phone-start-arrow {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 22px;
}

.phone-craving {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 10px 16px 0;
  padding: 16px 18px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.phone-craving .tone-circle {
  width: 44px;
  height: 44px;
  font-size: 22px;
}

.phone-craving-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.phone-craving-title {
  font-size: 17px;
  font-weight: 500;
}

.phone-craving-caption {
  color: var(--text-secondary);
  font-size: 14.5px;
}

.phone-craving > .icon {
  color: var(--text-tertiary);
  font-size: 18px;
}

.phone-today {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 26px 24px 0;
}

.phone-today-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 14px;
}

.phone-today-head span:first-child {
  color: var(--text-primary);
  font: 600 20px var(--serif);
}

.phone-meal {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.phone-meal-time {
  width: 42px;
  color: var(--text-tertiary);
  font-size: 14px;
}

.phone-meal-name {
  flex: 1;
  font-size: 16.5px;
}

.level-pair {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
}

.level-pair .icon {
  color: var(--text-tertiary);
  font-size: 13px;
}

.phone-tabs {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 8px 12px 30px;
  border-top: 1px solid var(--border);
  background: rgba(251, 250, 247, 0.96);
}

.phone-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #6E6C64;
  font: 500 12px var(--sans);
}

.phone-tab .icon {
  font-size: 27px;
}

.phone-tab.is-active {
  color: var(--primary-deep);
  font-weight: 600;
}

.phone-home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 134px;
  height: 5px;
  border-radius: 3px;
  background: var(--text-primary);
  transform: translateX(-50%);
}

/* One number before, one after */

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 640px;
}

.section-title {
  font: 600 clamp(2.125rem, 4vw, 3rem) / 1.08 var(--serif);
  letter-spacing: -0.01em;
}

.section-lead {
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: clamp(64px, 8vw, 104px);
}

.step-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}

.step-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 26px;
}

.step-visual {
  display: flex;
  align-items: center;
  height: 56px;
}

.step-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-title {
  font: 600 1.5rem / 1.15 var(--serif);
}

.card-text {
  color: var(--text-secondary);
  line-height: 1.5;
  text-wrap: pretty;
}

.mini-scale {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  align-items: end;
  gap: 3px;
}

.mini-scale span {
  height: 30px;
  border-radius: 7px;
}

.mini-scale .level-7 {
  height: 38px;
  border-radius: 8px;
}

.mini-scale .is-selected {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-radius: 9px;
  box-shadow: 0 0 0 2px var(--text-primary);
  font: 600 0.9375rem var(--sans);
}

.step-pair {
  gap: 10px;
}

.step-pair > .icon {
  color: var(--text-tertiary);
  font-size: 16px;
}

.step-pair-caption {
  margin-left: 4px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.steps .arrow-link {
  align-self: flex-start;
}

/* What you won’t find here */

.absent {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px 56px;
}

.absent-title {
  flex: 1 1 260px;
}

.absent-list {
  display: flex;
  flex: 2 1 440px;
  flex-direction: column;
  border-bottom: 1px solid var(--border);
}

.absent-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}

/* Privacy */

.privacy-card {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 56px;
  padding: clamp(28px, 4.5vw, 56px);
  border-radius: 32px;
}

.privacy-card-head {
  display: flex;
  flex: 1 1 300px;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.privacy-card-title {
  font: 600 clamp(1.875rem, 3.4vw, 2.5rem) / 1.1 var(--serif);
}

.privacy-card-points {
  display: flex;
  flex: 1.3 1 340px;
  flex-direction: column;
  gap: 24px;
}

.privacy-point {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.privacy-point + .privacy-point {
  padding-top: 24px;
  border-top: 1px solid var(--divider);
}

@media (max-width: 379px) {
  .phone {
    --phone-scale: 0.7;
  }
}
