/* Final website polish.
 * Keep the public site inside the native NutriFlux design language: rounded,
 * soft-filled chips, strict brand-derived colours, and a deliberate editorial
 * rhythm across wide, tablet and mobile viewports.
 */

/* Match the app's Chip component while retaining enough presence for the
 * marketing page. No hard outlines; colour variation stays inside the brand
 * palette/tints rather than introducing arbitrary colours. */
.food-rail {
  flex-wrap: wrap;
  overflow: visible;
  gap: 10px;
  padding-top: 34px;
}

.food-rail span,
.food-rail span:nth-child(3n + 2),
.food-rail span:nth-child(3n + 3) {
  flex: 0 0 auto;
  font-family: var(--body);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--brand-dark);
  box-shadow: none;
}

.food-rail span:nth-child(3n + 1) {
  background: var(--brand-soft);
}

.food-rail span:nth-child(3n + 2) {
  background: color-mix(in srgb, var(--green) 20%, var(--cream));
}

.food-rail span:nth-child(3n + 3) {
  background: color-mix(in srgb, var(--lime) 24%, var(--cream));
}

.rail-note {
  margin-top: 12px;
}

/* Desktop composition.
 * The hero is the only full viewport stage. The green statement remains a
 * strong visual break, but deliberately stops short of becoming a second
 * full-screen slide. */
@media (min-width: 981px) {
  .hero {
    min-height: calc(100svh - 88px);
  }

  .statement {
    min-height: clamp(500px, 62svh, 650px);
    grid-template-columns: minmax(190px, .30fr) minmax(0, 1fr);
    gap: clamp(44px, 5.5vw, 82px);
    padding-top: clamp(72px, 6vw, 92px);
    padding-bottom: clamp(72px, 6vw, 92px);
    align-items: center;
  }

  .statement .section-index {
    padding-top: 8px;
    align-self: start;
  }

  .statement > div {
    width: min(100%, 900px);
  }

  .statement h2 {
    max-width: 900px;
    font-size: clamp(50px, 5.25vw, 76px);
  }

  .statement p:not(.section-index) {
    max-width: 690px;
    margin-top: 24px;
    font-size: 18px;
  }

  .food-intro {
    grid-template-columns: minmax(190px, .30fr) minmax(0, 1fr);
    column-gap: clamp(44px, 5.5vw, 82px);
  }

  .food-intro .section-index {
    padding-top: 8px;
  }

  .food-intro h2 {
    max-width: 860px;
    font-size: clamp(46px, 4.8vw, 70px);
  }

  .food-intro > p:last-child {
    max-width: 700px;
  }

  /* Align the familiar-food rail with the main food-copy column and let the
   * chips breathe across the same visual width as the headline instead of
   * bunching up at one edge. */
  .food-rail {
    width: min(860px, calc(100% - 272px));
    margin-left: min(272px, 22vw);
    justify-content: space-between;
    column-gap: 14px;
    row-gap: 12px;
  }

  .rail-note {
    width: min(860px, calc(100% - 272px));
    margin-left: min(272px, 22vw);
  }

  /* Remove the oversized dead band between the familiar-food rail and Damage
   * Control while preserving clear section separation. */
  .food-language {
    padding-top: 84px;
    padding-bottom: 54px;
  }

  .recovery-story {
    padding-top: 60px;
    padding-bottom: 94px;
  }

  /* Footer: brand/slogan and all legal links occupy one clean baseline on
   * desktop. The disclaimer gets its own full-width line below and can use the
   * available width instead of wrapping into a narrow column. */
  footer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: clamp(32px, 4vw, 64px);
    row-gap: 16px;
    padding-top: 28px;
    padding-bottom: 36px;
  }

  .footer-brand {
    white-space: nowrap;
  }

  .footer-legal {
    justify-content: flex-end;
    align-items: center;
    gap: 10px clamp(14px, 1.5vw, 24px);
  }

  .legal-note {
    grid-column: 1 / -1;
    max-width: none;
    line-height: 1.55;
  }
}

@media (max-width: 980px) {
  .statement h2 {
    max-width: 760px;
  }

  .food-language {
    padding-top: 88px;
    padding-bottom: 68px;
  }

  .recovery-story {
    padding-top: 68px;
  }
}

@media (max-width: 640px) {
  .food-rail {
    gap: 8px;
    padding-top: 28px;
  }

  .food-rail span,
  .food-rail span:nth-child(3n + 2),
  .food-rail span:nth-child(3n + 3) {
    font-size: 14px;
    padding: 9px 15px;
  }

  .food-language {
    padding-top: 72px;
    padding-bottom: 56px;
  }

  .recovery-story {
    padding-top: 58px;
  }

  footer {
    gap: 16px;
    padding-top: 28px;
    padding-bottom: 34px;
  }

  .footer-legal {
    gap: 8px 16px;
  }

  .legal-note {
    max-width: none;
    line-height: 1.6;
  }
}
