:root {
  --bg: #f6f2ea;
  --bg-soft: #ede7db;
  --panel: #fbf8f2;
  --line: rgba(20, 18, 16, 0.14);
  --text: #141210;
  --muted: #5b5449;
  --accent: #9a7b4f;
  --accent-dark: #7d6338;
  --accent-soft: rgba(154, 123, 79, 0.1);
  --font-serif: "Prata", Georgia, "Times New Roman", serif;
  --font-sans: "Jost", "Segoe UI", Arial, sans-serif;
  --max: 1200px;
  --pad: clamp(20px, 5vw, 48px);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

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

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: transparent;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: rgba(246, 242, 234, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 80px;
}
.brand {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}
.brand span { color: var(--accent); }
.brand--footer { font-size: 1.05rem; }

.nav { display: flex; gap: 38px; }
.nav a {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  position: relative;
  transition: color 0.25s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { width: 100%; }

.header__actions { display: flex; align-items: center; gap: 18px; }
.header__tg {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  transition: color 0.25s;
}
.header__tg:hover { color: var(--accent); }

.header__cta {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 12px 26px;
  background: var(--text);
  color: var(--bg);
  transition: background 0.3s;
}
.header__cta:hover { background: var(--accent); }

.burger { display: none; background: none; border: none; }
.burger span {
  display: block;
  width: 24px; height: 1.5px;
  background: var(--text);
  margin: 5px 0;
}

/* ---------- Shared ---------- */
.overline {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  color: var(--accent);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.overline::before {
  content: "";
  width: 44px;
  height: 1px;
  background: var(--accent);
  flex: 0 0 auto;
}
.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  line-height: 1.12;
  margin-bottom: 26px;
}
.section-lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 62ch;
  margin-bottom: 48px;
}

/* ---------- Hero ---------- */
.hero { padding: 160px 0 100px; min-height: 100vh; display: flex; align-items: center; }
.hero__inner {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: clamp(48px, 8vw, 120px);
  align-items: center;
}
.hero__content { padding-left: clamp(4px, 1.5vw, 20px); }
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.9rem);
  line-height: 1.12;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin-bottom: 26px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.hero__lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 48ch;
  margin-bottom: 40px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 16px 34px;
  transition: all 0.3s;
}
.btn--solid { background: var(--text); color: var(--bg); }
.btn--solid:hover { background: var(--accent); }
.btn--ghost { border: 1px solid var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.photo-frame { position: relative; margin: 0; }
.photo-frame::before {
  content: "";
  position: absolute;
  inset: 24px -24px -24px 24px;
  border: 1px solid var(--accent);
  opacity: 0.55;
  z-index: 0;
}
.photo-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  max-height: 54vh;
  object-fit: cover;
}

/* Защита изображений от сохранения */
.photo-frame img,
.card img,
.lightbox__frame img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

/* ---------- Services ---------- */
.services { background: var(--bg-soft); padding: 110px 0; border-top: 1px solid var(--line); }
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service { background: var(--bg-soft); padding: 42px 38px; transition: background 0.3s; }
.service:hover { background: var(--panel); }
.service__num {
  font-family: var(--font-serif);
  color: var(--accent);
  font-size: 1rem;
  letter-spacing: 0.12em;
}
.service h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 16px 0 14px;
}
.service p { color: var(--muted); font-size: 0.97rem; }
.services__note {
  margin-top: 30px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  text-align: center;
}
.services__cta { margin-top: 46px; text-align: center; }

/* ---------- Portfolio ---------- */
.portfolio { padding: 110px 0; }
.portfolio__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}
.portfolio__head .section-title { margin-bottom: 0; }
.tabs { display: flex; gap: 30px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tab {
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 12px 2px;
  margin-bottom: -1px;
  transition: all 0.25s;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 26px;
}
.grid.is-hidden { display: none; }
.card { position: relative; margin: 0; cursor: zoom-in; overflow: hidden; }
.card__img { overflow: hidden; background: var(--bg-soft); }
.card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.card::after {
  content: "+";
  position: absolute;
  top: 14px; right: 14px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
  color: var(--bg);
  background: var(--text);
  opacity: 0;
  transform: translateY(-6px);
  transition: all 0.3s;
}
.card:hover img { transform: scale(1.04); }
.card:hover::after { opacity: 1; transform: translateY(0); }
.card figcaption {
  padding: 16px 2px 2px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.card figcaption.is-plain {
  text-transform: none;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

/* ---------- FAQ ---------- */
.faq { background: var(--bg-soft); padding: 110px 0; border-top: 1px solid var(--line); }
.faq__list { max-width: 860px; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 26px 8px;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  transition: color 0.25s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--accent);
  transition: transform 0.3s;
}
.faq__item[open] summary { color: var(--accent); }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item:hover summary { color: var(--accent); }
.faq__body { padding: 0 8px 28px; }
.faq__body p { color: var(--muted); max-width: 72ch; }

/* ---------- Contacts ---------- */
.contacts { padding: 110px 0; }
.contacts__lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 54ch;
  margin-bottom: 44px;
}
.contacts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.contact {
  background: var(--panel);
  padding: 38px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background 0.3s;
}
.contact:hover { background: var(--bg-soft); }
.contact__label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--accent);
}
.contact__value {
  font-size: 1.05rem;
  word-break: break-word;
  transition: color 0.3s;
}
.contact:hover .contact__value { color: var(--accent); }

/* ---------- Footer ---------- */
.footer { padding: 36px 0; border-top: 1px solid var(--line); background: var(--bg-soft); }
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer p { color: var(--muted); font-size: 0.85rem; }
.footer__socials { display: flex; gap: 22px; }
.footer__socials a {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  transition: color 0.25s;
}
.footer__socials a:hover { color: var(--accent); }

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.footer__legal a {
  font-size: 0.78rem;
  color: var(--muted);
  transition: color 0.25s;
}
.footer__legal a:hover { color: var(--accent); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(246, 242, 234, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vw;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__frame { max-width: 92vw; max-height: 88vh; margin: 0; }
.lightbox__frame img {
  max-width: 100%;
  max-height: 78vh;
  margin: 0 auto;
  border: 1px solid var(--line);
  transition: filter 0.3s;
}
.lightbox__frame img.is-blurred { filter: blur(16px); }
.lightbox__note {
  display: none;
  margin-top: 14px;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.lightbox__note.is-visible { display: block; }
.lightbox__frame figcaption {
  text-align: center;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.lightbox__close {
  position: absolute;
  top: 24px; right: 28px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2.4rem;
  line-height: 1;
  transition: color 0.25s, transform 0.25s;
}
.lightbox__close:hover { color: var(--accent); transform: rotate(90deg); }

/* ---------- Legal pages ---------- */
.legal { padding: 160px 0 80px; min-height: 70vh; }
.legal h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin: 8px 0 10px;
}
.legal__stamp {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 7px 14px;
  margin-bottom: 28px;
}
.legal h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.25rem;
  margin: 34px 0 12px;
  color: var(--text);
}
.legal p { color: var(--muted); margin-bottom: 12px; max-width: 76ch; }
.legal a { color: var(--accent); }
.legal a:hover { text-decoration: underline; }
.legal__back {
  display: inline-block;
  margin-bottom: 30px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.legal__back:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__content { padding-left: 0; }
  .hero { min-height: auto; padding-top: 140px; }
  .photo-frame img { max-height: 50vh; }
  .services__grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .contacts__grid { grid-template-columns: 1fr; }
  .nav {
    position: fixed;
    inset: 80px 0 auto 0;
    background: rgba(246, 242, 234, 0.98);
    flex-direction: column;
    gap: 0;
    padding: 20px var(--pad) 28px;
    transform: translateY(-130%);
    transition: transform 0.35s;
  }
  .nav.is-open { transform: translateY(0); }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .burger { display: block; }
  .header__cta { display: none; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .card img { height: 240px; }
  .footer__inner { justify-content: center; text-align: center; }
}
