/* ══════════════════════════════════════════════
   VESTA — Global Styles
   Единый CSS для всех страниц vesta-school.ru
   ══════════════════════════════════════════════ */

/* ── CSS VARIABLES ── */
:root {
  /* Фоны */
  --cream:       #FAFAF8;
  --cream-warm:  #F4EDE3;
  --cream-warm2: #EAE0D4;
  --dark:        #1C1C1A;
  --dark-deep:   #080e0a;
  --dark-card:   #252520;

  /* Акценты */
  --gold:        #B08C6A;
  --gold-light:  #C8AA64;
  --gold-muted:  rgba(176,140,106,0.15);

  /* Текст */
  --text:              #1C1C1A;
  --text-mid:          #3A3835;
  --text-muted:        #8A8278;
  --text-light:        #8A8278;
  --dark-soft:         #3A3835;
  --text-on-dark:      #FAFAF8;
  --text-on-dark-muted: rgba(250,250,248,0.5);

  /* Рамки */
  --border:      rgba(28,28,26,0.1);
  --border-dark: #2E2E2A;

  /* Особые */
  --sage:        #8B9E7A;
  --dark-forest: #1a2e1f;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { /* scroll-behavior moved to JS for anchor clicks only */ }

body {
  font-family: 'Tenor Sans', sans-serif;
  font-weight: 400;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── TYPOGRAPHY ── */
h1, h2 { font-family: 'Cormorant', serif; font-weight: 300; }
h3 { font-family: 'Cormorant', serif; font-weight: 400; }
a { text-decoration: none; color: inherit; }

/* ── SECTION LABELS ── */
.sec-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.sec-label-bar {
  width: 28px;
  height: 1px;
  background: var(--gold);
}
.sec-label-txt {
  font-size: 9px;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: 'Tenor Sans', sans-serif;
}
.sec-h {
  font-family: 'Cormorant', serif;
  font-weight: 300;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -.01em;
}

/* ══════════════════════════════════════════════
   NAV
   ══════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 36px 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all .6s ease;
}

/* Прозрачный на hero — по умолчанию */
.nav--hero {
  background: transparent;
}

/* Прокрученный / светлый */
.nav.scrolled {
  background: rgba(250,250,248,.96);
  backdrop-filter: blur(20px);
  padding: 20px 64px;
  border-bottom: 1px solid rgba(28,28,26,.08);
}

/* Тёмный фон (блог) */
.nav--dark {
  background: transparent;
}
.nav--dark.scrolled {
  background: var(--dark-deep);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-dark);
}

/* Логотип */
.nav-logo {
  font-family: 'Cormorant', serif;
  font-size: 18px;
  letter-spacing: .4em;
  font-weight: 300;
  text-decoration: none;
  transition: color .4s;
}
.nav-logo-main {
  color: var(--text-on-dark);
}
.nav.scrolled .nav-logo-main {
  color: var(--text);
}
.nav--dark .nav-logo-main {
  color: var(--text-on-dark);
}
.nav--dark.scrolled .nav-logo-main {
  color: var(--text-on-dark);
}
.nav-logo-sub {
  display: block;
  font-family: 'Tenor Sans', sans-serif;
  font-size: 8px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  margin-top: -2px;
}
.nav.scrolled .nav-logo-sub {
  color: var(--text-muted);
}
.nav--dark.scrolled .nav-logo-sub {
  color: var(--text-on-dark-muted);
}

/* Ссылки навигации */
.nav-links {
  display: flex;
  gap: 44px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-family: 'Tenor Sans', sans-serif;
  font-size: 14px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(250,250,248,.55);
  text-decoration: none;
  transition: color .35s;
  font-weight: 400;
  position: relative;
}
.nav.scrolled .nav-links a {
  color: var(--text-muted);
}
.nav-links a:hover {
  color: var(--gold);
}
/* hover line */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width .35s ease;
}
.nav-links a:hover::after {
  width: 100%;
}

/* Тёмная навигация */
.nav--dark .nav-links a {
  color: rgba(250,250,248,.55);
}
.nav--dark.scrolled .nav-links a {
  color: rgba(250,250,248,.55);
}
.nav--dark .nav-links a:hover {
  color: var(--gold);
}

/* CTA кнопка */
.nav-cta {
  font-family: 'Tenor Sans', sans-serif;
  font-size: 14px;
  letter-spacing: .22em;
  text-transform: uppercase;
  border: 1px solid rgba(250,250,248,.3);
  color: rgba(250,250,248,.7);
  padding: 10px 28px;
  border-radius: 8px;
  transition: all .35s;
  text-decoration: none;
  display: inline-block;
}
.nav.scrolled .nav-cta {
  border-color: rgba(28,28,26,.2);
  color: var(--text);
}
.nav-cta:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--cream);
}
.nav--dark .nav-cta {
  border-color: rgba(250,250,248,.3);
  color: rgba(250,250,248,.7);
}
.nav--dark.scrolled .nav-cta {
  border-color: rgba(250,250,248,.3);
  color: rgba(250,250,248,.7);
}

/* Бургер */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-on-dark);
  transition: transform .3s, opacity .3s;
}
.nav.scrolled .burger span {
  background: var(--text);
}
.nav--dark .burger span,
.nav--dark.scrolled .burger span {
  background: var(--text-on-dark);
}
.burger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Мобильное меню */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--dark);
  z-index: 999;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 36px;
  opacity: 0;
  transition: opacity .4s ease;
}
.mobile-menu.open {
  display: flex;
  opacity: 1;
}
.mobile-menu a {
  font-family: 'Tenor Sans', sans-serif;
  font-size: 16px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(250,250,248,.6);
  text-decoration: none;
  transition: color .3s;
}
.mobile-menu a:hover { color: var(--gold); }
.mobile-menu .nav-cta {
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 12px 32px;
  margin-top: 12px;
}

/* ══════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════ */
.btn-primary {
  font-family: 'Tenor Sans', sans-serif;
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  padding: 16px 44px;
  background: var(--gold);
  color: var(--cream);
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background .35s;
  display: inline-block;
}
.btn-primary:hover { background: var(--dark); }

.btn-secondary {
  font-family: 'Tenor Sans', sans-serif;
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  padding: 16px 44px;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all .35s;
  display: inline-block;
}
.btn-secondary:hover {
  background: var(--gold);
  color: var(--cream);
}

.btn-ghost-light {
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(250,250,248,.45);
  text-decoration: none;
  cursor: pointer;
  transition: color .3s;
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn-ghost-light:hover { color: var(--cream); }
.bgl-line {
  width: 28px;
  height: 1px;
  background: currentColor;
  position: relative;
  transition: width .35s;
}
.bgl-line::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  width: 5px;
  height: 5px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}
.btn-ghost-light:hover .bgl-line { width: 42px; }

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
footer {
  padding: 48px 64px;
  background: var(--cream-warm2);
  border-top: 1px solid rgba(28,28,26,.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}
.fl {
  font-family: 'Cormorant', serif;
  font-size: 17px;
  letter-spacing: .35em;
  font-weight: 300;
  color: var(--text);
}
.fc {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: .1em;
}
.fll { display: flex; gap: 28px; }
.fll a {
  font-size: 10px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: .1em;
  transition: color .3s;
}
.fll a:hover { color: var(--gold); }

/* Тёмный футер (блог и другие страницы) */
footer.footer--dark {
  background: var(--dark-deep);
  border-top: 1px solid var(--border-dark);
}
footer.footer--dark .fl { color: var(--text-on-dark); }
footer.footer--dark .fc { color: var(--text-on-dark-muted); }
footer.footer--dark .fll a { color: var(--text-on-dark-muted); }
footer.footer--dark .fll a:hover { color: var(--gold); }

/* ══════════════════════════════════════════════
   REVEAL ANIMATIONS
   ══════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s ease, transform .9s ease;
}
.reveal.on {
  opacity: 1;
  transform: translateY(0);
}
.reveal-l {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity .9s ease, transform .9s ease;
}
.reveal-l.on {
  opacity: 1;
  transform: translateX(0);
}

/* Section divider */
.sec-divider {
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 1.2s cubic-bezier(0.16,1,0.3,1);
  margin-bottom: 48px;
}
.sec-divider.on { width: 60px; }

/* ══════════════════════════════════════════════
   KEYFRAMES
   ══════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ══════════════════════════════════════════════
   TOUCH DEVICES
   ══════════════════════════════════════════════ */
@media (pointer: coarse) {
  body { cursor: auto !important; }
  a, button { cursor: pointer !important; }
  #cur, #ring, #cur-label { display: none !important; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 1020px) {
  .nav { padding: 18px 28px; }
  .nav.scrolled { padding: 14px 28px; }
  .nav-links { display: none; }
  .burger { display: flex; }
  footer {
    flex-direction: column;
    gap: 16px;
    padding: 36px 28px;
    text-align: center;
  }
}

/* ===== TABLET 768px ===== */
@media (max-width: 768px) {
  .nav { padding: 14px 20px; }
  .nav.scrolled { padding: 12px 20px; }
  footer { padding: 28px 20px; }
  footer .fll { flex-direction: column; gap: 8px; }
  h1 { font-size: 36px !important; line-height: 1.15; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }

  /* Touch targets */
  .btn-primary, .btn-secondary, .nav-cta { min-height: 44px; }
  .mobile-menu a { min-height: 44px; display: flex; align-items: center; }

  /* Breadcrumb wrap */
  .breadcrumb { flex-wrap: wrap; }
}

/* ===== MOBILE 480px ===== */
@media (max-width: 480px) {
  .nav { padding: 12px 16px; }
  .nav.scrolled { padding: 10px 16px; }
  footer { padding: 24px 16px; font-size: 13px; }
  h1 { font-size: 28px !important; line-height: 1.2; }
  h2 { font-size: 24px; }
  h3 { font-size: 18px; }
  body { font-size: 15px; }

  /* Buttons full-width */
  .btn-primary, .btn-secondary { width: 100%; text-align: center; min-height: 48px; }

  /* Tables — horizontal scroll */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
