/* ============================================
   Ольга Пилевская · стили сайта
   Эстетика: The Row / agreeg.design
   Чистый sans-serif, тонкие веса, много воздуха
   ============================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Шрифт — единственный, разные веса */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Палитра */
  --c-bg: #F1ECE2;            /* основной фон, тёплый молочный (как у AGREEG) */
  --c-bg-alt: #E8E2D5;        /* чередующиеся секции */
  --c-ink: #1A1816;           /* текст, мягкий чёрный */
  --c-ink-soft: #6A645B;      /* приглушённый текст, подписи */
  --c-line: #C9C2B3;          /* тонкие разделители */
  --c-accent: #8B5E3C;        /* акцент — приглушённый терракот */
  --c-accent-hover: #6F4830;

  /* Размеры */
  --container: 1320px;
  --container-narrow: 920px;
  --pad-x: clamp(20px, 5vw, 80px);
  --section-y: clamp(96px, 14vw, 180px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--c-accent); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; padding: 0; margin: 0; }

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
  margin: 0 0 40px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--c-ink);
  line-height: 1.05;
}

h1 em, h2 em {
  font-style: normal;
  font-weight: 400;
}

.section__title {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  margin-bottom: 56px;
  max-width: 22ch;
  letter-spacing: -0.02em;
}

.lead {
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--c-ink);
  margin: 0 0 32px;
  max-width: 56ch;
  font-weight: 400;
}

.prose p {
  font-size: 16px;
  line-height: 1.75;
  margin: 0 0 18px;
  max-width: 60ch;
  font-weight: 400;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 400;
  border-radius: 0;
  transition: all 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn--primary {
  background: var(--c-ink);
  color: var(--c-bg);
}
.btn--primary:hover {
  background: var(--c-accent);
  color: var(--c-bg);
}
.btn--ghost {
  background: transparent;
  color: var(--c-ink);
  border: 1px solid var(--c-ink);
}
.btn--ghost:hover {
  background: var(--c-ink);
  color: var(--c-bg);
}
.btn--large {
  padding: 22px 44px;
  font-size: 13px;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(241, 236, 226, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--c-line); }
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.nav__logo {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav__menu {
  display: flex;
  gap: 40px;
}
.nav__menu a {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-ink);
  font-weight: 400;
}
.nav__menu a:hover { color: var(--c-accent); }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(48px, 8vw, 96px) var(--pad-x) var(--section-y);
  max-width: var(--container);
  margin: 0 auto;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 6.5vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 48px;
  color: var(--c-ink);
}
.hero__title em {
  font-style: normal;
  font-weight: 400;
}
.hero__meta {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--c-ink-soft);
  margin: 0 0 56px;
  max-width: 44ch;
  text-transform: uppercase;
  line-height: 1.7;
}
.hero__image {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}
.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(0.96) brightness(1.02);
}

/* ---------- Sections ---------- */
.section {
  padding: var(--section-y) var(--pad-x);
}
.section--alt { background: var(--c-bg-alt); }
.section__inner {
  max-width: var(--container);
  margin: 0 auto;
}
.section__inner--narrow { max-width: var(--container-narrow); }

/* ---------- About — credentials ---------- */
.credentials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin: 80px 0 56px;
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  padding: 48px 0;
}
.credentials li {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.credentials__num {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.03em;
}
.credentials__label {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--c-ink-soft);
  line-height: 1.5;
  max-width: 24ch;
  text-transform: uppercase;
}
.methods {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.methods__label {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
  font-weight: 400;
}
.methods__list {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.4;
  color: var(--c-ink);
  letter-spacing: -0.005em;
}

/* ---------- Groups ---------- */
.groups__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.format { margin: 36px 0; }
.format__sub {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
  margin: 0 0 16px;
  font-weight: 400;
}
.bullet {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bullet li {
  position: relative;
  padding-left: 24px;
  font-size: 15px;
  line-height: 1.6;
}
.bullet li::before {
  content: "—";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--c-ink-soft);
}
.format__row {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  margin: 48px 0 32px;
  padding: 28px 0;
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
}
.format__meta {
  font-size: 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.format__meta b {
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
}
/* Photo rotator (used in Groups section) */
.photo-rotator {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--c-line);
}
.photo-rotator img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  filter: contrast(0.96) brightness(1.02);
}
.photo-rotator img.is-active {
  opacity: 1;
}

/* ---------- Therapy cards ---------- */
.therapy__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
.card {
  background: var(--c-bg-alt);
  padding: 56px 44px;
  display: flex;
  flex-direction: column;
}
.section--alt .card { background: var(--c-bg); }
.card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 2.4vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.card__lead {
  font-size: 15px;
  color: var(--c-ink-soft);
  margin: 0 0 36px;
  line-height: 1.55;
}
.card__block { margin-bottom: 32px; }
.card__block h4 {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
  margin: 0 0 16px;
  font-weight: 400;
}
.card__footer {
  margin-top: auto;
  padding-top: 36px;
  border-top: 1px solid var(--c-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.card__price {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.01em;
}
.card__price-meta {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--c-ink-soft);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---------- Contact ---------- */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
  margin-top: 24px;
}
.contact__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 36px 0;
}
.contact__note {
  font-size: 14px;
  color: var(--c-ink-soft);
  margin: 32px 0 0;
  letter-spacing: 0.02em;
  line-height: 1.55;
}
.contact__note a {
  color: var(--c-ink);
  border-bottom: 1px solid var(--c-ink);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.contact__note a:hover {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
}
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.field__label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
  font-weight: 400;
}
.field input, .field textarea, .field select {
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 14px 18px;
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  color: var(--c-ink);
  outline: none;
  transition: border-color 0.2s ease;
  border-radius: 0;
}
.section--alt .field input, .section--alt .field textarea, .section--alt .field select { background: var(--c-bg); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--c-ink); }
.field textarea { resize: vertical; min-height: 100px; font-family: var(--font-sans); }
.field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%231A1816' stroke-width='1.5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}
.contact__form .btn { margin-top: 8px; }
#formAction { display: flex; }
.contact__formnote {
  font-size: 13px;
  color: var(--c-ink-soft);
  margin: 0;
  min-height: 1em;
}
.contact__formnote.is-success { color: var(--c-accent); }

/* Form choice panel — appears after submit */
.form__choice {
  margin-top: 8px;
  padding: 28px 28px 24px;
  background: var(--c-bg);
  border: 1px solid var(--c-line);
}
.form__choice[hidden] { display: none; }
.form__choice-title {
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--c-ink);
  margin: 0 0 18px;
}
.form__choice-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.form__choice-buttons .btn { margin-top: 0; flex: 1; min-width: 140px; }
.form__choice-note {
  font-size: 12px;
  color: var(--c-ink-soft);
  line-height: 1.55;
  margin: 0;
}

/* ---------- Legal ---------- */
.legal {
  padding: 56px var(--pad-x);
  background: var(--c-bg);
  border-top: 1px solid var(--c-line);
}
.legal__details {
  border: 0;
}
.legal__details summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
  transition: color 0.2s ease;
}
.legal__details summary:hover { color: var(--c-ink); }
.legal__details summary::-webkit-details-marker { display: none; }
.legal__chevron {
  font-size: 18px;
  font-weight: 400;
  transition: transform 0.3s ease;
  color: var(--c-ink-soft);
}
.legal__details[open] .legal__chevron { transform: rotate(45deg); }
.legal__body { padding: 36px 0 24px; }
.legal__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 48px;
  margin: 0 0 32px;
}
.legal__list > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-line);
}
.legal__list dt {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
  font-weight: 400;
}
.legal__list dd { margin: 0; font-size: 14px; }
.legal__note {
  font-size: 12px;
  color: var(--c-ink-soft);
  line-height: 1.6;
  font-style: normal;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--c-ink);
  color: var(--c-bg);
  padding: 96px var(--pad-x) 48px;
}
.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
}
.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 48px;
  flex-wrap: wrap;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(241, 236, 226, 0.14);
}
.footer__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  line-height: 1;
}
.footer__role {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-line);
  margin: 0;
}
.footer__links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.footer__links a {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-bg);
  opacity: 0.85;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.footer__links a:hover { opacity: 1; color: var(--c-bg); }

/* Legal info inside footer */
.footer__legal {
  padding: 56px 0;
  border-bottom: 1px solid rgba(241, 236, 226, 0.14);
}
.footer__legal-eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-line);
  margin: 0 0 36px;
  max-width: 60ch;
}
.footer__legal-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 56px;
  margin: 0 0 36px;
}
.footer__legal-list > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer__legal-list dt {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-line);
  font-weight: 400;
}
.footer__legal-list dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--c-bg);
  opacity: 0.92;
}
.footer__legal-list dd a {
  color: var(--c-bg);
  border-bottom: 1px solid rgba(241, 236, 226, 0.3);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.footer__legal-list dd a:hover {
  border-bottom-color: var(--c-bg);
  color: var(--c-bg);
}
.footer__legal-note {
  font-size: 12px;
  color: var(--c-line);
  line-height: 1.6;
  margin: 0;
  font-style: normal;
  max-width: 80ch;
}
.footer__legal-note--small {
  font-size: 11px;
  margin-top: 16px;
  opacity: 0.85;
}

.footer__copy {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--c-line);
  margin: 32px 0 0;
}

/* ---------- Document pages (privacy, offer) ---------- */
.doc {
  padding: clamp(56px, 9vw, 120px) var(--pad-x) clamp(80px, 12vw, 160px);
  background: var(--c-bg);
}
.doc__inner {
  max-width: 760px;
  margin: 0 auto;
}
.doc__back {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
  margin-bottom: 64px;
}
.doc__back:hover { color: var(--c-ink); }
.doc__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--c-ink);
}
.doc__date {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--c-ink-soft);
  margin: 0 0 64px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--c-line);
}
.doc__section {
  margin-bottom: 48px;
}
.doc__section h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 1.8vw, 24px);
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin: 0 0 20px;
  color: var(--c-ink);
}
.doc__section p {
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 16px;
  color: var(--c-ink);
}
.doc__section a {
  color: var(--c-ink);
  border-bottom: 1px solid var(--c-line);
}
.doc__section a:hover { color: var(--c-accent); border-bottom-color: var(--c-accent); }
.doc__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 20px;
  padding-left: 0;
}
.doc__list li {
  position: relative;
  padding-left: 24px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--c-ink);
}
.doc__list li::before {
  content: "—";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--c-ink-soft);
}

/* ---------- Form consent checkbox ---------- */
.field--check {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.field--check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  border: 1px solid var(--c-ink);
  background: var(--c-bg);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: background 0.15s ease;
  border-radius: 0;
  padding: 0;
}
.field--check input[type="checkbox"]:checked {
  background: var(--c-ink);
}
.field--check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid var(--c-bg);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.field--check span {
  font-size: 13px;
  line-height: 1.5;
  color: var(--c-ink-soft);
  letter-spacing: 0.02em;
}
.field--check span a {
  color: var(--c-ink);
  border-bottom: 1px solid var(--c-line);
}
.field--check span a:hover { color: var(--c-accent); border-bottom-color: var(--c-accent); }

/* ---------- Mobile / Responsive ---------- */
@media (max-width: 880px) {
  body { font-size: 15px; }

  .nav__menu { display: none; }
  .nav__inner { padding: 18px var(--pad-x); }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero__title { font-size: clamp(36px, 11vw, 56px); margin-bottom: 32px; }
  .hero__meta { margin-bottom: 36px; }
  .hero__image { max-width: 480px; margin: 0 auto; }

  .credentials {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 36px 0;
    margin: 56px 0 40px;
  }
  .credentials__num { font-size: 48px; }

  .groups__grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .groups__images { grid-template-rows: auto auto; }

  .therapy__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .card { padding: 40px 28px; }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .form__choice-buttons { flex-direction: column; }
  .form__choice-buttons .btn { width: 100%; flex: 1 1 100%; }

  .legal__list { grid-template-columns: 1fr; gap: 16px; }

  .footer__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
    padding-bottom: 40px;
  }
  .footer__links { flex-wrap: wrap; gap: 20px 28px; }
  .footer__legal { padding: 40px 0; }
  .footer__legal-list {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer__legal-eyebrow { margin-bottom: 28px; }
}

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