:root {
  --bg: 8 6 18;
  --card: 18 14 30;
  --fg: 250 248 255;
  --muted: 196 190 220;
  --line: 255 255 255 / 0.14;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
  --radius: 24px;
  --radius-top: 0 0 24px 24px;
  --radius-bottom: 24px 24px 0 0;
  --pad: clamp(18px, 2.6vw, 28px);
  --max: 1080px;
  --accent: 255 84 170;
  --accent2: 255 196 88;
  --ctaFg: 8 6 18;
  --cardGlow: rgba(255, 255, 255, 0.06);
  --cardTop: rgba(255, 255, 255, 0.09);
  --cardBot: rgba(255, 255, 255, 0.03);
}

body.theme-1 {
  --accent: 255 84 170;
  --accent2: 255 196 88;
}
body.theme-2 {
  --accent: 120 255 214;
  --accent2: 88 152 255;
}
body.theme-3 {
  --accent: 255 140 90;
  --accent2: 255 84 170;
}
body.theme-4 {
  --accent: 200 160 255;
  --accent2: 120 255 214;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

@font-face {
  font-family: Montserrat;
  src: url("../fonts/Montserrat-Italic-VariableFont_wght.woff2") format("woff2");
  font-display: swap;
}

html {
  background: rgb(var(--bg));
  overflow-x: hidden;
}

body {
  margin: 0;
  color: rgb(var(--fg));
  background: rgb(var(--bg));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-family:
    "Montserrat",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  font-size-adjust: 0.52;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      1200px 700px at 12% -10%,
      rgb(var(--accent) / 0.42),
      transparent 62%
    ),
    radial-gradient(
      900px 600px at 95% 0%,
      rgb(var(--accent2) / 0.34),
      transparent 60%
    ),
    radial-gradient(
      1000px 700px at 50% 115%,
      rgb(255 255 255 / 0.07),
      transparent 60%
    ),
    radial-gradient(
      900px 600px at 10% 110%,
      rgb(120 255 214 / 0.18),
      transparent 62%
    ),
    rgb(var(--bg));
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

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

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px var(--pad) 44px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 0 18px;
}

.site-header__brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.site-header__avatar-ring {
  width: 120px;
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 4px;
  display: inline-grid;
  place-items: center;
  background: conic-gradient(
    from 0deg,
    #feda75,
    #fa7e1e,
    #d62976,
    #962fbf,
    #4f5bd5,
    #feda75
  );
  animation: btnWave 7s ease-in-out infinite;
  background-size: 300% 300%;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.site-header__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  border: 3px solid rgb(var(--bg));
  background: rgb(var(--bg));
}

.site-header__name {
  font-size: 16px;
  letter-spacing: 0.2px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgb(var(--fg));
}

.site-header__handle {
  font-size: 13px;
  color: rgb(var(--muted) / 0.98);
}

.site-header__lang {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid rgb(var(--line));
  border-radius: 999px;
  padding: 6px;
  background: rgb(255 255 255 / 0.06);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
}

.site-header__lang a {
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  color: rgb(var(--muted) / 0.95);
}

.site-header__lang a[aria-current="true"] {
  color: rgb(var(--fg));
  background: rgb(var(--accent) / 0.22);
  border: 1px solid rgb(var(--accent) / 0.34);
}

.hero {
  border: 1px solid transparent;
  border-radius: var(--radius-bottom);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-content {
  border: 1px solid rgb(var(--line));
  border-radius: var(--radius-top);
  overflow: hidden;
  background:
    radial-gradient(
      900px 460px at 18% 0%,
      rgb(var(--accent) / 0.28),
      transparent 62%
    ),
    radial-gradient(
      900px 460px at 92% 10%,
      rgb(var(--accent2) / 0.22),
      transparent 65%
    ),
    linear-gradient(180deg, var(--cardTop), var(--cardBot));
  box-shadow: var(--shadow);
  padding: clamp(18px, 2.6vw, 26px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

h1 {
  margin: 0;
  font-size: clamp(22px, 3.2vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.12;
  font-weight: 800;
  background: linear-gradient(
    135deg,
    rgb(var(--fg)),
    rgb(var(--accent2) / 0.95),
    rgb(var(--accent) / 0.95),
    rgb(var(--accent2) / 0.95),
    rgb(var(--fg))
  );
  background-size: 300% 300%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientWave 6s ease-in-out infinite;
}

@keyframes gradientWave {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.hero-content__subtitle {
  margin: 0;
  color: rgb(var(--muted) / 0.98);
  font-size: 14px;
  line-height: 1.5;
  max-width: 68ch;
}

.hero-content__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 6px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgb(var(--line));
  background: rgb(255 255 255 / 0.07);
  color: rgb(var(--fg));
  font-weight: 650;
  letter-spacing: 0.2px;
  transition:
    transform 0.12s ease,
    background 0.12s ease,
    border-color 0.12s ease,
    filter 0.12s ease;
  will-change: transform;
}

.button--primary {
  background: linear-gradient(
    135deg,
    rgb(var(--accent) / 0.98),
    rgb(var(--accent2) / 0.94),
    rgb(var(--accent) / 0.98)
  );
  background-size: 300% 300%;
  background-position: 0% 50%;
  color: rgb(var(--fg));
  border-color: transparent;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  font-size: 1.2rem;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
  animation: btnWave 7s ease-in-out infinite;
}

@keyframes btnWave {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.button--primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.5);
  outline: 3px solid rgb(var(--accent) / 0.34);
  outline-offset: 3px;
}

.button--primary:active {
  transform: translateY(0) scale(0.99);
}

.button:focus-visible {
  outline: 3px solid rgb(var(--accent) / 0.34);
  outline-offset: 3px;
}

.button svg {
  width: 2rem;
  fill: currentColor;
}

.page__grid {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.card {
  border: 1px solid rgb(var(--line));
  border-radius: var(--radius);
  background:
    radial-gradient(
      720px 360px at 12% 0%,
      rgb(var(--accent) / 0.18),
      transparent 62%
    ),
    radial-gradient(
      720px 360px at 90% 10%,
      rgb(var(--accent2) / 0.14),
      transparent 66%
    ),
    linear-gradient(180deg, var(--cardTop), var(--cardBot));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.card__inner {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card__kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgb(var(--fg) / 0.86);
}

ul {
  margin: 0;
  padding-left: 18px;
  color: rgb(var(--muted) / 0.98);
  line-height: 1.6;
  font-size: 14px;
}

.final-cta {
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.final-cta p {
  margin: 0;
  color: rgb(var(--muted) / 0.98);
  font-size: 13px;
  line-height: 1.45;
  max-width: 70ch;
}

.site-footer {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: rgb(var(--fg) / 0.62);
  font-size: 12px;
  max-width: 1023px;
  margin: 0 auto;
}

.site-footer a {
  color: rgb(var(--fg) / 0.8);
}

.site-footer a:focus-visible {
  outline: 3px solid rgb(var(--accent) / 0.25);
  outline-offset: 3px;
  border-radius: 10px;
}

.site-footer__copyright {
  color: rgb(var(--fg) / 0.62);
  font-size: 12px;
  margin: 1rem 0;
}

.hero,
.card,
.tile,
.site-header__lang {
  border: 0 !important;
  background-clip: padding-box;
  transform: translateZ(0);
  backface-visibility: hidden;
  isolation: isolate;
}

.hero {
  box-shadow:
    inset 0 0 0 1px rgb(var(--line)),
    var(--shadow) !important;
  padding: 2rem;
}

.card {
  box-shadow:
    inset 0 0 0 1px rgb(var(--line)),
    0 12px 40px rgba(0, 0, 0, 0.28) !important;
}

.tile {
  box-shadow:
    inset 0 0 0 1px rgb(var(--line)),
    0 10px 30px rgba(0, 0, 0, 0.22) !important;
}

.site-header__lang {
  box-shadow:
    inset 0 0 0 1px rgb(var(--line)),
    0 12px 40px rgba(0, 0, 0, 0.3) !important;
}

.hero__media {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  aspect-ratio: 9 / 7;
  overflow: hidden;
}

.hero__media-wrap {
  position: relative;
  height: 100%;
  max-width: 850px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
}

.hero__tap-target {
  position: absolute;
  inset: 0;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.hero__controls {
  position: absolute;
  top: 3rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
  pointer-events: none;
  z-index: 10;
}

.hero__controls.isOn {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero__control {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--line));
  background: rgb(0 0 0 / 0.35);
  color: rgb(var(--fg));
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px;
}

.gallery__item {
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 6 / 9;
  cursor: pointer;
  position: relative;
  box-shadow: inset 0 0 0 1px rgb(var(--line));
}

.gallery__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition:
    transform 0.18s ease,
    filter 0.18s ease;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}

.lightbox.isOn {
  display: block;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(0 0 0 / 0.65);
}

.lightbox__panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
}

.lightbox__media {
  display: block;
  width: min(520px, 92vw);
  aspect-ratio: 9 / 16;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
  background: rgb(0 0 0 / 0.2);
}

.lightbox__image,
#lbImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lightbox__button,
.lightbox__close {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  width: 44px;
  border-radius: 999px;
  border: 1px solid rgb(var(--line));
  background: rgb(0 0 0 / 0.35);
  color: rgb(var(--fg));
  font-weight: 900;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.lightbox__close {
  position: absolute;
  top: 18px;
  right: 14px;
}

.lightbox__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: absolute;
  max-width: 520px;
  width: 100%;
  padding: 1rem;
}

@supports not (backdrop-filter: blur(1px)) {
  .site-header__lang {
    backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header__avatar-ring,
  .button--primary,
  video {
    animation: none;
  }

  .button {
    transition: none;
  }
}

@media (hover: hover) {
  .button:hover {
    transform: translateY(-1px);
    background: linear-gradient(
      135deg,
      rgb(var(--accent) / 0.98),
      rgb(var(--accent2) / 0.94),
      rgb(var(--accent) / 0.98)
    );
  }

  .button--primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
  }

  .hero__media:hover .hero__controls {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .gallery__item:hover .gallery__image {
    transform: scale(1.05);
    filter: saturate(1.06) contrast(1.02);
  }
}

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

  .gallery__item {
    aspect-ratio: 9 / 16;
  }
}

@media (max-width: 520px) {
  .gallery__grid {
    gap: 8px;
    padding: 10px;
  }
}

@media (max-width: 850px) {
  .hero {
    padding: unset;
  }

  .hero__media {
    aspect-ratio: unset;
  }

  .hero__media-wrap {
    max-width: 850px;
  }

  .hero__video {
    position: unset;
    height: unset;
    width: 100%;
    border-radius: unset;
  }

  .hero__control {
    width: 2rem;
    height: 2rem;
  }

  .hero__controls {
    top: 1.5rem;
    right: 0.5rem;
  }
}

@media (max-width: 850px) {
  .hero__media-wrap {
    width: 100%;
    max-width: 850px;
    aspect-ratio: 9 / 16;
  }

  .hero__video {
    border-radius: 0;
  }
}

@media (max-width: 600px) {
  .lightbox__panel {
    gap: unset;
    padding: unset;
  }

  .lightbox__media {
    width: unset;
    aspect-ratio: unset;
    box-shadow: unset;
    background: unset;
    border-radius: unset;
    height: 100vh;
  }
}
