/* Холди — сайт holdie.ru.
   Палитра, шрифт и слои — по docs/03: крем, чернила, янтарь; Nunito 600 текст,
   700 кнопки, 800 заголовки и цифры. Смысловой текст ≥ 4,5:1 к фону; на fill —
   только чернила (muted там 4,36:1). Полный янтарь — у Холди, мёда в банке
   и ленте и у одного действия страницы. */

@font-face { font-family: Nunito; font-weight: 600; font-display: swap; src: url(fonts/nunito-600.woff2) format("woff2"); }
@font-face { font-family: Nunito; font-weight: 700; font-display: swap; src: url(fonts/nunito-700.woff2) format("woff2"); }
@font-face { font-family: Nunito; font-weight: 800; font-display: swap; src: url(fonts/nunito-800.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --cream: #FAF4E8;
  --surface: #FFFFFF;
  --fill: #F3EADA;      /* утопленная заливка: сцены, плашка статуса, трек ленты */
  --hair: #EADFC8;
  --ink: #3E3227;
  --muted: #7B6A55;     /* 4,75:1 к крему, 5,20:1 к белому */
  --deep: #935E26;      /* ссылки: 4,95:1 к крему */
  --amber: #E8963E;     /* текст на янтаре — только чернила (5,2:1) */
  --edge: 0 1px 0 rgba(62, 50, 39, .10);
  --raised: 0 1px 1px rgba(62, 50, 39, .04), 0 8px 16px rgba(62, 50, 39, .06);
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1120px;
  --section: clamp(72px, 8vw, 112px);
}

/* Системное «Увеличить контраст» — те же HC-варианты, что в приложении. */
@media (prefers-contrast: more) {
  :root { --muted: #5E4F3F; --deep: #7D4F20; }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 600 17px/1.55 Nunito, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--deep); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--deep); outline-offset: 3px; border-radius: 8px; }

h1, h2, h3 { margin: 0; font-weight: 800; text-wrap: balance; }
h1 { font-size: clamp(40px, 3.4vw + 26px, 68px); line-height: 1.03; letter-spacing: -.03em; }
h2 { font-size: clamp(30px, 1.6vw + 24px, 42px); line-height: 1.1; letter-spacing: -.025em; }
h3 { font-size: 21px; line-height: 1.25; letter-spacing: -.01em; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  padding: 12px 18px; border-radius: 18px;
  background: var(--surface); box-shadow: var(--edge), var(--raised);
  color: var(--ink); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 16px; }

/* ───────── Шапка и подвал ───────── */

.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 72px;
}

.logo {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px;
  color: var(--ink); text-decoration: none;
  font: 800 22px/1 Nunito, sans-serif; letter-spacing: -.01em;
}
.logo img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 2px var(--ink); }

.head-nav { display: flex; gap: 24px; }
.head-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px;
  color: var(--muted); font-weight: 700; font-size: 16px; text-decoration: none;
}
.head-nav a:hover, .head-nav a[aria-current="page"] { color: var(--ink); }

.site-foot { border-top: 1.5px solid var(--hair); padding: 28px 0 44px; color: var(--muted); font-size: 15px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 0 24px; margin-bottom: 8px; }
.site-foot nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--ink); font-weight: 700; font-size: 16px; text-decoration: none;
}
.site-foot nav a:hover { color: var(--deep); }
.site-foot nav a[aria-current="page"] { color: var(--muted); }
.site-foot p { margin: 4px 0 0; max-width: 60ch; }

/* ───────── Герой ───────── */

.hero { padding: clamp(8px, 3vw, 40px) 0 var(--section); }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 920px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 64px; }
}

.eyebrow { margin: 0 0 14px; color: var(--deep); font-weight: 700; font-size: 16px; }

.lead {
  margin: 20px 0 0; max-width: 30ch;
  color: var(--muted); font-size: clamp(19px, .5vw + 16px, 22px); line-height: 1.45;
  text-wrap: pretty;
}

/* Плашка, а не кнопка: нажимать пока нечего. После релиза здесь — значок App Store. */
.status {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 32px 0 0; padding: 11px 20px 11px 16px; border-radius: 24px;
  background: var(--fill);
  font-weight: 700; font-size: 16px; line-height: 1.25;
}
.status svg { width: 20px; height: 20px; flex: none; }
@media (max-width: 359px) { .status { gap: 8px; padding: 10px 16px 10px 13px; font-size: 15px; } }

/* Главный экран без телефона: сцена, лента недели и тихая строка — одна SVG. */
.hero-figure { position: relative; isolation: isolate; margin: 0; }
.hero-figure::before {
  content: ""; position: absolute; z-index: -1;
  left: 8%; right: 8%; top: -6%; height: 74%;
  background: radial-gradient(closest-side, #FFEFD2 0%, rgba(255, 239, 210, 0) 100%);
}
.hero-art { width: 100%; height: auto; overflow: visible; }
/* На телефоне лента недели забирает и поля: её подписи — мелкие цифры приложения. */
@media (max-width: 919px) { .hero-art { width: calc(100% + var(--gutter)); max-width: 560px; margin-inline: auto; } }
@media (max-width: 599px) { .hero-art { margin-inline: calc(var(--gutter) / -2); } }

.hero-art text, .beat-art text { font-family: Nunito, sans-serif; font-variant-numeric: tabular-nums; }
.rb-day { font-size: 12px; font-weight: 800; fill: var(--ink); }
.rb-num { font-size: 14px; font-weight: 700; fill: var(--muted); }
.rb-num.rb-today { font-size: 15px; font-weight: 800; fill: var(--ink); }
.rb-mark { font-size: 11px; font-weight: 700; fill: var(--muted); }
.rb-left { font-size: 13px; font-weight: 700; fill: var(--deep); }
.rb-fact { font-size: 20px; font-weight: 800; fill: var(--ink); letter-spacing: -.02em; }
.rb-ahead { font-size: 12px; font-weight: 700; fill: var(--muted); }
.rb-hint { font-size: 15px; font-weight: 600; fill: var(--muted); }
/* На узком экране лента мельче, чем в приложении, — подписи на кегль крупнее. */
@media (max-width: 479px) {
  .rb-day, .rb-ahead { font-size: 13px; }
  .rb-num { font-size: 15px; }
  .rb-num.rb-today { font-size: 16px; }
  .rb-mark { font-size: 12.5px; }
  .rb-left { font-size: 14px; }
  .rb-hint { font-size: 16px; }
}

/* Сцена героя: двигается только transform, контур Холди тот же (docs/04). */
.h-eyes { transform-box: fill-box; transform-origin: center; animation: blink 6.5s 2.6s infinite; }
.hero-art .h-drop { animation: drop .85s .55s cubic-bezier(.55, 0, 1, .45) both; }
.hero-art .h-body { animation: nod .7s 1.4s ease-in-out both; }

@keyframes blink {
  0%, 94%, 100% { transform: scaleY(1); }
  96.5% { transform: scaleY(.12); }
}
@keyframes drop {
  0% { transform: translateY(-64px); opacity: 0; }
  18%, 82% { opacity: 1; }
  100% { transform: translateY(0); opacity: 0; }
}
@keyframes nod {
  0%, 100% { transform: translateY(0); }
  35% { transform: translateY(2.5px); }
  70% { transform: translateY(-.6px); }
}

@media (prefers-reduced-motion: reduce) {
  .h-eyes, .hero-art .h-drop, .hero-art .h-body { animation: none; }
  .hero-art .h-drop { opacity: 0; }
}

/* ───────── Секции ───────── */

.section { padding: 0 0 var(--section); }

/* Как это устроено: три сцены одной недели. Сцена лежит на утопленной заливке,
   как кусок экрана; в узкой колонке — над текстом, на планшете — слева. */
.beats {
  list-style: none; margin: 36px 0 0; padding: 0;
  display: grid; gap: 48px;
}
.beat > h3 { margin: 22px 0 8px; }
.beat > p { margin: 0; max-width: 34ch; color: var(--muted); text-wrap: pretty; }

.stage {
  container-type: inline-size;
  display: grid; place-items: center;
  aspect-ratio: 3 / 2; padding: 5% 6%;
  border-radius: 24px; background: var(--fill);
  overflow: hidden;
}
.beat-art { width: 100%; height: 100%; }

@media (min-width: 600px) and (max-width: 899px) {
  .beat { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 8px 32px; align-items: center; }
  .beat .stage { grid-row: span 2; }
  .beat > h3 { margin: 0; align-self: end; }
  .beat > p { align-self: start; }
}
@media (min-width: 900px) {
  .beats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
}

/* Ввод: число, проекция на неделю, метки и низ нампада — как в шторке ввода.
   Масштаб — от ширины сцены (cqw), чтобы кусок экрана не рассыпался. */
.entry {
  width: 100%;
  font-size: clamp(11px, 4.2cqw, 16px);
  display: flex; flex-direction: column; align-items: center;
}
:where(.entry p) { margin: 0; }
.entry-number { display: flex; align-items: flex-end; gap: .25em; line-height: 1; }
.entry-number span { font-size: 3.3em; font-weight: 800; letter-spacing: -.02em; }
.entry-number i { width: .19em; height: 2.7em; margin-bottom: .2em; border-radius: .1em; background: var(--amber); }
.entry-number small { margin-bottom: .45em; font-size: 1em; font-weight: 700; }
.entry-week { margin-top: .7em; font-size: .9em; font-weight: 700; }
.entry-week b { font-weight: 800; }
.entry-chips { display: flex; gap: .4em; margin-top: 1em; }
.entry-chips span {
  padding: .5em 1em; border-radius: 99px;
  background: var(--surface); box-shadow: var(--edge);
  font-size: .9em; font-weight: 700; line-height: 1.2;
}
.entry-chips .on { background: var(--ink); color: var(--cream); box-shadow: none; }
/* Высота клавиш — у сетки: кегль цифры и «≈ на глаз» на неё не влияет. */
.entry-keys {
  display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 2.55em; gap: .45em;
  width: 100%; margin-top: 1.1em;
}
.entry-keys span {
  display: grid; place-content: center; justify-items: center; border-radius: .75rem;
  background: var(--surface); box-shadow: var(--edge);
  font-size: 1.3em; font-weight: 700; line-height: 1;
}
.entry-keys .eye { font-size: 1.1em; }
.entry-keys .eye small { margin-top: .15em; font-size: .68em; font-weight: 700; }
.entry-keys svg { width: .9em; height: .9em; }

/* Ничего лишнего: одна карточка — одна группа строк (docs/03, «Слои»). */
.facts {
  list-style: none; margin: 36px 0 0; padding: 0;
  display: grid;
  border-radius: 16px; background: var(--surface); box-shadow: var(--raised);
}
.fact { padding: 26px 24px 28px; }
.fact + .fact { border-top: 1.5px solid var(--hair); }
.fact-icon {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 22px; background: var(--fill);
}
.fact-icon svg { width: 24px; height: 24px; }
.fact h3 { margin: 16px 0 6px; font-size: 19px; }
.fact p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; text-wrap: pretty; }
@media (min-width: 900px) {
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fact { padding: 30px 32px 32px; }
  .fact + .fact { border-top: 0; border-left: 1.5px solid var(--hair); }
}

/* Финал: иконка приложения и где его ждать. После релиза — значок App Store. */
.closing { text-align: center; }
.closing .wrap { display: flex; flex-direction: column; align-items: center; }
.closing-icon {
  width: 96px; height: 96px; border-radius: 24px;
  box-shadow: 0 0 0 2.5px var(--ink), 0 18px 32px -14px rgba(62, 50, 39, .35);
}
.closing h2 { margin-top: 28px; }
.closing p { margin: 12px 0 0; max-width: 36ch; color: var(--muted); font-size: 18px; text-wrap: balance; }

/* ───────── Кнопки ───────── */

/* Главное действие страницы: янтарь, чернильный текст, радиус 18 (docs/03). */
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border-radius: 18px;
  background: var(--amber); color: var(--ink);
  font-weight: 700; font-size: 17px; text-decoration: none;
  box-shadow: var(--edge);
}
.cta:hover { color: var(--ink); background: #EFA14D; }
.cta:active { transform: scale(.97); }
.cta svg { width: 22px; height: 22px; flex: none; }

/* ───────── Страницы-документы ───────── */

.doc { padding: clamp(8px, 3vw, 40px) 0 var(--section); }
.doc .wrap { --max: 720px; }
/* «конфиденциальности» шире экрана iPhone SE: переносим по слогам. */
.doc h1 { font-size: clamp(36px, 2.4vw + 26px, 56px); hyphens: auto; overflow-wrap: break-word; }
.doc .lead { max-width: none; }
.doc h2 { margin: 48px 0 10px; font-size: 23px; line-height: 1.25; letter-spacing: -.01em; }
.doc p, .doc li { text-wrap: pretty; }
.doc p { margin: 12px 0 0; }
.doc ul { margin: 12px 0 0; padding-left: 1.2em; }
.doc li + li { margin-top: 8px; }
.doc .meta { margin-top: 14px; color: var(--muted); font-size: 15px; }

.card { margin-top: 32px; padding: 24px; border-radius: 16px; background: var(--surface); box-shadow: var(--raised); }
.card > :first-child { margin-top: 0; }

.path { font-weight: 700; color: var(--ink); white-space: nowrap; }

/* Поддержка: почта и одно действие. Адрес — текстом, чтобы его легко скопировать. */
.contact { display: grid; gap: 20px; align-items: center; }
.contact .contact-label { margin: 0; color: var(--muted); font-size: 15px; }
.contact .mail {
  margin: 2px 0 0; user-select: all; -webkit-user-select: all;
  font-weight: 800; font-size: clamp(21px, 1.4vw + 16px, 26px); line-height: 1.25; letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
@media (min-width: 640px) {
  .contact { grid-template-columns: 1fr auto; padding: 28px 28px 28px 32px; }
}

/* Частые вопросы: одна карточка, вопрос раскрывается по нажатию. */
.faq { margin-top: 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--raised); }
.faq details + details { border-top: 1.5px solid var(--hair); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 16px 24px;
  list-style: none; cursor: pointer;
  font-weight: 800; font-size: 18px; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 9px; height: 9px; margin: -4px 4px 0 0;
  border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { margin-top: 4px; transform: rotate(225deg); }
.faq summary:hover::after { border-color: var(--ink); }
.faq summary:focus-visible { outline-offset: -3px; border-radius: 16px; }
.faq details p { margin: -4px 0 0; padding: 0 24px 22px; max-width: 62ch; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* Политика: коротко — галочками, дальше — документ. */
.doc .checks { list-style: none; padding: 0; margin: 14px 0 0; }
.checks li { position: relative; padding-left: 34px; }
.checks li + li { margin-top: 10px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .18em;
  width: 22px; height: 22px; border-radius: 11px; background: var(--fill);
}
.checks li::after {
  content: ""; position: absolute; left: 7.5px; top: calc(.18em + 5px);
  width: 5px; height: 9px;
  border-right: 2.2px solid #56744E; border-bottom: 2.2px solid #56744E;
  transform: rotate(45deg);
}
.summary-title { margin: 0; font-weight: 800; font-size: 19px; }

/* ───────── 404 ───────── */

.not-found { padding: 32px 0 var(--section); text-align: center; }
.not-found .wrap { display: flex; flex-direction: column; align-items: center; }
.not-found img { width: min(100%, 300px); height: auto; margin-bottom: 24px; }
.not-found .cta { margin-top: 32px; }
