/* Homepage styles (loaded only by index.html, after site.css) */

/* Interactive food-mode hero */

.interactive-food {
  --food-hero-photo: url("/assets/assets-interactive/jed-owen-NPBnWE1o07I-unsplash.jpg");
  --phone: min(22.75rem, 72vw, calc(86dvh * 1280 / 2642));
  --s: calc(var(--phone) * 1170 / 1280 / 402);
  --screen-radius: calc(var(--phone) * 165 / 1280);
  --bezel: calc(var(--phone) * 55 / 1280);
  --frame-radius: calc(var(--phone) * 210 / 1280);
  --cream: #fffbf1;
  --ink: #1a1a1a;
  --chart-protein: #312e81;
  --chart-fat: #7b7ff0;
  --chart-carbs: #4f46e5;
  --chart-fiber: #9aa4f5;
  --chart-track: #e8e2d9;
}

.interactive-food .site-header {
  background: rgba(255, 251, 241, 0.82);
}

.interactive-food.is-capture .site-header,
.interactive-food.is-capture .site-footer,
.interactive-food.is-capture .food-hero__bar,
.interactive-food.is-capture .skip-link,
.interactive-food.is-capture .cookie-banner {
  display: none !important;
}

.interactive-food.is-capture {
  background: #1a1410;
}

.interactive-food.is-capture .food-hero {
  min-height: 100dvh;
  height: 100dvh;
}

.food-hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100dvh - 4.25rem);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #1a1410;
}

.food-hero__photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  pointer-events: none;
}

.food-hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 46%;
}

.food-hero__vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 28%, rgba(12, 8, 6, 0.28) 72%, rgba(12, 8, 6, 0.55) 100%);
}

.food-hero__stage {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 1.25rem 1rem 5.75rem;
}

.food-hero__bar {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 1.15rem;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 0.55rem;
  width: min(40rem, calc(100% - 2rem));
  padding: 0.45rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 251, 241, 0.9);
  border: 1px solid rgba(255, 251, 241, 0.35);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.food-hero__badge {
  margin: 0 0.35rem 0 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
}

.food-hero__bar .btn {
  min-height: 34px;
  padding: 0 0.9rem;
  font-size: 0.8125rem;
}

.food-hero__bar .btn.is-on {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

/* iPhone 16 Pro — Natural Titanium, Figma device-frame geometry */

.iphone {
  position: relative;
  width: var(--phone);
  height: calc(var(--phone) * 2642 / 1280);
  padding: var(--bezel);
  border-radius: var(--frame-radius);
  background: #1a1a1a;
  /* Figma 3553:74563 — dark body, hairline edge. The metal strokes sit
     inside the 55px bezel instead of adding an outer band. */
  box-shadow:
    inset 0 0 0 calc(var(--phone) * 1.5 / 1280) rgba(235, 227, 209, 0.55),
    inset 0 0 0 calc(var(--phone) * 4 / 1280) rgba(163, 154, 142, 0.4),
    0 22px 40px rgba(0, 0, 0, 0.35),
    0 50px 90px rgba(0, 0, 0, 0.5);
}

.iphone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: var(--screen-radius);
  background: #0c0c0c;
  isolation: isolate;
}

.iphone__food {
  /* Figma device-frame 3159:74802 — same FILL scale, ham in the scan frame */
  position: absolute;
  z-index: 0;
  display: block;
  left: calc(100% * -1423 / 1170);
  top: calc(100% * -213 / 2532);
  width: calc(100% * 3762 / 1170);
  height: calc(100% * 3009 / 2532);
  max-width: none;
  object-fit: fill;
  pointer-events: none;
  transition: top 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.food-hero[data-phase="summary"] .iphone__food {
  /* Figma layer 3161:75275 at -1423, -1112 in 1170×2532 */
  top: calc(100% * -1112 / 2532);
}

.iphone__island {
  position: absolute;
  z-index: 8;
  top: calc(var(--s) * 14);
  left: 50%;
  width: calc(var(--s) * 126);
  height: calc(var(--s) * 37);
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
  box-shadow: 0 0 0 calc(var(--s) * 3) rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.iphone__island::after {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(var(--s) * 18);
  width: calc(var(--s) * 10);
  height: calc(var(--s) * 10);
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #3a4a6a 0%, #0b1220 55%, #000 100%);
}

.iphone__btn {
  position: absolute;
  background: linear-gradient(90deg, #d8ccba, #8a8174);
  border-radius: calc(var(--phone) * 4 / 1280);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.iphone__btn--silent {
  left: calc(var(--phone) * -6 / 1280);
  top: calc(var(--phone) * 280 / 1280);
  width: calc(var(--phone) * 8 / 1280);
  height: calc(var(--phone) * 70 / 1280);
}

.iphone__btn--vol-up {
  left: calc(var(--phone) * -6 / 1280);
  top: calc(var(--phone) * 420 / 1280);
  width: calc(var(--phone) * 8 / 1280);
  height: calc(var(--phone) * 140 / 1280);
}

.iphone__btn--vol-down {
  left: calc(var(--phone) * -6 / 1280);
  top: calc(var(--phone) * 580 / 1280);
  width: calc(var(--phone) * 8 / 1280);
  height: calc(var(--phone) * 140 / 1280);
}

.iphone__btn--power {
  right: calc(var(--phone) * -6 / 1280);
  top: calc(var(--phone) * 470 / 1280);
  width: calc(var(--phone) * 8 / 1280);
  height: calc(var(--phone) * 180 / 1280);
}

/* Shared status bar */

.ui-status {
  position: absolute;
  z-index: 7;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--s) * 54);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 calc(var(--s) * 16) calc(var(--s) * 8);
  color: #fff;
  pointer-events: none;
}

.ui-status__time {
  flex: 1;
  font-size: calc(var(--s) * 17);
  font-weight: 600;
  letter-spacing: 0;
  text-align: center;
  line-height: calc(var(--s) * 22);
}

.ui-status__island {
  width: calc(var(--s) * 124);
  flex-shrink: 0;
}

.ui-status__levels {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--s) * 7);
}

.ui-status__levels svg {
  display: block;
  fill: currentColor;
}

/* Camera chrome */

.ui-camera {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 1;
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.ui-camera::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--s) * 150);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.18) 55%, transparent 100%);
  pointer-events: none;
}

.food-hero[data-phase="analyzing"] .ui-camera,
.food-hero[data-phase="summary"] .ui-camera {
  opacity: 0;
}

.ui-topbar {
  position: absolute;
  top: calc(var(--s) * 72);
  left: 50%;
  width: calc(var(--s) * 378);
  height: calc(var(--s) * 48);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ui-pill {
  display: grid;
  place-items: center;
  width: calc(var(--s) * 48);
  height: calc(var(--s) * 48);
  border: 0;
  border-radius: calc(var(--s) * 20);
  background: rgba(26, 26, 26, 0.8);
  color: var(--cream);
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  pointer-events: auto;
}

.ui-pill--count {
  border: 1px solid var(--cream);
  font-size: calc(var(--s) * 13);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.ui-logo {
  width: calc(var(--s) * 44);
  height: calc(var(--s) * 35);
  opacity: 0.9;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.ui-pill svg {
  width: calc(var(--s) * 22);
  height: calc(var(--s) * 22);
  fill: none;
  stroke: var(--cream);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scan-brackets {
  position: absolute;
  top: calc(50% - var(--s) * 36.5);
  left: 50%;
  width: calc(var(--s) * 337);
  height: calc(var(--s) * 337);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.scan-brackets__corner {
  position: absolute;
  width: 28%;
  height: 28%;
  border: calc(var(--s) * 2) solid var(--cream);
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.55));
}

.scan-brackets__corner--tl {
  top: 0;
  left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: calc(var(--s) * 32) 0 0 0;
}

.scan-brackets__corner--tr {
  top: 0;
  right: 0;
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 calc(var(--s) * 32) 0 0;
}

.scan-brackets__corner--bl {
  bottom: 0;
  left: 0;
  border-right: 0;
  border-top: 0;
  border-radius: 0 0 0 calc(var(--s) * 32);
}

.scan-brackets__corner--br {
  bottom: 0;
  right: 0;
  border-left: 0;
  border-top: 0;
  border-radius: 0 0 calc(var(--s) * 32) 0;
}

.scan-brackets__label {
  position: absolute;
  left: 50%;
  bottom: calc(var(--s) * 28);
  margin: 0;
  transform: translateX(-50%);
  color: #fff;
  font-size: calc(var(--s) * 15);
  font-weight: 700;
  text-align: center;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.analyze-dots span {
  opacity: 0;
}

.food-hero[data-phase="analyzing"] .ui-analyzing .scan-brackets__corner {
  animation: analyze-corner 0.9s ease-in-out 2;
}

.food-hero[data-phase="analyzing"] .analyze-dots span:nth-child(1) {
  animation: analyze-dot-1 1.2s linear infinite;
}

.food-hero[data-phase="analyzing"] .analyze-dots span:nth-child(2) {
  animation: analyze-dot-2 1.2s linear infinite;
}

.food-hero[data-phase="analyzing"] .analyze-dots span:nth-child(3) {
  animation: analyze-dot-3 1.2s linear infinite;
}

@keyframes analyze-corner {
  0%,
  100% {
    opacity: 0.28;
  }
  50% {
    opacity: 1;
  }
}

@keyframes analyze-dot-1 {
  0%,
  8% {
    opacity: 0;
  }
  14%,
  78% {
    opacity: 1;
  }
  84%,
  100% {
    opacity: 0;
  }
}

@keyframes analyze-dot-2 {
  0%,
  28% {
    opacity: 0;
  }
  34%,
  78% {
    opacity: 1;
  }
  84%,
  100% {
    opacity: 0;
  }
}

@keyframes analyze-dot-3 {
  0%,
  48% {
    opacity: 0;
  }
  54%,
  78% {
    opacity: 1;
  }
  84%,
  100% {
    opacity: 0;
  }
}

.ui-dock {
  position: absolute;
  left: 50%;
  bottom: calc(var(--s) * 50);
  width: calc(var(--s) * 360);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25));
  pointer-events: none;
}

.ui-modes {
  display: flex;
  gap: calc(var(--s) * 2);
  padding: calc(var(--s) * 2);
  margin-bottom: calc(var(--s) * 9);
  border-radius: calc(var(--s) * 14);
  background: rgba(26, 26, 26, 0.8);
}

.ui-modes span {
  display: grid;
  place-items: center;
  width: calc(var(--s) * 104);
  padding: calc(var(--s) * 10) calc(var(--s) * 8);
  border-radius: calc(var(--s) * 12);
  color: #fff;
  font-size: calc(var(--s) * 12);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.ui-modes span.is-on {
  background: #1a1a1a;
  border: 1px solid rgba(217, 217, 217, 0.4);
  color: #70b8ff;
}

.ui-nav {
  position: relative;
  width: calc(var(--s) * 360);
  height: calc(var(--s) * 96);
}

.ui-nav__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--s) * 64);
  border-radius: calc(var(--s) * 23);
  background: var(--cream);
}

.ui-nav__icon {
  position: absolute;
  bottom: calc(var(--s) * 8);
  width: calc(var(--s) * 48);
  height: calc(var(--s) * 48);
  display: grid;
  place-items: center;
  color: var(--ink);
}

.ui-nav__icon svg {
  width: calc(var(--s) * 24);
  height: calc(var(--s) * 24);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ui-nav__icon--history {
  left: calc(var(--s) * 16);
}
.ui-nav__icon--add {
  left: calc(var(--s) * 74);
}
.ui-nav__icon--insights {
  right: calc(var(--s) * 74);
}
.ui-nav__icon--you {
  right: calc(var(--s) * 16);
}

.ui-shutter {
  position: absolute;
  left: 50%;
  /* 96px shutter centered on the 64px bar, which is flush to the nav bottom */
  top: calc(var(--s) * 16);
  width: calc(var(--s) * 96);
  height: calc(var(--s) * 96);
  transform: translateX(-50%);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.ui-shutter__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--cream);
}

.ui-shutter__snap {
  position: absolute;
  /* Figma camera/button-snap: 110 box, white disc centered in the 96 cream circle */
  left: calc(var(--s) * -7);
  top: calc(var(--s) * -3);
  width: calc(var(--s) * 110);
  max-width: none;
  height: calc(var(--s) * 110);
  pointer-events: none;
  transition: transform 0.12s ease;
}

.food-hero[data-phase="snap"] .ui-shutter__snap {
  transform: scale(0.88);
}

.ui-flash {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

.food-hero[data-phase="snap"] .ui-flash {
  animation: food-shutter-flash 0.22s ease-out forwards;
}

@keyframes food-shutter-flash {
  0% {
    opacity: 0;
  }
  25% {
    opacity: 0.92;
  }
  100% {
    opacity: 0;
  }
}

/* Analyzing overlay */

.ui-analyzing {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: rgba(26, 26, 26, 0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.food-hero[data-phase="analyzing"] .ui-analyzing {
  opacity: 1;
}

.ui-analyzing .ui-topbar {
  pointer-events: none;
}

.ui-analyzing .scan-brackets {
  z-index: 1;
}

/* Summary */

.ui-summary {
  --collapse: 0;
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.food-hero[data-phase="summary"] .ui-summary {
  opacity: 1;
  pointer-events: auto;
}

.ui-summary__chrome {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  /* Figma scroll-mid sheet starts at y=138; the extra 42 is the collapsible photo */
  height: calc(var(--s) * 138);
  background: transparent;
}

.ui-summary .ui-topbar {
  display: block;
  pointer-events: none;
}

.ui-summary .ui-chip {
  position: absolute;
  left: calc(var(--s) * 8 * var(--collapse));
  top: calc(var(--s) * (10 - 2 * var(--collapse)));
  width: calc(var(--s) * (106 - 74 * var(--collapse)));
  height: calc(var(--s) * (28 + 4 * var(--collapse)));
  padding: 0 calc(var(--s) * (12 - 5 * var(--collapse))) 0 calc(var(--s) * (8 - var(--collapse)));
  gap: calc(var(--s) * 4 * (1 - var(--collapse)));
  box-sizing: border-box;
  overflow: hidden;
}

.ui-summary .ui-chip svg {
  width: calc(var(--s) * (16 + 2 * var(--collapse)));
  height: calc(var(--s) * (16 + 2 * var(--collapse)));
}

.ui-summary .ui-chip__label {
  max-width: calc(var(--s) * 72 * (1 - var(--collapse)));
  overflow: hidden;
  opacity: calc(1 - var(--collapse));
  white-space: nowrap;
}

.ui-summary .ui-logo {
  position: absolute;
  left: calc(var(--s) * (167 + 6 * var(--collapse)));
  top: calc(var(--s) * (7 + 5 * var(--collapse)));
  width: calc(var(--s) * (44 - 12 * var(--collapse)));
  height: calc(var(--s) * (35 - 10 * var(--collapse)));
  max-width: none;
  opacity: calc(1 - 0.2 * var(--collapse));
}

.ui-summary .ui-topbar .ui-pill {
  position: absolute;
  left: calc(var(--s) * (330 + 8 * var(--collapse)));
  top: calc(var(--s) * 8 * var(--collapse));
  width: calc(var(--s) * (48 - 16 * var(--collapse)));
  height: calc(var(--s) * (48 - 16 * var(--collapse)));
  border-radius: calc(var(--s) * (20 - 8 * var(--collapse)));
}

.ui-summary .ui-topbar .ui-pill svg {
  width: calc(var(--s) * (22 - 2 * var(--collapse)));
  height: calc(var(--s) * (22 - 2 * var(--collapse)));
}

.ui-chip {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--s) * 4);
  height: calc(var(--s) * 28);
  margin: 0;
  padding: 0 calc(var(--s) * 10) 0 calc(var(--s) * 8);
  border: 0;
  border-radius: calc(var(--s) * 12);
  background: rgba(26, 26, 26, 0.8);
  color: var(--cream);
  font-family: inherit;
  font-size: calc(var(--s) * 11);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
}

.ui-chip svg {
  width: calc(var(--s) * 16);
  height: calc(var(--s) * 16);
  flex-shrink: 0;
  stroke: var(--cream);
  fill: none;
  stroke-width: 1.8;
}

.ui-summary__scroll {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: transparent;
  scrollbar-width: none;
  transform: translateY(18%);
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.ui-summary__bleed {
  height: calc(var(--s) * 42);
  flex-shrink: 0;
}

.food-hero[data-phase="summary"] .ui-summary__scroll {
  transform: none;
}

.ui-summary__scroll::-webkit-scrollbar {
  display: none;
}

.summary-sheet {
  padding: calc(var(--s) * 10) calc(var(--s) * 20) calc(var(--s) * 96);
  background: var(--cream);
  box-shadow: 0 calc(var(--s) * -4) calc(var(--s) * 16) rgba(0, 0, 0, 0.12);
  color: var(--ink);
}

.summary-grabber {
  display: block;
  width: calc(var(--s) * 44);
  height: calc(var(--s) * 5);
  margin: 0 auto calc(var(--s) * 24);
  border-radius: 99px;
  background: #cbb99f;
}

.summary-sheet h2 {
  margin: 0 0 calc(var(--s) * 14);
  font-size: calc(var(--s) * 24);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--s) * 4) calc(var(--s) * 8);
  margin: 0 0 calc(var(--s) * 14);
  color: #646464;
  font-size: calc(var(--s) * 14);
  font-weight: 600;
  letter-spacing: 0.2px;
}

.summary-meta span[aria-hidden] {
  color: #8d8d8d;
}

.summary-lede {
  margin: 0 0 calc(var(--s) * 16);
  font-size: calc(var(--s) * 14);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.2px;
}

.summary-rule {
  height: 1px;
  margin: 0 0 calc(var(--s) * 16);
  background: #e8e2d9;
  border: 0;
}

.summary-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 calc(var(--s) * 12);
  font-size: calc(var(--s) * 18);
  font-weight: 600;
  letter-spacing: 0.1px;
}

.summary-h svg {
  width: calc(var(--s) * 24);
  height: calc(var(--s) * 24);
  stroke: #838383;
  fill: none;
  stroke-width: 1.6;
}

.summary-impact {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: calc(var(--s) * 8);
}

.summary-impact__pct {
  font-size: calc(var(--s) * 48);
  font-weight: 600;
  line-height: 1;
}

.summary-impact__sub {
  margin: calc(var(--s) * 4) 0 0;
  color: #838383;
  font-size: calc(var(--s) * 12);
  font-weight: 600;
}

.summary-impact__cal {
  font-size: calc(var(--s) * 20);
  font-weight: 700;
  letter-spacing: 0.4px;
}

.summary-impact__cal u {
  text-underline-offset: 0.12em;
}

.nutrition-bar {
  display: flex;
  overflow: hidden;
  height: calc(var(--s) * 56);
  margin-bottom: calc(var(--s) * 8);
  border: 1px solid #cecece;
  border-radius: calc(var(--s) * 12);
  background: var(--chart-track);
}

.nutrition-bar > span {
  display: block;
  height: 100%;
}

.nutrition-bar > span + span {
  margin-left: 1px;
}

.nutrition-legend {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--s) * 8) calc(var(--s) * 16);
  padding: 0 calc(var(--s) * 4) calc(var(--s) * 12);
  font-size: calc(var(--s) * 12);
  color: #646464;
}

.nutrition-legend b {
  margin-left: calc(var(--s) * 6);
  font-size: calc(var(--s) * 14);
  font-weight: 600;
}

.nutrition-legend b.is-protein {
  color: var(--chart-protein);
}
.nutrition-legend b.is-fat {
  color: var(--chart-fat);
}
.nutrition-legend b.is-carbs {
  color: var(--chart-carbs);
}
.nutrition-legend b.is-fiber {
  color: var(--chart-fiber);
}

.summary-note {
  margin: 0 0 calc(var(--s) * 16);
  color: #646464;
  font-size: calc(var(--s) * 12);
  font-weight: 500;
  line-height: 1.2;
}

.summary-note a,
.summary-note__link {
  color: #0090ff;
  text-decoration: none;
}

.summary-card {
  padding: calc(var(--s) * 16);
  margin-bottom: calc(var(--s) * 8);
  border-radius: calc(var(--s) * 16);
  background: #e8e2d9;
}

.summary-card h3 {
  margin: 0 0 calc(var(--s) * 2);
  font-size: calc(var(--s) * 18);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.summary-card p {
  margin: 0;
  color: #646464;
  font-size: calc(var(--s) * 14);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.2px;
}

.summary-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--s) * 12);
  padding: calc(var(--s) * 16);
  margin: calc(var(--s) * 8) 0 calc(var(--s) * 20);
  border: 1px dashed #d9d9d9;
  border-radius: calc(var(--s) * 20);
  text-align: center;
}

.summary-prompt > p {
  margin: 0;
  color: #838383;
  font-size: calc(var(--s) * 14);
  font-weight: 500;
}

.summary-prompt h3 {
  margin: 0;
  font-size: calc(var(--s) * 22);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.summary-prompt .btn {
  min-height: calc(var(--s) * 56);
  width: 100%;
  max-width: calc(var(--s) * 330);
  font-size: calc(var(--s) * 18);
}

.macro-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(var(--s) * 8);
  margin: calc(var(--s) * 12) 0 calc(var(--s) * 16);
  text-align: center;
}

.macro-row p {
  margin: 0;
  font-size: calc(var(--s) * 16);
  font-weight: 500;
  line-height: 1.2;
}

.macro-row span {
  display: block;
  margin-top: calc(var(--s) * 8);
  color: #838383;
  font-size: calc(var(--s) * 14);
}

.macro-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: calc(var(--s) * 72);
  margin-top: calc(var(--s) * 10);
  padding: calc(var(--s) * 6) calc(var(--s) * 10);
  border: 1px solid #cecece;
  border-radius: calc(var(--s) * 18);
  background: var(--cream);
  color: var(--ink);
  font-size: calc(var(--s) * 12);
  font-weight: 500;
}

.nutrient-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--s) * 12);
  margin-bottom: calc(var(--s) * 8);
  font-size: calc(var(--s) * 14);
}

.nutrient-row dt {
  margin: 0;
  color: #838383;
  font-weight: 500;
}

.nutrient-row dd {
  display: flex;
  align-items: center;
  gap: calc(var(--s) * 12);
  margin: 0;
  font-weight: 500;
}

.nutrient-row dd b {
  width: calc(var(--s) * 80);
  font-weight: 500;
}

.ingredient-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--s) * 8);
  margin-bottom: calc(var(--s) * 10);
  font-size: calc(var(--s) * 14);
}

.ingredient-row dt {
  margin: 0;
  color: #838383;
  font-weight: 600;
}

.ingredient-row dd {
  display: flex;
  align-items: center;
  gap: calc(var(--s) * 8);
  margin: 0;
}

.cal-bar {
  width: calc(var(--s) * 80);
  height: calc(var(--s) * 12);
  overflow: hidden;
  border-radius: calc(var(--s) * 6);
  background: #e8e2d9;
}

.cal-bar > span {
  display: block;
  height: 100%;
  background: var(--chart-carbs);
}

.summary-moments {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--s) * 12);
  padding: calc(var(--s) * 12) calc(var(--s) * 16);
  margin: calc(var(--s) * 8) 0 calc(var(--s) * 16);
  border: 1px solid #e8e2d9;
  border-radius: calc(var(--s) * 16);
  background: var(--cream);
}

.summary-moments__text {
  display: flex;
  flex: 0 1 calc(var(--s) * 263);
  flex-direction: column;
  gap: calc(var(--s) * 4);
  min-width: 0;
  margin: 0;
}

.summary-moments__text strong {
  color: var(--ink);
  font-size: calc(var(--s) * 15);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.summary-moments__text span {
  color: #838383;
  font-size: calc(var(--s) * 14);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.2px;
}

.summary-moments__btn {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: calc(var(--s) * 48);
  height: calc(var(--s) * 48);
  border-radius: calc(var(--s) * 20);
  background: var(--ink);
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
}

.summary-moments__btn svg {
  width: calc(var(--s) * 22);
  height: calc(var(--s) * 22);
  fill: var(--cream);
}

.summary-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--s) * 8);
  height: calc(var(--s) * 76);
  background: rgba(232, 226, 217, 0.8);
  border-top: 1px solid #d9d9d9;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.summary-actions .btn {
  min-height: calc(var(--s) * 56);
  height: calc(var(--s) * 56);
  width: calc(var(--s) * 160);
  padding: 0;
  border-radius: calc(var(--s) * 24);
  font-size: calc(var(--s) * 18);
}

.summary-actions .btn--outlined {
  background: var(--cream);
  border-color: #cecece;
  color: #0090ff;
}

.summary-actions .btn--primary {
  background: #0090ff;
  color: var(--cream);
}

@media (max-width: 700px) {
  .interactive-food {
    --phone: min(20.5rem, 78vw, calc(78dvh * 1280 / 2642));
  }

  .food-hero__stage {
    padding: 0.75rem 0.75rem 5.75rem;
  }

  .food-hero__bar {
    width: min(100% - 1.25rem, 24rem);
    border-radius: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .food-hero[data-phase="snap"] .ui-flash,
  .food-hero[data-phase="analyzing"] .ui-analyzing .scan-brackets__corner,
  .food-hero[data-phase="analyzing"] .analyze-dots span {
    animation: none;
  }

  .food-hero[data-phase="analyzing"] .analyze-dots span {
    opacity: 1;
  }

  .iphone__food,
  .ui-camera,
  .ui-analyzing,
  .ui-summary,
  .ui-summary__scroll,
  .ui-shutter__snap {
    transition: none;
  }
}

/* Welcome launch landing — phone centered, copy close beside it */

.welcome {
  --phone: min(22.75rem, 44vw, calc(86dvh * 1280 / 2642));
}

.welcome .food-hero--landing {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(var(--overlay-inset, 1.25rem), clamp(1.25rem, 3vw, 2.25rem))
    max(var(--overlay-inset, 1.25rem), clamp(1rem, 4vw, 3rem));
}

.welcome .food-hero__layout {
  position: relative;
  z-index: 2;
  display: grid;
  /* Equal side tracks keep the phone column exactly centered */
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: clamp(0.85rem, 2vw, 1.5rem);
  row-gap: clamp(1rem, 3vw, 1.5rem);
  width: 100%;
  margin: 0;
}

.welcome .food-hero__copy {
  grid-column: 1;
  justify-self: end;
  max-width: 28rem;
  width: 100%;
  min-width: 0;
  padding: clamp(1.5rem, 2.8vw, 2.25rem);
  border-radius: 28px;
  background: rgba(255, 251, 241, 0.94);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.welcome .food-hero__kicker {
  margin: 0 0 0.75rem;
  color: var(--accent-interactive);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.welcome .food-hero__copy h1 {
  margin: 0 0 0.7rem;
  max-width: 11ch;
  color: var(--text-primary);
  font-size: clamp(2.35rem, 4.4vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}

.welcome .food-hero__subhead {
  margin: 0 0 0.75rem;
  color: var(--text-primary);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  font-weight: 700;
  line-height: 1.3;
}

.welcome .food-hero__lede {
  margin: 0 0 1.35rem;
  color: var(--text-secondary);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.4;
}

.welcome .food-hero__meta {
  margin: 0.85rem 0 0;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
}

.welcome .food-hero__replay {
  margin: 0.9rem 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-interactive);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  text-underline-offset: 0.16em;
  cursor: pointer;
}

.welcome .food-hero__replay:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.welcome .food-hero__stage {
  grid-column: 2;
  z-index: 1;
  padding: 0;
  justify-self: center;
}

/* Extra section rhythm below the framed photo — margin, not padding, so the
   image frame stays even on all sides (--photo-frame-inset). */
@media (min-width: 1025px) {
  .welcome .story.story--photo--inset {
    margin-bottom: calc(clamp(2.75rem, 7vw, 5rem) - var(--photo-frame-inset));
  }
}

.welcome .story.story--scene,
.welcome .download-block {
  padding-top: 0;
  padding-bottom: clamp(2.75rem, 7vw, 5rem);
}

@media (max-width: 1024px) {
  .welcome {
    --phone: min(20rem, 58vw, calc(62dvh * 1280 / 2642));
  }

  .welcome .food-hero {
    min-height: 0;
    overflow: hidden;
  }

  .welcome .food-hero--landing {
    justify-content: center;
    padding: max(var(--overlay-inset, 1.25rem), clamp(1.25rem, 3vw, 2.25rem))
      max(var(--overlay-inset, 1.25rem), 1rem);
  }

  .welcome .food-hero__layout {
    z-index: auto;
    grid-template-columns: 1fr;
    justify-items: center;
    justify-content: center;
    gap: clamp(1rem, 3vw, 1.35rem);
    width: min(40rem, 100%);
  }

  .welcome .food-hero__copy {
    grid-column: 1;
    justify-self: stretch;
    max-width: none;
    width: 100%;
  }

  .welcome .food-hero__copy h1 {
    max-width: 14ch;
  }

  .welcome .food-hero__stage {
    grid-column: 1;
    justify-self: center;
  }

  .welcome .story.story--photo--inset,
  .welcome .story.story--scene,
  .welcome .download-block {
    position: relative;
    z-index: 0;
    overflow: hidden;
  }
}

@media (max-width: 760px) {
  .welcome {
    --phone: min(20.5rem, 78vw, calc(72dvh * 1280 / 2642));
  }

  /* Text first, phone under — matches HTML order */
  .welcome .food-hero__layout {
    gap: 1rem;
  }

  .welcome .food-hero__copy {
    order: 0;
  }

  .welcome .food-hero__stage {
    order: 1;
  }
}

/* Thanksgiving hero + lifestyle rail */

.home-i2 .review-banner {
  margin: 0;
  padding: 0.7rem var(--page-pad);
  background: #1a1410;
  color: #fffbf1;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
}

.home-i2 .review-banner a {
  color: #fffbf1;
  text-underline-offset: 0.18em;
}

.home-i2 .review-banner__label {
  display: inline-block;
  margin-right: 0.55rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(255, 251, 241, 0.35);
  border-radius: 999px;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-i2 .food-hero__replay {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}

.home-i2 .food-hero__replay svg {
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s ease;
}

.home-i2 .food-hero__replay:hover svg {
  transform: rotate(-90deg);
}

/* Full table backdrop — turkey scene is landscape */
.home-i2 .food-hero__photo img {
  object-position: 50% 48%;
}

.home-i2 .iphone {
  box-shadow:
    inset 0 0 0 calc(var(--phone) * 1.5 / 1280) rgba(235, 227, 209, 0.55),
    inset 0 0 0 calc(var(--phone) * 4 / 1280) rgba(163, 154, 142, 0.4);
}

/*
  Phone camera view: portrait crop of the table photo at native resolution,
  plate centered in the scan brackets. Not scaled, so it stays sharp on 2x screens.
*/
.home-i2 .iphone__food,
.home-i2 .food-hero[data-phase="summary"] .iphone__food {
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 0;
}

.home-i2 .food-hero[data-phase="summary"] .iphone__food {
  /* Live view yields to the captured scan still above the sheet */
  opacity: 0;
  transition: opacity 0.35s ease;
}

/*
  Captured scan-camera still — shown above the summary sheet.
  Parallax drifts with --scan-parallax (0 → 1 as the sheet scrolls up).
*/
.home-i2 .iphone__scan-still {
  position: absolute;
  z-index: 1;
  inset: 0;
  margin: 0;
  display: block;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.home-i2 .iphone__scan-still img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  /* Soft parallax: plate drifts up slower than the sheet */
  transform: translate3d(0, calc(var(--scan-parallax, 0) * -40px), 0);
  will-change: transform;
}

.home-i2 .food-hero[data-phase="summary"] .iphone__scan-still {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .home-i2 .iphone__scan-still img {
    transform: none;
    will-change: auto;
  }
}

/*
  Photo-section phones match the larger Insights mockup
  (cluster min(22.25rem, 38vw), phone min(19.5rem, 86% of that)).
*/
.home-i2 #journal-picture .device,
.home-i2 #nutrition .story__split > .device,
.home-i2 #menu .story__split > .device,
.home-i2 #history .device {
  width: min(19.135rem, 32.68vw);
}

/* File-folder scroll: each sheet sticks, and the next one slides up over it. */
.home-i2 .folder-stack > .story {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 100dvh;
  background: var(--background-primary);
}

.home-i2 .folder-stack > .story:nth-child(2) { z-index: 2; }
.home-i2 .folder-stack > .story:nth-child(3) { z-index: 3; }
.home-i2 .folder-stack > .story:nth-child(4) { z-index: 4; }
.home-i2 .folder-stack > .story:nth-child(5) { z-index: 5; }

.home-i2 .folder-stack > .story--photo {
  align-items: center;
  justify-content: center;
}

.home-i2 .folder-stack .story__split,
.home-i2 #nutrition .story__split,
.home-i2 #menu .story__split {
  grid-template-columns: auto auto;
  justify-content: center;
  align-items: center;
  gap: clamp(1.15rem, 2.2vw, 1.75rem);
}

/* Roomier than before, but a step below the hero card (clamp(1.5rem, 2.8vw, 2.25rem)) */
.home-i2 .folder-stack .story__copy--panel {
  width: min(26.5rem, 40vw);
  max-width: 26.5rem;
  padding: clamp(1.5rem, 2.3vw, 1.875rem);
  border-radius: 24px;
}

.home-i2 .folder-stack .wrap.journal-lockup {
  gap: clamp(1.15rem, 2.2vw, 1.75rem);
}

.home-i2 .story--journal .device--xl {
  margin-right: 0;
}

/*
  History backdrop (restaurant-with-friends.webp): keep the phone and card in
  the gap between the faces. The photo covers the section, scaled 1.08 by the
  parallax, so its rendered width is --img-w. The faces sit at about -15% (left)
  and +27% (right) of that width from centre, so the lockup is shifted 6% right
  and the phone + card are capped to fit the ~42% gap.
*/
@media (min-width: 761px) and (orientation: landscape) and (min-height: 521px) {
  .home-i2 #history {
    --img-w: calc(1.08 * max(100vw, 179.17dvh));
  }

  .home-i2 #history .wrap.journal-lockup {
    translate: calc(0.06 * var(--img-w)) 0;
  }

  .home-i2 #history .device {
    width: min(19.135rem, 32.68vw, calc(0.165 * var(--img-w)));
  }

  .home-i2 #history .story__copy--panel {
    flex: 0 0 auto;
    width: min(26.5rem, 40vw, calc(0.215 * var(--img-w)));
  }
}

/* —— Original linear lifestyle rail —— */

.home-i2 .moments {
  padding: 3.25rem 0 1.5rem;
  background: var(--background-primary);
}

.home-i2 .moments__rail {
  width: 100%;
  overflow: hidden;
  margin: 0;
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 3%,
    #000 97%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 3%,
    #000 97%,
    transparent 100%
  );
}

.home-i2 .moments__track {
  --moments-height: clamp(280px, 42vh, 420px);
  --moments-gap: 0.75rem;
  display: flex;
  width: max-content;
  gap: var(--moments-gap);
  align-items: stretch;
  animation: home-i2-moments-scroll 70s linear infinite;
  will-change: transform;
}

.home-i2 .moments__slide {
  margin: 0;
  flex: 0 0 auto;
  height: var(--moments-height);
  width: calc(var(--moments-height) * 0.72);
  overflow: hidden;
  border-radius: 4px;
}

.home-i2 .moments__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

@keyframes home-i2-moments-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(calc(-50% - var(--moments-gap) / 2), 0, 0);
  }
}

/* Easy input: equal space above (after the photo rail) and below */

.home-i2 .moments {
  padding-bottom: 0;
}

.home-i2 #easy-input {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
}

/* Pair block under easy-input: two feature cards */

.home-i2 .pair-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 1.5rem);
  margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
}

.home-i2 .feature-card {
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 3vw, 2.25rem);
  border: 1px solid var(--surface-tertiary);
  border-radius: 24px;
  background: var(--surface-primary);
  box-shadow: 0 1px 2px rgba(26, 26, 26, 0.04), 0 8px 24px rgba(26, 26, 26, 0.04);
}

.home-i2 .feature-card__visual {
  display: flex;
  align-items: center;
  min-height: 6.25rem;
  margin: 0 0 clamp(1.25rem, 2.6vw, 1.75rem);
  padding: 0.9rem;
  border-radius: 18px;
  /* Cool brand tint so the panel reads as part of the white card,
     not a cut-through to the cream page */
  background: linear-gradient(160deg, #f2f8ff 0%, #e4f1ff 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 144, 255, 0.08);
}

.home-i2 .pair-grid h3 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.home-i2 .pair-grid p {
  margin: 0;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.4;
}

/* Card 1: the four ways to add a meal */

.home-i2 .input-methods {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  list-style: none;
}

.home-i2 .input-methods li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.home-i2 .input-methods__icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 20px;
  background: var(--text-primary);
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
}

.home-i2 .input-methods__icon svg {
  width: 1.375rem;
  height: 1.375rem;
  fill: none;
  stroke: var(--on-accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Card 2: the app's camera mode switch, set to Menu */

.home-i2 .menu-mode {
  justify-content: center;
}

.home-i2 .menu-mode__switch {
  display: flex;
  gap: 2px;
  width: 100%;
  max-width: 21rem;
  padding: 3px;
  border-radius: 16px;
  background: var(--text-primary);
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
}

.home-i2 .menu-mode__switch span {
  flex: 1 1 0;
  display: grid;
  place-items: center;
  padding: 0.7rem 0.4rem;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--on-accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-i2 .menu-mode__switch span.is-on {
  border-color: rgba(217, 217, 217, 0.4);
  background: #2a2a2a;
  color: var(--accent-secondary);
}

/* Personalization: same card system as Easy input, with app-style panels */

.home-i2 .feature-card__visual--tall {
  justify-content: center;
  min-height: 12.5rem;
  padding: 1.1rem;
}

.home-i2 .pref-list,
.home-i2 .hide-cal {
  width: 100%;
  max-width: 22rem;
  border: 1px solid var(--surface-tertiary);
  border-radius: 16px;
  background: var(--background-primary);
  box-shadow: 0 2px 6px rgba(26, 26, 26, 0.05);
}

.home-i2 .pref-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-i2 .pref-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
}

.home-i2 .pref-list li + li {
  border-top: 1px solid var(--surface-tertiary);
}

.home-i2 .pref-list__icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 12px;
  background: var(--text-primary);
}

.home-i2 .pref-list__icon svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: var(--on-accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-i2 .pref-list__label {
  flex: 1 1 auto;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 700;
}

.home-i2 .pref-list__meta {
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  font-weight: 500;
}

.home-i2 .pref-list__chev {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-i2 .hide-cal {
  padding: 0.9rem 1rem 1rem;
}

.home-i2 .hide-cal__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.8rem;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid var(--surface-tertiary);
}

.home-i2 .hide-cal__label {
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 700;
}

.home-i2 .hide-cal__switch {
  position: relative;
  width: 2.75rem;
  height: 1.6rem;
  border-radius: 99px;
  background: #34c759;
}

.home-i2 .hide-cal__switch span {
  position: absolute;
  top: 2px;
  right: 2px;
  width: calc(1.6rem - 4px);
  height: calc(1.6rem - 4px);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.home-i2 .hide-cal__impact {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin-bottom: 0.6rem;
}

.home-i2 .hide-cal__pct {
  color: var(--text-primary);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.home-i2 .hide-cal__sub {
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  font-weight: 500;
}

.home-i2 .hide-cal__bar {
  display: flex;
  gap: 2px;
  height: 0.6rem;
  overflow: hidden;
  margin-bottom: 0.55rem;
  border-radius: 99px;
}

.home-i2 .hide-cal__legend {
  display: flex;
  justify-content: space-between;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-weight: 500;
}

.home-i2 .hide-cal__legend b {
  font-weight: 700;
}

@media (max-width: 720px) {
  .home-i2 .pair-grid {
    grid-template-columns: 1fr;
  }

  .home-i2 .feature-card__visual--tall {
    min-height: 0;
    padding: 0.75rem;
  }

  .home-i2 .pref-list li {
    gap: 0.6rem;
    padding: 0.8rem 0.8rem;
  }

  .home-i2 .pref-list__label {
    white-space: nowrap;
  }

  .home-i2 .hide-cal__legend {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.2rem 0.9rem;
  }

  .home-i2 .moments__track {
    --moments-height: clamp(220px, 36vh, 300px);
    --moments-gap: 0.55rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  .home-i2 .folder-stack > .story {
    position: relative;
    top: auto;
    min-height: 0;
  }

  .home-i2 .moments__track {
    animation: none;
    transform: none;
    width: 100%;
    max-width: calc(var(--max-width) + 8rem);
    margin: 0 auto;
    padding: 0 var(--page-pad);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .home-i2 .moments__slide[aria-hidden="true"] {
    display: none;
  }
}

/* Hero stacks (card on top, phone below) on phones and tablets: up to 1023px,
   portrait up to 1279px, and short landscape phones. Small desktops
   (1024–1279px landscape) keep the side-by-side hero, tuned below. */
@media (max-width: 1023px),
  (orientation: portrait) and (max-width: 1279px),
  (orientation: landscape) and (max-height: 520px) {
  .home-i2 {
    --phone: min(20rem, 70vw, calc(64dvh * 1280 / 2642));
    --hero-phone-overlap: 3.5rem;
  }

  .home-i2 .food-hero,
  .home-i2 .food-hero--landing {
    display: block;
    min-height: 0;
    padding: 0;
    overflow: visible;
    place-items: stretch;
  }

  .home-i2 .food-hero__layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 0.75rem 1rem 2.5rem;
  }

  /* Copy leads, front and centre; the animated phone follows below */
  .home-i2 .food-hero__copy {
    order: 0;
    position: relative;
    z-index: 4;
    align-self: stretch;
    width: 100%;
    max-width: 34rem;
    margin: 0 auto;
    /* Extra bottom room: the phone overlaps the last ~3.5rem of the card */
    padding: 1.35rem 1.35rem calc(1rem + var(--hero-phone-overlap));
    border-radius: 24px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3);
    text-align: center;
  }

  .home-i2 .food-hero__stage {
    order: 1;
    z-index: 5;
    margin-top: calc(-1 * var(--hero-phone-overlap));
    padding: 0;
  }

  /* The phone is a demo: let swipes over it scroll the page instead of
     the summary sheet. The scripted scan still scrolls the sheet. */
  .home-i2 .food-hero .iphone,
  .home-i2 .food-hero .iphone * {
    pointer-events: none;
  }

  .home-i2 .food-hero .ui-summary__scroll {
    overflow: hidden;
    touch-action: pan-y;
  }

  .home-i2 .food-hero__copy .download-badge-row {
    justify-content: center;
    margin-top: 0;
  }

  .home-i2 .food-hero__kicker {
    margin-bottom: 0.6rem;
    font-size: 0.8125rem;
  }

  .home-i2 .food-hero__copy h1 {
    max-width: 12ch;
    margin: 0 auto 0.75rem;
    font-size: clamp(2.35rem, 10.5vw, 3.25rem);
    line-height: 1.02;
  }

  .home-i2 .food-hero__lede {
    margin-bottom: 1rem;
    font-size: 1.0625rem;
    line-height: 1.42;
  }

  .home-i2 .food-hero__copy .app-store-badge img {
    width: 150px;
  }

  .home-i2 .food-hero__meta {
    margin-top: 0.65rem;
    font-size: 0.8125rem;
  }

  .home-i2 .food-hero__replay {
    margin-top: 0.6rem;
    font-size: 0.9375rem;
  }

  /* Hero footnote: exactly two short lines, set explicitly so it doesn't
     depend on text-wrap support or card width */
  .home-i2 .food-hero__meta {
    max-width: none;
    margin-inline: auto;
    font-size: 0.75rem;
    line-height: 1.4;
  }

  .home-i2 .food-hero__meta-line {
    display: block;
    white-space: nowrap;
  }
}

/* Phone and portrait tablet: device on top, copy pinned to the bottom.
   The layout is taller than the viewport, so the card stays put while the
   phone scrolls away, then releases with the hero.
   Landscape tablets stay on the desktop layout below. A phone turned
   sideways is short, so it stays with this layout too. */
@media (max-width: 760px),
  (orientation: portrait) and (max-width: 1200px),
  (orientation: landscape) and (max-height: 520px) {
  .home-i2 {
    --phone: min(18rem, 70vw, calc(58dvh * 1280 / 2642));
  }

  /* Same width as the larger Insights phone at this breakpoint */
  .home-i2 #journal-picture .device,
  .home-i2 #nutrition .story__split > .device,
  .home-i2 #menu .story__split > .device,
  .home-i2 #history .device {
    /* 90% of the full row, matching Insights. These wraps also have --overlay-inset padding. */
    width: min(19.75rem, calc(0.9 * (100% + 2 * var(--overlay-inset))));
  }

  .home-i2 .folder-stack .story__split,
  .home-i2 #nutrition .story__split,
  .home-i2 #menu .story__split {
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 1.15rem;
  }

  .home-i2 .folder-stack .story__copy--panel {
    width: 100%;
    max-width: none;
    padding: 1.2rem 1.2rem 1.25rem;
  }
}


/* Stacked scroll sections (phones, portrait tablets): card first, then the
   device centred under it. The device is intentionally a little wider than
   the text column, so centre it with an explicit offset (overflows evenly
   on both sides); auto margins and self-alignment push it right. All card copy reads left-aligned. */
@media (max-width: 760px),
  (orientation: portrait) and (max-width: 1200px),
  (orientation: landscape) and (max-height: 520px) {
  .home-i2 .folder-stack .story__split > .device,
  .home-i2 #nutrition .story__split > .device,
  .home-i2 #menu .story__split > .device,
  .home-i2 .folder-stack .journal-lockup > .device {
    justify-self: start;
    align-self: flex-start;
    margin-inline: 0;
    margin-left: 50%;
    translate: -50% 0;
  }

  .home-i2 .folder-stack .journal-lockup {
    flex-direction: column;
    align-items: center;
  }

  .home-i2 .folder-stack .journal-lockup > .story__copy--panel {
    order: 1;
    align-self: stretch;
  }

  .home-i2 .folder-stack .journal-lockup > .device {
    order: 2;
  }

  .home-i2 .folder-stack .story__copy--panel {
    text-align: left;
  }
}

/* Stacked hero: the script lines the photo up so the real plate sits behind
   the phone. Below the table edge the scene falls off into dark. */
@media (max-width: 1023px),
  (orientation: portrait) and (max-width: 1279px),
  (orientation: landscape) and (max-height: 520px) {
  .home-i2 .food-hero.is-photo-placed {
    background: #0e0c0b;
  }

  .home-i2 .food-hero.is-photo-placed .food-hero__photo {
    overflow: hidden;
  }

  .home-i2 .food-hero.is-photo-placed .food-hero__photo img {
    position: absolute;
    left: var(--hero-photo-x);
    top: var(--hero-photo-y);
    width: var(--hero-photo-w);
    height: var(--hero-photo-h);
    max-width: none;
    object-fit: fill;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 6%), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 6%), transparent);
  }
}

/* Small desktops (1024–1279px, landscape): side by side, but the copy
   takes a wider column next to the phone instead of the centred 1fr/auto/1fr
   grid, which would squeeze the card. Overrides the 1024px stacking in
   interactive-food.css. */
@media (min-width: 1024px) and (max-width: 1279px) and (orientation: landscape) and (min-height: 521px) {
  .home-i2 {
    --phone: min(20rem, calc(80dvh * 1280 / 2642));
  }

  .home-i2 .food-hero {
    min-height: calc(100dvh - 4.25rem);
  }

  .home-i2 .food-hero--landing {
    padding: clamp(1.25rem, 3vw, 2rem) clamp(1.5rem, 4vw, 3rem);
  }

  .home-i2 .food-hero__layout {
    grid-template-columns: minmax(0, 28rem) auto;
    justify-content: center;
    justify-items: stretch;
    column-gap: clamp(2rem, 4vw, 3.5rem);
    width: 100%;
  }

  .home-i2 .food-hero__copy {
    grid-column: 1;
    justify-self: stretch;
    max-width: 28rem;
  }

  .home-i2 .food-hero__copy h1 {
    max-width: 11ch;
    font-size: clamp(2.35rem, 4.2vw, 3.25rem);
  }

  .home-i2 .food-hero__stage {
    grid-column: 2;
  }
}

/* Stacked layout: every phone mockup matches the hero phone's height.
   --device-h is the hero iPhone frame height (1280 × 2642 frame). */
@media (max-width: 760px),
  (orientation: portrait) and (max-width: 1200px),
  (orientation: landscape) and (max-height: 520px) {
  .home-i2 {
    --device-h: calc(var(--phone) * 2642 / 1280);
  }

  /* 564 × 1160 device renders */
  .home-i2 #journal-picture .device,
  .home-i2 #menu .story__split > .device,
  .home-i2 #history .device {
    width: calc(var(--device-h) * 564 / 1160);
  }

  /* 810 × 1521 device render */
  .home-i2 #nutrition .story__split > .device {
    width: calc(var(--device-h) * 810 / 1521);
  }

  /* Insights pair: the large phone is 90% of the cluster, so size the
     cluster from it; the smaller phone keeps its 64% share. */
  .home-i2 .story--insights .device-cluster {
    width: calc(var(--device-h) * 564 / 1160 / 0.9);
  }

  .home-i2 .story--insights .device-cluster .device--lg {
    width: 90%;
  }

}

/* —— Seasonal launch copy (i2): intros, kickers, three cards —— */

.home-i2 .story__intro {
  max-width: 40rem;
  margin: 0.9rem 0 0;
  color: var(--text-secondary);
  font-size: clamp(1.0625rem, 1.9vw, 1.2rem);
  font-weight: 500;
  line-height: 1.45;
}

.home-i2 .story p.story__kicker {
  color: var(--text-primary);
  font-weight: 700;
}

.home-i2 .pair-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-i2 .pair-grid--three .input-methods {
  gap: 0.35rem;
}

.home-i2 .pair-grid--three .input-methods__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 16px;
}

@media (max-width: 1023px) {
  .home-i2 .pair-grid--three {
    grid-template-columns: 1fr;
  }
}

/* —— No judgment: every dish on the same table, none of them graded —— */

.home-i2 .no-judgment {
  padding-block: var(--section-space);
  background: var(--background-primary);
}

.home-i2 .no-judgment__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.home-i2 .no-judgment__copy h2 {
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  letter-spacing: -0.035em;
  line-height: 1;
}

.home-i2 .no-judgment__copy > p:not(.story__eyebrow) {
  margin: 0 0 0.85rem;
  color: var(--text-secondary);
  font-size: clamp(1.0625rem, 1.9vw, 1.2rem);
  font-weight: 500;
  line-height: 1.45;
}

.home-i2 .no-judgment__points {
  display: grid;
  gap: 0.7rem;
  margin: 1.6rem 0 0;
  padding: 1.4rem 0 0;
  border-top: 1px solid var(--surface-tertiary);
  list-style: none;
}

.home-i2 .no-judgment__points li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.4;
}

.home-i2 .no-judgment__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--text-primary)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E")
    center / 0.7rem no-repeat;
}

.home-i2 .no-judgment__points strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* Collage: seven dishes, one table. Tags describe; they never grade. */
.home-i2 .food-table {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(2, clamp(9rem, 15vw, 13rem)) clamp(10rem, 17vw, 15rem) clamp(8rem, 12vw, 10.5rem);
  gap: clamp(0.5rem, 1.1vw, 0.85rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-i2 .food-table__tile {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface-tertiary);
  box-shadow: 0 10px 30px rgba(26, 20, 16, 0.12);
}

.home-i2 .food-table__tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.home-i2 .food-table__tile:hover img {
  transform: scale(1.04);
}

.home-i2 .food-table__tile--noodles  { grid-column: 1 / 4; grid-row: 1 / 3; }
.home-i2 .food-table__tile--figsalad { grid-column: 4 / 7; grid-row: 1 / 2; }
.home-i2 .food-table__tile--burgers  { grid-column: 4 / 7; grid-row: 2 / 3; }
.home-i2 .food-table__tile--dinner   { grid-column: 1 / 5; grid-row: 3 / 4; }
.home-i2 .food-table__tile--takeout  { grid-column: 5 / 7; grid-row: 3 / 4; }
.home-i2 .food-table__tile--pasta    { grid-column: 1 / 4; grid-row: 4 / 5; }
.home-i2 .food-table__tile--seafood  { grid-column: 4 / 7; grid-row: 4 / 5; }


.home-i2 .food-table__tile--noodles img  { object-position: 50% 45%; }
.home-i2 .food-table__tile--figsalad img { object-position: 50% 74%; }
.home-i2 .food-table__tile--burgers img  { object-position: 50% 66%; }
.home-i2 .food-table__tile--dinner img   { object-position: 50% 45%; }
.home-i2 .food-table__tile--takeout img  { object-position: 50% 50%; }
.home-i2 .food-table__tile--pasta img    { object-position: 50% 66%; }
.home-i2 .food-table__tile--seafood img  { object-position: 50% 62%; }

.home-i2 .food-table__tag {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  max-width: calc(100% - 1.2rem);
  padding: 0.4rem 0.7rem 0.45rem;
  border-radius: 12px;
  background: rgba(255, 251, 241, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.home-i2 .food-table__tag b {
  display: block;
  color: #1a1410;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

@media (max-width: 900px) {
  .home-i2 .no-judgment__layout {
    grid-template-columns: 1fr;
  }

  .home-i2 .food-table {
    grid-template-rows: repeat(2, clamp(8rem, 30vw, 12rem)) clamp(9rem, 34vw, 13rem) clamp(7.5rem, 28vw, 10rem);
  }
}

@media (max-width: 480px) {
  .home-i2 .food-table {
    gap: 0.45rem;
  }

  .home-i2 .food-table__tile {
    border-radius: 14px;
  }

  .home-i2 .food-table__tag {
    left: 0.4rem;
    bottom: 0.4rem;
    max-width: calc(100% - 0.8rem);
    padding: 0.3rem 0.5rem 0.35rem;
    font-size: 0.6875rem;
  }

  .home-i2 .food-table__tag b {
    font-size: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-i2 .food-table__tile img {
    transition: none;
  }
}

/* Privacy follows the full-bleed History photo, which has no bottom
   padding of its own, so the card needs its own breathing room. */
.home-i2 .privacy-section {
  padding-top: var(--section-space);
}

/* —— Scroll reveals (i2) ——
   Reveals start as soon as a block enters the view (body.reveal-early in site.js).
   Device mockups travel in from their side of the layout instead of a 16px nudge. */
@media (prefers-reduced-motion: no-preference) {
  html.js .home-i2 .device[data-reveal] {
    --reveal-y: 56px;
    transform: translate3d(var(--reveal-x, 0px), var(--reveal-y), 0)
      translateY(var(--device-peek)) rotate(var(--device-tilt));
    transition:
      opacity 0.4s ease var(--reveal-delay, 0ms),
      transform 0.75s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms);
  }

  html.js .home-i2 .device[data-reveal].is-in {
    transform: translate3d(0, 0, 0) translateY(var(--device-peek)) rotate(var(--device-tilt));
  }

  /* Insights phones sit right of the copy: come in from the right, one after the other */
  html.js .home-i2 .story--insights .device[data-reveal] {
    --reveal-x: 96px;
  }

  html.js .home-i2 .story--insights .device-cluster .device[data-reveal]:nth-child(2) {
    --reveal-x: 140px;
    --reveal-delay: 120ms;
  }

  /* History phone sits left of its card: come in from the left */
  html.js .home-i2 #history .device[data-reveal] {
    --reveal-x: -96px;
    --reveal-delay: 0ms;
  }

  /* Cards and the collage: a touch more travel so the motion reads, still quick */
  html.js .home-i2 .pair-grid--three > [data-reveal] {
    --reveal-y: 20px;
    transition-duration: 0.35s, 0.5s;
  }

  html.js .home-i2 .pair-grid--three > [data-reveal]:nth-child(2) {
    --reveal-delay: 60ms;
  }

  html.js .home-i2 .pair-grid--three > [data-reveal]:nth-child(3) {
    --reveal-delay: 120ms;
  }

  html.js .home-i2 .food-table[data-reveal] {
    --reveal-y: 32px;
    transition-duration: 0.4s, 0.6s;
  }
}

/* Stacked layouts: phones sit under their copy, so they rise straight up */
@media (prefers-reduced-motion: no-preference) and (max-width: 760px),
  (prefers-reduced-motion: no-preference) and (orientation: portrait) and (max-width: 1200px),
  (prefers-reduced-motion: no-preference) and (orientation: landscape) and (max-height: 520px) {
  html.js .home-i2 .story--insights .device[data-reveal],
  html.js .home-i2 .story--insights .device-cluster .device[data-reveal]:nth-child(2),
  html.js .home-i2 #history .device[data-reveal] {
    --reveal-x: 0px;
  }
}

/* —— Privacy: copy beside three personal moments —— */
.home-i2 .privacy-card--photos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}

.home-i2 .privacy-card--photos .privacy-card__sublead {
  font-weight: 600;
  line-height: 1.5;
}

.home-i2 .privacy-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: clamp(10rem, 16vw, 14rem) clamp(8rem, 12vw, 10.5rem);
  gap: clamp(0.5rem, 1.1vw, 0.85rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-i2 .privacy-photos__tile {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface-tertiary);
  box-shadow: 0 10px 30px rgba(26, 20, 16, 0.12);
}

.home-i2 .privacy-photos__tile--dinner {
  grid-column: 1 / 3;
}

.home-i2 .privacy-photos__tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.home-i2 .privacy-photos__tile:hover img {
  transform: scale(1.04);
}

.home-i2 .privacy-photos__tile--dinner img  { object-position: 50% 45%; }
.home-i2 .privacy-photos__tile--kitchen img { object-position: 62% 40%; }
.home-i2 .privacy-photos__tile--snacks img  { object-position: 50% 45%; }

@media (max-width: 900px) {
  .home-i2 .privacy-card--photos {
    grid-template-columns: 1fr;
  }

  .home-i2 .privacy-photos {
    grid-template-rows: clamp(10rem, 44vw, 15rem) clamp(7.5rem, 30vw, 11rem);
  }
}

@media (max-width: 480px) {
  .home-i2 .privacy-photos {
    gap: 0.45rem;
  }

  .home-i2 .privacy-photos__tile {
    border-radius: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-i2 .privacy-photos__tile img {
    transition: none;
  }
}

/* Made for real life already ends with a full section gap; don't stack another
   on top of it, so the space below matches the space above. */
.home-i2 .no-judgment {
  padding-top: 0;
}

@media (min-width: 901px) {
  /* Side-by-side layout starts with the collage edge, not text; match the
     eyebrow's line-box offset above Made for real life (15px). */
  .home-i2 .no-judgment {
    padding-top: 15px;
  }
}

/* —— Your Table: phone left, copy right (copy first when stacked) —— */
.home-i2 #your-table {
  padding-top: var(--section-space);
  /* Privacy below brings its own top gap */
  padding-bottom: 0;
}

.home-i2 .your-table__row {
  grid-template-columns: auto minmax(0, 30rem);
  justify-content: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.home-i2 #your-table .device {
  width: min(19.135rem, 32.68vw);
}

.home-i2 #your-table .story__copy h2 {
  margin-bottom: 1rem;
}

@media (prefers-reduced-motion: no-preference) {
  html.js .home-i2 #your-table .device[data-reveal] {
    --reveal-x: -96px;
  }
}

@media (max-width: 760px),
  (orientation: portrait) and (max-width: 1200px),
  (orientation: landscape) and (max-height: 520px) {
  .home-i2 .your-table__row {
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 1.75rem;
  }

  .home-i2 #your-table .story__copy {
    order: 0;
    text-align: left;
  }

  .home-i2 #your-table .device {
    order: 1;
    width: calc(var(--device-h) * 564 / 1164);
    margin-inline: auto;
    justify-self: center;
  }

  html.js .home-i2 #your-table .device[data-reveal] {
    --reveal-x: 0px;
  }
}

/* Hero availability note: own line, a step stronger than the footnote,
   and allowed to wrap on narrow cards */
.home-i2 .food-hero__meta-line--status {
  display: block;
  white-space: normal;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Download card availability note: brighter than the fine print below it */
.home-i2 .download-card .download-availability {
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(255, 251, 241, 0.9);
}

/* Final CTA headline is a full sentence, so it runs a size down from the
   short two-beat headlines elsewhere and drops the narrow phone measure */
.home-i2 .download-card h2 {
  max-width: 22ch;
  font-size: clamp(1.75rem, 3.4vw, 2.4rem);
  line-height: 1.12;
}

@media (max-width: 760px) {
  .home-i2 .download-card h2 {
    max-width: none;
    font-size: clamp(1.45rem, 6vw, 1.8rem);
  }
}

/* Closing download banner photo */
.home-i2 .download-card {
  --download-photo: url("/assets/photos/candlelit-dinner.webp");
  --download-photo-pos: 70% 50%;
  min-height: 34rem;
  align-content: start; /* phones: copy on top, photo shows below */
}
@media (min-width: 700px) {
  .home-i2 .download-card { --download-photo-pos: 60% 55%; min-height: clamp(32rem, 40vw, 36rem); align-content: center; }
}

/* Hero launch waitlist (replaces the App Store badge until launch) */
.waitlist-form {
  margin-top: 0.25rem;
  text-align: left;
}

.waitlist-form__label {
  display: block;
  margin: 0 0 0.5rem;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
}

.waitlist-form__row {
  display: flex;
  gap: 0.5rem;
  padding: 0.3125rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-button);
  background: var(--surface-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.waitlist-form__row:focus-within {
  border-color: var(--accent-interactive);
  box-shadow: 0 0 0 3px rgba(0, 144, 255, 0.18);
}

.waitlist-form__input {
  flex: 1 1 0;
  width: 0; /* drop the input's ~20-character intrinsic width so the row can shrink on narrow phones */
  min-width: 0;
  padding: 0 0.875rem;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 1rem; /* 16px keeps iOS from zooming on focus */
  outline: none;
}

.waitlist-form__input::placeholder {
  color: var(--text-muted);
}

.waitlist-form .waitlist-form__btn {
  flex: 0 0 auto;
  min-height: 2.75rem;
  padding: 0 1.15rem;
  font-size: 1rem;
}

.waitlist-form .waitlist-form__btn[aria-busy="true"] {
  opacity: 0.7;
  pointer-events: none;
}

.waitlist-form__hint {
  margin: 0.5rem 0 0;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.waitlist-form__hint.is-error {
  color: #c62a1f;
  font-weight: 600;
}

.waitlist-form.is-joined .waitlist-form__row,
.waitlist-form.is-joined .waitlist-form__label {
  display: none;
}

.waitlist-form.is-joined .waitlist-form__hint {
  margin-top: 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-card);
  background: rgba(0, 144, 255, 0.1);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 600;
}

.waitlist-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.home-i2 .food-hero__copy .waitlist-form + .food-hero__meta {
  margin-top: 0.85rem;
}

@media (max-width: 1023px), (orientation: portrait) and (max-width: 1279px), (orientation: landscape) and (max-height: 520px) {
  .home-i2 .food-hero__copy .waitlist-form {
    width: 100%;
    max-width: 24rem;
    margin-inline: auto;
    text-align: center;
  }
  .home-i2 .food-hero__copy .waitlist-form__row {
    text-align: left;
  }
}

/* Closing banner waitlist: on the dark photo card */
.waitlist-form--dark {
  max-width: 26rem;
  margin-top: 1.25rem;
}
.waitlist-form--dark .waitlist-form__label {
  color: var(--on-accent);
}
.waitlist-form--dark .waitlist-form__row {
  border-color: transparent;
}
.waitlist-form--dark .waitlist-form__hint {
  color: rgba(255, 251, 241, 0.72);
}
.waitlist-form--dark .waitlist-form__hint.is-error {
  color: #ff9a8f;
}
.waitlist-form--dark.is-joined .waitlist-form__hint {
  background: rgba(255, 251, 241, 0.14);
  color: var(--on-accent);
}

/* Keep the hero form clear of the sticky header when jumped to */
#waitlist { scroll-margin-top: 6rem; }

/* Hero availability lines: one size, a step larger than fine print */
.home-i2 .food-hero__meta {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.45;
}
.home-i2 .food-hero__meta .food-hero__meta-line {
  display: block;
  white-space: normal;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}
@media (max-width: 1023px), (orientation: portrait) and (max-width: 1279px), (orientation: landscape) and (max-height: 520px) {
  .home-i2 .food-hero__meta { font-size: 0.875rem; }
}

/* Status line only takes space when it has a message */
.waitlist-form__hint:empty { display: none; }

/* Phones: show the whole photo as a band across the top of the banner, then
   fade into the dark card where the copy sits (no heavy zoom, copy not jammed
   against the top edge) */
@media (max-width: 699px) {
  .home-i2 .download-card {
    --photo-h: calc((100vw - 2 * var(--page-pad)) * 0.6665);
    min-height: 0;
    padding-top: calc(var(--photo-h) * 0.78);
  }
  .home-i2 .download-card::before {
    background:
      linear-gradient(
        180deg,
        rgba(26, 26, 26, 0.05) 0,
        rgba(26, 26, 26, 0.15) calc(var(--photo-h) * 0.45),
        rgba(26, 26, 26, 0.85) calc(var(--photo-h) * 0.82),
        #1a1a1a var(--photo-h),
        #1a1a1a 100%
      ),
      var(--download-photo) center top / 100% auto no-repeat,
      #1a1a1a;
  }
}
