/* Krainova Lashes — визитка в стиле «тихая роскошь» с элементами приложения.
   Много воздуха и тонкая типографика, но читаемо: основной текст от 16 px,
   подписи от 13 px, контраст текста не ниже 4.5:1. Без JS (CSP script-src 'none'). */

:root {
  --bg: #f5efe7;          /* молочный */
  --bg-2: #efe5d8;        /* чуть глубже — для блока обучения */
  --sand: #e2cdb3;
  --accent: #946546;      /* карамель: кнопки, обводки, акценты */
  --ink: #3a2b21;         /* тёплый тёмно-коричневый текст */
  --ink-2: #6b5546;       /* вторичный текст, 5.8:1 на фоне */
  --line: rgba(58, 43, 33, .16);
  --on-accent: #fff8f1;

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Onest", -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: #ebe2d6;
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
svg { flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.page {
  max-width: 480px; margin: 0 auto;
  background: var(--bg);
  min-height: 100dvh;
  overflow: clip;
  text-align: center;
}

/* Общие элементы */
.label {
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-2);
}
h1, h2 { font-family: var(--serif); font-weight: 600; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(44px, 12.5vw, 54px); line-height: .98; letter-spacing: -.01em; margin: 12px 0 12px; }
h2 { font-size: 40px; line-height: 1.05; }
h2 em { font-style: normal; }
section { padding: 64px var(--gutter) 0; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px; padding: 0 32px;
  border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font-size: 17px; font-weight: 600;
  box-shadow: 0 12px 28px -16px rgba(110, 76, 50, .75);
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.btn svg { width: 22px; height: 22px; }
.btn:active, .quick a:active { transform: scale(.97); }
@media (hover: hover) { .btn:hover { background: #845839; } }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--accent); box-shadow: none; }
@media (hover: hover) { .btn-outline:hover { background: rgba(148, 101, 70, .08); } }

/* Три кнопки связи с иконками */
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.quick a {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 48px; padding: 0 6px; border-radius: 999px;
  border: 1.5px solid rgba(148, 101, 70, .55);
  font-size: 15px; font-weight: 500;
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.quick svg { width: 18px; height: 18px; color: var(--accent); }
@media (hover: hover) { .quick a:hover { background: rgba(148, 101, 70, .08); } }

/* ---------- Первый экран: имя поверх светлого верха фото ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) var(--gutter) 0;
}
.top .brand { font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.lang { display: flex; gap: 4px; }
.lang a {
  min-width: 44px; min-height: 40px; display: grid; place-items: center;
  font-size: 14px; font-weight: 600; letter-spacing: .08em; color: var(--ink-2);
  border-bottom: 1.5px solid transparent;
}
.lang a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Фото под текстом, верхний край мягко растворяется в фоне — надписи ничего не перекрывают */
.hero { isolation: isolate; }
.hero-img {
  position: relative; z-index: -1;
  display: block; width: 100%; height: auto; margin-top: -40px;
  aspect-ratio: 1 / 1.08; object-fit: cover; object-position: 50% 14%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 24%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 24%);
}
.intro { padding-top: 20px; }
.subtitle { font-size: 17px; color: var(--ink-2); max-width: 26ch; margin: 0 auto; }

.book { padding-top: 22px; }
.tagline { font: italic 500 24px/1.25 var(--serif); color: var(--ink); margin-bottom: 22px; text-wrap: balance; }
.book .btn { width: 100%; }

/* ---------- Цифры ---------- */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { padding: 4px 6px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b { display: block; font: 500 clamp(40px, 12vw, 52px)/1 var(--serif); letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: lining-nums; }
.stat span { display: block; margin-top: 10px; font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.express {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 30px; font-size: 16px; color: var(--ink-2);
}
.express::before, .express::after { content: ""; flex: 0 0 32px; height: 1px; background: var(--accent); opacity: .6; }
.express span { max-width: 26ch; }
.express b { color: var(--ink); font-weight: 600; }

/* ---------- Работы: кружки-сторис + карусель на всю ширину ---------- */
.works-section h2 + .label { margin-top: 12px; }
.stories { display: flex; justify-content: center; gap: 18px; margin-top: 28px; }
.stories a { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 88px; }
.stories img {
  display: block; width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  padding: 3px; border: 1.5px solid var(--accent); background: var(--bg);
  transition: transform .25s var(--ease);
}
.stories a:active img { transform: scale(.95); }
.stories span { font: 500 18px/1 var(--serif); color: var(--ink); }
.works {
  display: flex; gap: 6px;
  margin: 28px calc(-1 * var(--gutter)) 0;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
}
.works::-webkit-scrollbar { display: none; }
.work { flex: 0 0 88%; scroll-snap-align: center; scroll-margin-top: 120px; }
.work:first-child { margin-left: 6%; }
.work:last-child { margin-right: 6%; }
.work img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.hint { margin-top: 14px; font-size: 14px; color: var(--ink-2); }

/* ---------- Почему ко мне ---------- */
.why { list-style: none; margin-top: 26px; text-align: left; }
.why li {
  display: grid; grid-template-columns: 48px 1fr; align-items: baseline;
  padding: 20px 0; border-top: 1px solid var(--line);
}
.why li:last-child { border-bottom: 1px solid var(--line); }
.why .num { font: 500 24px/1 var(--serif); color: var(--accent); }
.why b { display: block; font-size: 18px; font-weight: 600; }
.why p { margin-top: 4px; font-size: 16px; color: var(--ink-2); }

/* ---------- Обучение: другой тон фона, без рамок ---------- */
.school { margin-top: 64px; padding-top: 60px; padding-bottom: 60px; background: var(--bg-2); }
.school h2 { margin: 14px 0 14px; }
.school .text { font-size: 17px; color: var(--ink-2); max-width: 30ch; margin: 0 auto 26px; }
.school .btn { width: 100%; }

/* ---------- Вопросы ---------- */
.faq { margin-top: 22px; text-align: left; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding: 14px 0;
  font-size: 17px; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; font: 300 28px/1 var(--sans); color: var(--accent);
  transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 32px 20px 0; font-size: 16px; color: var(--ink-2); }

/* ---------- Финал ---------- */
.final .label { margin: 12px 0 26px; }
.final .btn { width: 100%; }
.numbers { margin-top: 18px; font-size: 14px; line-height: 1.7; color: var(--ink-2); font-variant-numeric: tabular-nums; }

footer { padding: 64px var(--gutter) 140px; }
footer .brand { font-size: 14px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
footer .label { margin-top: 8px; font-size: 13px; }
footer .sig { margin-top: 26px; font: italic 500 28px/1 var(--serif); }
footer .lang-alt { display: inline-block; margin-top: 16px; padding: 10px 4px; font-size: 15px; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Закреплённая панель записи (как в приложении) ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  max-width: 480px; margin: 0 auto;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: rgba(245, 239, 231, .84);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.dock .btn { width: 100%; }
/* Появляется, когда кнопка первого экрана уехала вверх (без JS) */
@supports (animation-timeline: scroll()) {
  .dock { animation: dock-in linear both; animation-timeline: scroll(root); animation-range: 560px 660px; }
  @keyframes dock-in {
    from { opacity: 0; transform: translateY(100%); visibility: hidden; }
    to   { opacity: 1; transform: none; visibility: visible; }
  }
}

/* Спокойное появление блоков */
@supports (animation-timeline: view()) {
  .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 50%; }
  @keyframes reveal { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html, .works { scroll-behavior: auto; }
  .reveal { animation: none; }
  /* панель всё равно прячется на первом экране, но появляется без движения */
  @supports (animation-timeline: scroll()) {
    .dock { animation-name: dock-fade; }
    @keyframes dock-fade { from { opacity: 0; visibility: hidden; } to { opacity: 1; visibility: visible; } }
  }
  .btn, .quick a, .stories img, .faq summary::after { transition: none; }
}
