/* Точка тишины — спокойный минимализм: песок, шалфей, тёмно-коричневый */

:root {
  --sand: #f4eee3;
  --sand-deep: #ece4d4;
  --paper: #faf6ee;
  --sage: #8fa282;
  --sage-dark: #5c6b52;
  --sage-mist: #cdd5c2;
  --brown: #33291f;
  --brown-soft: #4a3f33;
  --ink: #2e2620;
  --line: #d8cdb9;
  --error: #8f3d2e;
  --radius: 18px;
  --shadow: 0 18px 40px -24px rgba(51, 41, 31, .35);
  --maxw: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .logo-text, .price-value {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  color: var(--brown);
  margin: 0;
}

h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); line-height: 1.08; letter-spacing: .01em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.15; margin-bottom: .4em; }
h3 { font-size: 1.22rem; line-height: 1.3; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--sage-dark); }

:focus-visible {
  outline: 3px solid var(--sage-dark);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 40px);
}

.container-narrow { max-width: 780px; }

.kicker {
  font-size: .82rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: .9em;
  font-weight: 600;
}

.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-tinted { background: var(--sand-deep); }

.section-intro {
  max-width: 620px;
  color: var(--brown-soft);
  margin-bottom: 2.4em;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .85em 1.7em;
  border-radius: 999px;
  border: 2px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  background: none;
  color: var(--brown);
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}

.btn-primary { background: var(--sage-dark); color: var(--paper); border-color: var(--sage-dark); }
.btn-primary:hover { background: var(--brown); border-color: var(--brown); }
.btn-ghost { border-color: var(--brown); }
.btn-ghost:hover { background: var(--brown); color: var(--paper); }
.btn-small { padding: .5em 1.15em; font-size: .92rem; border-color: var(--sage-dark); color: var(--sage-dark); }
.btn-small:hover { background: var(--sage-dark); color: var(--paper); }
.btn-small.is-picked { background: var(--sage); border-color: var(--sage); color: #fff; }

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 238, 227, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--sage-dark);
}

.logo-text { font-size: 1.25rem; color: var(--brown); white-space: nowrap; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 24px);
}

.site-nav a {
  text-decoration: none;
  color: var(--brown-soft);
  font-weight: 600;
  font-size: .98rem;
  padding: .35em .2em;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--brown); border-bottom-color: var(--sage); }

.nav-cta {
  border: 2px solid var(--sage-dark) !important;
  border-radius: 999px;
  padding: .45em 1.1em !important;
  color: var(--sage-dark) !important;
}

.nav-cta:hover { background: var(--sage-dark); color: var(--paper) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  background: none;
  border: 2px solid var(--brown);
  border-radius: 12px;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  background: var(--brown);
  border-radius: 2px;
}

/* ---------- Первый экран ---------- */

.hero {
  position: relative;
  padding: clamp(56px, 8vw, 96px) 0 0;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  padding-bottom: clamp(70px, 8vw, 110px);
}

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--brown-soft);
  max-width: 34em;
  margin: 1.2em 0 1.8em;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-art { display: flex; justify-content: center; }

.hero-svg { width: min(100%, 430px); height: auto; display: block; }

.breath { transform-origin: 210px 185px; animation: breathe 9s ease-in-out infinite; }

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.hero-lines path { animation: drift 12s ease-in-out infinite; }
.hero-lines path:nth-child(2) { animation-delay: -4s; }
.hero-lines path:nth-child(3) { animation-delay: -8s; }

@keyframes drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-12px); }
}

.wave-divider { display: block; width: 100%; height: 70px; }

/* ---------- Направления ---------- */

.directions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.direction-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
}

.dir-icon {
  width: 52px; height: 52px;
  color: var(--sage-dark);
  margin-bottom: 18px;
}

.direction-card p { color: var(--brown-soft); font-size: .97rem; }

.dir-meta {
  margin-top: 14px;
  font-size: .84rem !important;
  letter-spacing: .05em;
  color: var(--sage-dark) !important;
  font-weight: 600;
}

/* ---------- Расписание ---------- */

.day-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.day-tab {
  padding: .6em 1.3em;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--paper);
  color: var(--brown-soft);
  font: inherit;
  font-weight: 600;
  font-size: .97rem;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.day-tab:hover { border-color: var(--sage); }

.day-tab[aria-selected="true"] {
  background: var(--sage-dark);
  border-color: var(--sage-dark);
  color: var(--paper);
}

.class-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.class-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.class-time {
  font-family: Georgia, serif;
  font-size: 1.15rem;
  color: var(--sage-dark);
  font-weight: 600;
  white-space: nowrap;
}

.class-name { font-weight: 700; color: var(--brown); }

.class-note {
  grid-column: 2;
  color: var(--brown-soft);
  font-size: .92rem;
}

.class-row .btn { grid-column: 3; grid-row: 1 / span 2; align-self: center; }

/* ---------- Преимущества ---------- */

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 2.2em;
}

.why-card {
  border-top: 3px solid var(--sage);
  padding: 24px 4px 0;
}

.why-num {
  font-family: Georgia, serif;
  font-size: 2.2rem;
  color: var(--sage);
  line-height: 1;
}

.why-card h3 { margin: 12px 0 10px; }
.why-card p { color: var(--brown-soft); }

/* ---------- Абонементы ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.price-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.price-featured { border: 2px solid var(--sage-dark); }

.price-badge {
  position: absolute;
  top: -14px;
  left: 20px;
  background: var(--sage-dark);
  color: var(--paper);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  padding: .35em 1em;
  border-radius: 999px;
  margin: 0;
}

.price { margin: 0; color: var(--brown); }

.price-value { font-size: 2.4rem; line-height: 1; }

.price-note { color: var(--brown-soft); font-size: .93rem; }

.pricing-hint {
  margin-top: 30px;
  text-align: center;
  color: var(--brown-soft);
  font-style: italic;
}

/* ---------- FAQ ---------- */

.faq-list { display: grid; gap: 14px; margin-top: 1.6em; }

.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 22px;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 34px 16px 0;
  font-weight: 700;
  color: var(--brown);
  position: relative;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 12px; height: 12px;
  border-right: 2.4px solid var(--sage-dark);
  border-bottom: 2.4px solid var(--sage-dark);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .25s ease;
}

.faq-item[open] summary::after { transform: translateY(-30%) rotate(225deg); }

.faq-item p { color: var(--brown-soft); padding-bottom: 18px; }

/* ---------- Форма ---------- */

.request-form, .form-success {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 40px);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field { display: flex; flex-direction: column; gap: 7px; }
.field-wide { grid-column: 1 / -1; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-pair > div { display: flex; flex-direction: column; gap: 7px; }

.field label { font-weight: 700; color: var(--brown); font-size: .96rem; }

.label-optional { font-weight: 400; color: var(--brown-soft); font-size: .86em; }

.field input[type="text"],
.field input[type="tel"],
.field select,
.field textarea {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: .7em .95em;
  width: 100%;
  transition: border-color .2s ease;
}

.field textarea { resize: vertical; min-height: 84px; }

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--sage-dark);
}

.field input[aria-invalid="true"] { border-color: var(--error); }

.field-error { min-height: 1.25em; margin: 0; color: var(--error); font-size: .88rem; font-weight: 600; }
.field-error[hidden] { display: block; visibility: hidden; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 400 !important;
  color: var(--brown-soft) !important;
  cursor: pointer;
}

.check input {
  width: 22px; height: 22px;
  margin: 2px 0 0;
  accent-color: var(--sage-dark);
  flex: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

/* Подтверждение */

.form-success { text-align: center; }

.success-mark {
  width: 64px; height: 64px;
  color: var(--sage-dark);
  margin-bottom: 14px;
}

.form-success h3 { margin-bottom: 10px; }

.success-summary { font-weight: 600; color: var(--brown); }

.success-honest { color: var(--brown-soft); max-width: 46em; margin: 12px auto 22px; }

/* ---------- Подвал ---------- */

.site-footer {
  background: var(--brown);
  color: #e9e0cd;
  padding: 44px 0;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sage-mist);
  flex: none;
}

.footer-name { font-family: Georgia, serif; font-size: 1.15rem; margin: 0; color: #f4eee3; }

.footer-note { max-width: 60em; font-size: .92rem; color: #c9bda6; margin: 0; }

/* ---------- Адаптив ---------- */

@media (max-width: 980px) {
  .directions-grid, .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-svg { width: min(72vw, 340px); }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 10px clamp(18px, 4vw, 40px) 18px;
    display: none;
  }

  .site-nav.is-open { display: flex; }

  .site-nav a { padding: .8em .2em; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .site-nav a:last-child { border-bottom: none; }

  .nav-cta { text-align: center; margin-top: 10px; }
}

@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .field-pair { grid-template-columns: 1fr; }

  .class-row { grid-template-columns: 1fr auto; }
  .class-time { grid-column: 1; }
  .class-name { grid-column: 1; }
  .class-note { grid-column: 1 / -1; }
  .class-row .btn { grid-column: 2; grid-row: 1; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .directions-grid, .pricing-grid { grid-template-columns: 1fr; }
  .day-tabs { gap: 8px; }
  .day-tab { padding: .55em 1em; font-size: .9rem; }
  .class-row { padding: 14px 16px; }
  .form-actions .btn { width: 100%; }
  .footer-inner { flex-direction: column; gap: 14px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
