/*
Визуальные правила исходной страницы собраны в отдельный static-файл.
Так шаблон отвечает только за структуру и данные, а Django может безопасно
кешировать CSS и изображения независимо от содержимого админки.
*/
:root {
  --cream:#f9f5ef;
  --sand:#f0e6da;
  --ink:#34251e;
  --olive:#646d4e;
  --muted:#786d62;
  --line:#e8dbcd
}

* {
  box-sizing:border-box
}
html {
  scroll-behavior:smooth
}
body {
  margin:0;
  background:var(--cream);
  color:var(--ink);
  font:15px/1.55 'DM Sans',Arial,sans-serif
}
h1,h2,h3,p {
  margin:0
}
h1,h2,.serif {
  font-family:'Playfair Display',Georgia,serif;
  font-weight:400
}
h2 {
  font-size:clamp(28px,3.4vw,43px);
  line-height:1.18
}
a {
  color:inherit;
  text-decoration:none
}
a:focus-visible,summary:focus-visible {
  outline:3px solid #9b6f50;
  outline-offset:4px
}
button {
  font:inherit
}
.wrap {
  width:min(1160px,calc(100% - 76px));
  margin:auto
}
.pill {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  border-radius:100px;
  background:var(--olive);
  color:white;
  padding:11px 20px;
  font-size:12px;
  font-weight:600;
  transition:transform .2s,background .2s
}
.pill:hover {
  background:#4f593b;
  transform:translateY(-2px)
}

/* Услуги показывают информацию сразу, поэтому отдельная кнопка в карточке
   не нужна. Остальные кнопки страницы сохраняются. */
.card .pill {
  display:none;
}
.pill .arrow {
  font-size:17px;
  line-height:0
}
.eyebrow {
  font-size:10px;
  letter-spacing:.19em;
  text-transform:uppercase;
  color:#8b7b6b;
  font-weight:700
}
.header {
  position:relative;
  z-index:4;
  padding:13px 0 0;
  background:linear-gradient(90deg,#eee4d9,#d9c8b6)
}
.nav {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:12px 20px;
  background:rgba(255,251,246,.93);
  border-radius:18px 18px 0 0;
  box-shadow:0 4px 25px #5b44351a
}
.brand {
  display:flex;
  align-items:center;
  gap:12px;
  min-width:185px
}
.brandmark {
  font:28px Georgia;
  color:#7a674f;
  border:1px solid #cbbba9;
  border-radius:50%;
  width:42px;
  height:42px;
  display:grid;
  place-items:center
}
.brand strong {
  display:block;
  font:18px Georgia
}
.brand small {
  display:block;
  color:#81766d;
  font-size:12px
}
.navlinks {
  display:flex;
  gap:19px;
  font-size:14px
}
.navlinks a:hover {
  color:var(--olive)
}
.nav .pill {
  white-space:nowrap;
  font-size:11px;
  padding:10px 15px
}
.hero {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background:#f5ebe1
}
.hero:before {
  content:"";
  position:absolute;
  z-index:-2;
  inset:0 0 0 39%;
  background:url('../assets/hero.webp') center 46%/cover no-repeat
}
.hero:after {
  content:"";
  position:absolute;
  z-index:-1;
  inset:0;
  background:linear-gradient(90deg,#f5ebe1 0%,#f5ebe1 25%,rgba(245,235,225,.97) 35%,rgba(245,235,225,.55) 46%,rgba(245,235,225,0) 60%);
  pointer-events:none
}
.hero-inner {
  display:block;
  position:relative;
  min-height:440px
}
.hero-copy {
  width:42%;
  max-width:505px;
  min-height:540px;
  padding:35px 14px 22px 25px;
  display:flex;
  flex-direction:column;
  align-items:flex-start
}
.hero h1 {
  font-size:clamp(49px,4.1vw,69px);
  line-height:1.01;
  letter-spacing:-.035em;
  margin:14px 0
}
.hero-lead {
  font-size:15px;
  max-width:320px;
  line-height:1.45;
  margin-bottom:15px
}
.hero .values {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-top:auto;
  padding-top:18px;
  width:100%
}
.values div {
  text-align:center;
  color:#746558;
  font-size:12px;
  line-height:1.3
}
.values span {
  display:block;
  font:30px Georgia;
  margin-bottom:7px;
  color:#765e4d
}
.hero-image {
  display:none
}
.about {
  display:grid;
  grid-template-columns:29% 1fr 23%;
  gap:24px;
  align-items:stretch;
  padding:52px 0
}
.about-photo {
  width:100%;
  height:225px;
  object-fit:cover;
  border-radius:12px
}
.about-copy {
  padding:9px 0
}
.about-copy h2 {
  margin:7px 0 12px
}
.about-copy p {
  font-size:13px;
  color:#605249;
  margin-bottom:11px
}
.about-copy .pill {
  margin-top:2px
}
.story-toggle {
  border:0;
  cursor:pointer;
}
.quote-card {
  display:grid;
  grid-template-columns:37% 63%;
  overflow:hidden;
  border-radius:12px;
  background:#efe4d7
}
.quote-card img {
  width:100%;
  height:225px;
  object-fit:cover
}
.quote-body {
  padding:20px 15px;
  font:17px/1.4 Georgia;
  color:#5d4939
}
.quote-body:before {
  content:"\201C";
  display:block;
  font:60px/.8 Georgia;
  color:#cbb49f
}
.story-panel {
  grid-column:1 / -1;
  margin:0 auto 24px;
  padding:28px 36px 30px;
  border-radius:14px;
  background:#efe4d7;
  color:#5d4939;
  font:17px/1.4 Georgia,serif;
}
.story-panel[hidden] {
  display:none;
}
.story-panel__text:before {
  content:"\201C";
  display:block;
  font:60px/.8 Georgia,serif;
  color:#cbb49f;
}
.story-panel__text p {
  margin:0 0 14px;
}
.story-panel__text p:last-child {
  margin-bottom:0;
}
.story-panel > .pill {
  margin-top:18px;
}
.services {
  background:#f3eae0;
  padding:50px 0 65px
}
.section-heading {
  text-align:center;
  margin-bottom:24px
}
.section-heading h2 {
  margin:6px 0
}
.section-heading p {
  color:#84766a;
  font-size:12px
}
.cards {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:13px
}
.card {
  background:#fffaf4;
  border:1px solid #e6d9cb;
  border-radius:14px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-width:0;
  box-shadow:0 2px 8px #6b4b3110
}
.card img {
  width:100%;
  height:113px;
  object-fit:cover
}
.card-body {
  padding:13px 13px 14px;
  display:flex;
  flex-direction:column;
  flex:1
}
.card h3 {
  font-size:14px;
  line-height:1.25;
  font-weight:600;
  min-height:35px
}
.price {
  align-self:flex-start;
  background:#f0e2d3;
  color:#936c52;
  border-radius:6px;
  padding:2px 7px;
  margin:8px 0 12px;
  font-size:13px
}
.card p {
  font-size:12px;
  line-height:1.45;
  flex:1;
  margin-bottom:13px
}
.card .pill {
  align-self:flex-start;
  padding:7px 13px;
  font-size:10px
}
.steps-section {
  padding:50px 0 65px;
  background:#faf6f0
}
.steps-section h2 {
  margin-bottom:20px
}
.steps {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px
}
.step {
  display:flex;
  gap:11px;
  align-items:flex-start
}
.num {
  flex:0 0 38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#e8d9c9;
  font:18px Georgia
}
.step strong {
  display:block;
  font-size:14px
}
.step p {
  color:#786d62;
  font-size:12px
}
.comfort {
  background:#f3eae0
}
.comfort-grid {
  display:grid;
  grid-template-columns:27% minmax(0,1fr) 19%;
  gap:22px;
  align-items:center;
  min-height:235px
}
.comfort-img {
  width:100%;
  height:235px;
  object-fit:cover
}
.comfort h2 {
  font-size:clamp(25px,2.7vw,38px);
  margin-bottom:20px
}
.benefits {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px
}
.benefit span {
  font:30px Georgia;
  color:#765d48
}
.benefit strong {
  display:block;
  font-size:13px;
  line-height:1.3;
  margin:6px 0
}
.benefit p {
  font-size:12px;
  color:#77695e;
  line-height:1.45
}
.olive-card {
  background:#626a4e;
  color:#fff;
  border-radius:14px;
  padding:26px 15px;
  text-align:center;
  font:17px/1.4 Georgia;
  min-height:170px;
  display:flex;
  align-items:center
}
.education-section {
  background:#f5eee5
}
.education {
  display:grid;
  grid-template-columns:58% 42%;
  align-items:center;
  min-height:175px;
  overflow:hidden
}
.education .copy {
  padding:22px 26px 22px 6px
}
.education h2 {
  font-size:29px;
  margin-bottom:9px
}
.education p {
  font-size:12px;
  color:#6c6055;
  max-width:490px;
  margin-bottom:12px
}
.education img {
  width:100%;
  height:185px;
  object-fit:cover
}
.faq {
  padding:50px 0 65px
}
.faq h2 {
  text-align:center;
  margin-bottom:16px
}
.faq details {
  max-width:780px;
  margin:auto;
  border-bottom:1px solid var(--line);
  padding:12px 4px
}
.faq summary {
  cursor:pointer;
  font-weight:600
}
.faq details p {
  font-size:13px;
  color:var(--muted);
  margin-top:10px
}
.closing {
  background:linear-gradient(#46342655,#46342655),url('../assets/footer.webp') center 52%/cover;
  text-align:center;
  color:white;
  padding:39px 20px 43px
}
.closing h2 {
  margin-bottom:10px
}
.closing p {
  margin:0 auto 17px;
  max-width:440px;
  font-size:12px
}
.closing .pill {
  border:1px solid #ffffff88
}
.footer {
  display:flex;
  justify-content:space-between;
  gap:20px;
  padding:16px 0;
  font-size:11px;
  color:#786c60
}
.footer a:hover {
  text-decoration:underline
}

@media(max-width:1000px) {
  .wrap {
    width:min(100% - 36px,1160px)
  }
  .navlinks {
    gap:9px
  }
  .navlinks a {
    font-size:10px
  }
  .nav .pill {
    display:none
  }
  .hero-copy {
    width:49%
  }
  .hero:before {
    inset:0 0 0 36%
  }
  .hero:after {
    background:linear-gradient(90deg,#f5ebe1 0%,#f5ebe1 28%,rgba(245,235,225,.85) 43%,transparent 67%)
  }
  .cards {
    gap:8px
  }
  .card-body {
    padding:10px
  }
  .card h3 {
    font-size:12px
  }
  .benefits {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .comfort-grid {
    grid-template-columns:26% minmax(0,1fr) 20%;
    gap:14px
  }
  .olive-card {
    font-size:14px;
    padding:16px 10px
  }

}

@media(max-width:720px) {
  .nav {
    border-radius:0
  }
  .navlinks {
    display:none
  }
  .nav .pill {
    display:inline-flex
  }
  .header {
    padding-top:0
  }
  .hero {
    background:#f5ebe1
  }
  .hero:before,.hero:after {
    display:none
  }
  .hero-inner {
    min-height:0
  }
  .hero-copy {
    width:auto;
    min-height:0;
    padding:38px 20px 28px
  }
  .hero h1 {
    font-size:clamp(52px,10vw,72px)
  }
  .hero-image {
    display:block;
    min-height:330px;
    background:url('../assets/hero.webp') center/cover
  }
  .hero .values {
    margin-top:20px
  }
  .about {
    grid-template-columns:1fr 1fr;
    gap:14px
  }
  .about-photo {
    height:220px
  }
  .about-copy {
    padding:0
  }
  .quote-card {
    grid-column:1/-1;
    grid-template-columns:25% 75%
  }
  .quote-card img {
    height:125px
  }
  .quote-body {
    font-size:16px;
    padding:12px
  }
  .quote-body:before {
    font-size:30px
  }
  .cards {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px
  }
  .card img {
    height:145px
  }
  .card h3 {
    font-size:15px
  }
  .card-body {
    padding:15px
  }
  .card p {
    font-size:12px
  }
  .steps {
    grid-template-columns:repeat(2,1fr);
    gap:20px
  }
  .comfort-grid {
    grid-template-columns:1fr;
    gap:20px;
    padding-top:0;
    padding-bottom:22px
  }
  .comfort-img {
    height:260px;
    width:100%
  }
  .olive-card {
    min-height:105px
  }
  .education {
    grid-template-columns:1fr
  }
  .education .copy {
    padding:26px 4px
  }
  .education img {
    height:200px
  }
  .footer {
    flex-wrap:wrap
  }

}

@media(max-width:440px) {
  .nav .pill {
    font-size:10px;
    padding:9px 11px
  }
  .brand strong {
    font-size:15px
  }
  .brand {
    min-width:0
  }
  .brandmark {
    width:34px;
    height:34px;
    font-size:21px
  }
  .about {
    grid-template-columns:1fr
  }
  .cards {
    grid-template-columns:1fr
  }
  .card {
    display:grid;
    grid-template-columns:39% 61%
  }
  .card img {
    height:100%;
    min-height:210px
  }
  .card h3 {
    min-height:0
  }
  .steps {
    grid-template-columns:1fr
  }
  .values {
    gap:5px
  }
  .values div {
    font-size:9px
  }

}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior:auto
  }
  .pill {
    transition:none
  }

}

/* Блок цитаты занимает ту же высоту, что и фотография слева, но содержит
   только редактируемый текст из админки. */
.quote-card {
  display:block;
  height:225px;
}
.quote-body {
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
@media(max-width:720px) {
  .quote-card {
    height:220px;
  }
}


/* CSS-файл расположен в static/website, поэтому assets находится рядом с ним. */
@media(min-width:721px) {
  .hero:before {
    background-image:url('assets/hero.webp')
  }

}

@media(max-width:720px) {
  .hero-image {
    background-image:url('assets/hero.webp')
  }

}

.closing {
  background-image:linear-gradient(#46342655,#46342655),url('assets/footer.webp')
}


/* Финальный блок повторяет компактную композицию референса: текст и кнопка
остаются хорошо читаемыми поверх фотографии и не занимают весь экран. */
.closing {
  min-height:253px;
  padding:25px 20px 28px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center
}

.closing h2 {
  font-size:clamp(24px,2.5vw,30px);
  line-height:1.15;
  margin-bottom:7px
}

.closing p {
  font-size:11px;
  line-height:1.35;
  max-width:420px;
  margin:0 auto 14px
}

.closing .pill {
  font-size:10px;
  line-height:1;
  padding:10px 16px;
  gap:9px;
  min-height:36px
}


/* Масштаб элементов футера увеличен примерно на 20% по запросу. */
.closing h2 {
  font-size:clamp(29px,3vw,36px)
}

.closing p {
  font-size:13px
}

.closing .pill {
  font-size:12px;
  padding:12px 19px;
  min-height:43px
}

/* На мобильном экране фотография «Обо мне» скрыта, чтобы сразу показать текст. */
@media(max-width:720px) {
  .about-photo {
    display:none;
  }
}

/* После скрытия фотографии мобильная секция должна использовать всю ширину,
   а не оставлять текст в первой половине старой двухколоночной сетки. */
@media(max-width:720px) {
  .about {
    grid-template-columns:1fr;
    gap:20px;
    padding:24px 0 28px;
  }
  .about-copy {
    width:100%;
    order:1;
  }
  .quote-card {
    grid-column:auto;
    width:100%;
    order:3;
  }
  .story-panel {
    order:2;
  }
  .story-panel {
    padding:22px 18px 24px;
    margin-bottom:20px;
  }
}

/* Всплывающее окно с видео использует нативный dialog: он доступен с клавиатуры
   и автоматически блокирует фон страницы, пока окно открыто. */
.video-dialog {
  width:min(880px,calc(100% - 32px));
  max-width:none;
  padding:0;
  border:0;
  border-radius:16px;
  background:#fffaf4;
  color:var(--ink);
  box-shadow:0 24px 80px #34251e55;
}
.video-dialog::backdrop {
  background:#34251e99;
}
.video-dialog__content {
  position:relative;
  padding:28px;
}
.video-dialog h2 {
  margin:0 42px 18px 0;
  font-size:clamp(25px,3vw,38px);
}
.video-dialog__player {
  display:block;
  width:100%;
  max-height:70vh;
  border-radius:10px;
  background:#34251e;
}
.video-dialog__close {
  position:absolute;
  top:16px;
  right:18px;
  width:34px;
  height:34px;
  border:0;
  border-radius:50%;
  background:#e8d9c9;
  color:var(--ink);
  font-size:25px;
  line-height:1;
  cursor:pointer;
}
.video-dialog__close:hover {
  background:#d8c2ad;
}
@media(max-width:600px) {
  .video-dialog__content {
    padding:22px 16px 16px;
  }
}
