:root {
  --ink: #2a211c;
  --ink-deep: #1c1612;
  --night: #3a2c24;
  --canal: #8a4b32;
  --gold: #a56b2a;
  --gold-bright: #c9843a;
  --gold-soft: rgba(165, 107, 42, 0.45);
  --ember: #9c4030;
  --dome-green: #4f6b45;
  --sky: #6d5a78;
  --mist: #e7d7c4;
  --paper: #e7dccb;
  --paper-deep: #ddd0bc;
  --card: #f3eadc;
  --text: #2a211c;
  --muted: #6a584c;
  --line: rgba(90, 62, 40, 0.18);
  --font-display: "Cormorant Infant", "Times New Roman", serif;
  --font-body: Georgia, "Times New Roman", serif;
  --shadow: 0 18px 40px rgba(58, 44, 36, 0.12);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--text);
  background: #e7dccb;
  line-height: 1.7;
}

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

a {
  color: var(--canal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover { color: var(--ink); }

.shell {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.shell.narrow { width: min(760px, calc(100% - 2.5rem)); }

.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link:focus {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 40;
  padding: 0.6rem 1rem;
  background: var(--gold-bright);
  color: var(--ink-deep);
  text-decoration: none;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #3a2c24;
  border-bottom: 4px solid #c9843a;
}

.top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
}

.brand,
.brand:hover,
.brand:hover strong,
.brand:hover em {
  color: #f6efe4;
  text-decoration: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand__mark {
  width: 0.95rem;
  height: 0.95rem;
  background: #c9843a;
  box-shadow: 8px 0 0 #9c4030;
}

.brand__text { display: grid; gap: 0.1rem; }

.brand__text strong {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
}

.brand__text em {
  font-style: normal;
  color: #e7d7c4;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

.top__side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem 1.6rem;
}

.contacts {
  display: grid;
  justify-items: end;
  gap: 0.1rem;
}

.contacts__phone,
.contacts__phone:hover {
  color: #f6efe4;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.45rem;
  white-space: nowrap;
}

.contacts__phone:hover { color: #f0c27a; }

.contacts__addr {
  margin: 0;
  color: #e7d7c4;
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  align-items: center;
}

.nav a {
  color: #f6efe4;
  text-decoration: none;
  font-size: 1.15rem;
}

.nav a[aria-current="page"],
.nav a:hover { color: #f0c27a; }

.nav__cta {
  padding: 0.4rem 0.9rem;
  border: 1px solid #c9843a;
  color: #f0c27a !important;
}

.hero {
  padding: 3.6rem 0 2.8rem;
  background:
    linear-gradient(180deg, rgba(58, 44, 36, 0.18), rgba(58, 44, 36, 0.05)),
    #d9c7ae;
  color: var(--ink);
}

.hero--plain,
.hero--service { padding-bottom: 2.2rem; }

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.2rem;
  align-items: center;
  perspective: 1200px;
}

.hero__copy h1,
.hero--plain h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.8rem, 5vw, 4.4rem);
  line-height: 1.05;
  margin: 0.35rem 0 1rem;
  color: #2a211c;
}

.eyebrow {
  margin: 0;
  color: var(--ember);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.lede {
  font-size: 1.45rem;
  line-height: 1.55;
  color: #3d322b;
  max-width: 40rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.hero__figure {
  margin: 0;
  border-radius: 1.25rem;
  overflow: hidden;
  transform: rotateY(-7deg) rotateX(4deg);
  transform-style: preserve-3d;
  box-shadow:
    22px 26px 0 rgba(201, 132, 58, 0.28),
    0 28px 48px rgba(58, 44, 36, 0.18);
  background: #c9aa84;
}

.hero__figure img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  aspect-ratio: 16 / 11;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  font: inherit;
  font-size: 1.15rem;
  cursor: pointer;
}

.btn--gold {
  background: #9c4030;
  color: #f8f1e7;
}

.btn--gold:hover { color: #fff; filter: brightness(1.06); }

.btn--ghost {
  border-color: #8a4b32;
  color: #3a2c24;
  background: transparent;
}

.btn--ghost:hover { color: #9c4030; }

.section { padding: 3.2rem 0; }

.section--paper {
  background: #efe4d4;
  border-block: 1px solid var(--line);
}

.section h2 {
  font-family: var(--font-display);
  font-size: 2.6rem;
  margin: 0 0 1rem;
  color: var(--ink);
  line-height: 1.1;
}

.section__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.card {
  display: block;
  padding: 1.5rem 1.35rem 1.6rem;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.card--kupola { box-shadow: inset 0 7px 0 #9c4030, var(--shadow); }
.card--krovlya { box-shadow: inset 0 7px 0 #4f6b45, var(--shadow); }
.card--fasady { box-shadow: inset 0 7px 0 #8a4b32, var(--shadow); }

.card h3 {
  font-family: var(--font-display);
  margin: 0.3rem 0 0.55rem;
  font-size: 2rem;
  line-height: 1.1;
  color: var(--ink);
}

.card--kupola h3 { color: #9c4030; }
.card--krovlya h3 { color: #3f5a38; }
.card--fasady h3 { color: #8a4b32; }

.card p {
  margin: 0;
  font-size: 1.15rem;
  color: var(--muted);
}

.card:hover { transform: translateY(-2px); }

.work-list { display: grid; gap: 1rem; }

.work {
  padding: 1.4rem 1.5rem;
  background: var(--card);
  border-radius: 14px;
}

.work h3 {
  font-family: var(--font-display);
  margin: 0.25rem 0 0.5rem;
  font-size: 1.9rem;
}

.muted { color: var(--muted); }

.points { margin: 1.2rem 0 0; padding-left: 1.2rem; }
.points li { margin: 0.35rem 0; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.filters a {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.15rem;
  border-bottom: 2px solid transparent;
}

.filters a[aria-current="page"],
.filters a:hover {
  color: var(--ember);
  border-bottom-color: var(--ember);
}

.form { display: grid; gap: 1.1rem; position: relative; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form label { display: grid; gap: 0.4rem; }

.form .consent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 1.05rem;
  line-height: 1.4;
}

.form .consent input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  flex: none;
}

.form span { font-size: 1.1rem; color: var(--night); }

.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(90, 62, 40, 0.25);
  border-radius: 8px;
  background: #f6f0e6;
  font: inherit;
  color: var(--text);
}

.form textarea { resize: vertical; }

.flash { padding: 0.9rem 1rem; border-radius: 8px; }
.flash--ok { background: #e3ead8; }
.flash--err { background: #f3d7cf; }

.footer {
  margin-top: 2rem;
  padding: 2.4rem 0 3rem;
  background: #3a2c24;
  color: #f0e4d4;
  font-size: 1.15rem;
}

.envelope {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.35rem 0.95rem 1.15rem;
  border-radius: 999px;
  background: #9c4030;
  color: #fff8ef;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  box-shadow:
    0 1px 0 rgba(255, 244, 230, 0.35) inset,
    0 8px 0 #6e2b1f,
    0 16px 24px rgba(58, 44, 36, 0.28);
  transform: translateY(0);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.envelope:hover,
.envelope:focus-visible {
  color: #fff8ef;
  background: #b04a36;
}

.envelope:active {
  color: #fff8ef;
  transform: translateY(6px);
  box-shadow:
    0 1px 0 rgba(255, 244, 230, 0.2) inset,
    0 2px 0 #6e2b1f,
    0 6px 10px rgba(58, 44, 36, 0.22);
}

.envelope svg {
  width: 2rem;
  height: 2rem;
  flex: none;
}

.footer__motto {
  margin: 0.15rem 0 0.35rem;
  color: #fff8ef;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 600;
  line-height: 1.15;
  text-shadow:
    0 1px 0 rgba(255, 244, 230, 0.45),
    0 3px 0 #6e2b1f,
    0 8px 16px rgba(0, 0, 0, 0.35);
}

.footer a { color: #f0c27a; }

.footer__quiet {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
}

.footer__quiet a,
.footer__quiet a:hover {
  color: rgba(240, 228, 212, 0.38);
  text-decoration: none;
}

.footer__inner { display: grid; gap: 0.7rem; }

.prose p { font-size: 1.28rem; }

.choices,
.chapters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.choice,
.chapter {
  padding: 1.35rem 1.4rem 1.45rem;
  background: var(--card);
  border-radius: 14px;
}

.choice h3,
.chapter h3 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  margin: 0.15rem 0 0.55rem;
  line-height: 1.1;
}

.choice p,
.chapter p { margin: 0 0 0.75rem; }

.chapter__index {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: var(--ember);
}

.chapter:nth-child(7) { grid-column: 1 / -1; }

.section__cta { margin: 1.6rem 0 0; }
.section--tight { padding-top: 0; }

@media (max-width: 860px) {
  body { font-size: 1.12rem; }
  .top__inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.8rem;
    padding: 0.55rem 0;
  }
  .top__side { display: contents; }
  .brand { order: 1; min-width: 0; }
  .brand__text em { display: none; }
  .brand__text strong { font-size: 1.35rem; }
  .contacts { order: 2; justify-items: end; margin-left: auto; }
  .contacts__addr { display: none; }
  .contacts__phone { font-size: 1.05rem; }
  .nav-toggle {
    order: 3;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border: 1px solid #c9843a;
    border-radius: 999px;
    background: transparent;
    color: #f6efe4;
    font: inherit;
    font-size: 1rem;
  }
  .nav {
    display: none;
    order: 4;
    width: 100%;
    padding: 0.15rem 0 0.45rem;
    gap: 0.55rem 0.9rem;
  }
  .top.is-open .nav { display: flex; }
  .envelope {
    gap: 0.56rem;
    padding: 0.76rem 1.08rem 0.76rem 0.92rem;
    font-size: 1.48rem;
    box-shadow:
      0 1px 0 rgba(255, 244, 230, 0.35) inset,
      0 6.4px 0 #6e2b1f,
      0 12.8px 19.2px rgba(58, 44, 36, 0.28);
  }
  .envelope:active {
    transform: translateY(4.8px);
    box-shadow:
      0 1px 0 rgba(255, 244, 230, 0.2) inset,
      0 1.6px 0 #6e2b1f,
      0 4.8px 8px rgba(58, 44, 36, 0.22);
  }
  .envelope svg {
    width: 1.6rem;
    height: 1.6rem;
  }
  .hero__grid,
  .cards,
  .choices,
  .chapters { grid-template-columns: 1fr; }
  .chapter:nth-child(7) { grid-column: auto; }
  .hero__figure { transform: none; }
}
