/* ==========================================================================
   КОКОШНИКЪ — свѣтлая тема съ древнерусской филигранью
   Палитра и типографика взяты изъ утверждённаго эскиза (mockup.html).
   ========================================================================== */

:root {
  --red: #C41E3A;
  --red-deep: #8B0000;
  --red-bright: #DC143C;
  --gold: #D4AF37;
  --gold-light: #F0D68A;
  --white: #FFF8F0;
  --cream: #FFF5E6;
  --pearl: #F8F4F0;
  --text-dark: #2A0A0A;
  --text-light: #5C1A1A;
  --head-h: 92px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Old Standard TT", serif;
  background: #FFFFFF;
  color: var(--text-dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

code {
  font-family: "Old Standard TT", monospace;
  background: var(--cream);
  padding: 0 .35em;
  border: 1px solid rgba(196, 30, 58, .25);
}

/* ===== СЛУЖЕБНОЕ ===== */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 60;
  background: var(--red);
  color: var(--white);
  font-family: "Forum", serif;
  padding: .6rem 1.2rem;
  text-decoration: none;
  transition: top .25s;
}

.skip-link:focus { top: 1rem; }

/* Поля honeypot не видны, но остаются въ DOM для ботовъ. */
.hp {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ===== ШАПКА ===== */
.header {
  position: sticky;
  top: 0;
  background: #FFFFFF;
  border-bottom: 3px solid var(--red);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  z-index: 30;
  transition: box-shadow .35s, padding .35s;
}

.header::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  opacity: .6;
  pointer-events: none;
}

/* Прилипанiе: безъ тѣни шапка сливаласьъ съ бѣлымъ hero'емъ. */
.site-head.is-stuck {
  padding-top: .55rem;
  padding-bottom: .55rem;
  box-shadow: 0 10px 30px rgba(139, 0, 0, .13);
}

.logo {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-width: 0;
}

.logo-ornament {
  width: 64px;
  height: 64px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-ornament img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* h1 сайта — на логотипѣ; класс .glitch оставленъ намеренно:
   тесты и прошлые правки ссылаются на него, а здѣсь онъ даётъ
   лишь двойной цвѣтовой сдвигъ при наведенiи, безъ «поломки» вёрстки. */
.logo h1,
.glitch {
  font-family: "Philosopher", "Old Standard TT", serif;
  font-size: 1.5rem;
  color: var(--red-deep);
  letter-spacing: .14em;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  transition: text-shadow .3s;
}

.logo h1:hover {
  text-shadow: 1.5px 0 rgba(212, 175, 55, .75), -1.5px 0 rgba(220, 20, 60, .45);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  font-family: "Forum", serif;
  font-size: 1.02rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.nav a {
  color: var(--text-dark);
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
  transition: color .3s;
  white-space: nowrap;
}

.nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  transition: width .4s;
}

.nav a:hover { color: var(--red); }
.nav a:hover::after { width: 100%; }

.nav__admin {
  font-size: .82em;
  opacity: .62;
  letter-spacing: .16em;
}

/* Бургеръ показывается только на узкихъ экранахъ. */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  background: none;
  border: 2px solid var(--red);
  cursor: pointer;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: var(--red);
  transition: transform .3s, opacity .3s;
}

.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: calc(100vh - var(--head-h));
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  overflow: hidden;
  padding: 3rem 2rem 4rem;
  text-align: center;
}

/* Кадры подъ бѣлымъ покровомъ: Ken Burns работаетъ, но свѣтъ не теряется. */
.hero__slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: var(--kb-x, 50%) var(--kb-y, 30%);
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.6s ease;
}

.hero__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--bg-wide, none);
  background-size: cover;
  background-position: var(--kb-x, 50%) var(--kb-y, 30%);
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero__slide.is-loaded::after { opacity: 1; }

.hero__slide.is-active {
  opacity: 1;
  animation: ken-burns var(--kb-dur, 9600ms) ease-in-out forwards;
}

@keyframes ken-burns {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(0, -1.2%, 0); }
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .93) 0%, rgba(255, 255, 255, .97) 55%, #FFFFFF 100%);
}

.hero__dust {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .55;
}

/* Декоративная рамка */
.hero-frame {
  position: absolute;
  inset: 2.5rem;
  pointer-events: none;
  z-index: 2;
}

/* Линiя рамки свѣтится сама по себѣ: opacity не наслѣдуется углами-орнаментами. */
.hero-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--red);
  animation: frame-glow 4s ease-in-out infinite;
}

@keyframes frame-glow {
  0%, 100% { opacity: .22; }
  50% { opacity: .38; }
}

.hero-frame .frame-corner {
  position: absolute;
  width: 118px;
  height: 118px;
}

.fc-tl { top: -10px; left: -10px; }
.fc-tr { top: -10px; right: -10px; transform: scaleX(-1); }
.fc-br { bottom: -10px; right: -10px; transform: scale(-1, -1); }
.fc-bl { bottom: -10px; left: -10px; transform: scaleY(-1); }

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 1000px;
  animation: fade-up 1.2s ease-out;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__kicker {
  font-family: "Forum", serif;
  font-size: 1rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.6rem;
}

/* ===== КОКОШНИКЪ — ИЛЛЮСТРАЦIЯ ===== */
.kokoshnik-wrapper {
  position: relative;
  width: 340px;
  height: 420px;
  margin: 0 auto 1.5rem;
}

.kokoshnik-svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 14px 30px rgba(139, 0, 0, .18));
}

.hero-quote {
  font-family: "Forum", serif;
  font-size: 1.4rem;
  font-style: italic;
  color: var(--text-light);
  margin: 0 auto 1.6rem;
  line-height: 1.7;
  position: relative;
  max-width: 760px;
  padding: 0 2rem;
}

.hero-quote::before,
.hero-quote::after {
  content: "❧";
  position: absolute;
  color: var(--gold);
  font-size: 1.2rem;
  opacity: .6;
}

.hero-quote::before { left: 0; top: -.2rem; }
.hero-quote::after { right: 0; bottom: -.2rem; }

.hero-subtitle {
  font-family: "Forum", serif;
  font-size: 1.12rem;
  color: var(--text-light);
  margin-bottom: 2.6rem;
  letter-spacing: .04em;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* ===== КНОПКА ===== */
.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  color: var(--white);
  font-family: "Forum", serif;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: 1.15rem 3.2rem;
  border: none;
  cursor: pointer;
  position: relative;
  transition: transform .3s, box-shadow .3s;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(139, 0, 0, .3);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(139, 0, 0, .5);
}

.cta-button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.cta-button::before,
.cta-button::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid var(--gold);
  transition: transform .3s;
}

.cta-button::before { top: -8px; left: -8px; border-right: none; border-bottom: none; }
.cta-button::after { bottom: -8px; right: -8px; border-left: none; border-top: none; }

.cta-button:hover::before,
.cta-button:hover::after { transform: scale(1.2); }

.cta-button:disabled {
  opacity: .6;
  cursor: progress;
  transform: none;
}

/* Точки слайдера и счётчикъ */
.hero__dots {
  display: flex;
  justify-content: center;
  gap: .7rem;
  margin-top: 2.2rem;
  min-height: 12px;
}

.hero__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid var(--red);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background .3s, transform .3s;
}

.hero__dot.is-active {
  background: var(--red);
  transform: scale(1.25);
}

.countdown {
  margin: 2.4rem auto 0;
  max-width: 560px;
}

.countdown__label {
  font-family: "Forum", serif;
  font-size: .92rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .9rem;
}

.countdown__units {
  display: flex;
  justify-content: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}

.countdown__units > div {
  min-width: 74px;
  padding: .6rem .4rem;
  border: 1px solid rgba(196, 30, 58, .3);
  background: rgba(255, 248, 240, .8);
}

.countdown__units b {
  display: block;
  font-family: "Philosopher", serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--red-deep);
  line-height: 1;
}

.countdown__units span {
  font-family: "Forum", serif;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-light);
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  z-index: 3;
  font-family: "Forum", serif;
  font-size: .82rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
  opacity: .75;
  animation: nudge 2.6s ease-in-out infinite;
}

@keyframes nudge {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 7px); }
}

/* ===== СЕКЦIИ ===== */
.section {
  padding: 6rem 2rem;
  position: relative;
}

.section--alt {
  background: linear-gradient(180deg, var(--cream) 0%, var(--white) 100%);
}

.section-head {
  text-align: center;
  margin-bottom: 3.4rem;
}

.title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
}

.title-orn {
  width: 34px;
  height: 34px;
  flex: none;
  opacity: .85;
  transition: transform .6s ease, opacity .6s ease;
}

.title-wrap:hover .title-orn {
  transform: rotate(45deg) scale(1.12);
  opacity: 1;
}

.section-title {
  font-family: "Philosopher", "Old Standard TT", serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: var(--red-deep);
  letter-spacing: .1em;
  margin-bottom: .8rem;
  position: relative;
  display: inline-block;
  font-weight: 700;
}

.section-title::after {
  content: "";
  display: block;
  width: 80%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: .8rem auto 0;
}

.section-lead {
  font-family: "Forum", serif;
  font-size: 1.12rem;
  color: var(--text-light);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.65;
}

.empty {
  text-align: center;
  font-family: "Forum", serif;
  font-size: 1.15rem;
  color: var(--text-light);
  border: 2px dashed rgba(196, 30, 58, .4);
  padding: 3rem 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}

/* ===== ФИЛЬТРЫ ===== */
.filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .8rem;
  margin: 0 auto 3rem;
}

.filters button {
  font-family: "Forum", serif;
  font-size: .95rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .6rem 1.5rem;
  background: transparent;
  color: var(--red-deep);
  border: 2px solid var(--red);
  cursor: pointer;
  transition: background .3s, color .3s;
}

.filters button:hover { background: rgba(196, 30, 58, .1); }

.filters button.is-active {
  background: var(--red);
  color: var(--white);
}

/* ===== ПОРТФОЛИО ===== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1300px;
  margin: 0 auto;
}

.portfolio-item {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--cream);
  border: 3px solid var(--red);
  overflow: hidden;
  cursor: pointer;
  transition: transform .5s, box-shadow .5s;
  box-shadow: 0 4px 15px rgba(139, 0, 0, .1);
}

.portfolio-item:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 16px 40px rgba(139, 0, 0, .25);
}

/* Золотая нутряная рамка — поверхъ кадра. */
.portfolio-item::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--gold);
  opacity: .4;
  pointer-events: none;
  z-index: 2;
  transition: opacity .3s;
}

.portfolio-item:hover::before { opacity: .85; }

.portfolio-item.is-hidden { display: none; }

.card__btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s ease, filter .5s ease;
}

.portfolio-item:hover .card__img {
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.03);
}

.card__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(139, 0, 0, 0) 45%, rgba(42, 10, 10, .55) 100%);
  opacity: 0;
  transition: opacity .4s;
}

.portfolio-item:hover .card__veil { opacity: 1; }

/* ===== УСЛУГИ ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  max-width: 1300px;
  margin: 0 auto;
}

.service-card {
  background: var(--pearl);
  border: 3px solid var(--red);
  padding: 2.5rem;
  position: relative;
  transition: transform .5s, box-shadow .5s;
  box-shadow: 0 6px 20px rgba(139, 0, 0, .08);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 14px 35px rgba(139, 0, 0, .2);
}

.service-card::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 1px solid var(--gold);
  opacity: .35;
  pointer-events: none;
  transition: opacity .3s;
}

.service-card:hover::before { opacity: .7; }

.service-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--white);
  box-shadow: 0 4px 12px rgba(139, 0, 0, .3);
}

.service-title {
  font-family: "Philosopher", "Old Standard TT", serif;
  font-size: 1.6rem;
  color: var(--red-deep);
  margin-bottom: 1rem;
  text-align: center;
  font-weight: 700;
}

.service-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 1.5rem;
  flex: 1;
}

.service-price {
  font-family: "Forum", serif;
  font-size: 1.4rem;
  color: var(--red);
  font-weight: 700;
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(196, 30, 58, .2);
}

.service-link {
  display: block;
  margin-top: 1.2rem;
  text-align: center;
  font-family: "Forum", serif;
  font-size: .95rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red-deep);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .3s, border-color .3s;
}

.service-link:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ===== ОБО МНѢ ===== */
.about-content {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: center;
}

.about-photo {
  aspect-ratio: 3 / 4;
  border: 4px solid var(--red);
  background: linear-gradient(135deg, var(--cream), var(--white));
  position: relative;
  box-shadow: 0 10px 30px rgba(139, 0, 0, .15);
  overflow: hidden;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-photo::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid var(--gold);
  opacity: .45;
  pointer-events: none;
}

.about-photo--empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-family: "Forum", serif;
  font-size: 1.2rem;
  letter-spacing: .2em;
  color: var(--text-light);
}

.about-orn { width: 74px; height: 74px; opacity: .7; }

.about-text p {
  font-size: 1.15rem;
  line-height: 1.9;
  margin-bottom: 1.2rem;
  color: var(--text-dark);
  text-align: justify;
}

.about-stats {
  display: flex;
  gap: 3rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid rgba(196, 30, 58, .15);
}

.stat {
  text-align: center;
  position: relative;
}

.stat::after {
  content: "✦";
  position: absolute;
  top: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: .8rem;
}

.stat-value {
  font-family: "Philosopher", "Old Standard TT", serif;
  font-size: 3rem;
  color: var(--red);
  line-height: 1;
  margin-bottom: .3rem;
  font-weight: 700;
}

.stat-label {
  font-family: "Forum", serif;
  font-size: .95rem;
  color: var(--text-light);
  letter-spacing: .05em;
}

/* ===== ОТЗЫВЫ ===== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
  max-width: 1300px;
  margin: 0 auto;
}

.review-card {
  background: var(--pearl);
  border: 3px solid var(--red);
  padding: 2.5rem;
  position: relative;
  font-style: italic;
  box-shadow: 0 6px 20px rgba(139, 0, 0, .08);
}

.review-card::before {
  content: "\201C";
  position: absolute;
  top: 10px;
  left: 15px;
  font-size: 4rem;
  color: var(--red);
  opacity: .2;
  font-family: serif;
  line-height: 1;
}

.review-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--gold);
  opacity: .35;
  pointer-events: none;
}

.review-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  padding-top: 2rem;
}

.review-author {
  font-family: "Forum", serif;
  font-style: normal;
  font-size: 1.1rem;
  color: var(--red-deep);
  text-align: right;
  font-weight: 700;
}

/* ===== КОНТАКТЫ ===== */
.contacts-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 4rem;
}

.contact-info {
  font-family: "Forum", serif;
  font-size: 1.15rem;
}

.contact-info ul { list-style: none; margin-bottom: 2.5rem; }

.contact-info li {
  margin-bottom: 1.2rem;
  padding-left: 2rem;
  position: relative;
  line-height: 1.5;
}

.contact-info li::before {
  content: "\2726";
  position: absolute;
  left: 0;
  color: var(--red);
  font-size: .9rem;
}

.contact-info a {
  color: var(--red-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(196, 30, 58, .35);
  transition: color .3s, border-color .3s;
}

.contact-info a:hover { color: var(--gold); border-bottom-color: var(--gold); }

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 2rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: "Forum", serif;
  font-size: 1.05rem;
  color: var(--red);
  text-decoration: none;
  padding: .6rem 1.2rem;
  border: 2px solid var(--red);
  transition: background .3s, color .3s;
}

.social-link:hover { background: var(--red); color: var(--white); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-title {
  font-family: "Philosopher", serif;
  font-size: 1.7rem;
  color: var(--red-deep);
  font-weight: 700;
}

.form-note {
  font-family: "Forum", serif;
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-top: -.4rem;
}

.contact-form input,
.contact-form textarea {
  font-family: "Old Standard TT", serif;
  font-size: 1.05rem;
  padding: 1rem 1.2rem;
  border: 2px solid var(--red);
  background: var(--white);
  color: var(--text-dark);
  outline: none;
  transition: border-color .3s, box-shadow .3s;
  border-radius: 0;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, .2);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form .is-invalid {
  border-color: var(--red-bright);
  box-shadow: 0 0 0 3px rgba(220, 20, 60, .16);
}

.contact-form button { align-self: flex-start; margin-top: .4rem; }

.form__status {
  font-family: "Forum", serif;
  font-size: 1.02rem;
  min-height: 1.4em;
  letter-spacing: .04em;
}

.form__status.is-ok { color: #1d6b3c; }
.form__status.is-error { color: var(--red-bright); }

/* ===== РАЗДЕЛИТЕЛИ ===== */
.divider {
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--red), var(--gold), var(--red), transparent);
  margin: 0;
  position: relative;
}

.divider-orn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 70vw);
  height: 40px;
  background: #FFFFFF;
  padding: 0 .5rem;
}

.section--alt + .divider .divider-orn { background: var(--cream); }

/* ===== ПОДВАЛЪ ===== */
.footer {
  background: linear-gradient(135deg, var(--red-deep) 0%, var(--red) 100%);
  color: var(--white);
  text-align: center;
  padding: 3rem 2rem;
  font-family: "Forum", serif;
  letter-spacing: .08em;
  position: relative;
  line-height: 1.8;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--red-bright), var(--gold));
}

.footer p { margin-bottom: .5rem; }

.footer a {
  color: var(--gold-light);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}

.footer a:hover { border-bottom-color: var(--gold-light); }

/* ===== ЛАЙТБОКСЪ ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  background: rgba(42, 10, 10, .93);
  animation: lb-in .3s ease-out;
}

.lightbox[hidden] { display: none; }

@keyframes lb-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox__figure {
  max-width: min(1100px, 92vw);
  text-align: center;
}

.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 82vh;
  margin: 0 auto;
  border: 3px solid var(--gold);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.lightbox figcaption {
  margin-top: 1rem;
  font-family: "Forum", serif;
  font-size: .95rem;
  letter-spacing: .12em;
  color: var(--gold-light);
  word-break: break-all;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: none;
  border: 2px solid var(--gold);
  color: var(--gold-light);
  cursor: pointer;
  font-family: "Forum", serif;
  line-height: 1;
  transition: background .3s, color .3s;
}

.lightbox__close:hover,
.lightbox__nav:hover { background: var(--gold); color: var(--text-dark); }

.lightbox__close {
  top: 1.4rem;
  right: 1.6rem;
  width: 52px;
  height: 52px;
  font-size: 1.9rem;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 84px;
  font-size: 2.4rem;
}

.lightbox__nav--prev { left: 1rem; }
.lightbox__nav--next { right: 1rem; }

/* ===== ВСПЛЫВАЮЩIЯ СООБЩЕНIЯ ===== */
.flashes {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  width: min(560px, 92vw);
}

.flash {
  font-family: "Forum", serif;
  font-size: 1.02rem;
  padding: 1rem 1.4rem;
  border: 2px solid var(--red);
  background: var(--white);
  color: var(--text-dark);
  box-shadow: 0 10px 30px rgba(139, 0, 0, .2);
}

.flash--success { border-color: #1d6b3c; }
.flash--error { border-color: var(--red-bright); }

/* ===== REVEAL ЊО СКРОЛЛУ ===== */
/* Безъ IntersectionObserver (или безъ JS) armed-элементы обязаны оставаться
   видимыми: скрытіе дѣлается только классомъ .is-armed, который навѣшиваетъ
   самъ скриптъ уже послѣ подключенія наблюдателя. */
.reveal.is-armed {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s ease, transform .8s ease;
}

.reveal.is-armed.is-visible {
  opacity: 1;
  transform: none;
}

/* ===== АДАПТИВЪ ===== */
@media (max-width: 980px) {
  .about-content,
  .contacts-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-photo { max-width: 420px; margin: 0 auto; }
}

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

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: #FFFFFF;
    border-bottom: 3px solid var(--red);
    box-shadow: 0 18px 40px rgba(139, 0, 0, .18);
    padding: 0 1.6rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease, padding .4s ease;
  }

  .nav.is-open {
    max-height: 70vh;
    padding: 1rem 1.6rem 1.6rem;
  }

  .nav a {
    width: 100%;
    padding: .85rem 0;
    border-bottom: 1px solid rgba(196, 30, 58, .16);
  }

  .nav a::after { display: none; }
}

@media (max-width: 768px) {
  .header {
    padding: .8rem 1rem;
    gap: .8rem;
  }

  .logo-ornament { width: 46px; height: 46px; }

  .logo h1,
  .glitch {
    font-size: 1.05rem;
    letter-spacing: .1em;
  }

  .section { padding: 4rem 1.2rem; }

  .hero { padding: 2rem 1.2rem 3.5rem; }

  .hero-frame { inset: 1rem; }
  .hero-frame .frame-corner { width: 72px; height: 72px; }

  .kokoshnik-wrapper { width: 240px; height: 300px; }

  .hero-quote { font-size: 1.15rem; padding: 0 1.4rem; }

  .cta-button {
    font-size: 1rem;
    padding: 1rem 2rem;
    letter-spacing: .12em;
  }

  .portfolio-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2rem; }

  .countdown__units { gap: .8rem; }
  .countdown__units > div { min-width: 62px; }
  .countdown__units b { font-size: 1.5rem; }

  .about-stats { gap: 1.8rem; }
}

@media (max-width: 480px) {
  .services-grid,
  .reviews-grid { grid-template-columns: 1fr; }

  .about-stats { flex-direction: column; gap: 1.5rem; }

  .title-orn { width: 22px; height: 22px; }
  .title-wrap { gap: .7rem; }

  .lightbox__nav { width: 42px; height: 64px; font-size: 1.8rem; }
}

/* ===== ПОКОЙ ДЛЯ ТѢХЪ, КТО ПРОТИВЪ АНИМАЦIЙ ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .reveal.is-armed { opacity: 1; transform: none; }
}