:root {
  --bg: #050a24;
  --card: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --text: #eef2ff;
  --muted: #a3b0d6;
  --primary: #0246e7;
  --primary-2: #28a5f9;
  --cyan: #40d2ff;
  --green: #41d684;
  /* colors from the AB VPN app (res/values/styles.xml) */
  --app-indigo-base: #052f93;
  --app-indigo-diff: #28a5f9;
  --app-indigo-900: #2b2a6d;
  --app-teal: #41d684;
  --radius: 20px;
  --font: "Inter", "Vazirmatn", system-ui, sans-serif;
}
html[lang="fa"] { --font: "Vazirmatn", "Inter", Tahoma, sans-serif; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}
html[lang="fa"] body { line-height: 1.85; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* ---------- background ---------- */
.bg-glow {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(600px 400px at 85% 10%, rgba(2, 70, 231, 0.45), transparent 70%),
    radial-gradient(500px 400px at 10% 60%, rgba(40, 165, 249, 0.18), transparent 70%),
    radial-gradient(700px 500px at 50% 110%, rgba(5, 47, 147, 0.6), transparent 70%),
    var(--bg);
}
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .25;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
}

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(5, 10, 36, 0.65);
  border-bottom: 1px solid var(--card-border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.2rem; font-family: "Inter", sans-serif; direction: ltr; }
.brand em { font-style: normal; color: var(--app-indigo-diff); }
.brand img { width: 40px; height: 40px; border-radius: 12px; }
.nav-links { display: flex; gap: 26px; color: var(--muted); font-size: .95rem; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--card-border); color: var(--text);
  font-family: "Vazirmatn", "Inter", sans-serif; font-size: .88rem; font-weight: 700; cursor: pointer;
}
html[lang="fa"] .lang-btn { font-family: "Inter", sans-serif; }
.lang-btn:hover { background: rgba(255,255,255,.1); }
.lang-btn svg { width: 16px; height: 16px; }
.menu-btn { display: none; background: none; border: 0; color: var(--text); font-size: 1.6rem; cursor: pointer; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 24px; border-radius: 14px; font-weight: 700; font-size: 1rem;
  font-family: inherit; border: 1px solid transparent; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.btn:hover { transform: translateY(-3px); }
.btn-primary {
  background: linear-gradient(135deg, var(--app-indigo-base), var(--primary) 50%, var(--primary-2));
  box-shadow: 0 10px 30px rgba(2, 70, 231, 0.45);
}
.btn-primary:hover { box-shadow: 0 14px 40px rgba(2, 70, 231, 0.65); }
.btn-ghost { background: var(--card); border-color: var(--card-border); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-tg { background: linear-gradient(135deg, #229ed9, #2aabee); box-shadow: 0 10px 30px rgba(34,158,217,.35); }
.btn-sm { padding: 9px 18px; font-size: .9rem; border-radius: 12px; }

/* ---------- hero ---------- */
.hero { padding: 70px 0 90px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 99px; font-size: .85rem;
  background: rgba(65, 214, 132, .1); color: var(--green); border: 1px solid rgba(65,214,132,.3);
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: blink 1.6s infinite; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.25; font-weight: 900; margin: 18px 0; letter-spacing: -.02em; }
html[lang="fa"] .hero h1 { line-height: 1.4; letter-spacing: 0; }
.gradient-text {
  background: linear-gradient(90deg, var(--cyan), var(--primary-2), #8fb3ff, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% auto; animation: shine 5s linear infinite;
}
.hero p.lead { color: var(--muted); font-size: 1.12rem; max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.stats { display: flex; gap: 36px; margin-top: 40px; flex-wrap: wrap; }
.stat b { display: block; font-size: 1.6rem; font-weight: 900; }
.stat span { color: var(--muted); font-size: .9rem; }

/* ---------- phone mockup ---------- */
.phone-wrap { position: relative; display: flex; justify-content: center; }
.orbit {
  position: absolute; border: 1px dashed rgba(64, 210, 255, .25); border-radius: 50%;
  top: 50%; left: 50%; translate: -50% -50%; animation: spin 40s linear infinite;
}
.orbit.o1 { width: 470px; height: 470px; }
.orbit.o2 { width: 600px; height: 600px; animation-direction: reverse; animation-duration: 60s; }
.orbit i {
  position: absolute; top: -7px; left: 50%; width: 14px; height: 14px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 18px var(--cyan);
}
.orbit.o2 i { background: var(--primary-2); box-shadow: 0 0 18px var(--primary-2); top: auto; bottom: -7px; }

.phone {
  position: relative; width: 290px; height: 600px; border-radius: 46px; padding: 11px;
  background: linear-gradient(145deg, #1d2550, #0b1030);
  box-shadow: 0 40px 80px rgba(0,0,0,.6), inset 0 0 0 2px rgba(255,255,255,.08), 0 0 80px rgba(2,70,231,.35);
  animation: float 6s ease-in-out infinite;
}
.phone::before { /* camera punch-hole */
  content: ""; position: absolute; top: 20px; left: 50%; translate: -50% 0;
  width: 12px; height: 12px; border-radius: 50%; background: #05081c; z-index: 5;
}

/* --- the app screen (replica of activity_main_new.xml) --- */
.screen {
  position: relative; height: 100%; border-radius: 36px; overflow: hidden;
  background: #fff; color: var(--app-indigo-900);
  font-family: "Inter", "Vazirmatn", sans-serif;
  display: flex; flex-direction: column; padding: 38px 15px 16px;
}
html[lang="fa"] .screen { font-family: "Vazirmatn", "Inter", sans-serif; }
.app-toolbar { display: flex; align-items: center; justify-content: space-between; }
.tb-icon { width: 38px; height: 38px; filter: drop-shadow(0 4px 6px rgba(80, 60, 220, .18)); }
.app-title { font-family: "Inter", sans-serif; font-weight: 900; font-size: 1.3rem; letter-spacing: .01em; }
.app-title .ab { color: var(--app-indigo-base); }
.app-title .vpn { color: var(--app-indigo-diff); }

.app-body {
  position: relative; flex: 1; margin-top: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  background: url("assets/app/img_bg.png") center / 100% 100% no-repeat;
}

.hex-btn { position: relative; width: 186px; height: 186px; margin-top: 18px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hex-btn:active { transform: scale(.96); }
.hex-btn:focus-visible { outline: 2px solid var(--app-indigo-diff); outline-offset: 4px; border-radius: 20px; }
.hex-img { width: 100%; height: 100%; object-fit: contain; transition: filter .3s; }
.screen[data-state="on"] .hex-img { animation: pulse 2.4s ease-in-out infinite; }
/* glowing comet that runs around the rim (HexOrbitView) */
.hex-orbit { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; opacity: 0; transition: opacity .2s; }
.hex-orbit polygon { fill: none; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 45 55; }
.orbit-glow { stroke: #40d2ff; stroke-width: 6; }
.orbit-core { stroke: #ebfcff; stroke-width: 2; }
.screen[data-state="connecting"] .hex-orbit,
.screen[data-state="disconnecting"] .hex-orbit { opacity: 1; }
.screen[data-state="connecting"] .hex-orbit polygon { animation: lap 1.4s linear infinite; }
.screen[data-state="disconnecting"] .hex-orbit polygon { animation: lap 1.4s linear infinite reverse; }

.traffic-row { width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; }
.tr-item { display: flex; align-items: flex-start; gap: 6px; min-width: 76px; }
.tr-item svg { width: 24px; height: 24px; flex-shrink: 0; margin-top: 2px; }
.tr-item small { display: block; font-size: .62rem; font-weight: 500; color: var(--app-indigo-900); line-height: 1.3; }
.tr-item b { display: block; font-size: .78rem; font-weight: 900; line-height: 1.3; font-family: "Inter", sans-serif; }
.tr-item b.down { color: var(--app-teal); }
.tr-item b.up { color: var(--app-indigo-base); }
.refresh { display: flex; flex-direction: column; align-items: center; margin-top: -6px; }
.refresh img { width: 52px; height: 52px; }
.refresh small { font-size: .62rem; font-weight: 500; margin-top: -6px; }
.screen[data-state="connecting"] .refresh img { animation: spin 1.2s linear infinite; }

.log-tv {
  min-height: 2.6em; display: grid; place-items: center; text-align: center;
  font-size: .8rem; font-weight: 700; color: var(--app-indigo-900); padding: 0 6px; line-height: 1.3;
}
.screen[data-state="on"] .log-tv { color: #18a865; }

.server-holder {
  width: 100%; display: flex; align-items: center; gap: 10px;
  border: 2.5px solid var(--app-indigo-900); border-radius: 18px; padding: 8px 12px 8px 10px;
  background: rgba(255,255,255,.9);
}
.flag-frame { position: relative; width: 34px; height: 34px; flex-shrink: 0; }
.flag-frame .frame { width: 100%; height: 100%; }
.flag-frame .flag {
  position: absolute; width: 21px; height: 21px; top: 50%; left: 50%; translate: -50% -50%;
  border-radius: 50%; object-fit: cover;
}
.srv-text { flex: 1; min-width: 0; line-height: 1.25; }
.srv-text b { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srv-text small { display: block; font-size: .72rem; font-weight: 500; color: rgba(43, 42, 109, .35); }
.screen[data-state="on"] .srv-text small { color: #18a865; }
.chev { width: 10px; height: 11px; }

.float-chip {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 14px; font-size: .82rem; font-weight: 700;
  background: rgba(15, 25, 70, .85); border: 1px solid var(--card-border);
  backdrop-filter: blur(10px); box-shadow: 0 15px 35px rgba(0,0,0,.4);
  animation: float 5s ease-in-out infinite;
}
.float-chip .ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; }
.chip-1 { top: 80px; inset-inline-start: -10px; animation-delay: -1s; }
.chip-1 .ic { background: rgba(65,214,132,.15); color: var(--green); }
.chip-2 { bottom: 120px; inset-inline-end: -20px; animation-delay: -2.5s; }
.chip-2 .ic { background: rgba(64,210,255,.15); color: var(--cyan); }

/* ---------- sections ---------- */
section { padding: 90px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 54px; }
.section-head .kicker { color: var(--cyan); font-weight: 700; font-size: .85rem; letter-spacing: .12em; }
html[lang="fa"] .section-head .kicker { letter-spacing: 0; }
.section-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 900; margin: 8px 0 12px; line-height: 1.3; }
.section-head p { color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  padding: 28px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--card-border);
  transition: transform .3s, border-color .3s, background .3s;
}
.feature:hover { transform: translateY(-6px); border-color: rgba(64,210,255,.4); background: rgba(255,255,255,.07); }
.feature .ic {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(2,70,231,.35), rgba(64,210,255,.2)); color: var(--cyan);
}
.feature .ic svg { width: 28px; height: 28px; }
.feature h3 { font-size: 1.15rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .95rem; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.step { position: relative; padding: 30px 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--card-border); }
.step::before {
  counter-increment: s; content: counter(s);
  position: absolute; top: -20px; inset-inline-start: 26px; width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center; font-weight: 900; font-size: 1.2rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 10px 25px rgba(2,70,231,.5);
}
html[lang="fa"] .step::before { content: counter(s, persian); }
.step h3 { margin: 10px 0 6px; }
.step p { color: var(--muted); font-size: .95rem; }

/* download */
.download-box {
  position: relative; overflow: hidden; border-radius: 32px; padding: 56px 48px;
  background: linear-gradient(135deg, #052f93, #0246e7 45%, #28a5f9);
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: center;
}
.download-box::after {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  inset-inline-end: -120px; bottom: -200px; background: radial-gradient(circle, rgba(64,210,255,.5), transparent 70%);
}
.dl-text { position: relative; z-index: 1; }
.download-box h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 900; line-height: 1.3; }
.download-box p { color: #d6e2ff; margin: 10px 0 26px; }
.dl-options { display: grid; gap: 14px; }
.dl-card {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  transition: background .2s, transform .2s;
}
.dl-card:hover { background: rgba(255,255,255,.2); transform: translateX(4px); }
html[dir="rtl"] .dl-card:hover { transform: translateX(-4px); }
html[dir="rtl"] .dl-card .arrow { transform: scaleX(-1); }
.dl-card .ic { width: 46px; height: 46px; border-radius: 14px; background: #fff; color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.dl-card .ic svg { width: 26px; height: 26px; }
.dl-card b { display: block; }
.dl-card small { color: #d6e2ff; }
.dl-card .arrow { margin-inline-start: auto; opacity: .7; }
.big-icon { justify-self: center; position: relative; z-index: 1; }
.big-icon img { width: 220px; filter: drop-shadow(0 25px 50px rgba(0,0,0,.4)); animation: float 6s ease-in-out infinite; }

/* telegram */
.tg-box {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 34px 40px; border-radius: 28px; background: var(--card); border: 1px solid var(--card-border);
}
.tg-box .left { display: flex; align-items: center; gap: 18px; }
.tg-logo {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, #229ed9, #2aabee); box-shadow: 0 10px 30px rgba(34,158,217,.4);
}
.tg-logo svg { width: 34px; height: 34px; }
.tg-box h3 { font-size: 1.3rem; }
.tg-box p { color: var(--muted); }

/* privacy teaser */
.privacy-teaser { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.p-list { list-style: none; display: grid; gap: 12px; }
.p-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.p-list li::before { content: "✓"; color: var(--green); font-weight: 900; }
.p-list.no li::before { content: "✕"; color: #ff5c8a; }
.p-card { padding: 30px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--card-border); }
.p-card h3 { margin-bottom: 14px; }
.center { text-align: center; margin-top: 30px; }

/* footer */
footer { border-top: 1px solid var(--card-border); padding: 34px 0; color: var(--muted); font-size: .9rem; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot .brand { color: var(--text); }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a:hover { color: var(--text); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s ease; }
.reveal.show { opacity: 1; transform: none; }

/* ---------- privacy page ---------- */
.doc { padding: 60px 0 90px; }
.doc-card { max-width: 860px; margin: 0 auto; padding: 46px; border-radius: 28px; background: var(--card); border: 1px solid var(--card-border); }
.doc-card h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 900; line-height: 1.3; }
.doc-card .meta { color: var(--muted); margin: 8px 0 26px; }
.doc-card h2 { font-size: 1.25rem; margin: 30px 0 10px; display: flex; align-items: center; gap: 10px; }
.doc-card h2 span {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: .95rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); flex-shrink: 0;
}
.doc-card p, .doc-card li { color: var(--muted); }
.doc-card b { color: var(--text); }
.doc-card ul { padding-inline-start: 22px; margin: 8px 0; display: grid; gap: 4px; }
.doc-card a { color: var(--cyan); }
[hidden] { display: none !important; }

/* ---------- keyframes ---------- */
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes lap { to { stroke-dashoffset: -100; } }
@keyframes pulse { 0%,100% { filter: drop-shadow(0 0 0 rgba(65,214,132,0)); } 50% { filter: drop-shadow(0 0 14px rgba(65,214,132,.55)); } }
@keyframes blink { 50% { opacity: .3; } }
@keyframes shine { to { background-position: 200% center; } }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .download-box { grid-template-columns: 1fr; }
  .hero { text-align: center; padding-top: 40px; }
  .hero p.lead { margin-inline: auto; }
  .hero-actions, .stats { justify-content: center; }
  .phone-wrap { margin-top: 30px; }
  .features, .steps { grid-template-columns: 1fr 1fr; }
  .big-icon { display: none; }
  .download-box { padding: 40px 26px; }
}
@media (max-width: 720px) {
  .nav-links {
    position: absolute; top: 70px; inset-inline: 0; flex-direction: column; gap: 0;
    background: rgba(5,10,36,.97); border-bottom: 1px solid var(--card-border);
    max-height: 0; overflow: hidden; transition: max-height .3s;
  }
  .nav-links.open { max-height: 320px; }
  .nav-links a { padding: 14px 20px; border-top: 1px solid var(--card-border); }
  .menu-btn { display: block; }
  .nav .btn-sm { display: none; }
  .features, .steps, .privacy-teaser { grid-template-columns: 1fr; }
  .orbit { display: none; }
  .phone { width: 270px; height: 560px; }
  .hex-btn { width: 170px; height: 170px; }
  .phone-wrap { padding: 26px 0; }
  .chip-1 { top: 0; inset-inline-start: 0; }
  .chip-2 { bottom: 0; inset-inline-end: 0; }
  .tg-box { padding: 26px; justify-content: center; text-align: center; }
  .tg-box .left { flex-direction: column; }
  .doc-card { padding: 26px 20px; }
  section { padding: 70px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
