/* ==========================================================================
   GlukVPN — base layer: reset, background scene, typography, utilities
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

/* Hidden states must win over component display:grid/flex/contents. */
[hidden]:not([hidden="until-found"]) {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  background: var(--bg-deep);
  color: var(--text-0);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--violet-light);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: rgba(124, 92, 246, 0.35);
  color: #fff;
}

/* ------------------------------------------------------------ scene layers */
/* One continuous background scene shared by every page (app parity:
   .page-waves + violet energy fields). Fixed, cheap, never scrolls. */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--bg-deep);
}

.scene__waves {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
}

.scene__glow--a {
  top: -18vh;
  right: -10vw;
  width: min(70vw, 900px);
  height: min(70vw, 900px);
  background: radial-gradient(
    circle,
    rgba(124, 92, 246, 0.28) 0%,
    rgba(124, 58, 237, 0.1) 42%,
    transparent 68%
  );
  animation: sceneDrift 22s ease-in-out infinite;
}

.scene__glow--b {
  bottom: -25vh;
  left: -15vw;
  width: min(80vw, 980px);
  height: min(80vw, 980px);
  background: radial-gradient(
    circle,
    rgba(79, 63, 214, 0.22) 0%,
    rgba(124, 92, 246, 0.08) 45%,
    transparent 70%
  );
  animation: sceneDrift 28s ease-in-out infinite reverse;
}

.scene__grain {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.035) 1px,
    transparent 1px
  );
  background-size: 3px 3px;
  mix-blend-mode: overlay;
}

@keyframes sceneDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, 3%, 0) scale(1.06);
  }
}

/* ------------------------------------------------------------------ layout */

.page {
  position: relative;
  z-index: 1;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow {
  max-width: var(--wrap-narrow);
}

.section {
  padding-block: clamp(56px, 7vw, 104px);
  position: relative;
}

.section--tight {
  padding-block: clamp(40px, 5vw, 72px);
}

.section__head {
  max-width: 660px;
  margin-bottom: clamp(28px, 4vw, 52px);
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--violet-light);
  color: #07040f;
  font-weight: 700;
}

.skip-link:focus {
  left: 16px;
}

/* -------------------------------------------------------------- typography */

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.015em;
  color: var(--text-0);
  text-wrap: balance;
}

.display {
  font-size: var(--fs-display);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.h2 {
  font-size: var(--fs-h2);
}

.h3 {
  font-size: var(--fs-h3);
  line-height: 1.3;
}

.lead {
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.15rem);
  line-height: 1.62;
  color: var(--text-1);
  font-weight: 500;
  max-width: 58ch;
}

.muted {
  color: var(--text-1);
}

.dim {
  color: var(--text-2);
}

.accent {
  color: var(--violet-light);
}

.gradient-text {
  background: linear-gradient(100deg, #ffffff 6%, var(--violet-light) 52%, var(--violet-deep) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet-light);
  background: rgba(124, 92, 246, 0.12);
  border: 1px solid var(--stroke-violet);
  border-radius: var(--r-pill);
  padding: 7px 15px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.eyebrow__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: blink 1.8s ease-in-out infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.mono-num {
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------- scroll reveal */

.reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity 0.7s var(--ease-soft), transform 0.7s var(--ease-soft);
  will-change: opacity, transform;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.reveal[data-delay="1"] {
  transition-delay: 0.07s;
}
.reveal[data-delay="2"] {
  transition-delay: 0.14s;
}
.reveal[data-delay="3"] {
  transition-delay: 0.21s;
}
.reveal[data-delay="4"] {
  transition-delay: 0.28s;
}
.reveal[data-delay="5"] {
  transition-delay: 0.35s;
}

/* -------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
