/* ==========================================================================
   AYB Craft — основной стиль сайта
   ========================================================================== */
:root {
  /* Красно-белая гамма */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f8f1f1;
  --ink: #1f1416;
  --ink-2: #3d2b2e;
  --muted: #7a6266;
  --line: #efdfe0;
  --accent: #c8102e;
  --accent-dark: #9e0c23;
  --accent-soft: #fdecee;
  --accent-rgb: 200, 16, 46;
  --dark: #9b1126;      /* тёмно-красный: первый экран, призыв к действию */
  --dark-2: #6f0b1b;    /* подвал */
  --on-dark: #ffd9de;   /* светлый акцент на красном фоне */
  --danger: #b4231b;
  --success: #2f7a4a;
  --star: #c8102e;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(31, 20, 22, .04), 0 8px 24px rgba(31, 20, 22, .06);
  --shadow-lg: 0 20px 50px rgba(31, 20, 22, .14);
  --font-head: "Playfair Display", "Noto Serif Armenian", Georgia, serif;
  --font-body: "Manrope", "Noto Sans Armenian", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

.section { padding: 96px 0; }
.section-tight { padding: 48px 0 96px; }
@media (max-width: 760px) { .section { padding: 64px 0; } .section-tight { padding: 32px 0 64px; } }

.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.eyebrow::before { content: ""; display: inline-block; width: 28px; height: 1px; background: currentColor; vertical-align: middle; margin-right: 10px; }
.eyebrow-light { color: var(--on-dark); }
.lead { font-size: 1.15rem; color: var(--ink-2); }
.section-head { max-width: 640px; margin-bottom: 48px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); box-shadow: 0 8px 20px rgba(var(--accent-rgb), .3); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-ghost-light { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s, background .2s;
}
.site-header.scrolled { border-color: var(--line); background: rgba(255, 255, 255, .96); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }

.logo { display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.logo-mark { font-family: var(--font-head); font-weight: 700; font-size: 1.55rem; letter-spacing: .02em; }
.logo-word { font-size: .72rem; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: var(--accent); }
.logo-light { color: #fff; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav > a, .nav-drop > a {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: 999px; text-decoration: none;
  font-weight: 500; font-size: .93rem; color: var(--ink-2); transition: color .2s, background .2s;
}
.main-nav > a:hover, .nav-drop > a:hover { color: var(--ink); background: rgba(31, 20, 22, .05); }
.main-nav a.active { color: var(--ink); font-weight: 700; }
.main-nav .nav-cta { color: #fff; margin-left: 8px; padding: 10px 18px; }
.main-nav .nav-cta:hover { color: #fff; background: var(--accent-dark); }
.chev { width: 12px; height: 12px; }

.nav-drop { position: relative; }
.nav-drop-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .18s;
}
.nav-drop-menu::before { content: ""; position: absolute; inset: -10px 0 auto; height: 10px; }
.nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu { opacity: 1; visibility: visible; transform: none; }
.nav-drop-menu a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; font-size: .93rem; }
.nav-drop-menu a:hover { background: var(--accent-soft); }

.header-tools { display: flex; align-items: center; gap: 12px; }
.lang-switch { display: flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.lang-switch a { padding: 5px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; text-decoration: none; color: var(--muted); }
.lang-switch a.on { background: var(--ink); color: #fff; }
.lang-switch a:not(.on):hover { color: var(--ink); }

.nav-toggle { display: none; width: 42px; height: 42px; border: 0; background: transparent; cursor: pointer; padding: 10px; border-radius: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; margin: 5px 0; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav a { white-space: nowrap; }
@media (max-width: 1200px) {
  .nav-toggle { display: block; }
  .header-tools { margin-left: auto; }
  .main-nav {
    /* шапка с backdrop-filter становится контейнером для fixed — поэтому высота задаётся явно */
    position: fixed; top: var(--header-h); left: 0; right: 0; height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h));
    flex-direction: column; align-items: stretch; gap: 2px; margin: 0;
    background: var(--bg); padding: 16px 16px 32px; overflow-y: auto;
    opacity: 0; transform: translateY(-8px); visibility: hidden;
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
  }
  .main-nav.open { opacity: 1; transform: none; visibility: visible; }
  .main-nav > a, .nav-drop > a { padding: 14px 12px; font-size: 1.05rem; border-radius: 10px; }
  .nav-drop-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 16px; }
  .nav-drop-menu::before { display: none; }
  .chev { display: none; }
  .main-nav .nav-cta { margin: 12px 0 0; padding: 14px; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--dark); color: #fff; overflow: hidden; }
.hero-grid-bg {
  position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  mask-image: radial-gradient(ellipse at 70% 50%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 50%, #000 30%, transparent 80%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 96px; padding-bottom: 110px; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 4.4vw, 3.6rem); margin-bottom: 20px; }
.hero-text { font-size: 1.15rem; color: rgba(255, 255, 255, .72); max-width: 560px; margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-art { display: flex; justify-content: center; }
.blueprint { width: 100%; max-width: 480px; }
.blueprint .bp-main { fill: none; stroke: #ffffff; stroke-width: 2; stroke-linejoin: round; }
.blueprint .bp-thin { fill: none; stroke: rgba(255, 255, 255, .45); stroke-width: 1.2; }
.blueprint .bp-fill { fill: rgba(255, 255, 255, .08); stroke: rgba(255, 255, 255, .75); stroke-width: 1.4; }
.blueprint .bp-accent { fill: rgba(255, 255, 255, .22); stroke: var(--on-dark); stroke-width: 1.6; }
.blueprint .bp-accent-dot { fill: var(--on-dark); }
.blueprint .bp-hatch line { stroke: rgba(255, 255, 255, .3); stroke-width: 1; }
.blueprint .bp-dim line { stroke: var(--on-dark); stroke-width: 1; }
.blueprint .bp-dim text, .blueprint .bp-label { fill: var(--on-dark); font-family: var(--font-body); font-size: 11px; letter-spacing: .12em; }
.blueprint .bp-main, .blueprint .bp-thin, .blueprint .bp-fill, .blueprint .bp-accent { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.4s ease forwards; }
.blueprint .bp-thin, .blueprint .bp-fill { animation-delay: .5s; }
.blueprint .bp-accent { animation-delay: .9s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .blueprint * { animation: none !important; stroke-dashoffset: 0 !important; }
  html { scroll-behavior: auto; }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 64px; gap: 24px; }
  .hero-art { order: -1; }
  .blueprint { max-width: 300px; }
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: center; }
.stats { display: grid; gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; display: flex; align-items: baseline; gap: 16px; }
.stat strong { font-family: var(--font-head); font-size: 2.6rem; line-height: 1; color: var(--accent); min-width: 110px; }
.stat span { color: var(--muted); font-weight: 500; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Services ---------- */
.services { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service-card { padding: 32px 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .25s, box-shadow .25s, border-color .25s; }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.svc-icon { width: 44px; height: 44px; color: var(--accent); margin-bottom: 22px; }
.service-card p { color: var(--muted); margin: 0; font-size: .95rem; }
@media (max-width: 1000px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .service-grid { grid-template-columns: 1fr; } }

/* ---------- Process ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; }
.step { padding: 28px 28px 8px 0; border-top: 2px solid var(--line); position: relative; }
.step::before { content: ""; position: absolute; top: -2px; left: 0; width: 48px; height: 2px; background: var(--accent); }
.step-num { font-family: var(--font-head); font-size: 1rem; color: var(--accent); display: block; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); gap: 0 24px; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.cta-band { background: var(--dark); color: #fff; padding: 72px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: rgba(255, 255, 255, .7); margin: 0; }

/* ---------- Page head ---------- */
.page-head { padding: 72px 0 24px; }
.page-head h1 { margin-bottom: 12px; }
.page-head p { color: var(--muted); font-size: 1.1rem; max-width: 640px; }
.back-link { display: inline-block; margin-bottom: 18px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; }
.back-link:hover { color: var(--accent); }
.page-404 { text-align: center; padding: 140px 0; }
.page-404 h1 { font-size: 6rem; color: var(--accent); }
.page-404 p { margin: 0 auto 24px; }
@media (max-width: 600px) { .page-head { padding: 44px 0 12px; } }

.subnav { display: inline-flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 999px; margin-top: 12px; flex-wrap: wrap; }
.subnav a { padding: 8px 18px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--muted); }
.subnav a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- Placeholders ---------- */
.ph { position: relative; color: rgba(255, 255, 255, .75); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ph-1 { background: linear-gradient(135deg, #8b6a4c, #c9a37d); }
.ph-2 { background: linear-gradient(135deg, #2c3a40, #5c7480); }
.ph-3 { background: linear-gradient(135deg, #5e5348, #a89580); }
.ph-4 { background: linear-gradient(135deg, #3e3a34, #7d6a55); }
.ph::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 22px 22px;
}
.ph-blueprint { background: linear-gradient(135deg, #1f3b52, #3b6584); }
.ph svg { position: relative; z-index: 1; width: 60%; max-width: 220px; }
.ph-num { position: relative; z-index: 1; font-family: var(--font-head); font-size: 3.4rem; opacity: .55; }

/* ---------- Project directions ---------- */
.dir-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.dir-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; text-decoration: none; transition: transform .25s, box-shadow .25s; }
.dir-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.dir-visual { aspect-ratio: 16 / 9; }
.dir-body { padding: 28px 30px 32px; }
.dir-body p { color: var(--muted); }
.dir-count { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.link-arrow { font-weight: 700; color: var(--accent); }
@media (max-width: 760px) { .dir-grid { grid-template-columns: 1fr; } }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project-card { display: block; width: 100%; padding: 0; text-align: left; font: inherit; color: inherit; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform .25s, box-shadow .25s; }
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.project-card.has-gallery { cursor: zoom-in; }
.project-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.project-media { position: relative; display: block; overflow: hidden; }
.project-media .project-img { transition: transform .5s ease; }
.project-card:hover .project-media .project-img { transform: scale(1.04); }
.project-img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; display: block; }
.project-img.ph { display: flex; }
.photo-count { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 5px; background: rgba(20, 18, 16, .7); color: #fff; font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(4px); }
.photo-count svg { width: 15px; height: 15px; }
.project-body { display: block; padding: 18px 22px 20px; }
.project-title { display: block; font-family: var(--font-head); font-weight: 600; font-size: 1.12rem; line-height: 1.3; margin-bottom: 4px; }
.project-meta { display: block; color: var(--muted); font-size: .9rem; }
.project-empty { grid-column: 1 / -1; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(14, 13, 11, .94); display: flex; flex-direction: column; opacity: 0; transition: opacity .2s; }
.lightbox.open { opacity: 1; }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; color: #fff; }
.lb-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-count { color: rgba(255, 255, 255, .6); font-size: .9rem; margin-left: 10px; font-weight: 500; }
.lb-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; padding: 0 64px 24px; min-height: 0; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; user-select: none; }
.lb-btn { width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; transition: background .2s; }
.lb-btn:hover { background: rgba(255, 255, 255, .25); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-single .lb-prev, .lb-single .lb-next, .lb-single .lb-count { display: none; }
@media (max-width: 600px) {
  .lb-stage { padding: 0 8px 70px; }
  .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; }
  .lb-prev { left: calc(50% - 56px); }
  .lb-next { right: calc(50% - 56px); }
}
.insta-more { text-align: center; margin-top: 48px; }
@media (max-width: 960px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .project-grid { grid-template-columns: 1fr; } }

/* ---------- Contacts ---------- */
.contacts-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; }
.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-card { display: flex; gap: 16px; align-items: center; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .2s, box-shadow .2s; min-width: 0; }
a.contact-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.contact-card small { display: block; color: var(--muted); font-size: .8rem; font-weight: 600; }
.contact-card strong { display: block; font-size: 1rem; overflow-wrap: anywhere; }
.c-icon { flex: 0 0 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-dark); display: grid; place-items: center; }
.c-icon svg { width: 22px; height: 22px; }
.contact-side { display: grid; gap: 16px; }
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; background: var(--surface-2); }
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.mini-cta { background: var(--dark); color: #fff; border-radius: var(--radius); padding: 28px; }
.mini-cta h3 { color: #fff; }
.mini-cta p { color: rgba(255, 255, 255, .7); }
@media (max-width: 960px) { .contacts-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .contact-cards { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); }
.form-card h3 { margin-bottom: 18px; }
.form-note { color: var(--muted); margin: -10px 0 18px; font-size: .92rem; }
.field { margin-bottom: 18px; }
.field label, .field .label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 7px; }
.req { color: var(--accent); }
input[type="text"], input[type="tel"], input[type="email"], input[type="search"], input[type="number"], input[type="date"], input[type="password"], textarea, select {
  width: 100%; padding: 13px 15px; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s, background .2s; -webkit-appearance: none; appearance: none;
}
input[type="date"] { min-height: 50px; }
textarea { resize: vertical; min-height: 100px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .15); }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field-error { display: block; color: var(--danger); font-size: .84rem; margin-top: 6px; min-height: 0; }
.field-error:empty { display: none; }
.input-unit { position: relative; }
.input-unit input { padding-right: 56px; }
.input-unit .unit { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radio-card { position: relative; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.rc-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 18px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); font-weight: 600; font-size: .92rem; transition: .2s; height: 100%; }
.rc-box svg { width: 30px; height: 30px; color: var(--muted); }
.radio-card:hover .rc-box { border-color: var(--accent); }
.radio-card input:checked + .rc-box { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.radio-card input:checked + .rc-box svg { color: var(--accent-dark); }
.radio-card input:focus-visible + .rc-box { box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .2); }
.field.has-error .rc-box { border-color: var(--danger); }

.rating-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.rating-input input { position: absolute; opacity: 0; pointer-events: none; }
.rating-input label { font-size: 1.7rem; line-height: 1; color: var(--line); cursor: pointer; margin: 0; transition: color .15s; }
.rating-input label:hover, .rating-input label:hover ~ label, .rating-input input:checked ~ label { color: var(--star); }
.rating-input input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 4px; }

.form-msg { margin-top: 14px; font-weight: 600; font-size: .95rem; }
.form-msg:empty { display: none; }
.form-msg.success { color: var(--success); background: #e8f4ec; padding: 12px 14px; border-radius: 10px; }
.form-msg.error { color: var(--danger); background: #f8e9e6; padding: 12px 14px; border-radius: 10px; }

.booking-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.booking-side { background: var(--dark); color: #fff; border-radius: 20px; padding: 32px; position: sticky; top: calc(var(--header-h) + 20px); }
.booking-side h3 { color: #fff; }
.side-steps { padding-left: 0; list-style: none; counter-reset: s; margin: 20px 0 28px; }
.side-steps li { counter-increment: s; position: relative; padding: 0 0 18px 44px; color: rgba(255, 255, 255, .8); }
.side-steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--on-dark); color: var(--on-dark); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.side-contact { border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 20px; display: grid; gap: 8px; justify-items: start; }
.side-contact small { color: rgba(255, 255, 255, .55); }
.side-contact > a:not(.btn) { font-size: 1.25rem; font-weight: 700; text-decoration: none; }
.side-contact .btn-outline { border-color: rgba(255, 255, 255, .4); color: #fff; margin-top: 6px; }
.side-contact .btn-outline:hover { background: #fff; color: var(--ink); }
@media (max-width: 900px) { .booking-grid { grid-template-columns: 1fr; } .booking-side { position: static; } }
@media (max-width: 520px) { .form-card { padding: 22px 18px; } .radio-cards { grid-template-columns: 1fr 1fr; } }

/* ---------- Feedback ---------- */
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 900px; }
.choice-card { position: relative; display: block; padding: 40px 34px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 22px; text-decoration: none; transition: .25s; }
.choice-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.choice-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--accent-soft); color: var(--accent-dark); margin-bottom: 22px; }
.choice-icon svg { width: 32px; height: 32px; }
.choice-card p { color: var(--muted); margin: 0; }
.choice-count { position: absolute; top: 28px; right: 28px; font-family: var(--font-head); font-size: 2rem; color: var(--line); }
@media (max-width: 640px) { .choice-grid { grid-template-columns: 1fr; } .choice-card { padding: 28px 24px; } }

.tabs-wrap { scroll-margin-top: calc(var(--header-h) + 24px); }
.tabs { display: inline-flex; gap: 4px; background: var(--surface-2); padding: 5px; border-radius: 999px; margin-bottom: 32px; }
.tab { padding: 10px 22px; border-radius: 999px; text-decoration: none; font-weight: 600; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.tab-count { font-size: .78rem; background: var(--line); color: var(--ink-2); border-radius: 999px; padding: 1px 8px; }
.tab[aria-selected="true"] .tab-count { background: var(--accent); color: #fff; }

.panel-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.sticky-form { position: sticky; top: calc(var(--header-h) + 20px); }
.panel-title { font-size: 1.4rem; margin-bottom: 18px; }
@media (max-width: 900px) { .panel-grid { grid-template-columns: 1fr; } .sticky-form { position: static; } }

.comment-list { display: grid; gap: 16px; }
.comment { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.comment header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.comment header strong { display: block; }
.comment time { font-size: .82rem; color: var(--muted); }
.comment p { margin: 0; white-space: pre-line; color: var(--ink-2); overflow-wrap: anywhere; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.stars { margin-left: auto; color: var(--line); letter-spacing: 1px; white-space: nowrap; }
.stars .on { color: var(--star); }
.empty { color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 32px; text-align: center; }

.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; transition: border-color .2s; }
.faq-item[open] { border-color: var(--accent); }
.faq-item summary { cursor: pointer; padding: 18px 52px 18px 22px; font-weight: 700; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 400; color: var(--accent); transition: transform .2s; }
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-answer { padding: 0 22px 20px; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- Widget ---------- */
.fb-widget {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px 10px 10px; border-radius: 999px;
  background: var(--ink); color: #fff; text-decoration: none; box-shadow: var(--shadow-lg);
  transition: transform .2s, box-shadow .2s;
  animation: widget-in .5s .8s both;
}
.fb-widget:hover { transform: translateY(-3px); box-shadow: 0 24px 50px rgba(31, 20, 22, .3); }
.fb-widget-icon { position: relative; width: 46px; height: 46px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.fb-widget-icon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); animation: pulse 2.4s infinite; }
.fb-widget-icon svg { width: 24px; height: 24px; }
.fb-widget-text strong { display: block; font-size: .92rem; line-height: 1.2; }
.fb-widget-text small { color: rgba(255, 255, 255, .6); font-size: .78rem; }
@keyframes pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes widget-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  .fb-widget { right: 16px; bottom: 16px; padding: 8px; }
  .fb-widget-text { display: none; }
}
@media (prefers-reduced-motion: reduce) { .fb-widget, .fb-widget-icon::after { animation: none; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark-2); color: rgba(255, 255, 255, .7); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 16px; }
.footer-tag { margin: 14px 0 4px; }
.footer-since { color: var(--on-dark); font-size: .9rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } .page-home .site-footer { padding-bottom: 96px; } }

/* На тёмно-красных блоках основная кнопка — белая */
.hero .btn-accent, .cta-band .btn-accent, .mini-cta .btn-accent { background: #fff; color: var(--accent-dark); }
.hero .btn-accent:hover, .cta-band .btn-accent:hover, .mini-cta .btn-accent:hover { background: var(--on-dark); color: var(--accent-dark); box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.hero { background: radial-gradient(120% 90% at 85% 40%, #b3162d 0%, var(--dark) 55%, #7c0d1e 100%); }
.fb-widget { background: var(--accent); }
.fb-widget-icon { background: #fff; color: var(--accent); }
.fb-widget-icon::after { border-color: #fff; }

/* ---------- Загрузка данных ---------- */
.loading { color: var(--muted); padding: 24px 0; }
.project-card.skeleton { pointer-events: none; }
.project-card.skeleton .project-img { display: block; background: linear-gradient(90deg, var(--surface-2) 25%, #fff 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: sk 1.4s infinite linear; }
.sk-line { display: block; height: 14px; border-radius: 6px; background: var(--surface-2); margin: 4px 0 10px; width: 70%; }
.sk-line.short { width: 40%; margin-bottom: 0; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .project-card.skeleton .project-img { animation: none; } }
.page-404 .logo { display: inline-flex; margin-bottom: 24px; }
.site-footer .logo-word { color: var(--on-dark); }
.site-footer { color: rgba(255, 255, 255, .78); }
/* Заглушки проектов в красной гамме */
.ph-1 { background: linear-gradient(135deg, #9b1126, #e0566b); }
.ph-2 { background: linear-gradient(135deg, #3b2a2d, #8c6a70); }
.ph-3 { background: linear-gradient(135deg, #c8102e, #f39aa7); }
.ph-4 { background: linear-gradient(135deg, #5e1420, #b04456); }
.ph-blueprint { background: linear-gradient(135deg, #2f2f35, #6a6d78); }
