/* ============================================================
   DARK FORGE — витрина 3D-печати
   Айдентика: рыжий #d34106 · сизый #3b465a · тёмный #1e1e1e
   Шрифт: HS Luna Obscura (SIL OFL 1.1, © Headspace Agency)
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "HS Luna Obscura";
  src:
    url("../fonts/HS_LunaObscura.woff2") format("woff2"),
    url("../fonts/HS_LunaObscura.otf") format("opentype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  --bg: #1e1e1e;
  --bg-2: #24242c;
  --bg-3: #2a2a33;
  --deep: #3b465a;
  --deep-soft: rgba(59, 70, 90, 0.35);
  --accent: #d34106;
  --accent-2: #ff6f35;
  --accent-dark: #a33304;
  --text: #e8e4dc;
  --text-muted: #8a8490;
  --line: rgba(232, 228, 220, 0.12);
  --font-main: "HS Luna Obscura", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Cascadia Mono", "Consolas", monospace;

  --container: 1180px;
  --radius: 10px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --text-xs: clamp(0.72rem, 0.68rem + 0.2vw, 0.82rem);
  --text-sm: clamp(0.85rem, 0.8rem + 0.25vw, 0.95rem);
  --text-base: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  --text-lg: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  --text-xl: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
  --text-hero: clamp(2.2rem, 1.2rem + 4.5vw, 4.2rem);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

/* Анимации сайта не зависят от системной настройки «анимации Windows»:
   при выключенных анимациях ОС браузеры шлют prefers-reduced-motion: reduce
   и гасят все переходы. Для витрины это критично, поэтому отключаем только
   фоновую «живность», а входные анимации оставляем. */
@media (prefers-reduced-motion: reduce) {
  .ember,
  .bg-glow,
  .status-dot,
  .grad-text,
  .btn-pulse,
  .category-title::before {
    animation: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- Background layers (из фирменной заглушки) ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 70, 90, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 70, 90, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(59, 70, 90, 0.35) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 85% 90%, rgba(211, 65, 6, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(59, 70, 90, 0.18) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  animation: pulse-glow 8s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.025) 3px,
    rgba(0, 0, 0, 0.025) 4px
  );
  pointer-events: none;
  z-index: 10;
}

.embers {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.ember {
  position: absolute;
  bottom: -10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px 2px rgba(211, 65, 6, 0.7);
  animation: rise var(--dur, 6s) var(--delay, 0s) ease-in infinite;
  opacity: 0;
}

@keyframes rise {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  10% { opacity: 0.9; }
  80% { opacity: 0.4; }
  100% {
    transform: translateY(-110vh) translateX(var(--drift, 30px)) scale(0.2);
    opacity: 0;
  }
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

section {
  scroll-margin-top: 84px;
}

.section-alt {
  background: rgba(36, 36, 44, 0.55);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.7rem;
  font-family: var(--font-main);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out),
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
  white-space: nowrap;
}

/* Пульсирующая главная кнопка (hero) */
.btn-pulse {
  animation: cta-pulse 2.8s ease-in-out infinite;
}

@keyframes cta-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(211, 65, 6, 0.55);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(211, 65, 6, 0);
  }
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-2) 0%, var(--accent) 60%, var(--accent-dark) 100%);
  color: #fff;
  box-shadow: 0 0 0 rgba(211, 65, 6, 0);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(211, 65, 6, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(232, 228, 220, 0.3);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-2);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.55rem 1.1rem;
  font-size: var(--text-xs);
}

.btn-lg {
  padding: 1rem 2.2rem;
  font-size: var(--text-base);
}

.btn-icon {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(30, 30, 30, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(59, 70, 90, 0.35);
  transition: box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  height: 34px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  margin-left: auto;
}

.nav-link {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.3rem 0;
  position: relative;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.nav-link:hover {
  color: var(--text);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-cta-mobile {
  display: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  transition: transform 0.3s var(--ease-out), opacity 0.3s ease;
}

.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);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 72px);
  min-height: calc(100dvh - 72px);
  display: flex;
  align-items: center;
  padding: 88px 0 72px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.6rem;
  max-width: 860px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-2);
  padding: 0.4rem 1.1rem;
  border: 1px solid rgba(211, 65, 6, 0.35);
  border-radius: 2px;
  background: rgba(211, 65, 6, 0.07);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: blink 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.hero-title {
  font-size: var(--text-hero);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.08;
  text-transform: uppercase;
  text-shadow: 0 0 40px rgba(59, 70, 90, 0.45);
}

.grad-text {
  background: linear-gradient(135deg, var(--accent-2) 0%, var(--accent) 55%, var(--accent-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px rgba(211, 65, 6, 0.45));
  animation: forge-flicker 5s ease-in-out infinite alternate;
}

@keyframes forge-flicker {
  from { filter: drop-shadow(0 0 14px rgba(211, 65, 6, 0.35)); }
  to { filter: drop-shadow(0 0 34px rgba(211, 65, 6, 0.6)); }
}

.hero-sub {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 56ch;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.4rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  margin-top: 3.2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.stat {
  padding-right: 1rem;
}

.stat dt {
  font-size: var(--text-sm);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--text);
}

.stat dd {
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-top: 0.2rem;
}

/* ---------- Section heads ---------- */
.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 3.4rem;
}

.section-head--left {
  align-items: flex-start;
  margin-bottom: 1.8rem;
}

.section-index {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  font-size: var(--text-xl);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2;
}

.section-sub {
  font-size: var(--text-base);
  color: var(--text-muted);
  max-width: 52ch;
  line-height: 1.7;
}

/* ---------- Catalog ---------- */
.catalog {
  padding: 96px 0 40px;
}

.category {
  margin-bottom: 72px;
}

.category-title {
  font-size: var(--text-lg);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.35rem;
}

.category-title::before {
  content: "";
  width: 34px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  flex-shrink: 0;
  animation: title-shimmer 3.2s ease-in-out infinite;
}

@keyframes title-shimmer {
  0%, 100% {
    background: linear-gradient(90deg, var(--accent), rgba(211, 65, 6, 0.1));
    box-shadow: 0 0 6px rgba(211, 65, 6, 0.4);
  }
  50% {
    background: linear-gradient(90deg, var(--accent-2), rgba(211, 65, 6, 0.55));
    box-shadow: 0 0 14px rgba(211, 65, 6, 0.8);
  }
}

.category-note {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 2.2rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(262px, 1fr));
  gap: 1.4rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    transform 0.35s var(--ease-out),
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

/* Внутренняя обёртка для 3D-наклона за курсором */
.card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.35s var(--ease-out);
  will-change: transform;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(211, 65, 6, 0.55);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(211, 65, 6, 0.18);
}

.product-card--custom {
  border-style: dashed;
  border-color: rgba(211, 65, 6, 0.35);
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #1a1a20;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.45s ease, transform 0.5s var(--ease-out);
}

/* Плавное появление фото в карточке (без «выскакивания» после загрузки) */
html.js .product-media img {
  opacity: 0;
}

html.js .product-media img.is-loaded {
  opacity: 1;
}

.product-card:hover .product-media img {
  transform: scale(1.045);
}

.product-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(30, 30, 30, 0.82);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(211, 65, 6, 0.45);
  border-radius: 3px;
  padding: 0.28rem 0.7rem;
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.3rem 1.3rem 1.4rem;
  flex: 1;
}

.product-body--center {
  align-items: flex-start;
  justify-content: center;
  min-height: 210px;
}

.product-title {
  font-size: var(--text-base);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.product-price {
  font-size: var(--text-sm);
  font-weight: 900;
  color: var(--accent-2);
  letter-spacing: 0.05em;
}

/* ---------- How to order ---------- */
.how {
  padding: 96px 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
  margin-bottom: 3.4rem;
}

.step {
  position: relative;
  padding: 1.6rem 1.4rem 1.6rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.3s ease, transform 0.3s var(--ease-out);
}

.step:hover {
  border-color: rgba(211, 65, 6, 0.5);
  transform: translateY(-4px);
}

.step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px var(--accent);
  margin-bottom: 1.1rem;
}

.step-title {
  font-size: var(--text-base);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.step-text {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.65;
}

.how-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.8rem 2rem;
  background: linear-gradient(135deg, rgba(211, 65, 6, 0.12), rgba(59, 70, 90, 0.14));
  border: 1px solid rgba(211, 65, 6, 0.3);
  border-radius: var(--radius);
}

.how-cta-text {
  font-size: var(--text-lg);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- About ---------- */
.about {
  padding: 96px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 4rem;
  align-items: center;
}

.about-figure {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 5;
}

.about-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 55%, rgba(211, 65, 6, 0.22) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(59, 70, 90, 0.4) 0%, transparent 70%);
  pointer-events: none;
}

.about-figure img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: screen;
}

.about-text {
  font-size: var(--text-base);
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2.2rem;
  max-width: 54ch;
}

.materials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
}

.material {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.1rem 1.3rem;
  background: var(--bg-2);
}

.material-name {
  font-size: var(--text-base);
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--accent-2);
}

.material-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.about-size {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.7;
}

.about-size strong {
  color: var(--text);
  font-weight: 900;
}

/* ---------- Contacts ---------- */
.contacts {
  padding: 96px 0;
}

.contacts-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2.4rem;
}

.contacts .section-head {
  align-items: center;
  text-align: center;
}

.contacts-actions {
  margin-top: 0.4rem;
}

.contacts-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 3rem;
  margin-top: 1.4rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: center;
}

.contact-label {
  font-size: var(--text-xs);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-value {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
}

a.contact-value:hover {
  color: var(--accent-2);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgba(59, 70, 90, 0.35);
  background: rgba(24, 24, 28, 0.8);
  padding: 2.6rem 0 2.4rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  flex-wrap: wrap;
}

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

.footer-mark {
  width: 30px;
  height: 30px;
}

.footer-name {
  font-size: var(--text-sm);
  font-weight: 900;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.footer-nav {
  display: flex;
  gap: 1.6rem;
}

.footer-link {
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.25s ease;
}

.footer-link:hover {
  color: var(--accent-2);
}

.footer-legal {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  line-height: 1.8;
  text-align: right;
}

/* ---------- Custom CTA (на заказ) ---------- */
.custom-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
  padding: 1.8rem 2rem;
  background: linear-gradient(135deg, rgba(211, 65, 6, 0.12), rgba(59, 70, 90, 0.14));
  border: 1px solid rgba(211, 65, 6, 0.3);
  border-radius: var(--radius);
}

.custom-cta-title {
  font-size: var(--text-lg);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.custom-cta-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 52ch;
  line-height: 1.65;
}

.catalog-error {
  grid-column: 1 / -1;
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- Модалка товара ---------- */
.no-scroll {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 14, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: modal-fade 0.3s ease;
}

@keyframes modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  width: min(100%, 980px);
  max-height: min(88vh, 860px);
  background: var(--bg-2);
  border: 1px solid rgba(211, 65, 6, 0.35);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: modal-pop 0.35s var(--ease-out);
}

@keyframes modal-pop {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text);
  background: rgba(30, 30, 30, 0.85);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.modal-close:hover {
  border-color: var(--accent);
  color: var(--accent-2);
}

.modal-gallery {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #1a1a20;
}

.modal-stage {
  position: relative;
  flex: 1;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 72vh;
  transition: opacity 0.3s ease, transform 0.35s var(--ease-out);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text);
  background: rgba(30, 30, 30, 0.6);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.gallery-nav:hover {
  background: rgba(211, 65, 6, 0.25);
  border-color: var(--accent);
}

.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }

.gallery-count {
  position: absolute;
  bottom: 10px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: rgba(30, 30, 30, 0.7);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

.gallery-thumbs img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.25s ease, border-color 0.25s ease;
  flex-shrink: 0;
}

.gallery-thumbs img:hover {
  opacity: 1;
}

.gallery-thumbs img.active {
  opacity: 1;
  border-color: var(--accent);
}

.modal-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 1.8rem;
  overflow-y: auto;
}

.modal-info .product-tag {
  position: static;
  align-self: flex-start;
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2;
}

.modal-desc {
  font-size: var(--text-base);
  color: var(--text-muted);
  line-height: 1.75;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.modal-foot .product-price {
  font-size: var(--text-lg);
}

@media (max-width: 720px) {
  .modal {
    padding: 12px;
  }
  .modal-backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .modal-card {
    grid-template-columns: 1fr;
    max-height: 92vh;
    overflow-y: auto;
  }
  .modal-stage {
    min-height: 260px;
  }
  .modal-img {
    max-height: 46vh;
  }
  .modal-info {
    padding: 1.4rem 1.2rem 1.6rem;
  }
}

/* ---------- Reveal animation ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
}

html.js .reveal.is-visible {
  animation: reveal-up 0.8s var(--ease-out) both;
  animation-delay: var(--d, 0s);
}

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

/* Каскад для шагов «Как заказать» */
.step:nth-child(2) { --d: 0.1s; }
.step:nth-child(3) { --d: 0.2s; }
.step:nth-child(4) { --d: 0.3s; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .site-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin: 0;
    padding: 0.8rem 24px 1.4rem;
    background: rgba(30, 30, 30, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(211, 65, 6, 0.35);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s var(--ease-out), opacity 0.35s ease, visibility 0.35s;
  }

  .site-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .site-nav .nav-link {
    width: 100%;
    padding: 0.9rem 0;
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--line);
  }

  .nav-cta-mobile {
    display: inline-flex;
    margin-top: 1.2rem;
  }

  .header-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.6rem;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-figure {
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 0 18px;
  }

  .hero {
    padding-top: 64px;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-top: 2.4rem;
    padding-top: 1.6rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .how-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
  }

  .materials {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
  }

  .footer-legal {
    text-align: left;
  }
}
