/* Сайт Міри. Кольори з app/src/ui/theme.ts: антрацит, біле тло, один зелений акцент.
   Заголовки — Fixel Display (цифри в ньому перекреслені, тому цифри бере системний шрифт), текст системний.
   Правила верстки ті самі, що в застосунку: списки з лініями замість карток, фото страв головні, зелений лише на вибраному. */

@font-face {
  font-family: "Fixel Display";
  src: url("assets/fonts/fixel-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0020-002F, U+003A-007E, U+00A0-00BF, U+0400-045F, U+0490-0491, U+02BC, U+2013-2014, U+2019, U+201C-201E;
}

:root {
  --bg: #fff; --panel: #f8f8fb; --ink: #1e1a24; --muted: #6b6773; --line: #e4e5e9; --track: #ecebf0;
  --green: #2e8b6a; --warm: #c4572c; --quiet: #efeef3;
  --band: #1e1a24; --band-panel: #28242e; --band-ink: #fff; --band-muted: #a9a5b0; --band-track: #3a3640;
  --btn: #1e1a24; --on-btn: #fff;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --head: "Fixel Display", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --gutter: 20px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1a24; --panel: #28242e; --ink: #fff; --muted: #a9a5b0; --line: #3a3640; --track: #3a3640;
    --green: #8fcbae; --warm: #ee8a5c; --quiet: #34303a;
    --band: #28242e; --band-panel: #1e1a24;
    --btn: #fff; --on-btn: #1e1a24;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.5 var(--text); -webkit-font-smoothing: antialiased; }
img, video, svg { display: block; max-width: 100%; height: auto; }
main { overflow-x: clip; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--head); font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(38px, 6.2vw, 68px); line-height: 1.04; letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.12; }
h3 { font-size: clamp(22px, 2.3vw, 28px); line-height: 1.2; }
p { text-wrap: pretty; }
small { font-size: 15px; color: var(--muted); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { max-width: 1160px; margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
.skip { position: absolute; left: 12px; top: -60px; background: var(--btn); color: var(--on-btn); padding: 10px 14px; border-radius: 10px; z-index: 20; }
.skip:focus { top: 12px; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); }
.top-in { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 600 21px/1 var(--head); letter-spacing: -0.02em; text-decoration: none; }
.logo img { border-radius: 7px; }
.top nav { display: flex; gap: 28px; font-size: 15px; margin-left: auto; }
.top nav a { text-decoration: none; padding: 10px 0; color: var(--muted); }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }
.menu-btn { display: none; font: 500 15px/1 var(--text); color: var(--ink); background: var(--quiet); border: 0; border-radius: 10px; min-height: 44px; padding: 0 16px; align-items: center; cursor: pointer; }

/* Кнопки */
.btn, .fake-btn, .scr-btn { display: inline-flex; align-items: center; justify-content: center; background: var(--btn); color: var(--on-btn); font: 600 16px/1 var(--text); border-radius: 12px; text-decoration: none; }
.btn { flex-direction: column; align-items: flex-start; min-height: 56px; padding: 0 22px; font-size: 19px; letter-spacing: -0.01em; transition: transform .15s ease, opacity .15s ease; }
.btn small { font-size: 11px; font-weight: 500; color: inherit; opacity: .72; margin-bottom: 3px; letter-spacing: 0; }
.btn.quiet { background: var(--quiet); color: var(--ink); }
a.btn:hover { opacity: .86; }
a.btn:active { transform: scale(.98); }
.btn.off { cursor: default; }
.stores { display: flex; flex-wrap: wrap; gap: 10px; }
.top-stores { display: flex; gap: 8px; }
.top-stores .btn { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; flex-direction: row; align-items: center; }
.pill { display: inline-block; font-size: 14px; font-weight: 500; background: var(--panel); border-radius: 999px; padding: 8px 14px; margin-bottom: 20px; }
.fake-btn { min-height: 44px; padding: 0 18px; }
.fake-btn.quiet, .scr-btn.quiet { background: var(--quiet); color: var(--ink); }
.cta-note { color: var(--muted); font-size: 15px; margin-top: 14px; }

/* Початок */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 56px; padding-top: clamp(28px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 80px); }
.hero-text { max-width: 600px; }
.lead { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.45; color: var(--muted); margin: 24px 0 32px; max-width: 34em; }
.phones { position: relative; display: flex; align-items: center; padding: 20px 0; margin-right: clamp(0px, 2vw, 24px); }
.phone { position: relative; z-index: 1; width: 278px; aspect-ratio: 590 / 1276; border-radius: 46px; padding: 9px; background: #1e1a24; box-shadow: 0 30px 60px -28px rgba(30, 26, 36, .45), 0 0 0 1px rgba(255, 255, 255, .08) inset; transform: rotate(2.5deg); }
.phone.second { z-index: 0; width: 236px; border-radius: 40px; padding: 8px; margin-right: -46px; transform: rotate(-5deg) translateY(18px); }
.phone.second .phone-screen { border-radius: 32px; }
.phone-screen { width: 100%; height: 100%; border-radius: 37px; object-fit: cover; background: #f8f8fb; }
.scr { background: #fff; color: #1e1a24; padding: 54px 18px 0; overflow: hidden; }
.scr p { line-height: 1.25; }
.scr-over, .scr-sub { font-size: 12px; color: #6b6773; }
.scr-title { font: 600 26px/1.15 var(--head); margin: 2px 0 16px; }
.scr-num { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.scr-sec { font: 600 18px/1.2 var(--head); margin: 22px 0 10px; }
.scr img { border-radius: 14px; aspect-ratio: 16 / 11; object-fit: cover; }
.scr-dish { font: 600 18px/1.2 var(--head); margin: 10px 0 2px; }
.scr-btns { display: flex; gap: 8px; margin-top: 12px; }
.scr-btn { background: #1e1a24; color: #fff; font-size: 13px; min-height: 36px; padding: 0 14px; border-radius: 10px; }
.scr-btn.quiet { background: #efeef3; color: #1e1a24; }

.under { margin-top: 4px; font-size: 15px; color: var(--muted); }

/* Ризик у цифрах */
.risk { background: var(--panel); margin-top: clamp(64px, 9vw, 120px); padding-block: clamp(64px, 9vw, 120px); }
.risk h2 { max-width: 16em; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: clamp(28px, 4vw, 48px); }
.facts li { background: var(--bg); border-radius: 20px; padding: 24px 22px 20px; display: flex; flex-direction: column; }
.facts b { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--warm); }
.facts span { margin-top: 12px; font-weight: 500; line-height: 1.35; }
.facts small { margin-top: auto; padding-top: 16px; font-size: 13px; }
.facts-note { margin-top: 14px; font-size: 13px; color: var(--muted); }
.pivot { margin-top: clamp(40px, 6vw, 72px); max-width: 760px; }
.pivot h3 { font-size: clamp(26px, 3.2vw, 38px); }
.pivot p { margin-top: 14px; font-size: clamp(19px, 1.9vw, 23px); line-height: 1.45; }

/* Поживні речовини й стандарти */
.nutri { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 6vw, 96px); align-items: start; padding-top: clamp(80px, 11vw, 150px); }
.nutri-text p { color: var(--muted); margin-top: 14px; }
.nutri-text .honest { color: var(--ink); border-left: 2px solid var(--green); padding-left: 14px; margin-top: 22px; }
.nutri-pic { background: var(--panel); border-radius: 20px; padding: 24px clamp(18px, 2.4vw, 28px); }
.nutri-pic .frag-title { border: 0; padding-bottom: 6px; }
.bars li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) 3.4em; gap: 12px; align-items: center; padding: 9px 0; font-weight: 500; }
.bar { height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--green); }
.bar-n { text-align: right; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nutri-all { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--muted); }
.standards { padding-top: clamp(80px, 11vw, 150px); }
.std { margin: clamp(24px, 3vw, 40px) 0 0; border-top: 1px solid var(--line); }
.std div { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 6px clamp(20px, 4vw, 64px); padding: 20px 0; border-bottom: 1px solid var(--line); }
.std dt { font: 600 19px/1.3 var(--head); letter-spacing: -0.01em; }
.std dd { margin: 0; color: var(--muted); }
.std-note { margin: 14px 0 36px; font-size: 13px; color: var(--muted); max-width: 46em; }

/* Сцена й вигоди */
.scene { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px clamp(28px, 6vw, 96px); padding-top: clamp(72px, 10vw, 136px); }
.scene-text p { font-size: clamp(19px, 1.9vw, 23px); line-height: 1.45; }
.scene-text p + p { margin-top: 18px; color: var(--muted); }
.gains { padding-top: clamp(72px, 10vw, 136px); }
.gains-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: clamp(24px, 3vw, 40px) 0 0; }
.gains-list div { background: var(--panel); border-radius: 20px; padding: 26px 26px 28px; }
.gains-list dt { font: 600 20px/1.3 var(--head); letter-spacing: -0.01em; }
.gains-list dd { margin: 6px 0 0; color: var(--muted); max-width: 30em; }

/* Кнопка, що лишається внизу на телефоні (зʼявляється разом із посиланням на App Store) */
.sticky { display: none; }

/* Стрічка страв */
.plates-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px max(var(--gutter), calc((100vw - 1160px) / 2 + var(--gutter))); scrollbar-width: none; }
.plates-row::-webkit-scrollbar { display: none; }
.plates-row li { flex: 0 0 clamp(132px, 17vw, 208px); scroll-snap-align: start; }
.plates-row img { border-radius: 16px; background: var(--panel); }
.plates { padding-top: 8px; }
.plates-cap { margin-top: 16px; color: var(--muted); font-size: 15px; }

/* Як минає тиждень */
.how { padding-top: clamp(72px, 10vw, 136px); }
.how > h2 { max-width: 14em; }
.step { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 6vw, 96px); align-items: start; padding-top: clamp(48px, 8vw, 104px); }
.step.flip .step-text { order: 2; }
.step-text { max-width: 30em; }
.step-text p, .kcal-text p, .train-text > p, .family-text p, .trust p { color: var(--muted); margin-top: 14px; }
.step-pic { max-width: 460px; width: 100%; }
.step.flip .step-pic, .step.wide .step-pic { max-width: none; }
.frag-title { font: 600 20px/1.3 var(--head); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.rows li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rows b { display: block; font-weight: 500; }
.rows small { display: block; }
.till { color: var(--muted); font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.till.warm { color: var(--warm); }

.week { background: var(--panel); border-radius: 20px; padding: 22px clamp(16px, 2.4vw, 28px) 10px; }
.week-cap { font-size: 13px; color: var(--muted); }
.week-tabs { display: flex; gap: 4px; margin: 6px -8px 6px; border-bottom: 1px solid var(--line); }
.week-tabs button { flex: 1; font: 500 16px/1 var(--text); color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; min-height: 46px; padding: 0; cursor: pointer; }
.week-tabs button:hover { color: var(--ink); }
.week-tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--green); }
.meals li { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.meals li:last-child { border-bottom: 0; }
.meal-ph { border-radius: 12px; }
.meal-t { display: flex; flex-direction: column; }
.meal-kind { font-size: 13px; color: var(--muted); }
.meal-name { font-weight: 500; line-height: 1.3; }
.meal-note { font-size: 13px; color: var(--muted); }
.meal-kcal { color: var(--muted); font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.dish img { border-radius: 20px; aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.dish-name { font: 600 24px/1.2 var(--head); letter-spacing: -0.02em; margin-top: 16px; }
.dish-sub { color: var(--muted); font-size: 15px; margin-top: 4px; }
.dish-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Калорії */
.kcal { background: var(--band); color: var(--band-ink); margin-top: clamp(80px, 11vw, 150px); }
.kcal-in { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: center; padding-block: clamp(64px, 9vw, 120px); }
.kcal-text { max-width: 32em; }
.kcal-text p { color: var(--band-muted); }
.kcal-pic { background: var(--band-panel); border-radius: 20px; padding: 28px; max-width: 420px; width: 100%; justify-self: end; }
.kcal-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.kcal-num { display: block; font-size: 52px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kcal-sub { display: block; color: var(--band-muted); font-size: 15px; margin-top: 8px; }
.ring { flex: none; width: 96px; height: 96px; }
.ring circle { fill: none; stroke-width: 10; }
.ring-track { stroke: var(--band-track); }
.ring-fill { stroke: #fff; stroke-linecap: round; }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.m-v { display: block; font-weight: 600; font-variant-numeric: tabular-nums; }
.m-n { display: block; color: var(--band-muted); font-size: 13px; }
.m-bar { display: block; height: 4px; border-radius: 2px; background: var(--band-track); margin-top: 8px; overflow: hidden; }
.m-bar i { display: block; height: 100%; border-radius: 2px; }
.m-bar .p { background: #e06867; } .m-bar .c { background: #e0a065; } .m-bar .f { background: #6898de; }

/* Тренування й родина */
.train { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 6vw, 96px); align-items: center; padding-top: clamp(80px, 11vw, 150px); }
.train-pic img { border-radius: 20px; width: 100%; }
.train-text { max-width: 32em; }
.rows.ex { margin-top: 28px; border-top: 1px solid var(--line); }
.rows.ex li { justify-content: flex-start; }
.rows.ex img { border-radius: 8px; flex: none; }
.family { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 6vw, 96px); align-items: start; padding-top: clamp(80px, 11vw, 150px); }
.family-text { max-width: 32em; }
.family-pic { max-width: 420px; width: 100%; justify-self: end; }

/* Норми, приватність, питання, кінець */
.trust { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 96px); margin-top: clamp(80px, 11vw, 150px); padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); }
.trust h2 { font-size: clamp(24px, 2.6vw, 30px); }
.trust > div { max-width: 32em; }
.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 24px clamp(28px, 6vw, 96px); padding-top: clamp(80px, 11vw, 150px); }
.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer; list-style: none; padding: 18px 0; font-weight: 500; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq details p { color: var(--muted); padding: 0 32px 20px 0; max-width: 36em; }
.faq-more { grid-column: 2; color: var(--muted); font-size: 15px; }
.end { padding-block: clamp(88px, 12vw, 170px) clamp(72px, 9vw, 120px); }
.end h2 { font-size: clamp(32px, 5vw, 58px); letter-spacing: -0.03em; max-width: 13em; margin-bottom: 32px; }

/* Підвал */
.foot { border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.foot-in { display: grid; grid-template-columns: 1fr auto; gap: 14px 32px; padding-block: 32px max(32px, env(safe-area-inset-bottom)); }
.foot-name { font: 600 19px/1.2 var(--head); color: var(--ink); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: flex-end; }
.foot a { text-decoration: none; padding: 4px 0; }
.foot a:hover { color: var(--ink); }
.foot-c { text-align: right; }

/* Сторінки з текстом: приватність, умови, підтримка */
.doc { max-width: 720px; margin-inline: auto; padding: clamp(32px, 6vw, 72px) var(--gutter) 96px; }
.doc h1 { font-size: clamp(32px, 5vw, 46px); margin-bottom: 12px; }
.doc h2 { font-size: 23px; margin: 44px 0 10px; }
.doc p, .doc ul, .doc ol { margin: 12px 0; }
.doc ul, .doc ol { padding-left: 22px; list-style: revert; }
.doc li { margin: 8px 0; }
.doc .muted { color: var(--muted); font-size: 15px; }
.doc .card { border-block: 1px solid var(--line); padding-block: 8px; margin-block: 20px; }
.doc .note { background: var(--panel); border-radius: 12px; padding: 14px 16px; font-size: 15px; }
.doc .btn { margin-top: 8px; flex-direction: row; align-items: center; font-size: 16px; }

/* Поява під час прокручування. Без скриптів і з вимкненою анімацією все видно одразу. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
  .js .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .phones { justify-content: center; margin: 0; }
  .phone { width: min(248px, 62vw); border-radius: 42px; }
  .phone .phone-screen { border-radius: 33px; }
  .phone.second { width: min(200px, 50vw); margin-right: -70px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .nutri, .std div { grid-template-columns: 1fr; }
  .top-stores { display: none; }
  .step, .kcal-in, .train, .family, .trust, .faq, .scene, .gains-list { grid-template-columns: 1fr; }
  .step.flip .step-text { order: 0; }
  .step-pic, .kcal-pic, .family-pic { max-width: none; justify-self: stretch; }
  .train-pic { max-width: 420px; }
  .faq-more { grid-column: 1; }
  .foot-in { grid-template-columns: 1fr; }
  .foot nav { justify-content: flex-start; }
  .foot-c { text-align: left; }
}
@media (max-width: 720px) {
  .menu-btn { display: inline-flex; }
  .top nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 4px var(--gutter) 12px; font-size: 17px; }
  .top nav a { padding: 13px 0; color: var(--ink); border-top: 1px solid var(--line); }
  .top.open nav { display: flex; }
  html:not(.js) .menu-btn { display: none; }
  html:not(.js) .top nav { display: flex; position: static; flex-direction: row; flex-wrap: wrap; gap: 0 16px; border: 0; padding: 0; font-size: 14px; }
  html:not(.js) .top nav a { border: 0; }
  .meals li { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 12px; }
  .facts li { padding: 18px 16px 16px; }
  .gains-list div { padding: 20px; }
  .sticky { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; padding: 10px var(--gutter) max(10px, env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .25s ease; }
  .sticky.on { transform: none; }
  .sticky .btn { flex: 1; align-items: center; }
  .kcal-pic { padding: 22px; }
  .kcal-num { font-size: 44px; }
}
