/* ==========================================================
   Тимур Фаизов — страница-хаб в био
   Тёмный тёплый холст + терракота Claude. Один акцент.
   Системные шрифты: сериф (New York на iOS) + SF. Веб-шрифты не грузим.
   ========================================================== */

:root {
  --bg:        #1B1A17;  /* тёплый уголь */
  --surface:   #232220;  /* карточка */
  --surface-2: #2C2B27;  /* приподнятая карточка */
  --line:      #38362F;  /* границы */
  --text:      #F5F3EE;
  --muted:     #A5A197;
  --clay:      #D97757;  /* акцент */
  --clay-lift: #E38C6E;
  --on-clay:   #21150F;  /* текст на терракоте */

  --r-md: 22px;
  --r-lg: 26px;
  --r-pill: 999px;

  --s1: 8px;  --s2: 12px; --s3: 16px;
  --s4: 24px; --s5: 32px; --s6: 48px;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* тёплое свечение за шапкой */
body::before {
  content: "";
  position: fixed;
  top: -240px;
  left: 50%;
  width: 520px;
  height: 460px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(217, 119, 87, 0.20), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* height: auto обязателен — иначе атрибут height у <img> перебивает пропорции */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--clay-lift);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== Сетка страницы ===== */
.page {
  position: relative;
  z-index: 1;
  max-width: 460px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + var(--s4)) var(--s3) var(--s6);
  padding-left: max(var(--s3), env(safe-area-inset-left));
  padding-right: max(var(--s3), env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  gap: var(--s5);
}

/* ===== Шапка: только типографика ===== */
.hero {
  padding: var(--s3) var(--s1) 0;
}

.hero h1 {
  font-family: var(--serif);
  font-size: 46px;
  line-height: 1.0;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
  color: #fff;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--clay);
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 10px 2px rgba(217, 119, 87, 0.55);
}

/* ===== Вступление ===== */
.intro {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: 0 var(--s1);
}

.intro .lead {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
}

.intro p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

/* ===== Блок ссылок ===== */
.links {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

/* --- Курс: единственная подсвеченная карточка --- */
.card-course {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(217, 119, 87, 0.16), transparent 60%),
    var(--surface-2);
  border: 1px solid rgba(217, 119, 87, 0.32);
  border-radius: var(--r-lg);
  padding: var(--s4);
  box-shadow: 0 20px 50px -30px rgba(217, 119, 87, 0.7);
}

.card-course h2 {
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0 0 var(--s2);
  color: #fff;
}

/* именно .desc, а не .card-course p — иначе перебивает .eyebrow и .hint */
.card-course .desc {
  margin: 0 0 var(--s4);
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.hint {
  margin: var(--s2) 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* --- Строки-ссылки: канал и консультация --- */
.row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 76px;
  padding: var(--s3) var(--s4) var(--s3) var(--s3);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.row:active { transform: scale(0.99); }

.row-solid {
  background: var(--surface);
  border: 1px solid var(--line);
}

.row-quiet {
  background: transparent;
  border: 1px dashed var(--line);
}

.row .icon {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.row .icon svg { width: 22px; height: 22px; }

.icon-tg { background: #2AABEE; }
.icon-tg svg { fill: #fff; }

.icon-chat {
  background: rgba(217, 119, 87, 0.12);
  border: 1px solid rgba(217, 119, 87, 0.35);
}
.icon-chat svg { fill: var(--clay); }

.row .text { flex: 1; min-width: 0; }

.row .text strong {
  display: block;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.row .text span {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
}

.row .arrow {
  flex: none;
  font-size: 18px;
  color: var(--muted);
}

/* ===== Кнопка ===== */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  padding: 14px 24px;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  border-radius: var(--r-pill);
  background: var(--clay);
  color: var(--on-clay);
  box-shadow: 0 12px 28px -14px rgba(217, 119, 87, 0.9);
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
  background: var(--clay-lift);
}

/* ===== Футер ===== */
.footer {
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  padding-bottom: env(safe-area-inset-bottom);
}

.footer a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer p { margin: var(--s2) 0 0; }

/* ===== Появление при скролле ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn, .row { transition: none; }
}

/* ===== Cookie-баннер ===== */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  padding: var(--s3);
  padding-bottom: max(var(--s3), env(safe-area-inset-bottom));
  box-shadow: 0 -20px 40px -24px rgba(0, 0, 0, 0.8);
}

.cookie-banner[hidden] { display: none; }

.cookie-banner p {
  margin: 0 auto var(--s2);
  max-width: 460px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.cookie-banner a { color: var(--text); }

.cookie-actions {
  display: flex;
  gap: var(--s2);
  max-width: 460px;
  margin: 0 auto;
}

.btn-cookie {
  flex: 1;
  min-height: 46px;
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.btn-cookie-accept {
  background: var(--clay);
  border-color: var(--clay);
  color: var(--on-clay);
}

/* ===== Политика конфиденциальности ===== */
.page-head { padding: 0 var(--s1); }

.page-head h1 {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s1);
  color: #fff;
}

.page-head p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.policy-body {
  padding: 0 var(--s1);
}

.policy-body h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: var(--s5) 0 var(--s2);
}

.policy-body h2:first-child { margin-top: 0; }

.policy-body p,
.policy-body li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.policy-body p { margin: 0 0 var(--s2); }

.policy-body ul {
  margin: 0 0 var(--s2);
  padding-left: 20px;
}

.policy-body li { margin-bottom: 6px; }

.policy-body a {
  color: var(--clay-lift);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.policy-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 5px;
}

/* ===== Планшет и шире ===== */
@media (min-width: 640px) {
  .page { padding-top: var(--s5); }
  .hero h1 { font-size: 52px; }
}
