/* ===== Шрифты (самохостинг, woff2 в репозитории) ===== */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/manrope-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/manrope-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/manrope-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+25FC, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/manrope-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/manrope-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/manrope-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/manrope-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/manrope-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/cormorant-garamond-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/cormorant-garamond-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/cormorant-garamond-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+25FC, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/cormorant-garamond-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Метрический фолбэк: занимает то же место, вёрстка не прыгает */
@font-face {
  font-family: "Manrope Fallback";
  src: local("Arial");
  size-adjust: 104%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Cormorant Fallback";
  src: local("Georgia");
  size-adjust: 108%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}

/* ===== Палитра (из брифа заказчика) ===== */
:root {
  color-scheme: dark;
  --accent: #d8a46e;
  --accent-hover: #c98f57;
  --bg_page: #141d19;
  --bg_card: #1d2a23;
  --brand: #9ec7b3;
  --text_primary: #f3efe7;
  --text_muted: #c0c9c0;
  --line: rgba(158, 199, 179, 0.18);
  --focus: #9ec7b3;

  --font-heading: "Cormorant Garamond", "Cormorant Fallback", Georgia, serif;
  --font-body: "Manrope", "Manrope Fallback", Arial, sans-serif;

  --radius: 0.2rem;
  --radius-lg: 1rem;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg_page);
  color: var(--text_primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  text-align: left;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text_primary);
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

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

/* ===== Кнопки ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.btn-accent {
  background: var(--accent);
  color: #1d150c;
  box-shadow: 0 0 24px rgba(216, 164, 110, 0.35);
}
.btn-accent:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 32px rgba(216, 164, 110, 0.5);
  transform: translateY(-1px);
  text-decoration: none;
}
.btn-ghost {
  background: transparent;
  color: var(--text_primary);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--brand);
  text-decoration: none;
}

/* ===== Навигация ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 29, 25, 0.9);
  backdrop-filter: saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text_primary);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
  color: var(--accent);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--text_muted);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}
.nav-links a:hover {
  color: var(--text_primary);
  background: rgba(158, 199, 179, 0.08);
  text-decoration: none;
}
.nav-links a[aria-current="page"] {
  color: var(--text_primary);
  background: rgba(158, 199, 179, 0.12);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 5.5rem 0 6rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 60% at 80% 10%, rgba(216, 164, 110, 0.22), transparent 70%),
    radial-gradient(50% 60% at 15% 85%, rgba(158, 199, 179, 0.16), transparent 70%),
    linear-gradient(180deg, #17231c 0%, #141d19 100%);
}
.hero .container {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--brand);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}
.hero h1 {
  max-width: 16ch;
  margin-bottom: 1.25rem;
}
.hero-sub {
  color: var(--text_muted);
  font-size: 1.1rem;
  max-width: 42ch;
  margin-bottom: 2rem;
}
.hero-hours {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text_muted);
  font-size: 0.95rem;
}
.hero-hours svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* ===== Секции ===== */
.section {
  padding: 4.5rem 0;
}
.section-alt {
  background: var(--bg_card);
}
.section-head {
  max-width: 46rem;
  margin-bottom: 2.5rem;
}
.section-head .eyebrow {
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.section-head p {
  color: var(--text_muted);
  font-size: 1.05rem;
}

/* ===== Расписание ===== */
.schedule-table {
  display: grid;
  gap: 0.75rem;
}
.schedule-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1rem;
  background: var(--bg_card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  transition: border-color 0.2s ease;
}
.schedule-row:hover {
  border-color: var(--brand);
}
.schedule-row.is-today {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.day-label {
  font-weight: 700;
  color: var(--text_primary);
}
.day-label .day-short {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}
.day-label .day-full {
  display: block;
  color: var(--text_muted);
  font-size: 0.85rem;
}
.today-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: #1d150c;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
}
.day-classes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.6rem;
}
.class-card {
  padding: 0.6rem 0.8rem;
  border-radius: 0.6rem;
  background: rgba(20, 29, 25, 0.6);
  border: 1px solid var(--line);
}
.class-time {
  display: block;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 0.1rem;
}
.class-name {
  font-weight: 600;
  color: var(--text_primary);
  font-size: 0.98rem;
}
.class-meta {
  color: var(--text_muted);
  font-size: 0.82rem;
}
.closed-note {
  color: var(--text_muted);
  font-style: italic;
  align-self: center;
}

/* ===== Цены ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
}
.price-card {
  position: relative;
  background: var(--bg_card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 8px 28px rgba(216, 164, 110, 0.16);
  transform: translateY(-4px);
}
.price-card .price-name {
  font-weight: 600;
  color: var(--text_primary);
  font-size: 1.1rem;
}
.price-card .price-amount {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text_primary);
  line-height: 1;
}
.price-card .price-amount .cur {
  font-size: 1.4rem;
}
.price-card .price-note {
  color: var(--accent);
  font-weight: 600;
  font-size: 1.1rem;
}
.price-card.featured .price-note {
  font-family: var(--font-heading);
  font-size: 1.4rem;
}
.payment-note {
  margin-top: 2rem;
  color: var(--text_muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}
.payment-note svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex: none;
}

/* ===== Преподаватели ===== */
.teachers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}
.teacher-card {
  background: var(--bg_card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.teacher-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}
.teacher-photo {
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(70% 70% at 50% 30%, rgba(158, 199, 179, 0.25), transparent 70%),
    linear-gradient(160deg, #24382d, #1d2a23);
  display: flex;
  align-items: center;
  justify-content: center;
}
.teacher-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.teacher-icon {
  width: 56px;
  height: 56px;
  color: var(--accent);
  opacity: 0.9;
}
.teacher-info {
  padding: 1.25rem 1.5rem 1.5rem;
}
.teacher-info h3 {
  margin-bottom: 0.25rem;
}
.teacher-info p {
  color: var(--text_muted);
  margin: 0;
}

/* ===== Контакты ===== */
.contact-card {
  background: var(--bg_card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 36rem;
}
.contact-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}
.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}
.contact-list svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex: none;
  margin-top: 2px;
}
.contact-list .contact-label {
  display: block;
  color: var(--text_muted);
  font-size: 0.85rem;
  margin-bottom: 0.1rem;
}
.contact-list .contact-value {
  color: var(--text_primary);
  font-weight: 600;
  font-size: 1.05rem;
}
.contact-list a.contact-value {
  color: var(--brand);
  text-decoration: none;
}
.contact-list a.contact-value:hover {
  text-decoration: underline;
}
.contact-phone {
  font-size: 1.6rem !important;
  font-family: var(--font-heading);
  font-weight: 700;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  color: var(--text_muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.site-footer a:hover {
  color: var(--text_primary);
}

/* ===== Движение (плавное появление) ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ===== Адаптив ===== */
@media (max-width: 640px) {
  .site-nav .container {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }
  .site-nav nav {
    width: 100%;
    min-width: 0;
  }
  .nav-links {
    justify-content: space-between;
    gap: 0;
  }
  .nav-links a {
    padding: 0.5rem 0.4rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }
  .schedule-row {
    grid-template-columns: 1fr;
  }
  .day-classes {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 3.5rem 0 4rem;
  }
  h1 {
    font-size: clamp(1.9rem, 7.5vw, 3.4rem);
    overflow-wrap: break-word;
  }
  .hero-tagline {
    letter-spacing: 0.01em;
  }
  .contact-phone {
    font-size: 1.35rem !important;
    overflow-wrap: anywhere;
  }
  .contact-card {
    padding: 1.5rem;
  }
}

/* Дополнительная страховка от горизонтального скролла для любых вложенных сеток */
.schedule-table,
.pricing-grid,
.teachers-grid,
.schedule-row,
.day-classes {
  min-width: 0;
  max-width: 100%;
}

/* Skip-link для доступности */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #1d150c;
  padding: 0.5rem 1rem;
  z-index: 100;
  border-radius: 0 0 0.5rem 0;
}
.skip-link:focus {
  left: 0;
}

/* :focus-visible для интерактивных элементов */
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
