/* ===== Дизайн-система ===== */
/* Природные оттенки, спокойствие, доверие. Для подростков и родителей. */

:root {
  /* Базовая палитра */
  --bg: #F4F1EA;          /* теплый кремовый */
  --bg-soft: #EDE7DB;     /* песочный для секций */
  --bg-card: #FBF9F4;     /* карточка */
  --ink: #2A2E26;         /* основной текст — почти черный с зелёным оттенком */
  --ink-muted: #5A5E54;   /* приглушённый */
  --ink-soft: #8A8E83;    /* мета */
  --line: #D8D2C4;        /* разделители */
  --line-soft: #E5DFD0;

  /* Акценты — природные */
  --sage: #7B9E89;        /* шалфей — основной акцент */
  --sage-deep: #4E6B5C;   /* тёмный шалфей */
  --moss: #2C3E2D;        /* мох — для контраста */
  --clay: #C18968;        /* терракот — теплый второй акцент */
  --sand: #D9C5A0;        /* песок */

  /* Шрифты (переопределяются через Tweaks) */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Размеры */
  --maxw: 1200px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 14px;
  --radius-lg: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-wrap: balance;
}

.h-display { font-size: clamp(44px, 6vw, 84px); line-height: 1.02; letter-spacing: -0.02em; }
.h-section { font-size: clamp(36px, 4.5vw, 56px); line-height: 1.05; letter-spacing: -0.015em; }
.h-sub { font-size: clamp(22px, 2.2vw, 28px); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.lede { font-size: clamp(18px, 1.4vw, 21px); color: var(--ink-muted); line-height: 1.55; text-wrap: pretty; max-width: 60ch; }

.container { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

section { padding-block: clamp(72px, 9vw, 128px); }
section.tight { padding-block: clamp(48px, 6vw, 80px); }

.bg-soft { background: var(--bg-soft); }
.bg-moss { background: var(--moss); color: #E8E3D2; }
.bg-moss .eyebrow { color: #B8C9B0; }
.bg-moss h1, .bg-moss h2, .bg-moss h3 { color: #F0EAD6; }

/* ===== Navigation ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(244, 241, 234, 0.82);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.nav.scrolled { border-bottom-color: var(--line-soft); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 20px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--sage) 0%, var(--sage-deep) 70%);
  position: relative;
}
.brand-mark::after {
  content: ''; position: absolute; inset: 6px;
  border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.5);
}
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  color: var(--ink); text-decoration: none; font-size: 15px;
  position: relative; padding-block: 6px;
}
.nav-links a:hover { color: var(--sage-deep); }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1.5px; background: var(--sage-deep);
}
@media (max-width: 720px) {
  .nav-links a:not(.btn) { display: none; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px;
  font-family: var(--font-body); font-size: 15px; font-weight: 500;
  text-decoration: none; cursor: pointer; border: none;
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
}
.btn.btn-primary { background: var(--moss); color: #F0EAD6; }
.btn.btn-primary:hover { background: var(--sage-deep); transform: translateY(-1px); color: #F0EAD6; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--bg-card); border-color: var(--ink-muted); }
.btn-arrow { transition: transform .2s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 32px;
}

/* ===== Tags ===== */
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--line-soft);
  font-size: 14px; color: var(--ink-muted);
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }

/* ===== Form ===== */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 13px; font-weight: 500; color: var(--ink-muted);
  letter-spacing: 0.02em;
}
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--sage-deep);
  box-shadow: 0 0 0 4px rgba(78, 107, 92, 0.12);
}
.field textarea { resize: vertical; min-height: 96px; }
.field.error input, .field.error select, .field.error textarea {
  border-color: #B85C4A;
}
.field-error { color: #B85C4A; font-size: 13px; }

.radio-group { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-card);
  cursor: pointer; font-size: 14px; transition: all .15s ease;
  user-select: none;
}
.radio-chip:hover { border-color: var(--ink-muted); }
.radio-chip.checked {
  background: var(--moss); color: #F0EAD6; border-color: var(--moss);
}
.radio-chip input { display: none; }

/* ===== Method cards ===== */
.method-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: transform .25s ease, box-shadow .25s ease;
  position: relative;
  overflow: hidden;
}
.method-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -18px rgba(44, 62, 45, 0.25); }
.method-card .method-num {
  font-family: var(--font-display);
  font-size: 64px; line-height: 1; color: var(--sage);
  opacity: 0.5;
}

/* ===== Accordion / FAQ ===== */
.faq-item {
  border-bottom: 1px solid var(--line-soft);
  padding-block: 24px;
}
.faq-item button {
  width: 100%; text-align: left; background: none; border: none;
  font: inherit; font-size: 19px; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; padding: 0;
  font-family: var(--font-display);
}
.faq-item button:hover { color: var(--sage-deep); }
.faq-icon {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center;
  flex-shrink: 0; transition: transform .25s ease;
}
.faq-item.open .faq-icon { transform: rotate(45deg); background: var(--moss); color: #F0EAD6; border-color: var(--moss); }
.faq-body {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease, padding .25s ease;
  color: var(--ink-muted); padding-right: 40px;
}
.faq-item.open .faq-body { max-height: 300px; padding-top: 14px; }

/* ===== Topic chips grid ===== */
.topic-chip {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 22px; border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  transition: all .2s ease;
}
.topic-chip:hover { border-color: var(--sage); background: #FFFFFF; }
.topic-chip .topic-num {
  font-family: var(--font-display);
  font-size: 13px; color: var(--sage-deep);
  width: 28px; flex-shrink: 0;
  padding-top: 3px;
}
.topic-chip h4 { font-family: var(--font-body); font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.topic-chip p { font-size: 14px; color: var(--ink-muted); line-height: 1.5; }

/* ===== Certificate cards ===== */
.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cert-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -20px rgba(44, 62, 45, 0.3); }
.cert-thumb {
  aspect-ratio: 3/4;
  background: repeating-linear-gradient(135deg, #EDE7DB 0 8px, #E3DCC8 8px 16px);
  display: grid; place-items: center;
  color: var(--ink-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  position: relative;
}
.cert-thumb::after {
  content: ''; position: absolute; inset: 14px;
  border: 1px solid rgba(0,0,0,0.08);
}
.cert-thumb-img {
  background-size: cover;
  background-position: right center;
}
.cert-thumb-img::after { display: none; }
.cert-thumb-landscape { aspect-ratio: 16/10; background-position: center !important; }
.cert-card-wide { grid-column: span 2; }
@media (max-width: 600px) { .cert-card-wide { grid-column: span 1; } }
.cert-thumb-pdf {
  background: linear-gradient(135deg, #E8E1CF 0%, #D9CFB5 100%);
  color: var(--moss);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
}
.cert-thumb-pdf::after { display: none; }
.cert-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(255, 252, 245, 0.92);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.04em;
  padding: 4px 8px; border-radius: 999px;
  color: var(--moss);
}
.cert-meta { padding: 18px; }
.cert-meta .year { color: var(--ink-soft); font-size: 13px; }
.cert-meta .name { font-size: 15px; margin-top: 4px; line-height: 1.35; }

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(42, 46, 38, 0.7);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center;
  z-index: 100; padding: 24px;
  animation: fadeIn .2s ease;
}
.modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  max-width: 560px; width: 100%;
  padding: 40px;
  position: relative;
  animation: rise .3s cubic-bezier(.22,.61,.36,1);
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg-card);
  cursor: pointer; display: grid; place-items: center;
  font-size: 18px; color: var(--ink-muted);
}
.modal-close:hover { background: var(--moss); color: #F0EAD6; border-color: var(--moss); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ===== Hero ===== */
.hero {
  padding-block: clamp(64px, 8vw, 120px) clamp(80px, 10vw, 140px);
  position: relative; overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: clamp(40px, 5vw, 80px); align-items: center;
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-img {
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at 30% 20%, rgba(193, 137, 104, 0.25) 0%, transparent 50%),
    repeating-linear-gradient(45deg, #DDD5C0 0 10px, #D2C9B0 10px 20px);
  position: relative; overflow: hidden;
}
.hero-img-tag {
  position: absolute; bottom: 18px; left: 18px;
  background: rgba(244, 241, 234, 0.92);
  padding: 8px 14px; border-radius: 999px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--ink-muted);
}
.hero-floating {
  position: absolute; background: var(--bg-card);
  border: 1px solid var(--line-soft);
  padding: 14px 18px; border-radius: 14px;
  box-shadow: 0 12px 32px -16px rgba(44, 62, 45, 0.25);
  font-size: 13px;
}

/* ===== Stats / meta row ===== */
.meta-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px; padding-block: 40px;
  border-block: 1px solid var(--line-soft);
}
@media (max-width: 720px) { .meta-row { grid-template-columns: repeat(2, 1fr); } }
.meta-row .num { font-family: var(--font-display); font-size: 40px; line-height: 1; color: var(--moss); }
.meta-row .lbl { font-size: 13px; color: var(--ink-muted); margin-top: 6px; }

/* ===== Footer ===== */
footer {
  background: var(--moss); color: #C8C0A8;
  padding-block: 64px 32px;
}
footer h4 { color: #F0EAD6; margin-bottom: 16px; font-size: 15px; font-family: var(--font-body); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
footer a { color: #C8C0A8; text-decoration: none; }
footer a:hover { color: #F0EAD6; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-bottom {
  padding-top: 24px; display: flex; justify-content: space-between;
  font-size: 13px; flex-wrap: wrap; gap: 12px;
}

/* ===== Booking form section ===== */
.booking-grid {
  display: grid; grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 6vw, 80px);
}
@media (max-width: 880px) { .booking-grid { grid-template-columns: 1fr; } }

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
}
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 540px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }

/* Success state */
.success-card {
  text-align: center; padding: 60px 40px;
}
.success-check {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--sage); display: grid; place-items: center;
  margin: 0 auto 24px; color: #fff;
  animation: pop .4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ===== VK / social channel banner ===== */
.tg-banner-section { padding-block: clamp(40px, 6vw, 80px); }
.tg-banner {
  display: grid; grid-template-columns: 1fr 1.4fr;
  align-items: stretch; gap: 0;
  background: var(--bg-card);
  border: 1.5px solid var(--sage);
  border-radius: 28px;
  text-decoration: none; color: inherit;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  min-height: 280px;
}
.tg-banner:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px -28px rgba(78, 107, 92, 0.4);
  border-color: var(--sage-deep);
}

.tg-banner-visual {
  position: relative;
  background: #F4F1EA;
  overflow: hidden;
  min-height: 280px;
}
.tg-banner-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.tg-flower-pot { display: none; }
.tg-flower-pot {
  position: absolute;
  left: 50%; bottom: 14%;
  transform: translateX(-50%);
  width: 160px; height: 200px;
  background: var(--sand);
  border-radius: 18px 18px 6px 6px;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 18px;
  box-shadow:
    inset 0 -8px 0 rgba(0,0,0,0.06),
    0 10px 24px -10px rgba(44, 62, 45, 0.25);
}
.tg-flower-emoji {
  position: absolute;
  top: -54px;
  font-size: 90px;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.12));
}
.tg-pot-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(0,0,0,0.4);
  letter-spacing: 0.04em;
}
.tg-curve {
  position: absolute;
  top: 24px; right: -10%;
  width: 70%; height: 60%;
  pointer-events: none;
}
.tg-plane {
  position: absolute;
  top: 36px; right: 32px;
  transform: rotate(-12deg);
  filter: drop-shadow(0 4px 8px rgba(78, 107, 92, 0.25));
  transition: transform .4s ease;
}
.tg-banner:hover .tg-plane { transform: rotate(-18deg) translate(4px, -4px); }

.tg-banner-text {
  padding: clamp(28px, 4vw, 48px);
  display: flex; flex-direction: column; justify-content: center;
}
.tg-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}
.tg-title em { font-style: italic; color: var(--sage-deep); }
.tg-subtitle {
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1.55;
  margin-bottom: 24px;
  max-width: 480px;
}
.tg-cta {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--sage-deep);
  font-weight: 500;
  font-size: 15px;
  align-self: flex-start;
  padding: 10px 0;
  border-bottom: 1.5px solid var(--sage);
  transition: gap .2s ease, color .2s ease;
}
.tg-banner:hover .tg-cta { gap: 14px; color: var(--moss); }

@media (max-width: 720px) {
  .tg-banner { grid-template-columns: 1fr; }
  .tg-banner-visual { min-height: 240px; }
}

/* ===== Smooth section reveal ===== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
