:root {
  --bg: #0b0c10;
  --ink: #f3f1ea;
  --muted: #9a968c;
  --line: rgba(243, 241, 234, 0.1);
  --accent: #e8ff4d;
  --accent-ink: #12140a;
  --teal: #3de0c5;
  --teal-deep: #1aa88f;
  --surface: rgba(255, 255, 255, 0.04);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: "Segoe UI", "Segoe UI Variable", system-ui, sans-serif;
  --body: "Segoe UI", "Segoe UI Variable", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(61, 224, 197, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 20%, rgba(232, 255, 77, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 35% at 0% 70%, rgba(61, 224, 197, 0.08), transparent 50%),
    linear-gradient(180deg, #101218 0%, #0b0c10 45%, #08090d 100%);
  pointer-events: none;
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.35;
  mix-blend-mode: soft-light;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: none; background: none; cursor: pointer; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(11, 12, 16, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0;
}

.brand span,
.brand-mark span,
.foot-brand span {
  color: var(--teal);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 0.2s var(--ease), filter 0.2s, background 0.2s;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-main {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px rgba(232, 255, 77, 0.22);
}

.btn-main:hover { filter: brightness(1.05); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(243, 241, 234, 0.2);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-lg {
  min-height: 52px;
  padding: 14px 28px;
  font-size: 1rem;
}

.top .btn-main {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn-vpn {
  background: var(--teal);
  color: #06241f;
  box-shadow: 0 10px 30px rgba(61, 224, 197, 0.22);
}

.btn-vpn:hover { filter: brightness(1.05); }

.cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  animation: rise 0.7s var(--ease) 0.24s both;
}

.cta-row .btn {
  width: 100%;
  min-width: 0;
  padding: 12px 8px;
  font-size: clamp(0.78rem, 3.1vw, 0.9rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(0, 0, 0, 0.18);
}

/* Hero — one composition */
.hero {
  width: min(440px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 20px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 14px;
}

.brand-mark {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 11vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: 0;
  animation: rise 0.7s var(--ease) both;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.25rem, 5.2vw, 1.55rem);
  line-height: 1.3;
  letter-spacing: 0;
  max-width: 18ch;
  animation: rise 0.7s var(--ease) 0.08s both;
}

.lead {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  max-width: 30ch;
  animation: rise 0.7s var(--ease) 0.16s both;
}

/* Phone */
.phone {
  width: min(78vw, 280px);
  margin-top: 10px;
  animation: rise 0.9s var(--ease) 0.3s both;
}

.phone-frame {
  position: relative;
  border-radius: 34px;
  padding: 9px;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02)),
    #14161e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.4) inset;
}

.phone-frame::before {
  content: "";
  position: absolute;
  inset: -18% -20% auto;
  height: 55%;
  background: radial-gradient(circle, rgba(61, 224, 197, 0.22), transparent 65%);
  filter: blur(20px);
  z-index: -1;
  pointer-events: none;
}

.phone-notch {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 32%;
  height: 16px;
  border-radius: 999px;
  background: #05060a;
  z-index: 3;
}

.phone-screen {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #0e1016;
  aspect-ratio: 9 / 17.2;
}

.slides { position: relative; height: 100%; }

.slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 10px;
  padding: 34px 12px 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0s linear 0.45s;
}

.slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 2;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0s;
}

.slide-meta {
  display: grid;
  gap: 2px;
  text-align: left;
}

.slide-meta span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  width: fit-content;
  padding: 3px 8px;
  border-radius: 6px;
}

.slide-meta span.is-vpn {
  background: var(--teal);
}

.slide-meta strong {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  min-height: 0;
}

.compare figure {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #171922;
}

.compare img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 4;
}

.compare .is-after {
  outline: 1px solid rgba(61, 224, 197, 0.35);
}

.compare .is-after img {
  animation: breathe 3.2s var(--ease) infinite;
}

.compare figcaption {
  position: absolute;
  left: 7px;
  bottom: 7px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(8, 9, 13, 0.72);
}

.vpn-panel {
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
}

.vpn-ring {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(61, 224, 197, 0.2), transparent 60%),
    conic-gradient(from 210deg, var(--teal), transparent 55%, var(--accent), var(--teal));
  animation: spinSoft 8s linear infinite;
  padding: 3px;
}

.vpn-core {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #12151c;
  box-shadow: inset 0 0 24px rgba(61, 224, 197, 0.15);
  position: relative;
}

.vpn-core::after {
  content: "";
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 24px rgba(61, 224, 197, 0.55);
}

.vpn-status {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.vpn-note {
  color: var(--muted);
  font-size: 0.8rem;
}

.phone-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--accent-ink);
}

.phone-cta.is-vpn {
  background: var(--teal);
  color: #06241f;
}

.dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding-bottom: 2px;
}

.dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: block;
}

.dots i.is-on {
  width: 18px;
  border-radius: 999px;
  background: var(--teal);
}

/* Strip */
.strip {
  width: min(440px, calc(100% - 28px));
  margin: 28px auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.strip-item {
  padding: 14px 8px;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.strip-item strong {
  display: block;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0;
  margin-bottom: 2px;
}

.strip-item span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

/* Story */
.story {
  width: min(440px, calc(100% - 28px));
  margin: 0 auto 48px;
  text-align: center;
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 32px 18px;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(320px 160px at 20% 100%, rgba(232, 255, 77, 0.1), transparent 55%),
    radial-gradient(380px 180px at 80% 0%, rgba(61, 224, 197, 0.2), transparent 60%),
    radial-gradient(280px 140px at 50% 120%, rgba(61, 224, 197, 0.12), transparent 50%),
    linear-gradient(180deg, rgba(22, 24, 32, 0.95), rgba(10, 12, 16, 0.98));
  border: 1px solid rgba(61, 224, 197, 0.22);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 40px rgba(61, 224, 197, 0.08);
}

.story h2 {
  font-family: var(--display);
  font-size: clamp(1.3rem, 4.8vw, 1.55rem);
  letter-spacing: 0;
  line-height: 1.25;
  max-width: 16ch;
}

.story p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 32ch;
}

/* Footer */
.foot {
  width: min(440px, calc(100% - 28px));
  margin: 0 auto;
  padding: 0 0 40px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  display: grid;
  gap: 6px;
}

.foot-brand {
  font-family: var(--display);
  font-weight: 800;
  color: var(--ink);
  font-size: 1.05rem;
}

.foot a { color: var(--teal); }
.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  margin-top: 6px;
}
.foot-copy { margin-top: 8px; opacity: 0.7; font-size: 0.76rem; }

/* Modal */
body.dl-modal-open { overflow: hidden; }

.dl-modal {
  border: none;
  padding: 16px;
  margin: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  background: transparent;
  color: var(--ink);
  position: fixed;
  inset: 0;
}

.dl-modal[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dl-modal::backdrop {
  background: rgba(5, 6, 10, 0.78);
  backdrop-filter: blur(8px);
}

.dl-modal__sheet {
  position: relative;
  width: min(380px, 100%);
  background: linear-gradient(180deg, #171922, #0e1016);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px 22px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.dl-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  color: var(--muted);
}

.dl-modal__state h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  margin: 14px 0 8px;
  text-align: center;
}

.dl-modal__lead {
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
  margin: 0 auto 10px;
  max-width: 30ch;
}

.dl-spinner {
  width: 46px;
  height: 46px;
  margin: 4px auto 0;
  border-radius: 50%;
  border: 3px solid rgba(61, 224, 197, 0.2);
  border-top-color: var(--teal);
  animation: dlSpin 0.75s linear infinite;
}

.dl-ok {
  width: 46px;
  height: 46px;
  margin: 4px auto 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(61, 224, 197, 0.15);
  color: var(--teal);
  font-size: 1.35rem;
  font-weight: 700;
}

.dl-modal__again,
#dlStateError .btn { width: 100%; margin-top: 10px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); filter: saturate(1); }
  50% { transform: scale(1.03); filter: saturate(1.1) brightness(1.04); }
}

@keyframes spinSoft {
  to { transform: rotate(360deg); }
}

@keyframes dlSpin {
  to { transform: rotate(360deg); }
}

@media (min-width: 768px) {
  .top {
    width: min(720px, calc(100% - 40px));
    margin: 14px auto 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(12, 13, 18, 0.8);
  }

  .hero,
  .strip,
  .story,
  .foot {
    width: min(440px, calc(100% - 40px));
  }

  .phone { width: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  .slide,
  .brand-mark,
  .hero h1,
  .lead,
  .cta-row,
  .phone {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .compare .is-after img,
  .vpn-ring { animation: none; }
  .btn:hover { transform: none; }
}
