/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Dark theme (default) */
:root {
  --gold: #C9A84C;
  --gold-light: #E8C96A;
  --gold-dark: #9E7A2A;
  --bg: #080808;
  --bg-2: #0f0f0f;
  --bg-3: #161616;
  --bg-card: #111111;
  --border: rgba(255,255,255,0.07);
  --border-gold: rgba(201,168,76,0.3);
  --text: #F0F0F0;
  --text-muted: #888;
  --text-dim: #555;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 64px rgba(0,0,0,0.6);
  --shadow-gold: 0 0 40px rgba(201,168,76,0.15);
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --nav-bg: rgba(8,8,8,0.95);
  --hero-grid-color: rgba(201,168,76,0.04);
  --marquee-fade: var(--bg-2);
}

/* Light theme */
[data-theme="light"] {
  --gold: #9E6F10;
  --gold-light: #B8860B;
  --gold-dark: #7A5200;
  --bg: #F7F5F0;
  --bg-2: #EEEBe4;
  --bg-3: #E5E1D8;
  --bg-card: #FFFFFF;
  --border: rgba(0,0,0,0.09);
  --border-gold: rgba(158,111,16,0.25);
  --text: #1A1A1A;
  --text-muted: #5A5A5A;
  --text-dim: #999;
  --shadow: 0 24px 64px rgba(0,0,0,0.1);
  --shadow-gold: 0 0 40px rgba(158,111,16,0.12);
  --nav-bg: rgba(247,245,240,0.95);
  --hero-grid-color: rgba(158,111,16,0.06);
  --marquee-fade: var(--bg-2);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: rgba(201,168,76,0.3); color: var(--text); }

.gold { color: var(--gold); }

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

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

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }

/* ===== CONTAINER ===== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn--gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #000;
}
.btn--gold:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.35);
}

.btn--outline {
  background: transparent;
  border: 1.5px solid var(--border-gold);
  color: var(--gold);
}
.btn--outline:hover {
  background: rgba(201,168,76,0.08);
  border-color: var(--gold);
}

.btn--ghost {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.15);
}

.btn--lg { padding: 1.125rem 2.25rem; font-size: 1rem; border-radius: 12px; }
.btn--full { width: 100%; justify-content: center; }

/* ===== SECTION ===== */
.section { padding: 7rem 0; position: relative; }

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 480px;
}

.section-header {
  margin-bottom: 4rem;
}

/* ===== ANIMATIONS ===== */
[data-animate] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-animate].visible {
  opacity: 1;
  transform: none;
}
/* Карточки с flip-анимацией: отключаем стандартный data-animate */
[data-animate][data-flip] {
  transform: none;
  transition: none;
}
[data-animate][data-flip].visible {
  opacity: 0;
  transform: none;
}
/* ===== PRODUCT CARD FLIP ANIMATION ===== */
@keyframes card-flip-in {
  0%   { opacity: 0; transform: perspective(600px) rotateY(-90deg) scale(0.85); }
  60%  { opacity: 1; transform: perspective(600px) rotateY(8deg) scale(1.02); }
  100% { opacity: 1; transform: perspective(600px) rotateY(0deg) scale(1); }
}

.product-card[data-flip],
.portfolio-card[data-flip] {
  opacity: 0;
}
.product-card[data-flip].flipped,
.portfolio-card[data-flip].flipped {
  animation: card-flip-in 0.65s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}


/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: var(--transition);
}

.nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 0;
}

.nav__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* ── Logo SVG ────────────────────────────────── */
.logo-svg {
  display: block;
  height: 40px;
  width: auto;
  flex-shrink: 0;
  color: var(--text);
}
.logo-svg--footer { height: 44px; }

/* Light theme keeps same dark color as brand file */
[data-theme="light"] .logo-svg { color: #262D33; }

/* ── Logo draw animation ─────────────────────── */

/* Outer hexagon: perimeter ≈ 175 */
.logo-hex-path {
  stroke-dasharray: 175;
  stroke-dashoffset: 175;
  animation: logo-draw 0.9s cubic-bezier(.4,0,.2,1) 0.1s forwards;
}

/* Accent line: length ≈ 30 */
.logo-accent-path {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: logo-draw 0.35s ease-out 0.9s forwards;
}

/* Inner diamond — fade in after hex is drawn */
.logo-diamond-path {
  opacity: 0;
  animation: logo-fade 0.4s ease-out 0.85s forwards;
}

/* Text row 1 (Фабрика) */
.logo-text-top {
  opacity: 0;
  animation: logo-fade-up 0.5s ease-out 1.05s forwards;
}

/* Text row 2 (Решений) */
.logo-text-bottom {
  opacity: 0;
  animation: logo-fade-up 0.45s ease-out 1.2s forwards;
}

/* Dot — appears last */
.logo-dot {
  opacity: 0;
  animation: logo-dot-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) 1.65s forwards;
}
@keyframes logo-dot-pop {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes logo-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes logo-fade {
  to { opacity: 1; }
}
@keyframes logo-fade-up {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .logo-hex-path    { animation: none; stroke-dashoffset: 0; }
  .logo-accent-path { animation: none; stroke-dashoffset: 0; }
  .logo-diamond-path,
  .logo-text-top,
  .logo-text-bottom,
  .logo-dot { animation: none; opacity: 1; }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin-left: auto;
}

.nav__link {
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  white-space: nowrap;
}

.nav__link:hover, .nav__link.active {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.nav__cta { margin-left: 1rem; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
}

.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(8,8,8,0.98);
  backdrop-filter: blur(20px);
  /* light theme override applied via JS */
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}

.mobile-menu.open { transform: none; }

.mobile-menu__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.mobile-menu__link {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.75rem 2rem;
  border-radius: 12px;
  transition: var(--transition);
  display: block;
}

.mobile-menu__link:hover { color: var(--gold); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hero-grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid-color) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 20%, black 0%, transparent 100%);
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
}

.hero__glow--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(201,168,76,0.4) 0%, transparent 70%);
  top: -20%;
  right: -10%;
  animation: float1 8s ease-in-out infinite;
}

.hero__glow--2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(201,168,76,0.2) 0%, transparent 70%);
  bottom: 10%;
  left: -5%;
  animation: float2 10s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 30px) scale(1.1); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -20px); }
}

.hero__container {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 5rem 2rem 2rem;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-gold);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gold);
  margin-bottom: 1.25rem;
  background: rgba(201,168,76,0.05);
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.1875rem);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 540px;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero__stats {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: fit-content;
  backdrop-filter: blur(10px);
}

.hero__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1.25rem;
}

.hero__stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
  flex-shrink: 0;
}

.hero__stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.hero__stat-suffix {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gold);
}

.hero__stat-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  white-space: nowrap;
}

.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 1;
}

.hero__scroll-line {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dark), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(0.5); opacity: 0.4; }
}

/* ===== ABOUT ===== */
.about { background: var(--bg); }

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: stretch;
}

.about__content {
  display: flex;
  flex-direction: column;
}

.about__text {
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.about__directions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 2rem;
}

@keyframes chip-appear {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.about__direction {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  opacity: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.625rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.about__direction.chip-visible {
  animation: chip-appear 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.about__direction:hover {
  border-color: var(--border-gold);
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  .about__direction { opacity: 1; }
  .about__direction.chip-visible { animation: none; }
}

.about__direction-icon {
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--gold);
}
.about__direction-icon svg { width: 18px; height: 18px; }

.about__visual {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
}

.about__card:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-gold);
}

.about__card--main {}

.about__card-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.about__card-title { font-weight: 700; font-size: 0.9375rem; margin-bottom: 0.5rem; }
.about__card-text { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.5; }

.about__sm-row {
  display: flex;
  gap: 1rem;
}

/* users highlight card */
.about__card--users {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(201,168,76,.1) 0%, var(--bg-card) 60%);
  border-color: rgba(201,168,76,.3);
}
.about__card--users:hover { border-color: var(--border-gold); }
.about__users-num {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
  margin-bottom: .35rem;
}
.about__users-label {
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 18ch;
}
.about__users-icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  color: var(--gold);
  opacity: .5;
}
.about__users-icon svg { width: 40px; height: 40px; }

/* ── Stack & Competencies card ── */
.about__card--stack { padding: 1.25rem 1.25rem 1rem; }

.about__grades {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.about__grade {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.grade-ring { width: 80px; height: 80px; }

.grade-ring__bg {
  fill: none;
  stroke: rgba(255,255,255,0.09);
  stroke-width: 5;
}

.grade-ring__arc {
  fill: none;
  stroke: var(--gold);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 201.1;
  stroke-dashoffset: 201.1;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.grade-ring__num {
  fill: var(--text);
  font-size: 14px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: central;
  font-family: inherit;
}

.grade-ring__name {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
}

.about__stack-title {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 0.625rem;
}

.about__stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.375rem;
}


/* ===== STACK CHIP FLIP ANIMATION ===== */
.about__stack-chip[data-chip-flip] {
  opacity: 0;
}
.about__stack-chip[data-chip-flip].chip-flipped {
  animation: card-flip-in 0.55s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
.about__stack-chip {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.25rem;
  text-align: center;
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-style: italic;
  color: var(--text-muted);
  white-space: nowrap;
  transition: var(--transition);
}

.about__stack-chip:hover {
  border-color: var(--border-gold);
  color: var(--gold);
}

[data-theme="light"] .grade-ring__bg { stroke: rgba(0,0,0,0.1); }
[data-theme="light"] .about__stack-chip { background: rgba(0,0,0,0.03); }

.about__card-icon {
  width: 28px; height: 28px;
  margin-bottom: .75rem;
  color: var(--gold);
}
.about__card-icon svg { width: 28px; height: 28px; }

.about__card-value { font-size: 1.75rem; font-weight: 800; line-height: 1; margin-bottom: 0.35rem; }

/* ── About stats grid ── */
.about__stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.about__stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: border-color .25s, box-shadow .25s;
}
.about__stat-card:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-gold);
}
.about__stat-card--wide { grid-column: 1 / -1; }
.about__stat-val {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.375rem;
}
.about__stat-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ===== PRODUCTS ===== */
.products { background: var(--bg-2); }

.products__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.product-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-4px);
  box-shadow: var(--shadow), var(--shadow-gold);
}

.product-card--wide {
  grid-column: span 2;
  flex-direction: column;
  align-items: flex-start;
}

.product-card__tag {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.875rem;
}

.product-card__content { flex: 1; display: flex; flex-direction: column; }

.product-card__title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.product-card__title--logo { line-height: 1; }
.product-card__logo-img {
  height: 60px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
[data-theme="light"] .product-card__logo-img {
  filter: brightness(0);
}
.product-card__logo-img--robymarket {
  height: 44px;
}
.product-card__logo-img--foodmarket {
  height: 44px;
}
.product-card__logo-img--attractive {
  height: 80px;
}
.product-card__logo-img--dentego {
  height: 44px;
}

.product-card__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.product-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.product-card__tags span {
  padding: 0.3125rem 0.75rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.product-card__link {
  margin-top: auto;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: var(--transition);
}

.product-card__link:hover { gap: 0.625rem; }

.product-card__visual {
  width: 100px;
  height: 100px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 2.5rem;
}

.product-card--wide .product-card__visual { width: 120px; height: 120px; font-size: 3rem; }

.product-card__icon-img {
  width: 75%;
  height: 75%;
  object-fit: contain;
  border-radius: 8px;
}

.product-card__visual--roby { background: linear-gradient(135deg, rgba(201,168,76,0.2), rgba(201,168,76,0.05)); }
.product-card__visual--maxbonus { background: linear-gradient(135deg, rgba(96,165,250,0.15), rgba(96,165,250,0.03)); }
.product-card__visual--beyond { background: linear-gradient(135deg, rgba(167,139,250,0.15), rgba(167,139,250,0.03)); }
.product-card__visual--dentego { background: linear-gradient(135deg, rgba(52,211,153,0.15), rgba(52,211,153,0.03)); }
.product-card__visual--food { background: linear-gradient(135deg, rgba(251,146,60,0.15), rgba(251,146,60,0.03)); }
.product-card__visual--attractive { background: linear-gradient(135deg, rgba(244,114,182,0.15), rgba(244,114,182,0.03)); }

/* ===== PORTFOLIO ===== */
.portfolio { background: var(--bg); }

.portfolio__filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.portfolio__filter {
  padding: 0.5rem 1.125rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.portfolio__filter:hover {
  border-color: rgba(201,168,76,0.4);
  color: var(--text);
}

.portfolio__filter.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-color: transparent;
  color: #000;
  font-weight: 700;
}

.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
}

.portfolio-card__image {
  margin: -2rem -2rem 0;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
}

.portfolio-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.portfolio-card:hover .portfolio-card__image img {
  transform: scale(1.04);
}

.portfolio-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-4px);
  box-shadow: var(--shadow), var(--shadow-gold);
}

.portfolio-card.hidden {
  display: none;
}

.portfolio-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.portfolio-card__client {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portfolio-card__category {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.portfolio-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.portfolio-card__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.portfolio-card__results {
  display: flex;
  gap: 1.5rem;
}

.portfolio-card__result {
  display: flex;
  flex-direction: column;
}

.portfolio-card__result-value {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.portfolio-card__result-label {
  font-size: 0.6875rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

.portfolio-card__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: auto;
}

.portfolio-card__tech span {
  padding: 0.25rem 0.625rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.6875rem;
  color: var(--text-dim);
}

.portfolio-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.5rem 1.125rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-gold);
  color: var(--gold);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  align-self: flex-start;
}
.portfolio-card__link:hover {
  background: rgba(201,168,76,0.08);
  border-color: var(--gold);
  transform: translateY(-1px);
}
.portfolio-card__link::after { content: '→'; }

.portfolio__more {
  margin-top: 4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.portfolio__more-text {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ===== ACHIEVEMENTS ===== */
.achievements { background: var(--bg-2); }

.achievements__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 5rem;
}

.achievement-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
  text-align: left;
}

.achievement-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-4px);
}

.achievement-card__icon {
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 1rem;
  color: var(--gold);
}
.achievement-card__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.achievement-card__year {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.achievement-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.achievement-card__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== CLIENTS MARQUEE ===== */
.clients { overflow: hidden; }

.clients__marquee {
  position: relative;
  overflow: hidden;
  padding: 1.5rem 0;
}

.clients__marquee::before,
.clients__marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
}

.clients__marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--marquee-fade), transparent);
}

.clients__marquee::after {
  right: 0;
  background: linear-gradient(-90deg, var(--marquee-fade), transparent);
}

.clients__track {
  display: flex;
  gap: 1.5rem;
  animation: marquee 30s linear infinite;
  width: max-content;
}

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

.clients__item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: var(--transition);
  cursor: default;
  min-width: 140px;
}

.clients__item:hover {
  border-color: var(--border-gold);
  background: var(--hero-grid-color);
}

.clients__logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  /* Dark mode base: invert делает тёмные логотипы светлыми,
     brightness(1.5) компенсирует потемнение белых элементов после invert. */
  filter: grayscale(1) invert(1) brightness(1.5);
  opacity: 0.65;
  transition: opacity 0.35s ease, filter 0.35s ease;
}

[data-theme="light"] .clients__logo {
  filter: grayscale(1);
  opacity: 0.5;
}

/* Пауза marquee при наведении — логотипы не мелькают под курсором */
.clients__marquee:hover .clients__track {
  animation-play-state: paused;
}

/* Hover: сохраняем invert чтобы тёмные лого оставались видимы на тёмном фоне */
.clients__item:hover .clients__logo {
  filter: grayscale(1) invert(1) brightness(2.2);
  opacity: 1;
}
[data-theme="light"] .clients__item:hover .clients__logo {
  filter: grayscale(0);
  opacity: 0.9;
}

/* ===== TEAM ===== */
.team { background: var(--bg); }

.team__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}

.team__text {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.team__expertise {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: center;
}

/* Каждый пункт скрыт по умолчанию */
.team__exp-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 0.9375rem;
  font-weight: 500;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Когда родитель получил класс visible — показываем пункты поочерёдно */
.team__expertise.visible .team__exp-item:nth-child(1)  { opacity: 1; transform: none; transition-delay: 0.05s; }
.team__expertise.visible .team__exp-item:nth-child(2)  { opacity: 1; transform: none; transition-delay: 0.15s; }
.team__expertise.visible .team__exp-item:nth-child(3)  { opacity: 1; transform: none; transition-delay: 0.25s; }
.team__expertise.visible .team__exp-item:nth-child(4)  { opacity: 1; transform: none; transition-delay: 0.35s; }
.team__expertise.visible .team__exp-item:nth-child(5)  { opacity: 1; transform: none; transition-delay: 0.45s; }
.team__expertise.visible .team__exp-item:nth-child(6)  { opacity: 1; transform: none; transition-delay: 0.55s; }
.team__expertise.visible .team__exp-item:nth-child(7)  { opacity: 1; transform: none; transition-delay: 0.65s; }
.team__expertise.visible .team__exp-item:nth-child(8)  { opacity: 1; transform: none; transition-delay: 0.75s; }

.team__exp-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.team__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 4rem;
}

.team__stat-card {
  position: relative;
  background: transparent;
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 180px;
  overflow: hidden;
}

/* SVG border drawn on load */
.stat-border {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.stat-border__rect {
  fill: none;
  stroke: rgba(184,154,74,0.5);
  stroke-width: 1;
  stroke-dasharray: 9999;
  stroke-dashoffset: 9999;
}

.team__stat-label {
  font-size: 0.625rem;
  color: rgba(184,154,74,0.55);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.65;
  font-weight: 600;
  flex: 0 0 auto;
  width: 115px;
  padding-top: 0.1em;
}

.team__stat-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4rem, 6vw, 7rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  text-align: right;
  align-self: flex-end;
}

[data-theme="light"] .team__stat-value {
  color: #1a1a1a;
}
[data-theme="light"] .team__stat-label {
  color: rgba(0,0,0,0.5);
}
[data-theme="light"] .stat-border__rect {
  stroke: rgba(0,0,0,0.25);
}

/* ===== MISSION ===== */
.mission {
  position: relative;
  padding: 8rem 0;
  text-align: center;
  overflow: hidden;
}

.mission__bg {
  position: absolute;
  inset: 0;
}

.mission__glow {
  position: absolute;
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(201,168,76,0.08) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.mission__content { position: relative; z-index: 1; }

.mission__quote {
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  font-weight: 500;
  line-height: 1.6;
  max-width: 760px;
  margin: 0 auto;
  color: var(--text-muted);
  font-style: normal;
}

/* ===== OFFICE MAP ===== */
.office-map { overflow: hidden; padding-bottom: 0; }
.office-map .section-header { margin-bottom: 2rem; }

.office-map__canvas-wrap {
  position: relative;
  width: calc(100% - 16rem);
  max-width: 960px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  line-height: 0;
}

#officeMapCanvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 800 / 500;
}

.office-map__pin {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.office-map__pin-dot {
  width: 10px;
  height: 10px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--gold);
  position: relative;
  z-index: 2;
}

.office-map__pin-pulse {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: mapPulse 2.2s ease-out infinite;
  pointer-events: none;
}

.office-map__pin-card {
  position: absolute;
  left: 18px;
  top: -16px;
  background: rgba(12, 16, 20, 0.9);
  border: 1px solid rgba(201, 168, 76, 0.5);
  border-radius: 8px;
  padding: 8px 14px;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.office-map__pin-city {
  font-size: 0.8125rem;
  font-weight: 600;
}

.office-map__pin-sub {
  font-size: 0.625rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  font-weight: 600;
}

@keyframes mapPulse {
  0%   { transform: translate(-50%, -50%) scale(0.4); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(2.8); opacity: 0; }
}

/* ===== TEAM VIDEO ===== */
.team-video { overflow: hidden; padding-bottom: 5rem; }
.team-video .section-header { margin-bottom: 2rem; }
.team-video__wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  line-height: 0;
}
.team-video__sound {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.5);
  background: rgba(10,14,20,0.65);
  backdrop-filter: blur(8px);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
  z-index: 3;
}
.team-video__sound:hover { border-color: var(--gold); background: rgba(10,14,20,0.85); transform: scale(1.08); }
.team-video__sound svg { width: 1.1rem; height: 1.1rem; }
.team-video__sound .sound-icon--on  { display: none; }
.team-video__sound .sound-icon--off { display: block; }
.team-video__sound.is-on .sound-icon--on  { display: block; }
.team-video__sound.is-on .sound-icon--off { display: none; }
.team-video__player {
  display: block;
  width: 100%;
  height: auto;
  max-height: 540px;
  object-fit: cover;
  cursor: pointer;
}
/* Video controls popup */
.video-controls {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(0.4rem);
  background: rgba(10,14,20,0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 3rem;
  padding: 0.55rem 1rem 0.55rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s, transform .22s, visibility .22s;
  z-index: 4;
  white-space: nowrap;
}
.video-controls.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.video-controls__btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(201,168,76,0.5);
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color .2s, transform .15s;
  padding: 0;
}
.video-controls__btn:hover { border-color: var(--gold); transform: scale(1.1); }
.video-controls__btn svg { width: 0.8rem; height: 0.8rem; }
.video-controls__seek {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.18);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}
.video-controls__seek-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  width: 0%;
  pointer-events: none;
  transition: width .1s linear;
}
.video-controls__time {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.65);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 2.2rem;
  text-align: right;
}
@media (max-width: 768px) {
  .team-video__wrap { width: calc(100% - 2rem); }
}

/* ===== SITE FOOTER ===== */
.site-footer {
  background: #000;
  color: #fff;
  padding: 5rem 0 3.5rem;
}
.site-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  column-gap: 3rem;
  row-gap: 2.5rem;
  min-height: 70vh;
}

/* LEFT — display:contents делает детей прямыми ячейками грида */
.site-footer__left  { display: contents; }

.site-footer__hero-text { grid-column: 1; grid-row: 1; align-self: start; line-height: 1; display: flex; flex-direction: column; }
.site-footer__social    { grid-column: 1; grid-row: 2; align-self: start; display: flex; gap: .75rem; }
.site-footer__social .social-icon {
  color: #fff;
  opacity: .55;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: opacity .25s;
}
.site-footer__social .social-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.5);
  animation: tg-pulse 2s ease-out infinite;
}
@keyframes tg-pulse {
  0%   { transform: scale(1);    opacity: .6; }
  70%  { transform: scale(1.75); opacity: 0;  }
  100% { transform: scale(1.75); opacity: 0;  }
}
.site-footer__social .social-icon:hover { opacity: 1; }
.site-footer__social .social-icon:hover::before { animation-play-state: paused; opacity: 0; }
.site-footer__ru {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2.25rem, 4.5vw, 4rem);
  font-weight: 400;
  color: #b89a4a;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: 0.2em;
}
.site-footer__en {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  color: rgba(255,255,255,0.15);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.05;
}
.site-footer__foot { grid-column: 1; grid-row: 3; align-self: end; }
.site-footer__copy { font-size: 0.75rem; color: rgba(255,255,255,0.3); margin-bottom: 1.5rem; }
.site-footer__partners { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }

/* Partner: Sk */
.partner-sk {
  background: #c8e84b;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 68px;
  line-height: 1.1;
}
.partner-sk__sk { font-size: 1.5rem; font-weight: 900; color: #3a3a3a; font-style: italic; }
.partner-sk__sub { font-size: 0.55rem; color: #3a3a3a; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

/* Partner: ФРИИ */
.partner-frii {
  border: 1.5px solid #2c7be5;
  border-radius: 4px;
  padding: 0.35rem 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
}
.partner-frii__top { font-size: 1.1rem; font-weight: 800; color: #2c7be5; letter-spacing: 0.05em; text-transform: uppercase; }
.partner-frii__bot { font-size: 0.5rem; font-weight: 700; color: #2c7be5; letter-spacing: 0.08em; text-transform: uppercase; }

/* Partner: Фонд */
.partner-fond {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-width: 120px;
}
.partner-fond__text { font-size: 0.55rem; font-weight: 700; color: #fff; letter-spacing: 0.05em; line-height: 1.4; }
.partner-fond__stripe { display: flex; height: 4px; border-radius: 2px; overflow: hidden; width: 80px; }
.partner-fond__stripe span { flex: 1; }

/* Partner: Минцифры */
.partner-mincifry { display: flex; align-items: center; gap: .55rem; }
.partner-mincifry__icon { width: 48px; flex-shrink: 0; opacity: .45; filter: grayscale(1) invert(1); }
.partner-mincifry__text { font-size: .55rem; font-weight: 700; color: rgba(255,255,255,.38); letter-spacing: .04em; line-height: 1.4; text-transform: uppercase; max-width: 110px; }

/* RIGHT — display:contents делает детей прямыми ячейками грида */
.site-footer__right { display: contents; }

/* Clocks */
.site-footer__clocks { grid-column: 2; grid-row: 1; align-self: start; justify-self: end; display: flex; gap: 2rem; align-items: flex-start; }
.clock-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.clock-canvas { display: block; }
.clock-tz { font-size: 0.7rem; color: rgba(255,255,255,0.4); letter-spacing: 0.12em; font-weight: 600; text-transform: uppercase; }

/* Info */
.site-footer__info { grid-column: 2; grid-row: 2; align-self: start; justify-self: end; display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-end; }
.site-footer__email {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color .2s;
}
.site-footer__email:hover { color: #b89a4a; }
.site-footer__address {
  font-style: normal;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  line-height: 2;
  text-align: right;
}
.site-footer__address a { color: inherit; text-decoration: none; }
.site-footer__address a:hover { color: #b89a4a; }

/* CTA button */
.site-footer__cta { grid-column: 2; grid-row: 3; align-self: end; justify-self: end; }
.site-footer__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f0ede6;
  color: #1a1a1a;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-radius: 50px;
  transition: background .2s, transform .15s;
}
.site-footer__cta:hover { background: #fff; transform: translateY(-2px); }

@media (max-width: 768px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    row-gap: 2rem;
    min-height: unset;
  }
  .site-footer__hero-text { grid-column: 1; grid-row: 1; }
  .site-footer__social    { grid-column: 1; grid-row: 2; }
  .site-footer__clocks    { grid-column: 1; grid-row: 3; justify-self: start; gap: 1rem; }
  .site-footer__info      { grid-column: 1; grid-row: 4; justify-self: start; align-items: flex-start; }
  .site-footer__foot      { grid-column: 1; grid-row: 5; }
  .site-footer__cta       { grid-column: 1; grid-row: 6; justify-self: start; }
  .site-footer__address   { text-align: left; }
  /* Уменьшаем часы на мобильном */
  .clock-canvas { width: 72px !important; height: 72px !important; }
  .clock-tz { font-size: 0.6rem; }
  /* Партнёры — перенос на мобильном */
  .site-footer__partners { gap: 0.75rem; }
  .partner-fond__text { font-size: 0.6rem; }
  .partner-mincifry__text { font-size: 0.6rem; }
}

/* ===== CONTACTS ===== */
.contacts { background: var(--bg-2); }

.contacts__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.contacts__text {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.contacts__info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contacts__link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

.contacts__link:hover { color: var(--gold); }
.contacts__link-icon { font-size: 1.125rem; }

/* ===== CONTACT FORM ===== */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
}

.contact-form__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.contact-form__field { margin-bottom: 1rem; }

.contact-form__input {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1.125rem;
  color: var(--text);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
  resize: vertical;
}

.contact-form__input:focus {
  border-color: var(--gold);
  background: rgba(201,168,76,0.03);
}

.contact-form__input::placeholder { color: var(--text-dim); }

.contact-form__textarea { min-height: 120px; }

.contact-form__privacy {
  margin-top: 0.875rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
}

/* ===== SUCCESS STATE ===== */
.form-success {
  text-align: center;
  padding: 3rem 2rem;
  display: none;
}

.form-success.visible { display: flex; flex-direction: column; align-items: center; gap: 1rem; }

.form-success__icon { font-size: 3rem; }
.form-success__title { font-size: 1.25rem; font-weight: 700; }
.form-success__text { color: var(--text-muted); font-size: 0.9375rem; }

/* ===== FOOTER ===== */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer__tagline {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-top: 0.875rem;
}

.footer__nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer__nav-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.footer__nav-link {
  display: block;
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 0.625rem;
  transition: var(--transition);
}

.footer__nav-link:hover { color: var(--gold); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-dim);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .products__grid { grid-template-columns: repeat(2, 1fr); }
  .product-card--wide { grid-column: span 2; }
  .portfolio__grid { grid-template-columns: repeat(2, 1fr); }
  .achievements__grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .about__grid { gap: 3rem; }
  .team__grid { gap: 3rem; }
}

@media (max-width: 768px) {
  .section { padding: 5rem 0; }

  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }

  .hero__stats {
    gap: 0;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
  }

  .hero__stat { padding: 0.75rem 1.25rem; }
  .hero__stat-divider { height: 30px; }

  .about__grid { grid-template-columns: 1fr; }
  .about__visual { display: none; }

  .products__grid { grid-template-columns: 1fr; }
  .product-card--wide {
    grid-column: span 1;
    flex-direction: column;
  }
  .product-card__visual { align-self: flex-start; }

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

  .achievements__grid { grid-template-columns: 1fr; gap: 0.875rem; }

  .team__grid { grid-template-columns: 1fr; }
  .team__stats { grid-template-columns: 1fr 1fr; }

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

  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer__nav { grid-template-columns: repeat(2, 1fr); }

  .footer__bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 480px) {
  .hero__actions { flex-direction: column; }
  .hero__stat-divider { display: none; }
  .portfolio__filters { gap: 0.375rem; }
  .portfolio__filter { font-size: 0.8125rem; padding: 0.4375rem 0.875rem; }
  .team__stats { grid-template-columns: 1fr; }
  .footer__nav { grid-template-columns: 1fr; }
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.theme-toggle__pill {
  display: flex;
  align-items: center;
  width: 58px;
  height: 30px;
  border-radius: 100px;
  background: #1a1a1a;
  border: 1.5px solid rgba(255,255,255,0.1);
  padding: 2px;
  transition: background 0.4s ease, border-color 0.4s ease;
  position: relative;
}

[data-theme="light"] .theme-toggle__pill {
  background: #dedad2;
  border-color: rgba(0,0,0,0.12);
}

.theme-toggle__knob {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2e2e2e;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease;
  transform: translateX(0);
  color: var(--gold);
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

[data-theme="light"] .theme-toggle__knob {
  background: #fff;
  transform: translateX(28px);
  color: var(--gold);
  box-shadow: 0 1px 6px rgba(0,0,0,0.15);
}

.theme-icon {
  width: 12px;
  height: 12px;
}

/* Dark mode: show moon */
.theme-icon--moon { display: block; }
.theme-icon--sun  { display: none; }

/* Light mode: show sun */
[data-theme="light"] .theme-icon--moon { display: none; }
[data-theme="light"] .theme-icon--sun  { display: block; }

/* Light theme: fix mobile menu background */
[data-theme="light"] .mobile-menu {
  background: rgba(247,245,240,0.98);
}

/* Light theme: hero glow adjustment */
[data-theme="light"] .hero__glow--1 {
  background: radial-gradient(circle, rgba(158,111,16,0.25) 0%, transparent 70%);
  opacity: 0.5;
}
[data-theme="light"] .hero__glow--2 {
  background: radial-gradient(circle, rgba(158,111,16,0.15) 0%, transparent 70%);
  opacity: 0.4;
}

/* Light theme: mission glow */
[data-theme="light"] .mission__glow {
  background: radial-gradient(ellipse, rgba(158,111,16,0.06) 0%, transparent 70%);
}

/* Smooth theme transition on all elements */
body,
.nav, .nav__logo-icon, .btn,
.product-card, .portfolio-card, .achievement-card,
.team__stat-card, .contact-form, .footer {
  transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

/* ===== BOOKING MODAL ===== */
.booking-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.booking-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.booking-modal {
  background: #fff;
  border-radius: 20px;
  display: grid;
  grid-template-columns: 260px 1fr;
  width: 100%;
  max-width: 660px;
  max-height: 92vh;
  overflow: hidden;
  overflow-y: auto;
  position: relative;
  transform: translateY(24px) scale(.97);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 32px 80px rgba(0,0,0,.35);
}
.booking-overlay.is-open .booking-modal {
  transform: translateY(0) scale(1);
}

/* --- Close button --- */
.booking-close {
  position: absolute;
  top: .85rem;
  right: .85rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.07);
  color: rgba(0,0,0,.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
  z-index: 2;
}
.booking-close:hover { background: rgba(0,0,0,.13); color: rgba(0,0,0,.8); }

/* --- Dark left panel --- */
.booking-info {
  background: #0d0d0d;
  padding: 2rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
}
.booking-brand__logo {
  height: 30px;
  width: auto;
  object-fit: contain;
  object-position: left;
  margin-bottom: 2rem;
  opacity: .9;
  display: block;
  align-self: flex-start;
  flex-shrink: 0;
}
/* Suppress draw animations on the booking modal logo */
.booking-brand__logo .logo-hex-path,
.booking-brand__logo .logo-accent-path {
  stroke-dasharray: none;
  stroke-dashoffset: 0;
  animation: none;
}
.booking-brand__logo .logo-diamond-path,
.booking-brand__logo .logo-text-top,
.booking-brand__logo .logo-text-bottom,
.booking-brand__logo .logo-dot {
  opacity: 1;
  animation: none;
  transform: none;
}
.booking-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: .75rem;
  border: 2px solid rgba(255,255,255,.12);
  flex-shrink: 0;
}
.booking-avatar img { width: 100%; height: 100%; object-fit: cover; }
.booking-avatar svg { width: 100%; height: 100%; }
.booking-host {
  font-size: .75rem;
  color: rgba(255,255,255,.45);
  margin-bottom: .3rem;
  letter-spacing: .03em;
}
.booking-event {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}
.booking-meta { display: flex; flex-direction: column; gap: 1rem; margin-top: auto; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.08); }
.booking-meta__row {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  font-size: .78rem;
  color: rgba(255,255,255,.55);
  line-height: 1.5;
}

/* --- Form panel --- */
.booking-form-wrap {
  padding: 2.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.booking-form__title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #111;
  line-height: 1.2;
  margin-bottom: .45rem;
}
.booking-form__sub {
  font-size: .83rem;
  color: #999;
  margin-bottom: 1.75rem;
}
.booking-field { margin-bottom: .9rem; }
.booking-field input {
  width: 100%;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  padding: .85rem 1rem;
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
  background: #fafafa;
  color: #111;
}
.booking-field input::placeholder { color: #bbb; }
.booking-field input:focus { border-color: #b89a4a; background: #fff; }
.booking-submit {
  width: 100%;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: .95rem 1rem;
  font-size: .95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, transform .15s;
  margin-top: .25rem;
  margin-bottom: .85rem;
}
.booking-submit:hover:not(:disabled) { background: #2a2a2a; transform: translateY(-1px); }
.booking-submit:disabled { opacity: .6; cursor: not-allowed; }
.booking-note {
  font-size: .72rem;
  color: #bbb;
  text-align: center;
  line-height: 1.4;
}
.booking-success[hidden] { display: none !important; }
.booking-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .75rem;
  padding: 2.5rem 1rem;
  flex: 1;
}
.booking-success p {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111;
}
.booking-success span {
  font-size: .85rem;
  color: #888;
}

/* --- Mobile --- */
@media (max-width: 580px) {
  .booking-modal {
    grid-template-columns: 1fr;
    border-radius: 16px;
    max-height: 95vh;
  }
  .booking-info {
    border-radius: 16px 16px 0 0;
    padding: 1.5rem;
  }
  .booking-meta { margin-top: 1rem; padding-top: 1rem; }
  .booking-form-wrap { padding: 1.5rem; }
  .booking-close {
    background: rgba(255,255,255,.15);
    color: rgba(255,255,255,.9);
  }
  .booking-close:hover {
    background: rgba(255,255,255,.28);
    color: #fff;
  }
}

/* ===== LANG SWITCHER ===== */
.lang-switcher {
  display: flex; align-items: center; flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.1); border-radius: 8px; overflow: hidden;
  transition: border-color 0.3s;
}
[data-theme="light"] .lang-switcher { border-color: rgba(0,0,0,0.12); }
.lang-btn {
  background: none; border: none; padding: 0.375rem 0.625rem;
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--text-muted); cursor: pointer; line-height: 1;
  transition: color 0.2s, background 0.2s;
}
.lang-btn:first-child { border-right: 1.5px solid rgba(255,255,255,0.1); }
[data-theme="light"] .lang-btn:first-child { border-right-color: rgba(0,0,0,0.12); }
.lang-btn:hover { color: var(--text); background: rgba(255,255,255,0.06); }
[data-theme="light"] .lang-btn:hover { background: rgba(0,0,0,0.05); }
.lang-btn.active { color: var(--gold); background: rgba(201,168,76,0.1); }
[data-theme="light"] .lang-btn.active { background: rgba(158,111,16,0.1); }
@media (max-width: 768px) {
  /* Лого прижимаем влево, остальные контролы — вправо */
  .nav__container { gap: 0.75rem; padding: 0 1rem; }
  .nav__logo { margin-right: auto; }
  .nav__burger { margin-left: 0; }
  /* Лангсвитчер в шапке на мобильном */
  .nav__container .lang-switcher { display: flex; border-color: rgba(255,255,255,0.2); padding: 2px; }
  .nav__container .lang-btn { font-size: 0.7rem; padding: 0.2rem 0.45rem; }
  [data-theme="light"] .nav__container .lang-switcher { border-color: rgba(0,0,0,0.15); }
  /* Скрываем лангсвитчер внутри оверлея бургер-меню */
  .mobile-menu .lang-switcher { display: none; }
}

/* ===== BILINGUAL LOGO SWITCH ===== */
html:not([lang="en"]) .logo-en { display: none; }
html[lang="en"]       .logo-ru { display: none; }

/* ===== FOOTER HERO TEXT — EN MODE: EN on top, RU below ===== */
html[lang="en"] .site-footer__en {
  order: -1;
  color: #b89a4a;
  font-size: clamp(2.25rem, 4.5vw, 4rem);
  margin-bottom: 0.2em;
}
html[lang="en"] .site-footer__ru {
  order: 0;
  color: rgba(255,255,255,0.15);
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 0;
}

/* ===== MOBILE PORTFOLIO PAGINATION ===== */
.portfolio__mobile-wrap {
  display: none;
  text-align: center;
  margin-top: 2rem;
}
