/* ============================================================
   Фонд «Приютино» — общая таблица стилей
   Спокойная палитра: тёплый беж + приглушённый шалфейный зелёный
   ============================================================ */

:root {
  /* Палитра */
  --bg:            #f7f5f0;   /* тёплый молочный фон */
  --bg-alt:        #eef0ea;   /* блоки-разделители */
  --surface:       #ffffff;   /* карточки */
  --sage:          #6b8e7f;   /* основной зелёный */
  --sage-dark:     #567567;   /* hover */
  --sage-soft:     #a8c3b8;   /* мягкий акцент */
  --sage-tint:     #e4ede8;   /* очень светлый зелёный */
  --sand:          #d8cbb4;   /* песочный акцент */
  --text:          #33403a;   /* основной текст */
  --text-soft:     #6b7772;   /* вторичный текст */
  --line:          #e2e0d8;   /* границы */
  --warm:          #c98a5e;   /* тёплый терракотовый акцент (кнопки-помощь) */
  --warm-dark:     #b3764c;

  --radius:        16px;
  --radius-sm:     10px;
  --shadow:        0 6px 24px rgba(60, 70, 60, 0.07);
  --shadow-lg:     0 14px 40px rgba(60, 70, 60, 0.12);
  --maxw:          1160px;
  --font:          'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--sage-dark); text-decoration: none; transition: color .2s; }
a:hover { color: var(--sage); }

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

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

.section { padding: 72px 0; }
.section--tint { background: var(--bg-alt); }
.section--sage { background: var(--sage-tint); }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head p { color: var(--text-soft); font-size: 1.05rem; }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 14px;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.btn--primary { background: var(--sage); color: #fff; }
.btn--primary:hover { background: var(--sage-dark); color: #fff; transform: translateY(-1px); }
.btn--warm { background: var(--warm); color: #fff; }
.btn--warm:hover { background: var(--warm-dark); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--sage-dark); border-color: var(--sage-soft); }
.btn--ghost:hover { background: var(--sage-tint); color: var(--sage-dark); }
.btn--lg { padding: 16px 34px; font-size: 1.05rem; }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 240, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: nowrap; height: 74px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.15rem; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 46px; height: 46px; border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.footer .brand-mark { background: #fff; padding: 5px; }
.brand small { display: block; font-size: .72rem; font-weight: 500; color: var(--text-soft); letter-spacing: .02em; }

.menu { display: flex; align-items: center; flex-wrap: nowrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.menu a { white-space: nowrap; }
.menu > li { position: relative; }
.menu a { padding: 10px 14px; border-radius: 8px; font-size: .95rem; font-weight: 500; color: var(--text); }
.menu a:hover { background: var(--sage-tint); color: var(--sage-dark); }

.has-sub > a::after { content: '▾'; font-size: .7rem; margin-left: 5px; color: var(--text-soft); }
.submenu {
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: 8px; list-style: none; margin: 8px 0 0;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all .18s;
}
.has-sub:hover .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a { display: block; padding: 9px 12px; font-size: .92rem; }

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

.burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: .2s; }

/* ---------- Герой ---------- */
.hero {
  position: relative;
  padding: 84px 0 76px;
  background:
    radial-gradient(1200px 500px at 80% -10%, var(--sage-tint), transparent 60%),
    var(--bg);
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero-lead { font-size: 1.18rem; color: var(--text-soft); margin-bottom: 30px; max-width: 540px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual {
  aspect-ratio: 4/3.4; border-radius: 24px;
  background: linear-gradient(135deg, var(--sage-soft), var(--sage));
  box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
  display: grid; place-items: center;
}
.hero-visual .paw { font-size: 8rem; opacity: .35; }
.hero-visual > img { width: 100%; height: 100%; object-fit: cover; }
.hero-stats { display: flex; gap: 30px; margin-top: 38px; flex-wrap: wrap; }
.stat b { display: block; font-size: 2.1rem; color: var(--sage-dark); line-height: 1; }
.stat span { font-size: .9rem; color: var(--text-soft); }

/* ---------- Карточки-сетки ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-icon {
  width: 54px; height: 54px; border-radius: 14px;
  background: var(--sage-tint); color: var(--sage-dark);
  display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 18px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-soft); font-size: .97rem; margin: 0; }

/* ---------- Карточка животного ---------- */
.pet-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.pet-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pet-photo {
  position: relative; overflow: hidden;
  aspect-ratio: 1/1; background: linear-gradient(135deg, var(--sage-tint), var(--sage-soft));
  display: grid; place-items: center; font-size: 4rem; color: #fff; opacity: .95;
}
.pet-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Пометка временного изображения-образца */
.sample-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  background: rgba(51, 64, 58, .72); color: #fff;
  padding: 4px 10px; border-radius: 999px;
}
.hero-visual .sample-badge { top: 14px; left: 14px; }
.pet-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.pet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.pet-head h3 { margin: 0; }
.pet-age { font-size: .85rem; color: var(--text-soft); white-space: nowrap; }
.pet-body p { color: var(--text-soft); font-size: .94rem; flex: 1; }
.pet-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 16px; }
.tag {
  font-size: .76rem; padding: 4px 10px; border-radius: 999px;
  background: var(--sage-tint); color: var(--sage-dark); font-weight: 500;
}

/* ---------- Блок «Дополнительный блок» ---------- */
.extra-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .74rem; font-weight: 600; letter-spacing: .04em;
  color: var(--warm-dark); background: #f6e7db;
  padding: 4px 11px; border-radius: 999px; margin-bottom: 14px;
  text-transform: uppercase;
}
.extra-badge::before { content: '✦'; }
.card--extra { border-color: #ecd9c8; background: linear-gradient(180deg, #fdf8f3, var(--surface)); }

/* ---------- До / После ---------- */
.ba-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.ba-images { display: grid; grid-template-columns: 1fr 1fr; }
.ba-images figure { margin: 0; position: relative; }
.ba-images img, .ba-ph {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block;
}
.ba-ph { background: linear-gradient(135deg, var(--sage-tint), var(--sage-soft)); display: grid; place-items: center; color: #fff; font-size: 2.4rem; }
.ba-images figcaption {
  position: absolute; top: 12px; left: 12px;
  font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  background: rgba(51,64,58,.78); color: #fff; padding: 4px 11px; border-radius: 999px;
}
.ba-images figure:last-child figcaption { background: var(--sage); }
.ba-body { padding: 22px 24px 26px; }
.ba-body h3 { margin-bottom: 8px; }
.ba-body p { color: var(--text-soft); margin: 0; font-size: .96rem; }

/* ---------- Полоса помощи ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--sage), var(--sage-dark));
  color: #fff; border-radius: 24px; padding: 54px; text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.88); max-width: 560px; margin: 0 auto 28px; }
.cta-band .btn--ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.cta-band .btn--ghost:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ---------- Партнёры (стена логотипов) ---------- */
.partners-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.partner-card {
  position: relative;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  height: 116px; display: grid; place-items: center; padding: 20px;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.partner-card img { max-width: 100%; max-height: 68px; object-fit: contain; }
a.partner-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* Облачко-подсказка с описанием партнёра (как в мультфильмах) */
.partner-tip {
  position: absolute; bottom: calc(100% + 16px); left: 50%;
  transform: translateX(-50%) translateY(8px) scale(.94);
  width: max-content; max-width: 250px;
  background: #fff; color: var(--text);
  font-size: .85rem; line-height: 1.4; text-align: center;
  padding: 13px 18px; border-radius: 22px; border: 2.5px solid var(--sage);
  box-shadow: 0 12px 28px rgba(60, 70, 60, .2);
  opacity: 0; visibility: hidden; pointer-events: none; z-index: 40;
  transition: opacity .2s ease, transform .22s cubic-bezier(.34, 1.56, .64, 1);
}
.partner-tip__name { display: block; color: var(--sage-dark); margin-bottom: 3px; font-size: .9rem; }
/* хвостик-облачко из отрывных кружков (как «мысли» в мультфильмах) */
.partner-tip::before, .partner-tip::after {
  content: ''; position: absolute; left: 50%;
  background: #fff; border: 2.5px solid var(--sage); border-radius: 50%;
}
.partner-tip::before { width: 15px; height: 15px; top: calc(100% + 3px); transform: translateX(-60%); }
.partner-tip::after  { width: 8px;  height: 8px;  top: calc(100% + 16px); transform: translateX(-30%); }
.partner-card:hover .partner-tip,
.partner-card:focus-visible .partner-tip {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.faq-item summary {
  cursor: pointer; padding: 18px 22px; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; gap: 14px; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--sage); font-size: 1.5rem; line-height: 1; flex-shrink: 0; transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 22px 20px; color: var(--text-soft); margin: 0; }

/* ---------- Учредители ---------- */
.founders-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.founder-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; text-align: center; box-shadow: var(--shadow); }
.founder-avatar {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 16px;
  background: var(--sage-tint); color: var(--sage-dark);
  display: grid; place-items: center; font-size: 2rem; font-weight: 700;
}
.founder-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.founder-card h3 { margin: 0 0 4px; font-size: 1.15rem; }
.founder-card p { margin: 0; color: var(--text-soft); font-size: .95rem; }

/* ---------- Список нужд / реквизиты ---------- */
.list-clean { list-style: none; padding: 0; margin: 0; }
.list-clean li { padding: 10px 0 10px 30px; position: relative; border-bottom: 1px solid var(--line); color: var(--text-soft); }
.list-clean li::before { content: '✓'; position: absolute; left: 0; color: var(--sage); font-weight: 700; }
.list-clean li:last-child { border-bottom: none; }

.req-box {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 30px; box-shadow: var(--shadow);
}
.req-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.req-row:last-child { border-bottom: none; }
.req-row span { color: var(--text-soft); }
.req-row b { text-align: right; font-weight: 600; }

/* ---------- Отчёты: действия и окно-превью ---------- */
.link-btn { background: none; border: none; padding: 0; font: inherit; color: var(--sage-dark); cursor: pointer; }
.link-btn:hover { color: var(--sage); text-decoration: underline; }
.report-actions { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .92rem; flex-wrap: wrap; justify-content: flex-end; }
.report-actions .dot { color: var(--line); }

.doc-modal { position: fixed; inset: 0; z-index: 200; display: none; }
.doc-modal.open { display: block; }
.doc-modal__backdrop { position: absolute; inset: 0; background: rgba(30, 38, 34, .55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.doc-modal__card { position: absolute; inset: 4vh 4vw; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
.doc-modal__bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.doc-modal__title { font-weight: 600; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-modal__actions { display: flex; gap: 8px; flex-shrink: 0; }
.doc-modal__body { flex: 1; background: var(--bg-alt); overflow: auto; display: grid; place-items: center; }
.doc-modal__body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.doc-modal__body img { max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 600px) {
  .doc-modal__card { inset: 0; border-radius: 0; }
  .doc-modal__title { max-width: 44vw; }
  .doc-modal__actions .btn { padding: 8px 10px; }
}

/* ---------- Шаги ---------- */
.steps { counter-reset: step; display: grid; gap: 20px; }
.step { display: flex; gap: 18px; align-items: flex-start; }
.step-num {
  counter-increment: step; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--sage); color: #fff; display: grid; place-items: center; font-weight: 700;
}
.step-num::before { content: counter(step); }
.step h4 { margin: 4px 0 4px; }
.step p { color: var(--text-soft); margin: 0; font-size: .95rem; }

/* ---------- Форма ---------- */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 7px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); font-family: inherit; font-size: .97rem;
  background: var(--surface); color: var(--text); transition: border-color .2s;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none; border-color: var(--sage);
}
.form-note { font-size: .84rem; color: var(--text-soft); }

/* ---------- Хлебные крошки / шапка страницы ---------- */
.page-hero {
  background: var(--sage-tint);
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}
.page-hero .eyebrow { color: var(--sage-dark); }
.page-hero p { color: var(--text-soft); max-width: 680px; margin: 0; font-size: 1.08rem; }
.crumbs { font-size: .85rem; color: var(--text-soft); margin-bottom: 16px; }
.crumbs a { color: var(--sage-dark); }

/* ---------- Подвал ---------- */
.footer { background: #2c3833; color: #cdd6d1; padding: 60px 0 28px; }
.footer a { color: #cdd6d1; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 40px; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 9px; font-size: .93rem; }
.footer .brand { color: #fff; margin-bottom: 14px; }
.footer .brand small { color: #9fb0a8; }
.footer-desc { font-size: .92rem; color: #9fb0a8; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .85rem;
}
.footer-bottom, .footer-bottom a { color: #8fa199; }

/* ---------- Утилиты ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-32 { margin-top: 32px; }
.lead { font-size: 1.1rem; color: var(--text-soft); }
.divider { height: 1px; background: var(--line); border: none; margin: 40px 0; }
/* Заголовок в одну строку на десктопе */
@media (min-width: 980px) { .nowrap-desktop { white-space: nowrap; } }
/* Перенос строки только на десктопе */
.br-desktop { display: none; }
@media (min-width: 980px) { .br-desktop { display: inline; } }

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

/* Меню → гамбургер раньше, чтобы навигация не переносилась на две строки */
@media (max-width: 960px) {
  .menu, .nav-cta .btn { display: none; }
  .burger { display: block; }
  .menu.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 74px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 12px; gap: 2px; box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 74px); overflow-y: auto;
  }
  .menu.open a { white-space: normal; }
  .menu.open .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding: 0 0 0 14px; margin: 2px 0; }

  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .partners-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 780px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .founders-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 38px 24px; }
  .req-row { flex-direction: column; gap: 2px; }
  .req-row b { text-align: left; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr; }
  .partners-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 52px 0; }
}
