/* ============================================================
   Орден Шнека — общие стили
   Палитра, типографика, компоненты, адаптивность
   ============================================================ */

:root {
  --paper: #f5f1e8;
  --paper-2: #efe8d8;
  --surface: #fffcf5;
  --ink: #1f2430;
  --body: #3b4353;
  --muted: #6b7486;
  --line: #e2d9c5;
  --line-strong: #cfc4a9;

  --bronze: #a9651c;
  --bronze-2: #8a4f14;
  --bronze-3: #c9842f;
  --bronze-light: #e0b26a;
  --bronze-soft: #f0e2c8;
  --gold: #c9944a;

  --serif: "Playfair Display", "Georgia", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 44px -22px rgba(31, 36, 48, 0.35);
  --shadow-sm: 0 8px 22px -14px rgba(31, 36, 48, 0.28);
  --container: 1160px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--body);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---------- Утилиты ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.section--alt { background: var(--paper-2); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--bronze-3);
  border-radius: 2px;
}

.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .eyebrow::after {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--bronze-3);
  border-radius: 2px;
}

.section-head__title {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  margin: 14px 0 16px;
}

.section-head__lead { color: var(--muted); font-size: 1.08rem; }

.lead { font-size: 1.14rem; color: var(--body); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--bronze-3), var(--bronze-2));
  color: #fff8ec;
  box-shadow: 0 12px 26px -12px rgba(138, 79, 20, 0.7);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -12px rgba(138, 79, 20, 0.85);
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}
.btn--ghost:hover {
  border-color: var(--bronze);
  color: var(--bronze-2);
  transform: translateY(-2px);
}

.btn--light {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn--light:hover { transform: translateY(-2px); }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 241, 232, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 74px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand__mark {
  width: 38px;
  height: 38px;
  color: var(--bronze);
  flex: none;
}

.brand__name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.28rem;
  color: var(--ink);
  line-height: 1;
}
.brand__tag {
  display: block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.nav { display: flex; align-items: center; gap: 28px; }

.nav__links { display: flex; align-items: center; gap: 6px; }

.nav__link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--body);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav__link:hover { color: var(--bronze-2); background: var(--bronze-soft); }
.nav__link.active {
  color: var(--bronze-2);
  background: var(--bronze-soft);
  font-weight: 600;
}

.nav__cta { display: inline-flex; }

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 10px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav__toggle span {
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav--open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav--open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav--open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 96px;
  background:
    radial-gradient(circle at 85% 18%, rgba(224, 178, 106, 0.16), transparent 42%),
    var(--paper);
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -160px;
  width: 460px;
  height: 460px;
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0.7;
  pointer-events: none;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero__title {
  font-size: clamp(2.5rem, 5.4vw, 4.1rem);
  margin: 20px 0 20px;
}
.hero__title em {
  font-style: italic;
  color: var(--bronze-2);
}

.hero__lead {
  font-size: 1.18rem;
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 32px;
}

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

.hero__note {
  margin-top: 22px;
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero__note svg { width: 16px; height: 16px; color: var(--bronze); flex: none; }

.hero__art {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 34px rgba(138, 79, 20, 0.18));
}

/* ---------- Статистика ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 36px 0;
}

.stat { text-align: center; }
.stat__value {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 700;
  color: var(--bronze-2);
  line-height: 1;
}
.stat__label { margin-top: 8px; color: var(--muted); font-size: 0.92rem; }

/* ---------- Сетки и карточки ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card-grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}

.card__icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: var(--bronze-soft);
  color: var(--bronze-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.card__icon svg { width: 26px; height: 26px; }

.card__num {
  font-family: var(--serif);
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  color: var(--bronze-3);
  font-weight: 700;
}

.card h3 { font-size: 1.28rem; margin: 10px 0 10px; }
.card p { color: var(--muted); font-size: 0.97rem; }

/* ---------- Полоса-цитата ---------- */
.quote-band {
  background: var(--ink);
  color: #ece6d8;
  border-radius: var(--radius);
  padding: 56px 60px;
  position: relative;
  overflow: hidden;
}
.quote-band::before {
  content: "“";
  position: absolute;
  top: -30px;
  left: 24px;
  font-family: var(--serif);
  font-size: 12rem;
  color: rgba(224, 178, 106, 0.18);
  line-height: 1;
}
.quote-band__text {
  position: relative;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-style: italic;
  line-height: 1.35;
  max-width: 820px;
}
.quote-band__author {
  position: relative;
  margin-top: 18px;
  color: var(--bronze-light);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

/* ---------- Таймлайн ---------- */
.timeline { position: relative; margin-top: 12px; }

.timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line-strong);
}

.timeline__item {
  position: relative;
  padding: 0 0 40px 52px;
}
.timeline__item:last-child { padding-bottom: 0; }

.timeline__dot {
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--bronze);
  display: flex;
  align-items: center;
  justify-content: center;
}
.timeline__dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bronze);
}

.timeline__year {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--bronze-2);
  font-size: 1.3rem;
}
.timeline__title { font-size: 1.2rem; margin: 6px 0 6px; }
.timeline__text { color: var(--muted); max-width: 720px; }

/* ---------- Таблица ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table { width: 100%; border-collapse: collapse; min-width: 640px; }
thead th {
  text-align: left;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bronze-2);
  background: var(--bronze-soft);
  padding: 16px 22px;
}
tbody td {
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  color: var(--body);
  font-size: 0.97rem;
}
tbody tr:nth-child(even) { background: #faf6ec; }
tbody td:first-child { font-weight: 600; color: var(--ink); }

/* ---------- Галерея ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.figure {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.figure:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.figure__art {
  background: linear-gradient(180deg, var(--paper-2), var(--paper));
  padding: 28px;
  border-bottom: 1px solid var(--line);
}
.figure__art svg { width: 100%; height: auto; }

.figure__body { padding: 20px 24px 24px; }
.figure__body h3 { font-size: 1.22rem; margin-bottom: 8px; }
.figure__body p { color: var(--muted); font-size: 0.95rem; }
.figure__tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bronze-2);
  background: var(--bronze-soft);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 12px;
}

/* ---------- Форма ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.info-list { display: grid; gap: 22px; }

.info-item { display: flex; gap: 16px; align-items: flex-start; }
.info-item__icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--bronze-soft);
  color: var(--bronze-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.info-item__icon svg { width: 22px; height: 22px; }
.info-item h3 { font-family: var(--sans); font-size: 1rem; margin-bottom: 3px; }
.info-item p { color: var(--muted); font-size: 0.95rem; }

.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.98rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; min-height: 140px; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7486' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--bronze-3);
  box-shadow: 0 0 0 3px rgba(169, 101, 28, 0.15);
}

.form__note { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }

.form-success {
  display: none;
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: #e7f1e4;
  border: 1px solid #bcd7b4;
  color: #2f5a2a;
  font-size: 0.95rem;
  font-weight: 500;
}
.form-success.visible { display: block; }

/* ---------- Подвал ---------- */
.footer {
  background: var(--ink);
  color: #cfc9bb;
  margin-top: 40px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 64px 0 44px;
}

.footer__brand p { margin-top: 16px; font-size: 0.94rem; color: #a8a294; max-width: 300px; }

.footer__col h4 {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bronze-light);
  margin-bottom: 16px;
}
.footer__col ul { display: grid; gap: 10px; }
.footer__col a { color: #cfc9bb; font-size: 0.94rem; transition: color 0.15s ease; }
.footer__col a:hover { color: var(--bronze-light); }

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #8d877b;
}

/* ---------- Кнопка «наверх» ---------- */
.to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--bronze-2);
  color: #fff8ec;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 40;
}
.to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--bronze-3); }
.to-top svg { width: 20px; height: 20px; }

/* ---------- Появление при прокрутке ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Адаптивность ---------- */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .hero__art { max-width: 560px; margin: 0 auto; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Дополнительно ---------- */
.btn--sm { padding: 10px 20px; font-size: 0.88rem; }

.page-hero {
  padding: 72px 0 52px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 12% 8%, rgba(224, 178, 106, 0.13), transparent 42%),
    var(--paper);
}
.page-hero__title { font-size: clamp(2.1rem, 4.5vw, 3.2rem); margin: 16px 0 14px; }
.page-hero__lead { color: var(--muted); font-size: 1.1rem; max-width: 720px; }

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
}
.breadcrumbs a:hover { color: var(--bronze-2); }
.breadcrumbs .sep { color: var(--line-strong); }

.footer .brand__name { color: #fff8ec; }
.footer .brand__tag { color: #8d877b; }

@media (max-width: 720px) {
  .page-hero { padding: 52px 0 40px; }
  .section { padding: 60px 0; }
  .site-header__inner { height: 66px; }

  .nav__cta { display: none; }

  .nav__toggle { display: flex; }

  .nav__links {
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 14px 20px 20px;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav--open .nav__links { display: flex; }
  .nav__link { padding: 12px 16px; }

  .card-grid, .card-grid--2, .gallery-grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 56px 0 72px; }
  .quote-band { padding: 44px 30px; }
}
