:root {
  --bg: #0b0c0d;
  --bg-soft: #101113;
  --fg: #f8f8f6;
  --muted: #d2d2cb;
  --accent: #d0b48c; /* тёплый бронзовый */
  --card: #141516;
  --border: #3a3b3e;
  --focus: #e7d4b5;
}
/* Utility */
.visually-hidden { position: absolute !important; left: -10000px !important; top: auto !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--fg);
  background: linear-gradient(180deg, #0a0b0c, #0c0d0f 50%);
}

h1, h2, h3, .logo {
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: 0.3px;
}

h1 { font-size: clamp(28px, 4vw, 56px); line-height: 1.05; margin: 0 0 16px; }
h2 { font-size: clamp(22px, 2.4vw, 36px); line-height: 1.15; margin: 0 0 12px; }

p { color: #e8e8e3; line-height: 1.8; }

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(12, 12, 12, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo {
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
  font-size: 22px;
}

.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: #f0f0ec; text-decoration: none; font-weight: 500; opacity: 0.9; }
.nav a:hover { color: var(--fg); opacity: 1; }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  color: #111;
  background: var(--accent);
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  font-weight: 600;
}

.button:hover { filter: brightness(1.05); }

.button--ghost {
  color: var(--fg);
  background: transparent;
  border-color: var(--border);
}

.button--ghost:hover { border-color: var(--accent); color: var(--fg); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  padding: clamp(48px, 8vw, 96px) 0;
}

.hero-content {
  background: rgba(0,0,0,0.46);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(16px, 3vw, 28px);
  backdrop-filter: blur(4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.hero-visual {
  border-radius: 20px;
  position: relative;
  min-height: 340px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
}

.hero-visual .hero-slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 20px;
  opacity: 0; transition: opacity 1.2s ease; will-change: opacity, transform;
}
.hero-visual .hero-slide.is-active { opacity: 1; animation: none; transform: none; }

.lead { font-size: 18px; margin: 12px 0 22px; color: #f2f2ef; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Sections */
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section--alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { margin-bottom: 22px; }

/* Toolbar */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 28px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters .filter {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.filters .filter.is-active, .filters .filter:hover { border-color: var(--accent); color: var(--fg); background: rgba(208,180,140,0.08); }

.view-controls { display: inline-flex; align-items: center; gap: 8px; }
.view-label { color: var(--muted); font-size: 14px; }
.view { background: transparent; color: var(--muted); border: 1px solid var(--border); padding: 8px 12px; border-radius: 999px; cursor: pointer; }
.view.is-active, .view:hover { border-color: var(--accent); color: var(--fg); }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.card {
  grid-column: span 4;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  content-visibility: auto;
  contain-intrinsic-size: 300px 420px;
}

.card.is-hidden { display: none !important; }

.card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.35); }

.card img { display: block; width: 100%; height: 280px; object-fit: cover; }
.img-blur { filter: blur(12px); transform: scale(1.02); }
.img-fade { opacity: 0; transition: opacity .35s ease, filter .35s ease, transform .35s ease; }
.img-fade.is-loaded { opacity: 1; filter: none; transform: none; }
.card figcaption { padding: 12px 14px; color: #ecece8; }
.card figcaption .title { color: var(--fg); font-weight: 700; margin-bottom: 6px; }
.card figcaption .meta { color: #d4d4ce; font-size: 13px; margin-bottom: 10px; }
.card figcaption .desc { color: #e6e6e1; font-size: 14px; margin: 0; opacity: 0.98; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Masonry view (без обрезки) — на колонках, без JS-расчётов */
.grid.masonry { 
  column-count: 3; 
  column-gap: 14px; 
  column-fill: balance;
}
.grid.masonry .card { 
  display: inline-block; 
  width: 100%; 
  break-inside: avoid; 
  -webkit-column-break-inside: avoid; 
  margin: 0 0 14px; 
}
.grid.masonry .card img { height: auto; object-fit: contain; aspect-ratio: auto; }
.grid.masonry .card figcaption { padding-top: 10px; }

/* About */
.about { display: grid; gap: 28px; grid-template-columns: 1fr 1.1fr; align-items: center; }
.about-media { position: relative; aspect-ratio: 16 / 11; min-height: 280px; border-radius: 16px; overflow: hidden; background: #0e0f10; border: 1px solid var(--border); }
.about-media .about-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.about-media .about-slide.is-active { opacity: 1; }

/* Form */
.form { display: grid; gap: 16px; }
.form-row { display: grid; gap: 8px; }
.form-row--inline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.form label { color: var(--fg); font-weight: 500; }
.form input, .form textarea {
  width: 100%;
  color: #f3f3f1;
  background: #111214;
  border: 1px solid #474a4f;
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}
.form input:focus, .form textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(231,212,181,0.22); }

.checkbox { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.checkbox input { width: 18px; height: 18px; }
.form-actions { display: flex; align-items: center; gap: 14px; }
.form-note { color: var(--muted); margin: 0; }
.error { color: #ff8686; font-size: 13px; min-height: 18px; }
#formStatus { display: block; margin-top: 6px; color: var(--accent); }

.actions { display: flex; gap: 12px; }
.actions--center { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: #0a0a0a; }
.footer-inner { display: grid; gap: 18px; grid-template-columns: 1fr auto auto; align-items: center; padding: 22px 0; }
.footer-contacts { display: flex; gap: 16px; }
.footer-contacts a { color: #e9e9e5; text-decoration: none; }
.footer-contacts a:hover { color: var(--fg); }
.footer-copy { color: var(--muted); font-size: 14px; text-align: right; }

/* GLightbox: только фото, без описания/подписи */
.gdesc, .gdesc-inner, .gslide-description { display: none !important; }
.gprev, .gnext, .gclose { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4)); }

/* Work detail gallery */
#workGallery { column-count: 3; column-gap: 14px; }
#workGallery a { display: inline-block; width: 100%; break-inside: avoid; -webkit-column-break-inside: avoid; margin: 0 0 14px; }
#workGallery img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--border); }

/* Lightbox image fit */
.glightbox-container .gslide-image img { max-width: 92vw !important; max-height: 86vh !important; width: auto; height: auto; }

@media (max-width: 980px) {
  #workGallery { column-count: 2; }
}
@media (max-width: 560px) {
  #workGallery { column-count: 1; }
}

/* Yandex Form embed */
.ya-form-embed { max-width: 760px; margin: 0 auto; }
.ya-form-embed iframe {
  min-height: 640px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff; /* светлый фон для читаемости */
}

@media (max-width: 520px) {
  .ya-form-embed iframe { min-height: 760px; }
}

/* Responsive */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-copy { text-align: center; }
}

@media (max-width: 980px) {
  .grid.masonry { column-count: 2; }
}
@media (max-width: 560px) {
  .grid.masonry { column-count: 1; }
}

@media (max-width: 780px) {
  .card { grid-column: span 6; }
}

@media (max-width: 520px) {
  .card { grid-column: span 12; }
}

