:root {
  --font-sans: "Manrope", system-ui, -apple-system, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
  --accent: #b45309;
  --accent-text: #ffffff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --topbar-bg: rgba(255, 255, 255, 0.92);
  --border: rgba(15, 23, 42, 0.1);
  --border-btn: rgba(15, 23, 42, 0.15);
  --text: #0f172a;
  --muted: #475569;
  --seg-bg: rgba(15, 23, 42, 0.05);
  --seg-active: #ffffff;
  --seg-active-text: #0f172a;
  --hover-bg: rgba(15, 23, 42, 0.05);
}

body.theme-dark {
  --surface: rgba(2, 6, 23, 0.8);
  --surface-strong: rgba(2, 6, 23, 0.92);
  --topbar-bg: rgba(2, 6, 23, 0.88);
  --border: rgba(255, 255, 255, 0.12);
  --border-btn: rgba(255, 255, 255, 0.16);
  --text: #f1f5f9;
  --muted: #cbd5e1;
  --seg-bg: rgba(255, 255, 255, 0.07);
  --seg-active: rgba(255, 255, 255, 0.16);
  --seg-active-text: #ffffff;
  --hover-bg: rgba(255, 255, 255, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font-family: inherit;
  color: inherit;
}

/* Фоновая сцена */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.parallax-layer,
.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  will-change: transform;
}

.scene-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Шапка */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.topbar-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}

.nav a {
  white-space: nowrap;
  transition: color 0.15s ease;
}

.nav a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.zen-header-title {
  display: none;
  font-size: 0.875rem;
  opacity: 0.82;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
  .zen-header-title:not([hidden]) {
    display: block;
  }
}

/* Основная сетка */
.main-wrap {
  flex: 1;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.main-wrap[hidden],
.zen-stage[hidden],
[hidden] {
  display: none !important;
}

.hero-center {
  margin: auto 0;
  padding: 1.75rem 0 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.hero-card {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .hero-card {
    padding: 2.25rem;
  }
}

.eyebrow {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
}

.hero-title {
  margin: 0.75rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.4vw, 3.75rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero-title em {
  font-style: italic;
  font-weight: 500;
}

.hero-lead {
  margin: 1rem 0 0;
  max-width: 40rem;
  font-size: 1rem;
  line-height: 1.6;
}

@media (min-width: 640px) {
  .hero-lead {
    font-size: 1.125rem;
  }
}

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

.meta-strip {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.meta-strip .sep {
  display: none;
}

@media (min-width: 640px) {
  .meta-strip {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .meta-strip .sep {
    display: inline;
  }
}

.cta-row {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* Кнопки */
.btn-accent,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-text);
  border: 1px solid transparent;
}

.btn-accent:hover {
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-btn);
  font-weight: 500;
}

.btn-outline:hover {
  background: var(--hover-bg);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  border-radius: 0.5rem;
}

.btn-xs {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 0.5rem;
}

.icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* Подвал */
.footer-card {
  max-width: 48rem;
  width: 100%;
  margin: 0.5rem auto 1.5rem;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-card p {
  margin: 0;
}

.footer-mail {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (min-width: 640px) {
  .footer-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Cookie-баннер */
body.has-cookie-banner .main-wrap {
  padding-bottom: 11rem;
}

.cookie-notice {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: var(--surface-strong);
  border-top: 1px solid var(--border);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.cookie-card {
  max-width: 64rem;
  margin: 0 auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0.65rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cookie-text h2 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
}

.cookie-text p {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  line-height: 1.38;
}

@media (min-width: 640px) {
  body.has-cookie-banner .main-wrap {
    padding-bottom: 4.5rem;
  }
  .cookie-card {
    padding: 0.75rem 1.5rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }
  .cookie-text h2 {
    font-size: 0.875rem;
  }
  .cookie-text p {
    font-size: 0.75rem;
  }
}

/* Анимации */
@keyframes floatSlow {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(18px, -6px, 0);
  }
}

@keyframes floatReverse {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-22px, 5px, 0);
  }
}

@keyframes shimmerPulse {
  0%, 100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.9;
  }
}

@keyframes windGustSway {
  0% {
    transform: rotate(0deg);
  }
  20% {
    transform: rotate(1.9deg);
  }
  45% {
    transform: rotate(-0.85deg);
  }
  70% {
    transform: rotate(0.65deg);
  }
  86% {
    transform: rotate(-0.2deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

.animate-float-slow {
  animation: floatSlow 22s ease-in-out infinite;
}

.animate-float-reverse {
  animation: floatReverse 28s ease-in-out infinite;
}

.animate-shimmer {
  animation: shimmerPulse 5.5s ease-in-out infinite;
}

.tree-sway {
  transform-box: fill-box;
  transform-origin: bottom center;
}

.is-wind-gust .tree-sway {
  animation: windGustSway 3.4s cubic-bezier(0.37, 0, 0.63, 1) 1 both;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .animate-float-slow,
  .animate-float-reverse,
  .animate-shimmer,
  .is-wind-gust .tree-sway {
    animation: none !important;
  }
}
