/* ===== Переходи між сторінками ===== */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.35s ease both nutri-vt-out; }
::view-transition-new(root) { animation: 0.45s ease both nutri-vt-in; }
@keyframes nutri-vt-out { to { opacity: 0; } }
@keyframes nutri-vt-in { from { opacity: 0; } }

/* ===== Зареєстровані властивості для mesh-градієнта ===== */
@property --nutri-mx { syntax: '<percentage>'; inherits: false; initial-value: 20%; }
@property --nutri-my { syntax: '<percentage>'; inherits: false; initial-value: 30%; }

/* ===== Палітра та токени (тема: dark immersive) ===== */
:root {
  --nutri-bg: #0D1117;
  --nutri-surface: #161C27;
  --nutri-surface-2: #1E2634;
  --nutri-footer: #080B10;
  --nutri-tone: #4FD1C5;
  --nutri-tone-hover: #8AEDE4;
  --nutri-warm: #F6C667;
  --nutri-sky: #5AB0E6;
  --nutri-rose: #F28BA0;
  --nutri-ink: #F1F5F9;
  --nutri-muted: #B4C0CC;
  --nutri-line: rgba(255, 255, 255, 0.14);
  --nutri-glass: rgba(255, 255, 255, 0.08);
  --nutri-gradient: linear-gradient(135deg, #4FD1C5 0%, #2B8FB8 55%, #F6C667 100%);
  --nutri-radius: 14px;
  --nutri-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(79, 209, 197, 0.12);
  --font-display: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;
}

/* ===== База ===== */
*, *::before, *::after { box-sizing: border-box; }
html { margin: 0; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--nutri-bg);
  color: var(--nutri-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--nutri-tone); }
a:hover { color: var(--nutri-tone-hover); }
:focus-visible { outline: 3px solid var(--nutri-warm); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 0.6em; color: var(--nutri-ink); }
h1 { font-size: clamp(2rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; color: var(--nutri-muted); }
figure { margin: 0; }
.nutri-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nutri-kicker { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--nutri-warm); font-weight: 700; margin-bottom: 12px; }
.nutri-lead { font-size: 1.1rem; color: var(--nutri-ink); }

.nutri-wrap { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; }
.nutri-section { position: relative; padding: 10dvh 5vw; overflow: clip; }
.nutri-section-alt { background: var(--nutri-surface); }
.nutri-section-head { max-width: 720px; margin-bottom: 36px; }

/* ===== Header ===== */
.nutri-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 5vw;
  background: rgba(13, 17, 23, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nutri-line);
}
.nutri-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 3px;
  width: 100%;
  background: var(--nutri-gradient);
  transform-origin: 0 50%;
  transform: scaleX(0);
  animation: nutri-progress linear both;
  animation-timeline: scroll(root);
}
@keyframes nutri-progress { to { transform: scaleX(1); } }

.nutri-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--nutri-ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}
.nutri-brand:hover { color: var(--nutri-ink); }
.nutri-logo-mark {
  width: 40px;
  height: 40px;
  flex: none;
  color: var(--nutri-tone);
  filter: drop-shadow(0 0 8px rgba(79, 209, 197, 0.55));
}
.nutri-nav-toggle { display: none; }
.nutri-burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.nutri-burger-bar { display: block; width: 24px; height: 2px; border-radius: 2px; background: var(--nutri-ink); }
.nutri-links-panel { display: flex; gap: 28px; align-items: center; }
.nutri-links-panel a {
  color: var(--nutri-ink);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nutri-links-panel a:hover,
.nutri-links-panel a[aria-current="page"] { color: var(--nutri-tone); border-color: var(--nutri-tone); }

/* ===== Hero ===== */
.nutri-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 12dvh 5vw;
  overflow: clip;
  isolation: isolate;
}
.nutri-hero-short { min-height: 70dvh; }
.nutri-hero-form {
  min-height: auto;
  background: radial-gradient(circle at 15% 10%, rgba(79, 209, 197, 0.12), transparent 45%), var(--nutri-bg);
}
.nutri-hero-photo,
.nutri-hero-shade,
.nutri-hero-mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.nutri-hero-photo { object-fit: cover; }
.nutri-hero-shade { background: linear-gradient(180deg, rgba(13, 17, 23, 0.5), rgba(13, 17, 23, 0.94)); }
.nutri-hero-mesh {
  background:
    radial-gradient(circle at var(--nutri-mx) var(--nutri-my), rgba(79, 209, 197, 0.38), transparent 42%),
    radial-gradient(circle at 85% 15%, rgba(246, 198, 103, 0.22), transparent 40%),
    radial-gradient(circle at 15% 90%, rgba(43, 143, 184, 0.32), transparent 46%);
  animation: nutri-mesh-drift 26s ease-in-out infinite alternate;
}
@keyframes nutri-mesh-drift {
  from { --nutri-mx: 18%; --nutri-my: 28%; }
  to { --nutri-mx: 78%; --nutri-my: 70%; }
}
.nutri-hero-inner { position: relative; z-index: 1; width: 100%; }
.nutri-glass-card {
  max-width: min(640px, 58vw);
  padding: clamp(24px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--nutri-radius);
  box-shadow: var(--nutri-shadow);
}
.nutri-h1-line { display: block; }
.nutri-rise { animation: nutri-rise 0.8s ease backwards; }
.nutri-rise.d2 { animation-delay: 0.15s; }
@keyframes nutri-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* ===== Кнопки ===== */
.nutri-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--nutri-radius);
  background: var(--nutri-tone);
  border: 2px solid var(--nutri-tone);
  color: var(--nutri-bg);
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.nutri-cta-btn:hover {
  background: var(--nutri-tone-hover);
  border-color: var(--nutri-tone-hover);
  color: var(--nutri-bg);
  transform: scale(1.03);
  box-shadow: 0 0 22px rgba(79, 209, 197, 0.45);
}
.nutri-cta-btn:active { transform: scale(0.98); }
.nutri-cta-ghost { background: transparent; color: var(--nutri-tone); }
.nutri-cta-ghost:hover { background: rgba(79, 209, 197, 0.12); color: var(--nutri-tone-hover); }

/* ===== Фото та клієнтський шар ===== */
@supports (animation-timeline: view()) {
  .nutri-clip-img {
    animation: nutri-clip-in linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }
}
@keyframes nutri-clip-in {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* ===== Split-блок ===== */
.nutri-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--nutri-surface);
  border-radius: var(--nutri-radius);
  overflow: clip;
  box-shadow: var(--nutri-shadow);
}
.nutri-split-section { padding: 0; }
.nutri-split-section .nutri-wrap { max-width: none; }
.nutri-split-reverse .nutri-split-photo { order: 2; }
.nutri-split-photo { position: relative; min-height: 420px; overflow: hidden; }
.nutri-split-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nutri-split-text { padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; }
.nutri-dot-list { list-style: none; padding: 0; margin: 0 0 1.5em; }
.nutri-dot-list li { position: relative; padding-left: 22px; margin-bottom: 10px; color: var(--nutri-ink); }
.nutri-dot-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--nutri-warm);
  box-shadow: 0 0 10px rgba(246, 198, 103, 0.6);
}

/* ===== Картки та плитки ===== */
.nutri-feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.nutri-glass-tile,
.nutri-info-card,
.nutri-principle {
  padding: 32px 26px;
  border-radius: var(--nutri-radius);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--nutri-line);
  box-shadow: var(--nutri-shadow);
}
.nutri-glass-tile {
  border-top: 3px solid var(--nutri-tone);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.nutri-glass-tile:hover {
  border-color: var(--nutri-warm);
  border-top-color: var(--nutri-warm);
}
.nutri-tile-icon { width: 32px; height: 32px; color: var(--nutri-tone); margin-bottom: 16px; display: block; }
.nutri-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.nutri-info-card { border-top: 3px solid var(--nutri-sky); }
.nutri-info-card p:first-of-type { margin-bottom: 1.2em; }

/* Нумерований список з кольоровими значками */
.nutri-num-list { list-style: none; padding: 0; margin: 0; counter-reset: nutri-n; }
.nutri-num-list li {
  counter-increment: nutri-n;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
  color: var(--nutri-ink);
}
.nutri-num-list li::before {
  content: counter(nutri-n);
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--nutri-bg);
  background: var(--nutri-tone);
}
.nutri-num-list li:nth-child(2)::before { background: var(--nutri-warm); }
.nutri-num-list li:nth-child(3)::before { background: var(--nutri-sky); }
.nutri-num-list li:nth-child(4)::before { background: var(--nutri-rose); }

/* Принципи без цифр */
.nutri-principle-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.nutri-principle { border-left: 3px solid var(--nutri-tone); }

/* Акордеон (всі відкриті) */
.nutri-accordion { counter-reset: nutri-acc; display: grid; gap: 16px; }
.nutri-accordion details {
  position: relative;
  counter-increment: nutri-acc;
  background: var(--nutri-surface);
  border: 1px solid var(--nutri-line);
  border-radius: var(--nutri-radius);
  padding: 22px 80px 22px 26px;
  box-shadow: var(--nutri-shadow);
}
.nutri-accordion details::before {
  content: counter(nutri-acc, decimal-leading-zero);
  position: absolute;
  right: 22px;
  top: 16px;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: rgba(79, 209, 197, 0.25);
}
.nutri-accordion summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--nutri-ink);
}
.nutri-accordion summary::-webkit-details-marker { display: none; }
.nutri-accordion details p { margin: 12px 0 0; }

/* Timeline */
.nutri-timeline { position: relative; list-style: none; padding: 0; margin: 0; max-width: 760px; counter-reset: nutri-step; }
.nutri-timeline::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: var(--nutri-tone);
  box-shadow: 0 0 14px rgba(79, 209, 197, 0.6);
}
.nutri-timeline li { position: relative; padding-left: 76px; margin-bottom: 40px; }
.nutri-timeline li:last-child { margin-bottom: 0; }
.nutri-timeline h3 { margin-top: 4px; }
.nutri-step-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--nutri-bg);
  border: 3px solid var(--nutri-tone);
  color: var(--nutri-tone);
  font-family: var(--font-display);
  font-weight: 700;
  box-shadow: 0 0 18px rgba(79, 209, 197, 0.5);
}

/* Фото-смуга */
.nutri-band {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 10dvh 5vw;
  overflow: clip;
  isolation: isolate;
}
.nutri-band-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; pointer-events: none; }
.nutri-band-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(13, 17, 23, 0.94), rgba(13, 17, 23, 0.6));
}
.nutri-band-text { position: relative; z-index: 1; max-width: 680px; }
.nutri-thanks { min-height: 80vh; }
.nutri-thanks-inner { text-align: left; }

/* CTA-смуга */
.nutri-cta-strip {
  position: relative;
  padding: 10dvh 5vw;
  text-align: center;
  background: linear-gradient(120deg, rgba(79, 209, 197, 0.12), rgba(43, 143, 184, 0.08)), var(--nutri-bg);
  border-top: 1px solid var(--nutri-line);
}
.nutri-cta-strip .nutri-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.nutri-cta-strip p { margin: 0; max-width: 620px; }

/* ===== Форма ===== */
.nutri-form-card {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px);
  background: var(--nutri-surface);
  border: 1px solid var(--nutri-line);
  border-radius: var(--nutri-radius);
  box-shadow: var(--nutri-shadow);
}
.nutri-form { display: grid; gap: 18px; margin-top: 24px; }
.nutri-field label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--nutri-ink); }
.nutri-field input,
.nutri-field textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--nutri-radius);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: var(--nutri-bg);
  color: var(--nutri-ink);
  font: inherit;
}
.nutri-field input:focus,
.nutri-field textarea:focus { outline: 3px solid var(--nutri-warm); outline-offset: 1px; }
.nutri-consent { display: flex; gap: 12px; align-items: flex-start; color: var(--nutri-muted); font-size: 0.95rem; cursor: pointer; }
.nutri-consent input { margin-top: 4px; width: 20px; height: 20px; flex: none; accent-color: var(--nutri-tone); }
.nutri-submit { justify-self: start; cursor: pointer; }
.nutri-faq-wrap { max-width: 860px; }
.nutri-faq details {
  border-bottom: 1px solid var(--nutri-line);
  padding: 18px 0;
}
.nutri-faq summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--nutri-ink);
  font-family: var(--font-display);
}
.nutri-faq summary::-webkit-details-marker { display: none; }
.nutri-faq p { margin: 12px 0 0; }

/* ===== Документи ===== */
.nutri-doc-page { position: relative; min-height: 100vh; min-height: 100dvh; padding: 10dvh 5vw; }
.nutri-doc { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; }
.nutri-doc section + section { margin-top: 36px; }
.nutri-doc h2 { font-size: 1.5rem; margin-top: 8px; }
.nutri-doc section[id] { scroll-margin-top: 90px; }

/* ===== Footer ===== */
.nutri-footer {
  position: relative;
  background: var(--nutri-footer);
  border-top: 1px solid var(--nutri-line);
  padding: 48px 5vw 28px;
}
.nutri-foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; }
.nutri-foot-links { display: flex; flex-wrap: wrap; gap: 20px; }
.nutri-foot-links a { color: var(--nutri-ink); text-decoration: none; border-bottom: 1px solid transparent; }
.nutri-foot-links a:hover { color: var(--nutri-tone); border-color: var(--nutri-tone); }
.nutri-disclaimer {
  display: block;
  font-size: 0.92rem;
  color: var(--nutri-ink);
  border-left: 3px solid var(--nutri-warm);
  padding: 10px 16px;
  background: rgba(246, 198, 103, 0.07);
  border-radius: 4px;
  margin-bottom: 16px;
}
.nutri-copy { color: var(--nutri-muted); font-size: 0.9rem; margin: 0; }

/* ===== Cookie-банер ===== */
.nutri-cookie-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 5vw;
  background: var(--nutri-surface-2);
  border-top: 1px solid var(--nutri-line);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
}
.nutri-cookie-bar[hidden] { display: none; }
.nutri-cookie-bar p { margin: 0; color: var(--nutri-ink); flex: 1 1 320px; }
.nutri-cookie-bar p a { color: var(--nutri-tone); }
.nutri-cookie-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.nutri-cookie-btn {
  padding: 10px 20px;
  border-radius: var(--nutri-radius);
  border: 2px solid var(--nutri-tone);
  background: transparent;
  color: var(--nutri-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}
.nutri-cookie-btn:hover { background: rgba(79, 209, 197, 0.12); color: var(--nutri-tone-hover); }
.nutri-cookie-btn.is-primary { background: var(--nutri-tone); color: var(--nutri-bg); }
.nutri-cookie-btn.is-primary:hover { background: var(--nutri-tone-hover); color: var(--nutri-bg); }

/* ===== Stagger-reveal (JS вмикає .is-in) ===== */
.js .nutri-stagger {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s, box-shadow 0.3s;
}
.js .nutri-stagger.is-in { opacity: 1; transform: none; }

/* ===== Адаптивність ===== */
@media (max-width: 1024px) {
  .nutri-principle-grid { grid-template-columns: repeat(2, 1fr); }
  .nutri-info-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nutri-burger { display: flex; }
  .nutri-links-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 20px 5vw;
    background: var(--nutri-surface);
    border-bottom: 1px solid var(--nutri-line);
    box-shadow: var(--nutri-shadow);
  }
  .nutri-nav-toggle:checked ~ .nutri-links-panel { display: flex; }
  .nutri-glass-card { max-width: 100%; }
  .nutri-split { grid-template-columns: 1fr; }
  .nutri-split-reverse .nutri-split-photo { order: 0; }
  .nutri-split-photo { min-height: 260px; }
  .nutri-feature-row,
  .nutri-info-grid,
  .nutri-principle-grid { grid-template-columns: 1fr; }
  .nutri-timeline li { padding-left: 64px; }
  .nutri-step-dot { width: 40px; height: 40px; }
  .nutri-timeline::before { left: 18px; }
  .nutri-accordion details { padding-right: 60px; }
  .nutri-accordion details::before { font-size: 1.6rem; }
  .nutri-cookie-bar { align-items: stretch; }
  .nutri-cookie-actions { width: 100%; }
  .nutri-cookie-actions .nutri-cookie-btn { flex: 1 1 auto; }
}
@media (max-width: 420px) {
  .nutri-brand span { font-size: 0.95rem; }
  .nutri-cta-btn { width: 100%; justify-content: center; }
  .nutri-submit { width: 100%; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  html { view-transition-name: none; }
  .js .nutri-stagger { opacity: 1; transform: none; }
}