/* ==========================================================================
   Kite the Planet - дизайн-система "Балтика и янтарь"
   1. Токены  2. База  3. Раскладка  4. Компоненты  5. Шапка и подвал  6. Адаптив
   ========================================================================== */

/* 1. Токены ---------------------------------------------------------------- */
:root {
  /* море */
  --sea-900: #0B3B47;
  --sea-700: #0F5A6B;
  --sea-500: #1B8296;
  --sea-200: #BFE3E8;
  --sea-50: #EEF7F8;
  /* песок */
  --sand-50: #FBF7F0;
  --sand-100: #F3EBDD;
  --sand-300: #E2D3B8;
  /* янтарь - единственный акцент, только для действий */
  --amber-500: #F2A007;
  --amber-600: #D98600;
  --amber-100: #FFF1CF;
  /* текст */
  --ink: #0E2A33;
  --ink-soft: #4C636B;
  --white: #FFFFFF;

  --font-head: "Unbounded", "Golos Text", system-ui, sans-serif;
  --font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --fs-h1: clamp(1.9rem, 1.2rem + 3vw, 3.4rem);
  --fs-h2: clamp(1.45rem, 1.1rem + 1.5vw, 2.2rem);
  --fs-h3: 1.15rem;
  --fs-lead: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9rem;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --shadow: 0 10px 30px rgba(11, 59, 71, 0.10);
  --container: 1160px;
}

/* 2. База ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--sand-50);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--sea-700); text-underline-offset: 3px; }
a:hover { color: var(--sea-500); }
:focus-visible { outline: 3px solid var(--amber-500); outline-offset: 2px; border-radius: 4px; }
p { margin: 0 0 var(--space-2); }
ul, ol { margin: 0 0 var(--space-2); padding-left: 1.3rem; }
li { margin-bottom: 0.35rem; }

h1, h2, h3, .h1, .h2, .h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 var(--space-2); color: var(--sea-900); font-weight: 700; }
h1, .h1 { font-size: var(--fs-h1); letter-spacing: -0.01em; }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); font-weight: 500; }
.lead { font-size: var(--fs-lead); color: var(--ink-soft); max-width: 46rem; }
.muted { color: var(--ink-soft); font-size: var(--fs-small); }
.eyebrow { font-family: var(--font-head); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sea-500); margin-bottom: var(--space-1); }

.skip { position: absolute; left: -999px; top: 0; background: var(--white); padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* заглушка: то, что владелец должен заменить */
/* подсветка скрыта, включается ссылкой в подвале или ?stubs=1 */
.show-stubs .stub { background: linear-gradient(transparent 62%, var(--amber-100) 62%); border-bottom: 1px dashed var(--amber-600); cursor: help; }

/* 3. Раскладка ------------------------------------------------------------- */
.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.section { padding-block: var(--space-5); }
.section--tint { background: var(--sea-50); }
.section--sand { background: var(--sand-100); }
.section--dark { background: var(--sea-900); color: var(--sand-50); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark .lead, .section--dark .muted { color: var(--sea-200); }
.section--dark a:not(.btn) { color: var(--amber-500); }
.section__head { margin-bottom: var(--space-4); max-width: 46rem; }

.grid { display: grid; gap: var(--space-3); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-4); align-items: center; }
.split--top { align-items: start; }
.prose { max-width: 46rem; }
.prose h2 { margin-top: var(--space-4); }
.prose h3 { margin-top: var(--space-3); }
.stack > * + * { margin-top: var(--space-2); }

/* 4. Компоненты ------------------------------------------------------------ */

/* Кнопки: янтарная - главное действие, одна на блок; контурная - второе */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.85rem 1.5rem; border-radius: 999px; border: 2px solid transparent; font: 600 1rem var(--font-body); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn--accent { background: var(--amber-500); color: var(--ink); }
.btn--accent:hover { background: var(--amber-600); color: var(--ink); }
.btn--ghost { border-color: var(--sea-700); color: var(--sea-700); background: transparent; }
.btn--ghost:hover { background: var(--sea-700); color: var(--white); }
.section--dark .btn--ghost, .hero .btn--ghost { border-color: var(--sand-50); color: var(--sand-50); }
.section--dark .btn--ghost:hover, .hero .btn--ghost:hover { background: var(--sand-50); color: var(--sea-900); }
.btn--small { padding: 0.55rem 1.1rem; font-size: 0.95rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.link-more { font-weight: 600; text-decoration: none; }
.link-more::after { content: " \2192"; }

/* Заглушка фото */
.ph { position: relative; margin: 0; border-radius: var(--radius-m); overflow: hidden; aspect-ratio: 4 / 3; background:
    radial-gradient(120% 90% at 85% 10%, rgba(242,160,7,.55), transparent 55%),
    linear-gradient(180deg, var(--sea-200) 0%, var(--sea-200) 52%, var(--sea-500) 52%, var(--sea-700) 100%); }
.ph::before { content: ""; position: absolute; left: 14%; top: 14%; width: 34%; aspect-ratio: 2 / 1; background: var(--sea-900); opacity: .8; border-radius: 100% 100% 12% 12% / 160% 160% 20% 20%; transform: rotate(-18deg); }
.ph::after { content: attr(data-label); position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0.75rem; padding: 0.4rem 0.7rem; background: rgba(251,247,240,.92); border: 1px dashed var(--amber-600); border-radius: var(--radius-s); font-size: var(--fs-small); color: var(--ink); }
.ph--wide { aspect-ratio: 16 / 9; }
.ph--tall { aspect-ratio: 3 / 4; }
.ph--square { aspect-ratio: 1; }
.ph--sand { background:
    radial-gradient(120% 90% at 15% 10%, rgba(255,241,207,.9), transparent 55%),
    linear-gradient(180deg, var(--sea-200) 0%, var(--sea-200) 45%, var(--sand-300) 45%, var(--sand-100) 100%); }

/* Первый экран */
.hero { background: linear-gradient(160deg, var(--sea-900) 0%, var(--sea-700) 70%, var(--sea-500) 100%); color: var(--sand-50); padding-block: var(--space-5) var(--space-6); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 60px; background: var(--sand-50); clip-path: path("M0 60 L0 30 Q 180 0 360 26 T 720 26 T 1080 26 T 1440 26 T 1800 26 T 2160 26 T 2600 26 L 2600 60 Z"); }
.hero h1 { color: var(--white); }
.hero .lead { color: var(--sea-200); }
.hero .eyebrow { color: var(--amber-500); }
.hero__facts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: var(--space-3); padding: 0; list-style: none; font-size: var(--fs-small); color: var(--sea-200); }
.hero__facts li::before { content: "✓ "; color: var(--amber-500); }

/* Шапка внутренней страницы */
.page-head { padding-block: var(--space-4) var(--space-3); }
.page-head .lead { margin-bottom: 0; }

/* Хлебные крошки */
.crumbs { padding-top: var(--space-2); font-size: var(--fs-small); color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }
.crumbs span { margin-inline: 0.15rem; }

/* Карточка */
.card { display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius-m); padding: var(--space-3); box-shadow: var(--shadow); border: 1px solid rgba(11,59,71,.06); }
.card > .ph { margin: calc(var(--space-3) * -1) calc(var(--space-3) * -1) var(--space-3); border-radius: var(--radius-m) var(--radius-m) 0 0; }
.card__meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: var(--space-2); }
.card__foot { margin-top: auto; padding-top: var(--space-2); display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.card--flat { box-shadow: none; background: var(--sea-50); border: 0; }
.card--line { box-shadow: none; border: 1px solid var(--sand-300); }

.tag { display: inline-block; padding: 0.2rem 0.7rem; border-radius: 999px; background: var(--sea-50); color: var(--sea-700); font-size: 0.82rem; font-weight: 500; }
.tag--amber { background: var(--amber-100); color: #7A4B00; }
.price { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--sea-900); white-space: nowrap; }
.price small { font: 400 var(--fs-small) var(--font-body); color: var(--ink-soft); }

/* Факты в цифрах */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); list-style: none; padding: 0; margin: 0; }
.fact__num { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); color: var(--sea-700); line-height: 1.1; display: block; }
.fact__text { color: var(--ink-soft); font-size: var(--fs-small); }

/* Шаги */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.steps--col { grid-template-columns: 1fr; max-width: 46rem; }
.step { counter-increment: step; position: relative; padding-top: 3.4rem; margin: 0; }
.step::before { content: counter(step); position: absolute; top: 0; left: 0; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--sea-900); color: var(--amber-500); font: 700 1rem var(--font-head); }
.steps--col .step { padding: 0 0 0 3.8rem; min-height: 2.6rem; }
.step h3 { margin-bottom: 0.3rem; }
.step p { color: var(--ink-soft); margin: 0; }

/* Список с галочками */
.checks { list-style: none; padding: 0; }
.checks li { position: relative; padding-left: 1.7rem; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 0.9rem; height: 0.5rem; border-left: 3px solid var(--sea-500); border-bottom: 3px solid var(--sea-500); transform: rotate(-45deg); }

/* Таблица цен */
.table-wrap { overflow-x: auto; border-radius: var(--radius-m); background: var(--white); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; min-width: 34rem; }
.table th, .table td { padding: 0.9rem 1.1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--sand-100); }
.table th { font: 500 0.78rem var(--font-head); letter-spacing: 0.06em; text-transform: uppercase; color: var(--sea-700); background: var(--sea-50); }
.table tr:last-child td { border-bottom: 0; }
.table td:last-child, .table th:last-child { text-align: right; white-space: nowrap; }
.table .table__group td { background: var(--sand-100); font-weight: 600; text-align: left; }

/* Заметка */
.note { border-left: 4px solid var(--sea-500); background: var(--sea-50); padding: var(--space-2) var(--space-3); border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.note--amber { border-color: var(--amber-500); background: var(--amber-100); }
.note > :last-child { margin-bottom: 0; }

/* Вопросы и ответы */
.faq { max-width: 50rem; }
.faq details { border-bottom: 1px solid var(--sand-300); }
.faq summary { cursor: pointer; padding: 1.1rem 2.5rem 1.1rem 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%); font: 500 1.5rem var(--font-head); color: var(--sea-500); }
.faq details[open] summary::after { content: "-"; }
.faq details > :not(summary) { color: var(--ink-soft); }
.faq details > :last-child { padding-bottom: 1.1rem; margin-bottom: 0; }

/* Отзыв */
.review { margin: 0; }
.review blockquote { margin: 0 0 var(--space-2); font-size: 1.05rem; }
.review figcaption { display: flex; align-items: center; gap: 0.75rem; font-size: var(--fs-small); color: var(--ink-soft); }
.avatar { width: 2.8rem; height: 2.8rem; border-radius: 50%; background: var(--sea-200); display: grid; place-items: center; font: 700 0.9rem var(--font-head); color: var(--sea-900); flex: none; }

/* Человек */
.person .ph { aspect-ratio: 1; }
.person__role { color: var(--sea-500); font-size: var(--fs-small); font-weight: 600; margin-bottom: 0.5rem; }

/* Бренд */
.brand { border-top: 6px solid var(--sea-900); }
.brand__logo { font: 700 1.5rem var(--font-head); letter-spacing: 0.08em; color: var(--sea-900); margin-bottom: var(--space-2); }

/* Способы связи */
.channels { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.channels li { margin: 0; }
.channel { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.8rem; border-radius: var(--radius-s); text-decoration: none; color: var(--ink); background: var(--white); border: 1px solid var(--sand-300); transition: border-color .15s, transform .15s; }
.channel:hover { border-color: var(--sea-500); color: var(--ink); transform: translateX(2px); }
.channel__icon { width: 2.4rem; height: 2.4rem; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--white); font: 700 0.62rem var(--font-head); letter-spacing: 0.02em; background: var(--sea-700); }
.channel__icon--phone { background: var(--sea-900); font-size: 1rem; }
.channel__icon--tg { background: #2A9FD8; }
.channel__icon--wa { background: #25A85A; }
.channel__icon--max { background: #6A4BE0; }
.channel__icon--vk { background: #2C6FD6; }
.channel__icon--ig { background: #C13584; }
.channel__text { display: flex; flex-direction: column; line-height: 1.25; }
.channel__text small { color: var(--ink-soft); font-size: 0.85rem; align-self: flex-start; }
.channels--wide { grid-template-columns: repeat(2, 1fr); }

/* Блок "Остались вопросы" */
.cta { background: var(--sea-900); color: var(--sand-50); padding-block: var(--space-5); }
.cta h2 { color: var(--white); }
.cta .lead, .cta .muted { color: var(--sea-200); }
.cta__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); align-items: start; }
.cta__channels .channels { grid-template-columns: repeat(2, 1fr); }

/* 5. Шапка и подвал -------------------------------------------------------- */
.demo-bar { background: var(--amber-100); color: #5C3A00; font-size: 0.85rem; text-align: center; padding: 0.4rem 1rem; }
.header { position: sticky; top: 0; z-index: 50; background: rgba(251,247,240,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--sand-300); }
.header__row { display: flex; align-items: center; gap: var(--space-3); min-height: 72px; }
.logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--sea-900); flex: none; }
.logo__mark { width: 2.4rem; height: 2.4rem; color: var(--sea-700); }
.logo__text { font: 700 1rem var(--font-head); line-height: 1.15; }
.logo__text small { display: block; font: 400 0.72rem var(--font-body); color: var(--ink-soft); }
.nav { display: flex; gap: 0.15rem; margin-left: auto; }
.nav__link { padding: 0.5rem 0.65rem; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.98rem; white-space: nowrap; }
.nav__link:hover { background: var(--sea-50); color: var(--sea-700); }
.nav__link.is-active { background: var(--sea-900); color: var(--white); }
.header__contact { display: flex; align-items: center; gap: var(--space-2); flex: none; }
.header__phone { font-weight: 600; color: var(--sea-900); text-decoration: none; white-space: nowrap; }
.burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 10px; }
.burger span { display: block; height: 2px; background: var(--sea-900); margin: 5px 0; border-radius: 2px; }

.contact-menu { position: relative; }
.contact-menu summary { list-style: none; }
.contact-menu summary::-webkit-details-marker { display: none; }
.contact-menu__panel { position: absolute; right: 0; top: calc(100% + 0.6rem); width: min(22rem, 92vw); background: var(--sand-50); border: 1px solid var(--sand-300); border-radius: var(--radius-m); box-shadow: var(--shadow); padding: var(--space-2); }
.contact-menu__title { font-weight: 600; margin-bottom: 0.6rem; }

.footer { background: var(--ink); color: var(--sea-200); padding-block: var(--space-5) var(--space-3); font-size: var(--fs-small); }
.footer a { color: var(--sand-50); }
.footer .muted { color: var(--sea-200); }
.show-stubs .footer .stub { background: none; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-4); }
.footer__brand { font: 700 1.1rem var(--font-head); color: var(--white); }
.footer__title { font: 500 0.75rem var(--font-head); letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber-500); }
.footer__list { list-style: none; padding: 0; }
.footer__bottom { margin-top: var(--space-4); padding-top: var(--space-2); border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.mobile-bar { display: none; }

/* Страница дизайн-системы */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: var(--space-2); }
.swatch { border-radius: var(--radius-s); overflow: hidden; border: 1px solid var(--sand-300); background: var(--white); font-size: var(--fs-small); }
.swatch i { display: block; height: 4.5rem; }
.swatch span { display: block; padding: 0.5rem 0.7rem; }

/* 6. Адаптив --------------------------------------------------------------- */
@media (max-width: 1180px) {
  .header__phone { display: none; }
}
@media (max-width: 1020px) {
  .burger { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: var(--sand-50); border-bottom: 1px solid var(--sand-300); padding: var(--space-2); margin: 0; box-shadow: var(--shadow); }
  .nav.is-open { display: flex; }
  .nav__link { padding: 0.8rem 1rem; font-size: 1.05rem; }
  .grid--4, .facts, .steps { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .section { padding-block: var(--space-4); }
  .split, .cta__grid, .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps .step { padding: 0 0 0 3.8rem; min-height: 2.6rem; }
  .cta__channels .channels, .channels--wide { grid-template-columns: 1fr; }
  .logo__text small { display: none; }
  .header__contact { display: none; }
  .mobile-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 0.6rem 0.8rem calc(0.6rem + env(safe-area-inset-bottom)); background: rgba(251,247,240,.96); border-top: 1px solid var(--sand-300); }
  .mobile-bar .btn { padding: 0.7rem 1rem; }
  body { padding-bottom: 4.6rem; }
  .footer__grid { grid-template-columns: 1fr; gap: var(--space-3); }
}
@media (max-width: 460px) {
  .grid--4, .facts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* плоская карточка на голубом фоне должна быть видна */
.section--tint .card--flat { background: var(--white); }

/* колонки не распирает широким содержимым (таблица внутри сетки) */
.split > *, .grid > *, .cta__grid > * { min-width: 0; }
h1, h2, h3 { overflow-wrap: break-word; }

/* Фото вместо заглушки. Подпись "какое фото нужно" видна только в режиме подсветки */
.ph--photo, .ph--avatar, .ph--map { background: var(--sea-200); }
.ph--photo::before, .ph--avatar::before, .ph--map::before { display: none; }
.ph--photo::after, .ph--avatar::after, .ph--map::after { display: none; }
.show-stubs .ph--photo::after, .show-stubs .ph--avatar::after { display: block; content: "Временное фото. Нужно: " attr(data-label); }
.ph > img, .ph > iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.ph--map { aspect-ratio: 16 / 9; }

.footer__demo { max-width: 46rem; }
.stub-toggle { background: none; border: 0; padding: 0; font: inherit; color: var(--sand-50); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.credits img { width: 9rem; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-s); }
.table--text td:last-child, .table--text th:last-child { text-align: left; white-space: normal; }
