/* ============================================================
   КВАНТОВЫЙ ТУРИЗМ — Основные стили
   style.css: CSS-переменные, reset, типографика, контейнер, утилиты
   ============================================================ */

/* --- Дизайн-токены (CSS Custom Properties) --- */
:root {
  /* Фон */
  --color-bg-primary: #09040f;
  --color-bg-deep: #020103;
  --color-bg-card: #14091c;
  --color-bg-card-hover: #22102d;
  --color-bg-overlay: rgba(9, 4, 15, 0.82);

  /* Космический спектр */
  --color-space-dark: #271233;
  --color-space-blue: #8f3dff;
  --color-space-violet: #b266ff;
  --color-space-cyan: #ffd447;

  /* Тёплые акценты (энергия, огонь) */
  --color-accent-orange: #ff7a18;
  --color-accent-gold: #ffd447;
  --color-accent-red: #ff315c;
  --color-accent-violet: #8f3dff;

  /* Текст */
  --color-text-primary: #fff4e8;
  --color-text-secondary: #f3c9a8;
  --color-text-muted: #b98aa0;

  /* Градиенты */
  --gradient-bg:
    radial-gradient(circle at top, rgba(143, 61, 255, 0.14), transparent 32%),
    radial-gradient(circle at 20% 20%, rgba(255, 49, 92, 0.1), transparent 22%),
    linear-gradient(180deg, #09040f 0%, #020103 100%);
  --gradient-cta: linear-gradient(90deg, #b85cff 0%, #ff315c 34%, #ff7a18 68%, #ffb22e 100%);
  --gradient-glow: linear-gradient(135deg, #ffd447 0%, #ff7a18 36%, #ff315c 72%, #8f3dff 100%);
  --gradient-panel: linear-gradient(180deg, rgba(33, 9, 39, 0.96) 0%, rgba(17, 5, 21, 0.92) 100%);

  /* Тени и свечения */
  --shadow-card: 0 18px 42px rgba(0, 0, 0, 0.42);
  --shadow-card-hover: 0 24px 60px rgba(143, 61, 255, 0.22);
  --glow-cta: 0 14px 34px rgba(255, 122, 24, 0.26), 0 0 42px rgba(255, 49, 92, 0.18), 0 0 72px rgba(143, 61, 255, 0.2);
  --glow-cyan: 0 0 24px rgba(255, 212, 71, 0.24);

  /* Типографика */
  --font-heading: 'Cormorant Garamond', serif;
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'Space Grotesk', sans-serif;

  /* Размеры текста (clamp для адаптивности) */
  --text-hero: clamp(2.5rem, 6vw, 5rem);
  --text-h1: clamp(2rem, 4vw, 3.5rem);
  --text-h2: clamp(1.5rem, 3vw, 2.5rem);
  --text-h3: clamp(1.2rem, 2vw, 1.75rem);
  --text-body: clamp(0.95rem, 1.2vw, 1.1rem);
  --text-small: clamp(0.8rem, 1vw, 0.9rem);

  /* Отступы */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  --spacing-section: clamp(4rem, 8vw, 8rem);

  /* Скругления */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 50%;

  /* Анимации */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.3s;
  --duration-slow: 0.6s;

  /* Контейнер */
  --container-max: 1200px;
  --container-padding: clamp(1rem, 4vw, 2rem);
}


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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--color-space-dark);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

@media (hover: hover) and (pointer: fine) {
  html {
    scrollbar-gutter: stable;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.75;
  color: var(--color-text-primary);
  position: relative;
  background: var(--color-bg-primary);
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--gradient-bg);
  pointer-events: none;
  z-index: -1;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
}

p {
  margin-bottom: var(--spacing-sm);
}

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

::selection {
  background: var(--color-space-violet);
  color: var(--color-text-primary);
}

/* Убираем стандартный outline, добавляем свой для фокуса */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-space-cyan);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}


/* --- Типографика --- */
.text-hero {
  font-family: var(--font-heading);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
}

h1, .text-h1 {
  font-size: var(--text-h1);
  font-weight: 700;
}

h2, .text-h2 {
  font-size: var(--text-h2);
  font-weight: 700;
}

h3, .text-h3 {
  font-size: var(--text-h3);
  font-weight: 600;
}

.text-display {
  font-family: var(--font-display);
}

.text-mono {
  font-family: var(--font-mono);
  font-size: var(--text-small);
}

.text-small {
  font-size: var(--text-small);
}

/* Градиентный текст */
.text-gradient {
  background: var(--gradient-glow);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-cta {
  background: var(--gradient-cta);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* --- Контейнер --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container--wide {
  max-width: 1400px;
}

.container--narrow {
  max-width: 800px;
}


/* --- Canvas звёздного фона --- */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}


/* --- Секции --- */
.section {
  padding-top: var(--spacing-section);
  padding-bottom: var(--spacing-section);
  position: relative;
}

.section__header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section__title {
  font-size: var(--text-h2);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  position: relative;
  display: inline-block;
  letter-spacing: 0.08em;
  text-shadow: 0 0 18px rgba(143, 61, 255, 0.18);
}

/* Декоративная линия под заголовком секции */
.section__title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gradient-glow);
  margin: var(--spacing-sm) auto 0;
  border-radius: 2px;
}

.section__subtitle {
  color: var(--color-text-secondary);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  max-width: 600px;
  margin: 0 auto;
}


/* --- Hero-секции --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: clip;
  overflow-y: visible;
  isolation: isolate;
  padding: 8rem 0 clamp(5rem, 12vh, 8rem);
}

.hero--small {
  min-height: 50vh;
}

.hero--medium {
  min-height: 60vh;
}

.hero__content {
  text-align: center;
  z-index: 2;
  position: relative;
  max-width: 880px;
}

.hero__crest {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.hero__crest-line {
  width: 92px;
  height: 1px;
  background: var(--gradient-glow);
  opacity: 0.6;
}

.hero__crest-icon {
  color: var(--color-accent-gold);
  font-size: 1.2rem;
  text-shadow: 0 0 18px rgba(255, 212, 71, 0.45);
}

.hero__pretitle {
  font-family: var(--font-display);
  font-size: var(--text-small);
  color: var(--color-accent-gold);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: var(--spacing-sm);
  text-shadow: 0 0 20px rgba(255, 212, 71, 0.22);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  line-height: 0.98;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255, 49, 92, 0.18), 0 0 42px rgba(143, 61, 255, 0.24);
}

.hero__subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-md);
  font-weight: 500;
  line-height: 1.45;
  margin-left: auto;
  margin-right: auto;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Радиальная вспышка на фоне hero */
.hero__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background:
    radial-gradient(ellipse at center, rgba(143, 61, 255, 0.18), transparent 54%),
    radial-gradient(circle at 50% 40%, rgba(255, 49, 92, 0.1), transparent 28%);
  pointer-events: none;
  z-index: 0;
}

/* Scroll-индикатор */
.hero__scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
  font-size: var(--text-small);
  font-family: var(--font-mono);
}

.hero__scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--color-text-muted);
  border-bottom: 2px solid var(--color-text-muted);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.5; }
  50% { transform: rotate(45deg) translateY(8px); opacity: 1; }
}


/* --- Парящие 3D-объекты (заглушки) --- */
.floating-object {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.floating-object--enceladus {
  --enceladus-size: clamp(84rem, 112vw, 128rem);
  top: -30%;
  right: calc(var(--enceladus-size) / -1.7);
  width: var(--enceladus-size);
  height: var(--enceladus-size);
  transform: translateY(calc(-50% - (var(--enceladus-size) / 2)));
  opacity: 0.94;
  z-index: -1;
}
/* CSS-заглушка для 3D-объекта */
.floating-object__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  font-family: var(--font-mono);
  font-size: var(--text-small);
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--spacing-sm);
  border: 1px solid rgba(255, 122, 24, 0.28);
  background: radial-gradient(circle, rgba(143, 61, 255, 0.14), rgba(255, 49, 92, 0.06) 48%, transparent 72%);
  box-shadow: inset 0 0 18px rgba(255, 212, 71, 0.08), 0 0 32px rgba(143, 61, 255, 0.12);
}

.floating-object__placeholder--enceladus {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, rgba(255, 255, 255, 0.14), transparent 18%),
    radial-gradient(circle at 48% 48%, rgba(182, 214, 255, 0.1), transparent 40%),
    radial-gradient(circle at 64% 58%, rgba(120, 147, 182, 0.12), transparent 54%),
    radial-gradient(circle at 50% 50%, rgba(213, 234, 255, 0.06), transparent 76%);
  box-shadow: none;
  flex-direction: column;
  gap: 1rem;
}

.enceladus-model {
  width: 100%;
  height: 100%;
  filter:
    drop-shadow(0 0 42px rgba(180, 217, 255, 0.22))
    drop-shadow(0 0 92px rgba(188, 220, 255, 0.12))
    drop-shadow(-18px 28px 46px rgba(0, 0, 0, 0.38));
  mix-blend-mode: screen;
}

.enceladus-model img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.enceladus-label {
  display: none;
}


/* --- Утилитарные классы --- */

/* Отображение */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

/* Текст */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Цвета текста */
.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent-orange); }
.text-gold { color: var(--color-accent-gold); }
.text-cyan { color: var(--color-space-cyan); }

/* Flex утилиты */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.flex-wrap { flex-wrap: wrap; }
.gap-xs { gap: var(--spacing-xs); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* Grid утилиты */
.grid { display: grid; }
.grid > * { min-width: 0; }

/* Отступы */
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

/* Ширина */
.w-full { width: 100%; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Overflow */
.overflow-hidden { overflow: hidden; }

/* Line clamp (обрезка текста) */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Разделительная линия */
.divider {
  width: 100%;
  height: 1px;
  background: var(--gradient-glow);
  border: none;
  opacity: 0.3;
}

/* Backdrop blur поверхности */
.glass {
  background: var(--color-bg-overlay);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}


/* --- Скроллбар (Webkit) --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-space-dark);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-red);
}

/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--color-space-dark) var(--color-bg-primary);
}


/* --- Переход между страницами --- */
.page-transition {
  opacity: 1;
  transition: opacity 0.3s var(--ease-smooth);
  position: relative;
  z-index: 1;
}

.page-transition.fade-out {
  opacity: 0;
}

.page-transition.fade-in {
  animation: pageFadeIn 0.4s var(--ease-smooth) forwards;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Внутренние страницы --- */
.page-hero {
  position: relative;
  padding: clamp(8rem, 14vw, 11rem) 0 4rem;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(143, 61, 255, 0.24), transparent 24%),
    radial-gradient(circle at 85% 25%, rgba(255, 49, 92, 0.18), transparent 20%),
    linear-gradient(180deg, rgba(9, 4, 15, 0.72), rgba(9, 4, 15, 0.94));
  pointer-events: none;
}

.page-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.page-hero__content {
  max-width: 48rem;
  min-width: 0;
}

.page-hero__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 5.1rem);
  line-height: 0.98;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}

.page-hero__text {
  max-width: 42rem;
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.8;
  color: var(--color-text-secondary);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

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

.page-hero__panel {
  position: relative;
  min-width: 0;
}

.section--narrow {
  padding-top: 2rem;
}

.grid--catalog,
.grid--steps,
.grid--two {
  display: grid;
  gap: 2rem;
}

.grid--catalog {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid--steps {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid--two {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.filters--center {
  justify-content: center;
}

.feature-list {
  display: grid;
  gap: 0.7rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--color-text-secondary);
}

.feature-list li {
  position: relative;
  padding-left: 1.2rem;
}

.feature-list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--color-accent-gold);
}

.content-panel {
  padding: 2rem;
  border: 1px solid rgba(255, 244, 232, 0.08);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    rgba(15, 8, 22, 0.82);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  min-width: 0;
}

.content-panel__eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-accent-gold);
}

.content-panel__title {
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.05;
  color: var(--color-text-primary);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}

.content-panel p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.8;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  overflow: hidden;
  border: 1px solid rgba(255, 244, 232, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(16, 8, 22, 0.88);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-smooth),
              border-color var(--duration-fast) var(--ease-smooth),
              box-shadow var(--duration-fast) var(--ease-smooth);
}

.gallery-item:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 122, 24, 0.35);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36), 0 0 28px rgba(143, 61, 255, 0.12);
}

.gallery-item__media {
  aspect-ratio: 4 / 3;
  background: radial-gradient(circle at 30% 30%, rgba(255, 212, 71, 0.22), transparent 18%),
              linear-gradient(135deg, rgba(143, 61, 255, 0.35), rgba(255, 49, 92, 0.2), rgba(255, 122, 24, 0.24));
}

.gallery-item__media--image {
  background: radial-gradient(circle at center, rgba(194, 227, 255, 0.08), transparent 62%);
}

.gallery-item__media--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item__media picture,
.gallery-item__media img {
  width: 100%;
  height: 100%;
}

.gallery-item__media--violet {
  background: linear-gradient(135deg, rgba(41, 16, 72, 0.9), rgba(143, 61, 255, 0.45), rgba(255, 49, 92, 0.22));
}

.gallery-item__media--sun {
  background: linear-gradient(135deg, rgba(255, 212, 71, 0.28), rgba(255, 122, 24, 0.3), rgba(143, 61, 255, 0.12));
}

.gallery-item__body {
  padding: 1.35rem;
}

.gallery-item__body h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--color-text-primary);
}

.gallery-item__body p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.7;
}
