:root {
  color-scheme: dark;
  --bg: #121316;
  --panel: #1b1d22;
  --panel-soft: #24262d;
  --text: #f8f8fb;
  --muted: #b7bbc8;
  --line: rgba(255, 255, 255, 0.12);
  --violet: #6657ff;
  --violet-light: #8277ff;
  --cyan: #57d8ff;
  --green: #6ee7b7;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 12%, rgba(87, 216, 255, 0.14), transparent 26rem),
    radial-gradient(circle at 84% 8%, rgba(102, 87, 255, 0.2), transparent 30rem),
    linear-gradient(180deg, #141518 0%, #1d1e23 48%, #121316 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 19, 22, 0.82);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  background: #3f4043;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.nav-links a,
.lang-btn {
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.nav-links a {
  padding: 9px 12px;
}

.nav-links a:hover,
.lang-btn:hover {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.language-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.lang-btn {
  min-width: 42px;
  padding: 8px 9px;
  cursor: pointer;
  background: transparent;
}

.lang-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--violet), #7468ff);
  box-shadow: 0 10px 24px rgba(102, 87, 255, 0.3);
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 100px);
  padding: 64px 0 44px;
}

.hero-copy h1,
.legal-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 5.7vw, 68px);
  line-height: 1.02;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-text {
  max-width: 690px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.primary-btn,
.secondary-btn,
.legal-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--violet), var(--violet-light));
  box-shadow: 0 18px 42px rgba(102, 87, 255, 0.34);
}

.secondary-btn,
.legal-links a {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.primary-btn:hover,
.secondary-btn:hover,
.legal-links a:hover {
  transform: translateY(-2px);
}

.hero-mark {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
}

.hero-mark::before,
.hero-mark::after {
  position: absolute;
  content: "";
  border-radius: 999px;
  filter: blur(4px);
}

.hero-mark::before {
  width: 86%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(102, 87, 255, 0.22));
  box-shadow: var(--shadow);
  animation: float 7s ease-in-out infinite;
}

.hero-mark::after {
  width: 60%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(87, 216, 255, 0.08);
  animation: float 7s ease-in-out infinite reverse;
}

.hero-mark img {
  position: relative;
  z-index: 2;
  width: min(72%, 390px);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.04;
  letter-spacing: 0;
}

.how-section,
.gallery-section,
.about,
.legal-content {
  padding: 76px 0;
}

.section-copy {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.step-card {
  min-height: 260px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(102, 87, 255, 0.12)),
    var(--panel-soft);
  box-shadow: var(--shadow);
  transition: transform 220ms ease, border-color 220ms ease;
}

.step-card:hover {
  transform: translateY(-4px);
  border-color: rgba(130, 119, 255, 0.5);
}

.step-card span {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--violet), var(--violet-light));
  box-shadow: 0 16px 32px rgba(102, 87, 255, 0.28);
}

.step-card h3 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.gallery-card {
  position: relative;
  display: flex;
  grid-column: span 2;
  flex-direction: column;
  justify-content: space-between;
  min-height: 330px;
  padding: 22px;
  overflow: hidden;
  border: 3px solid rgba(102, 87, 255, 0.9);
  border-radius: 8px;
  color: #5b36e8;
  text-align: left;
  cursor: pointer;
  background:
    linear-gradient(135deg, rgba(102, 87, 255, 0.1), rgba(255, 255, 255, 0.08)),
    #f5edff;
  box-shadow: 0 20px 70px rgba(34, 18, 90, 0.34);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.gallery-card::before,
.gallery-card::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.gallery-card::before {
  inset: 12px;
  border: 1px solid rgba(91, 54, 232, 0.14);
  border-radius: 8px;
}

.gallery-card::after {
  right: 18px;
  bottom: 18px;
  width: 42%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--violet), var(--violet-light));
  opacity: 0.82;
}

.gallery-card.wide {
  grid-column: span 3;
  min-height: 390px;
}

.gallery-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: var(--violet-light);
  box-shadow: 0 24px 90px rgba(102, 87, 255, 0.32);
}

.gallery-number,
.gallery-title,
.gallery-text,
.gallery-hint {
  position: relative;
  z-index: 1;
}

.gallery-number {
  width: max-content;
  padding: 7px 10px;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  background: var(--violet);
}

.gallery-title {
  display: block;
  max-width: 94%;
  margin-top: auto;
  font-size: clamp(23px, 2.2vw, 34px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0;
}

.gallery-text {
  display: block;
  max-width: 92%;
  margin-top: 14px;
  color: #6f4af0;
  font-size: 17px;
  font-weight: 600;
}

.gallery-hint {
  width: max-content;
  margin-top: 28px;
  padding-bottom: 4px;
  border-bottom: 2px solid currentColor;
  color: #4e26dd;
  font-size: 13px;
  font-weight: 900;
}

.about-grid p,
.legal-content p,
.legal-hero p {
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(7, 8, 12, 0.78);
  backdrop-filter: blur(18px);
}

.lightbox.open {
  display: grid;
}

.lightbox-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(760px, calc(100vw - 110px));
  min-height: min(620px, calc(100vh - 80px));
  padding: clamp(28px, 5vw, 64px);
  overflow: hidden;
  border: 4px solid var(--violet);
  border-radius: 8px;
  color: #5b36e8;
  background:
    linear-gradient(135deg, rgba(102, 87, 255, 0.12), rgba(255, 255, 255, 0.04)),
    #f5edff;
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.58);
}

.lightbox-title {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 34px 0 18px;
  color: #5b36e8;
  font-size: clamp(34px, 6vw, 70px);
  line-height: 1.02;
  letter-spacing: 0;
}

.lightbox-text {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0;
  color: #6f4af0;
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 600;
}

.lightbox-lines {
  position: absolute;
  right: 42px;
  bottom: 42px;
  display: grid;
  gap: 16px;
  width: min(42%, 290px);
}

.lightbox-lines span {
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--violet), var(--violet-light));
}

.lightbox-close,
.lightbox-arrow {
  position: fixed;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  font: inherit;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 180ms ease, background 180ms ease;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
}

.lightbox-close {
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
}

.lightbox-arrow {
  top: 50%;
  width: 54px;
  height: 72px;
  transform: translateY(-50%);
}

.lightbox-arrow:hover {
  transform: translateY(calc(-50% - 2px));
}

.lightbox-arrow.prev {
  left: 24px;
}

.lightbox-arrow.next {
  right: 24px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.about-grid p {
  min-height: 180px;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  font-size: 18px;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.legal-page {
  padding-top: 52px;
}

.legal-hero {
  padding: 56px 0 28px;
}

.legal-hero p:last-child {
  margin-top: 18px;
}

.legal-content {
  max-width: 880px;
}

.legal-content h2 {
  margin: 34px 0 10px;
  font-size: 26px;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-18px) rotate(3deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .language-switch {
    grid-column: 2;
    grid-row: 1;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 52px;
  }

  .hero-mark {
    min-height: 360px;
  }

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

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

  .gallery-card,
  .gallery-card.wide {
    grid-column: span 1;
    min-height: 300px;
  }
}

@media (max-width: 560px) {
  .site-header,
  .section,
  .site-footer {
    width: min(100% - 20px, 1180px);
  }

  .brand span {
    max-width: 108px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero-copy h1,
  .legal-hero h1 {
    font-size: 40px;
  }

  .hero-text {
    font-size: 18px;
  }

  .hero-actions,
  .legal-links,
  .site-footer {
    flex-direction: column;
  }

  .how-section,
  .gallery-section,
  .about,
  .legal-content {
    padding: 54px 0;
  }

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

  .gallery-card,
  .gallery-card.wide {
    min-height: 280px;
  }

  .lightbox {
    padding: 14px;
  }

  .lightbox-card {
    width: calc(100vw - 28px);
    min-height: min(560px, calc(100vh - 100px));
  }

  .lightbox-arrow {
    top: auto;
    bottom: 18px;
    width: 48px;
    height: 52px;
    transform: none;
  }

  .lightbox-arrow:hover {
    transform: translateY(-2px);
  }

  .lightbox-arrow.prev {
    left: 18px;
  }

  .lightbox-arrow.next {
    right: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
