/* ==========================================================================
   MAXIM DEMIN — site.css
   Визуальный слой публичных страниц. Подключается после style.css,
   поэтому переопределяет только оформление и не ломает админку.
   ========================================================================== */

/* ============ TOKENS ============ */
:root {
  --bg: #08090b;
  --surface: #0e1013;
  --surface-2: #14171b;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);

  --text: #f4f2ee;
  --muted: #918e88;

  --gold: #c89b5c;
  --gold-bright: #e3ba80;
  --gold-deep: #8f6a3a;

  --radius: 20px;
  --radius-sm: 12px;
  --max: 1280px;
  --nav-h: 78px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ============ BASE ============ */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--gold);
  color: #0a0a0a;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* тонкая киноплёнка-зерно поверх всего */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ============ LAYOUT ============ */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 44px);
}

.section {
  position: relative;
  padding: clamp(72px, 10vw, 140px) 0;
}

.section.dark {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

/* ============ TYPE ============ */
h1,
h2,
h3 {
  margin: 0;
  font-family: "Unbounded", "Onest", sans-serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 5.2vw, 4.2rem);
}

h2 {
  font-size: clamp(1.6rem, 3.8vw, 2.9rem);
}

h3 {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 16px;
}

p:last-child {
  margin-bottom: 0;
}

.section-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-label::before,
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--gold);
  flex: none;
}

/* ============ BUTTONS ============ */
.btn,
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border: 1px solid transparent;
  border-radius: 100px;
  font-family: "Onest", sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
    border-color 0.35s var(--ease), transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.btn-primary {
  background: var(--gold);
  color: #14100a;
  box-shadow: 0 10px 30px -12px rgba(200, 155, 92, 0.65);
}

.btn-primary:hover {
  background: var(--gold-bright);
  transform: translateY(-2px);
  box-shadow: 0 16px 38px -14px rgba(200, 155, 92, 0.8);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.34);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 11px 20px;
  font-size: 0.84rem;
}

/* ============ NAV ============ */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  width: 100%;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(18px, 4vw, 44px);
  background: transparent;
  border-bottom: 1px solid transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease),
    backdrop-filter 0.4s var(--ease);
}

.topbar.is-scrolled,
.topbar.is-open {
  background: rgba(8, 9, 11, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}

/* лёгкое затемнение под шапкой на первом экране — иначе ссылки теряются на светлом видео */
.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(6, 7, 9, 0.62), rgba(6, 7, 9, 0));
  transition: opacity 0.4s var(--ease);
}

.topbar.is-scrolled::before {
  opacity: 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Unbounded", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: nowrap;
}

.logo::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(200, 155, 92, 0.9);
  flex: none;
}

.logo span {
  color: var(--muted);
  font-weight: 400;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 34px);
  font-size: 0.9rem;
  color: #bab7b1;
}

.nav > a {
  position: relative;
  transition: color 0.3s var(--ease);
}

.nav > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.35s var(--ease);
}

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

.nav > a:hover::after {
  width: 100%;
}

.nav a.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
  margin: 0;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 100px;
  background: var(--gold);
  color: #14100a;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 10px 30px -14px rgba(200, 155, 92, 0.8);
  transition: background 0.35s var(--ease), transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.nav a.nav-cta::after {
  display: none;
}

.nav a.nav-cta:hover {
  background: var(--gold-bright);
  color: #14100a;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -14px rgba(200, 155, 92, 0.9);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 17px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease);
}

.topbar.is-open .nav-toggle span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.topbar.is-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.topbar.is-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100svh;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
  background: #050506;
  padding: calc(var(--nav-h) + 40px) 0 clamp(40px, 6vw, 68px);
}

.hero-video-bg {
  position: absolute !important;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-video-bg video {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  filter: saturate(0.9) contrast(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
      120% 90% at 15% 105%,
      rgba(6, 6, 8, 0.97) 0%,
      rgba(6, 6, 8, 0.6) 46%,
      rgba(6, 6, 8, 0.12) 76%
    ),
    linear-gradient(
      to bottom,
      rgba(6, 6, 8, 0.7) 0%,
      rgba(6, 6, 8, 0.18) 32%,
      rgba(6, 6, 8, 0.86) 88%,
      var(--bg) 100%
    ),
    linear-gradient(100deg, rgba(6, 6, 8, 0.8) 0%, rgba(6, 6, 8, 0.1) 62%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding: 0 clamp(18px, 4vw, 44px);
  display: block;
  text-align: left;
}

.hero h1 {
  max-width: 17ch;
  margin: 0;
  font-size: clamp(2.1rem, 5.6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.hero-text {
  max-width: 52ch;
  margin: 26px 0 0;
  color: #c6c3bd;
  font-size: clamp(0.98rem, 1.4vw, 1.1rem);
  line-height: 1.72;
  text-align: left;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.scroll-hint {
  position: absolute;
  right: clamp(18px, 4vw, 44px);
  bottom: 42px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.scroll-hint::after {
  content: "";
  width: 1px;
  height: 54px;
  background: linear-gradient(var(--gold), transparent);
  animation: hintDrop 1.9s infinite var(--ease);
}

@keyframes hintDrop {
  0% {
    transform: scaleY(0.2);
    opacity: 0;
  }
  45% {
    opacity: 1;
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}

/* ============ MARQUEE ============ */
.marquee {
  position: relative;
  z-index: 3;
  padding: 13px 0;
  overflow: hidden;
  background: var(--surface);
  border-block: 1px solid var(--line);
  user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 52s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  margin-right: clamp(30px, 3.8vw, 58px);
  white-space: nowrap;
}

.marquee__item::after {
  content: "";
  width: 4px;
  height: 4px;
  margin-left: clamp(20px, 2.6vw, 40px);
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.55;
  flex: none;
}

.marquee__logo {
  height: 32px;
  width: auto;
  max-width: 92px;
  padding: 10px 12px;
  box-sizing: content-box;
  object-fit: contain;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  opacity: 0.92;
  transition: opacity 0.35s var(--ease), background 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.marquee:hover .marquee__logo {
  opacity: 1;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
}

/* тёмный логотип «Мархинского» — инвертируем, чтобы читался на тёмном */
.marquee__logo--light {
  filter: invert(1) hue-rotate(180deg) brightness(1.25) contrast(1.15);
}

.marquee__mono {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  padding: 10px 12px;
  box-sizing: content-box;
  border: 1px solid rgba(200, 155, 92, 0.42);
  border-radius: 10px;
  background: rgba(200, 155, 92, 0.06);
  color: var(--gold);
  font-family: "Unbounded", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
}

.marquee__name {
  font-family: "Unbounded", sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #8b8880;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ============ SECTION HEAD ============ */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: clamp(34px, 5vw, 58px);
}

.section-head h2 {
  max-width: 20ch;
}

.section-head p {
  max-width: 40ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.72;
}

/* ============ CATEGORY CARDS ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(14px, 2vw, 24px);
  margin-top: 0;
}

.card {
  position: relative;
  grid-column: span 6;
  display: block;
  overflow: hidden;
  min-height: 0;
  aspect-ratio: 16 / 10;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: radial-gradient(120% 100% at 82% 0%, rgba(200, 155, 92, 0.14), transparent 58%),
    linear-gradient(160deg, #171a1e 0%, #0c0e11 62%, #100d09 100%);
  font-size: inherit;
  isolation: isolate;
  transition: border-color 0.5s var(--ease), transform 0.5s var(--ease);
}

.card:nth-child(4n + 1),
.card:nth-child(4n + 4) {
  grid-column: span 7;
  aspect-ratio: 16 / 9;
}

.card:nth-child(4n + 2),
.card:nth-child(4n + 3) {
  grid-column: span 5;
}

.card:hover {
  border-color: rgba(200, 155, 92, 0.4);
  transform: translateY(-4px);
}

.card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
  transition: transform 0.9s var(--ease), filter 0.6s var(--ease);
}

.card:hover .card-bg {
  transform: scale(1.06);
  filter: saturate(1.1);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(6, 7, 9, 0.97) 0%,
    rgba(6, 7, 9, 0.74) 30%,
    rgba(6, 7, 9, 0.14) 62%,
    transparent 86%
  );
  transition: opacity 0.5s var(--ease);
}

.card:hover::after {
  opacity: 0.82;
}

.card-title {
  position: absolute;
  z-index: 2;
  left: clamp(18px, 2.4vw, 30px);
  bottom: clamp(18px, 2.4vw, 30px);
  right: clamp(64px, 7vw, 84px);
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.card-meta {
  position: absolute;
  z-index: 2;
  left: clamp(18px, 2.4vw, 30px);
  bottom: calc(clamp(18px, 2.4vw, 30px) + clamp(1.35rem, 2.3vw, 1.95rem) + 8px);
  max-width: 32ch;
  color: #b3b0aa;
  font-size: 0.82rem;
  line-height: 1.5;
}

.card-arrow {
  position: absolute;
  z-index: 2;
  right: clamp(18px, 2.4vw, 30px);
  bottom: clamp(18px, 2.4vw, 30px);
  display: grid;
  place-items: center;
  width: clamp(42px, 4.4vw, 54px);
  height: clamp(42px, 4.4vw, 54px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  transition: background 0.45s var(--ease), border-color 0.45s var(--ease),
    color 0.45s var(--ease), transform 0.45s var(--ease);
}

.card-arrow svg {
  width: 40%;
  height: 40%;
}

.card:hover .card-arrow {
  background: var(--gold);
  border-color: var(--gold);
  color: #14100a;
  transform: scale(1.06);
}

/* карточка-заглушка, если контента нет */
.card--empty {
  display: grid;
  place-items: center;
  min-height: 240px;
  aspect-ratio: auto;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ============ ABOUT ============ */
.about-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
}

.about-image {
  position: relative;
  width: 100%;
  max-width: none;
  height: auto;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #23262b, #0f1114);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.03);
}

.about-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 7, 9, 0.5), transparent 55%);
  pointer-events: none;
}

.about-text p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.85;
}

.about-text h2 {
  margin-bottom: 26px;
  font-size: clamp(1.35rem, 2.4vw, 2.05rem);
  line-height: 1.14;
}

.about-lead {
  margin: 0 0 26px;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--text) !important;
}

.about-lead b {
  font-weight: 600;
  color: var(--gold);
}

/* ============ ORDER / CTA ============ */
.order-box {
  position: relative;
  max-width: 900px;
  margin-inline: auto;
  padding: clamp(30px, 5vw, 64px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: clamp(22px, 3vw, 34px);
  background: linear-gradient(150deg, #0f1214 0%, #0b0d0f 62%, #0d0c09 100%);
}

.order-box::before {
  content: "";
  position: absolute;
  right: -16%;
  top: -42%;
  width: 66%;
  height: 180%;
  background: radial-gradient(circle, rgba(200, 155, 92, 0.1), transparent 62%);
  pointer-events: none;
}

.order-box > * {
  position: relative;
}

.order-box h2 {
  max-width: 18ch;
}

.order-lead {
  max-width: 52ch;
  margin: 20px 0 30px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.75;
}

.order-toggle {
  margin-bottom: 0;
}

.order-plain-toggle {
  display: block;
  margin-top: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: rgba(255, 255, 255, 0.25);
  transition: color 0.3s var(--ease);
}

.order-plain-toggle:hover {
  color: var(--gold);
}

.order-panel {
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s var(--ease), opacity 0.35s var(--ease),
    margin-top 0.35s var(--ease);
}

.order-panel.is-open {
  max-height: 1200px;
  margin-top: 32px;
  opacity: 1;
}

.order-form {
  max-width: 100%;
}

.order-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

/* «Контакты» — на всю ширину: поле-ловушка в разметке скрыто и сдвигает сетку */
.order-grid > div:last-child {
  grid-column: 1 / -1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 18px;
}

.form-group label {
  color: #b6b3ad;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea,
.form-group select,
.quiz-field input,
.quiz-field textarea,
.quiz-field select {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.form-group select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #918e88 50%),
    linear-gradient(135deg, #918e88 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.form-group input::placeholder,
.form-group textarea::placeholder,
.quiz-field input::placeholder,
.quiz-field textarea::placeholder {
  color: #6c6a66;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.quiz-field input:focus,
.quiz-field textarea:focus,
.quiz-field select:focus {
  border-color: rgba(200, 155, 92, 0.75);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(200, 155, 92, 0.12);
}

.form-group textarea {
  min-height: 170px;
  resize: vertical;
}

.order-success {
  margin: 0 0 24px;
  padding: 16px 18px;
  border: 1px solid rgba(200, 155, 92, 0.32);
  border-radius: 14px;
  background: rgba(200, 155, 92, 0.1);
  color: var(--text);
  line-height: 1.6;
}

/* ============ QUIZ ============ */
.quiz-lock {
  overflow: hidden;
}

.quiz-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 4, 6, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.quiz-modal.is-open {
  display: flex;
}

.quiz-card {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line-strong);
  border-radius: clamp(22px, 3vw, 30px);
  background: radial-gradient(circle at 16% 0%, rgba(200, 155, 92, 0.16), transparent 36%),
    linear-gradient(150deg, rgba(18, 20, 23, 0.99), rgba(7, 8, 10, 0.99));
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.quiz-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.quiz-close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.32);
}

.quiz-top {
  padding-right: 52px;
}

.quiz-step-label {
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.quiz-card h3 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.9rem);
  line-height: 1.16;
}

.quiz-progress {
  height: 4px;
  margin: 24px 0 26px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.quiz-progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold));
  transition: width 0.3s var(--ease);
}

.quiz-body {
  min-height: 220px;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quiz-option {
  min-height: 56px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.quiz-option:hover,
.quiz-option.is-selected {
  border-color: rgba(200, 155, 92, 0.8);
  background: rgba(200, 155, 92, 0.13);
  transform: translateY(-1px);
}

.quiz-extra-field {
  margin-top: 16px;
}

.quiz-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: #b6b3ad;
  font-size: 0.82rem;
}

.quiz-field textarea {
  min-height: 140px;
  resize: vertical;
}

.quiz-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.quiz-contact-wide {
  grid-column: 1 / -1;
}

.quiz-hidden-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.quiz-error {
  display: none;
  margin-top: 18px;
  padding: 12px 15px;
  border: 1px solid rgba(190, 56, 56, 0.4);
  border-radius: 12px;
  background: rgba(190, 56, 56, 0.14);
  color: #ffd1d1;
  line-height: 1.45;
}

.quiz-error.is-visible {
  display: block;
}

.quiz-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
}

.quiz-btn {
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: 100px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease),
    opacity 0.3s var(--ease);
}

.quiz-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.quiz-btn-primary {
  background: var(--gold);
  color: #14100a;
}

.quiz-btn-primary:hover:not(:disabled) {
  background: var(--gold-bright);
  transform: translateY(-1px);
}

.quiz-btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.quiz-btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

.quiz-success {
  padding: 24px 0 8px;
  text-align: center;
}

.quiz-success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: rgba(200, 155, 92, 0.16);
  color: var(--gold-bright);
  font-size: 32px;
}

.quiz-success p {
  max-width: 46ch;
  margin: 14px auto 26px;
  color: var(--muted);
  line-height: 1.7;
}

/* ============ INNER PAGES ============ */
.section-with-topbar {
  padding-top: calc(var(--nav-h) + clamp(48px, 7vw, 90px));
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  color: #6f6d69;
  font-size: 0.82rem;
  line-height: 1.4;
}

.breadcrumbs a {
  color: var(--muted);
  transition: color 0.25s var(--ease);
}

.breadcrumbs a:hover {
  color: var(--gold);
}

.video-player {
  margin: clamp(28px, 4vw, 44px) 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: clamp(16px, 2vw, 24px);
  background: #000;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
}

.video-player video {
  display: block;
  width: 100%;
  max-height: 78vh;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
}

.video-player-message {
  margin: 30px 0;
  color: var(--muted);
}

.panel {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  line-height: 1.75;
}

/* ============ FOOTER ============ */
.footer {
  position: relative;
  padding: clamp(40px, 6vw, 64px) 0 34px;
  border-top: 1px solid var(--line);
  background: #060708;
}

.footer-row {
  display: grid;
  grid-template-columns: 1.4fr auto 1fr;
  align-items: center;
  gap: clamp(22px, 4vw, 44px);
}

.footer-title {
  margin-bottom: 8px;
  font-family: "Unbounded", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}

.footer-text {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  color: #c9c6c0;
  font-size: 17px;
  transition: border-color 0.35s var(--ease), color 0.35s var(--ease),
    background 0.35s var(--ease), transform 0.35s var(--ease);
}

.footer-socials a:hover {
  border-color: var(--gold);
  background: rgba(200, 155, 92, 0.1);
  color: var(--gold);
  transform: translateY(-2px);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  text-align: right;
}

.footer-contact a {
  color: #d6d3cd;
  font-size: 0.92rem;
  transition: color 0.3s var(--ease);
}

.footer-contact a:hover {
  color: var(--gold);
}

.footer-phone {
  color: var(--muted) !important;
  font-size: 0.86rem !important;
}

.footer-city {
  color: #6f6d69;
  font-size: 0.8rem;
}

/* ============ PRELOADER ============ */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #060708;
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease),
    filter 0.6s var(--ease);
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  filter: blur(8px);
}

.preloader-inner {
  text-align: center;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

#preloader.hidden .preloader-inner {
  opacity: 0;
  transform: translateY(-8px);
}

.preloader-logo {
  margin-bottom: 26px;
  color: var(--text);
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.5rem, 5vw, 2.6rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
}

.preloader-line {
  width: 320px;
  max-width: 76vw;
  height: 2px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.preloader-line-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  box-shadow: 0 0 12px rgba(200, 155, 92, 0.7);
  animation: preloaderLine 1.6s var(--ease) infinite;
}

@keyframes preloaderLine {
  0% {
    width: 0%;
  }
  60% {
    width: 82%;
  }
  100% {
    width: 100%;
  }
}

/* ============ REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .about-image {
    max-width: 460px;
    aspect-ratio: 4 / 5;
  }

  .footer-row {
    grid-template-columns: 1fr auto;
    row-gap: 26px;
  }

  .footer-contact {
    grid-column: 1 / -1;
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 900px) {
  .nav {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px clamp(18px, 4vw, 44px) 26px;
    background: rgba(8, 9, 11, 0.97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    font-size: 1rem;
  }

  .topbar.is-open .nav {
    display: flex;
  }

  .nav > a {
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
  }

  .nav > a::after {
    display: none;
  }

  .nav a.nav-cta {
    margin-top: 18px;
    padding: 15px 24px;
    text-align: center;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .card,
  .card:nth-child(4n + 1),
  .card:nth-child(4n + 2),
  .card:nth-child(4n + 3),
  .card:nth-child(4n + 4) {
    grid-column: span 12;
    aspect-ratio: 16 / 10;
  }

  .scroll-hint {
    display: none;
  }
}

@media (max-width: 620px) {
  .hero {
    min-height: 92svh;
  }

  .marquee {
    padding: 11px 0;
  }

  .marquee__logo {
    height: 24px;
    max-width: 70px;
    padding: 8px 10px;
    border-radius: 8px;
  }

  .marquee__mono {
    width: 24px;
    height: 24px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.68rem;
  }

  .marquee__item {
    gap: 9px;
    margin-right: 20px;
  }

  .marquee__item::after {
    margin-left: 14px;
  }

  .marquee__name {
    font-size: 0.66rem;
    letter-spacing: 0.04em;
  }

  .eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .hero-actions .btn-primary,
  .hero-actions .btn-ghost {
    width: 100%;
  }

  .order-grid,
  .quiz-options,
  .quiz-contact-grid {
    grid-template-columns: 1fr;
  }

  .quiz-modal {
    padding: 10px;
    align-items: flex-end;
  }

  .quiz-card {
    max-height: calc(100vh - 20px);
    border-radius: 22px;
  }

  .quiz-body {
    min-height: 0;
  }

  .quiz-actions {
    position: sticky;
    bottom: 0;
    margin: 22px -24px -24px;
    padding: 14px 24px 20px;
    background: linear-gradient(180deg, rgba(10, 11, 13, 0), rgba(10, 11, 13, 0.98) 26%);
  }

  .quiz-btn {
    flex: 1;
    padding: 14px 16px;
  }

  .footer-row {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .footer-socials {
    order: 2;
  }

  .footer-contact {
    order: 3;
  }
}

/* ============ MOTION PREFERENCES ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
