/* =====================================================================
   Iran IP VPN — site styles  ·  dark premium theme
   Brand blue from the Damavand logo; Azadi tower as the hero backdrop.
   ===================================================================== */

:root {
  --bg:        #070b12;
  --bg-2:      #0b1018;
  --surface:   #0f1622;
  --surface-2: #131c2b;
  --border:    #1d2738;
  --border-2:  #28344a;

  --fg:        #eaf1fb;
  --muted:     #9fb0c7;
  --muted-2:   #6b7c95;

  --brand:     #3b88f5;
  --brand-2:   #6fb1ff;
  --brand-ink: #0a1422;
  --glow:      rgba(59, 136, 245, .45);

  --good:      #34d399;
  --warn:      #fbbf24;
  --danger:    #f87171;

  --radius:    16px;
  --radius-sm: 12px;
  --maxw:      1120px;
  --shadow:    0 24px 60px -24px rgba(0, 0, 0, .8);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ambient brand glows fixed behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 500px at 75% -8%, rgba(59,136,245,.18), transparent 60%),
    radial-gradient(700px 500px at 8% 12%,  rgba(111,177,255,.10), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand-2);
  background: rgba(59,136,245,.10); border: 1px solid rgba(59,136,245,.25);
  padding: 5px 12px; border-radius: 999px;
}
.gradient-text {
  background: linear-gradient(100deg, #ffffff 10%, var(--brand-2) 55%, var(--brand) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  --b: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: inherit; font-weight: 600; font-size: .98rem;
  padding: 12px 22px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  box-shadow: 0 10px 30px -10px var(--glow), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover { box-shadow: 0 16px 40px -12px var(--glow), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-ghost {
  color: var(--fg);
  background: var(--surface);
  border-color: var(--border-2);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--brand); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(14px);
  background: rgba(7,11,18,.72);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; color: var(--fg); }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 6px 18px -6px var(--glow); }
.brand span { font-size: 1.06rem; letter-spacing: -.01em; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--muted); font-weight: 500; font-size: .95rem;
  padding: 8px 13px; border-radius: 9px;
}
.nav-links a:hover { color: var(--fg); background: var(--surface); text-decoration: none; }
.nav-links .btn { margin-left: 8px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--fg); cursor: pointer; padding: 6px; }
.nav-left { display: flex; align-items: center; gap: 12px; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-weight: 600; font-size: .82rem; letter-spacing: .02em; line-height: 1;
  font-family: "Vazirmatn", "Inter", sans-serif;
  color: var(--muted); background: transparent; border: 1px solid var(--border);
  padding: 7px 11px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  transition: color .2s, border-color .2s, background .2s;
}
.lang-toggle:hover { color: var(--fg); border-color: var(--border-2); background: var(--surface); }
.lang-toggle svg { width: 15px; height: 15px; opacity: .85; }

/* ---------- hero: full artwork, headline tucked into its free top-right corner ---------- */
.hero { padding: 18px 0 44px; }
.hero-frame { position: relative; width: min(820px, 94%); margin: 0 auto; }
/* White line-art on solid black; "screen" drops the black so the whole artwork
   shows on the page with no rectangle. Full height = nothing is cropped. */
.hero-pic { display: block; width: 100%; height: auto; opacity: 1; mix-blend-mode: screen; }
.hero-title {
  position: absolute; top: 6%; right: 5%; margin: 0;
  max-width: 14ch; text-align: right;
  font-size: clamp(1.15rem, 2.5vw, 1.9rem); font-weight: 800; line-height: 1.24;
  letter-spacing: -.01em; text-shadow: 0 2px 16px rgba(0,0,0,.6);
}
.logo-orb { position: relative; width: min(330px, 78%); aspect-ratio: 1; }
.logo-orb img { width: 100%; border-radius: 50%; position: relative; z-index: 1;
  box-shadow: 0 40px 80px -30px var(--glow), 0 0 0 1px rgba(111,177,255,.12); }
.logo-orb::after {
  content: ""; position: absolute; inset: -14%; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle at 50% 45%, var(--glow), transparent 62%);
  filter: blur(18px); animation: pulse 6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: .65; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }

/* ---------- sections ---------- */
.section { padding: 78px 0; }
.section-head { max-width: 640px; margin: 0 auto 46px; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; margin: 14px 0 12px; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.section.alt { background: linear-gradient(180deg, transparent, rgba(15,22,34,.5) 50%, transparent); }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--border-2); box-shadow: var(--shadow); }
.card .ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(59,136,245,.12); border: 1px solid rgba(59,136,245,.25); color: var(--brand-2);
  margin-bottom: 16px;
}
.card .ico svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.16rem; margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: .97rem; }

/* ---------- download cards ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.dl-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; text-align: center; position: relative; overflow: hidden;
  transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
}
.dl-card:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow); }
.dl-card .platform-ico { width: 52px; height: 52px; margin: 0 auto 14px; color: var(--brand-2); }
.dl-card .platform-ico svg { width: 100%; height: 100%; }
.dl-card h3 { font-size: 1.2rem; margin-bottom: 4px; }
.dl-card .meta { color: var(--muted-2); font-size: .86rem; margin-bottom: 18px; min-height: 1.2em; }
.dl-card .btn { width: 100%; }
.badge-soon {
  position: absolute; top: 12px; right: 12px; font-size: .68rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--warn);
  background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.3);
  padding: 3px 9px; border-radius: 999px;
}
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.store-badge {
  display: inline-flex; align-items: center; gap: 11px; text-align: left;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 12px;
  padding: 10px 18px; color: var(--fg); transition: border-color .2s, transform .12s, background .2s;
}
.store-badge:hover { border-color: var(--brand); transform: translateY(-2px); background: var(--surface-2); text-decoration: none; }
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge small { display: block; color: var(--muted-2); font-size: .72rem; line-height: 1.1; }
.store-badge b { font-size: 1rem; font-weight: 650; }
.store-badge.is-disabled { opacity: .45; pointer-events: none; }

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; gap: 16px; max-width: 720px; margin: 0 auto; }
.step { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px 20px; }
.step::before {
  counter-increment: step; content: counter(step);
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700;
  color: #fff; background: linear-gradient(180deg, var(--brand-2), var(--brand));
}
.step h4 { margin: 2px 0 4px; font-size: 1.02rem; }
.step p { margin: 0; color: var(--muted); font-size: .94rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, rgba(59,136,245,.16), rgba(111,177,255,.06));
  border: 1px solid rgba(59,136,245,.28); border-radius: 22px;
  padding: 44px; text-align: center; position: relative; overflow: hidden;
}
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 12px; }
.cta-band p { color: var(--muted); max-width: 52ch; margin: 0 auto 24px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- community ---------- */
.tg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tg-card { display: flex; align-items: center; gap: 16px; padding: 24px; }
.tg-card .ico { margin: 0; width: 54px; height: 54px; flex: none; }
.tg-card .ico svg { width: 28px; height: 28px; }
.tg-card h3 { margin: 0 0 2px; }
.tg-card p { margin: 0; }

/* ---------- account ---------- */
.account-wrap { max-width: 620px; margin: 0 auto; padding: 60px 0 90px; }
.auth-card { background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--border); border-radius: 20px; padding: 40px 34px; box-shadow: var(--shadow); }
.auth-card .logo-orb { width: 96px; margin: 0 auto 22px; }
.gsi-host { display: flex; justify-content: center; min-height: 44px; margin: 22px 0 6px; }
.account-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.account-row:last-child { border-bottom: 0; }
.account-row .k { color: var(--muted); font-size: .92rem; }
.account-row .v { font-weight: 600; text-align: right; }
.plan-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.plan-free    { color: var(--muted); background: var(--surface-2); border: 1px solid var(--border-2); }
.plan-premium { color: #ffe9a8; background: linear-gradient(180deg, rgba(251,191,36,.18), rgba(251,191,36,.06)); border: 1px solid rgba(251,191,36,.4); }
.expiry-good { color: var(--good); }
.expiry-soon { color: var(--warn); }
.expiry-gone { color: var(--danger); }
.renew-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: .82rem; }
.renew-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.renew-pill.on  { color: var(--good); background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.35); }
.renew-pill.off { color: var(--warn); background: rgba(251,191,36,.14); border: 1px solid rgba(251,191,36,.4); }

.manage-list { display: grid; gap: 10px; margin-top: 8px; }
.manage-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  color: var(--fg); transition: border-color .2s, background .2s;
}
.manage-item:hover { border-color: var(--brand); background: var(--surface-2); text-decoration: none; }
.manage-item svg { width: 24px; height: 24px; flex: none; color: var(--brand-2); }
.manage-item .t { font-weight: 600; }
.manage-item .d { color: var(--muted-2); font-size: .85rem; }
.manage-item .chev { margin-left: auto; color: var(--muted-2); }

/* upgrade flow: method choice + crypto plans (account upgrade view) */
.crypto-title { font-size: 1.05rem; margin: 6px 0 0; display: flex; align-items: center; gap: 8px; }
.crypto-title svg { color: var(--brand-2); }
.crypto-plans { display: grid; gap: 8px; margin-top: 4px; }
.crypto-plan { justify-content: space-between; font-weight: 600; }
.crypto-price { font-weight: 800; color: var(--good); }
.up-back { text-decoration: none; transition: color .2s; }
.up-back:hover { color: var(--fg); text-decoration: none; }
[dir="rtl"] .up-back svg { transform: scaleX(-1); }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--fg);
  padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 80; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: rgba(248,113,113,.5); }

.result-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 20px; }
.result-icon svg { width: 34px; height: 34px; }
.result-icon.ok  { color: var(--good);   background: rgba(52,211,153,.13);  border: 1px solid rgba(52,211,153,.4); }
.result-icon.bad { color: var(--danger); background: rgba(248,113,113,.13); border: 1px solid rgba(248,113,113,.4); }

.spinner { width: 22px; height: 22px; border: 2.5px solid var(--border-2); border-top-color: var(--brand-2); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; color: transparent !important; }
@keyframes sk { to { background-position: -200% 0; } }
.hidden { display: none !important; }

/* ---------- legal pages ---------- */
.legal { max-width: 860px; margin: 0 auto; padding: 56px 0 90px; }
.legal h1 { font-size: 2.1rem; margin-bottom: 8px; }
.legal h2 { font-size: 1.35rem; margin: 40px 0 12px; }
.legal h3 { font-size: 1.06rem; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--fg); }
.legal .lead { font-size: 1.08rem; color: var(--fg); }
.legal ul, .legal ol { padding-left: 22px; } .legal li { margin: 6px 0; }
.legal .meta { color: var(--muted-2); font-size: .92rem; margin: 2px 0; }
.legal .card { margin: 18px 0; }
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .93rem; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border: 1px solid var(--border); vertical-align: top; }
.legal th { background: var(--surface); color: var(--fg); }
.legal code { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: .9em; color: var(--brand-2); }
.legal .toc a { display: inline-block; margin: 2px 14px 2px 0; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 54px 0 36px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 34px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { color: var(--muted-2); font-size: .92rem; max-width: 30ch; }
.footer-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); margin: 0 0 14px; }
.footer-col a { display: block; color: var(--muted); padding: 5px 0; font-size: .95rem; }
.footer-col a:hover { color: var(--fg); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--muted-2); font-size: .88rem; }
.footer-bottom .socials { display: flex; gap: 10px; }
.footer-bottom .socials a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.footer-bottom .socials a:hover { color: var(--brand-2); border-color: var(--brand); }
.footer-bottom .socials svg { width: 19px; height: 19px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .dl-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  /* Only two nav items now — keep them inline (no hamburger); logo-only brand to fit. */
  .nav-toggle { display: none; }
  .brand span { display: none; }
  .nav-left { gap: 8px; }
  .nav-links { gap: 4px; }
  .nav-links a { padding: 7px 8px; font-size: .9rem; }
  .nav-links .btn { margin-left: 0; padding: 9px 13px; }
  .grid-3, .grid-2, .dl-grid, .tg-grid, .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  /* Phone: show the whole picture clearly; the headline sits below it, not in the corner. */
  .hero { padding: 10px 0 30px; }
  .hero-frame { width: 100%; }
  .hero-pic { opacity: .9; }
  .hero-title {
    position: static; top: auto; right: auto; max-width: none;
    text-align: center; margin: 16px auto 0;
    font-size: clamp(1.5rem, 6.4vw, 2.05rem); text-shadow: none;
  }
  .cta-band { padding: 32px 22px; }
}

/* ---------- Farsi / RTL ----------
   Applied when i18n.js sets <html lang="fa" dir="rtl">. Persian text gets the
   Vazirmatn webfont; the handful of physical-direction rules are mirrored. */
html[lang="fa"] body { font-family: "Vazirmatn", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

[dir="rtl"] .nav-links .btn { margin-left: 0; margin-right: 8px; }
[dir="rtl"] .account-row .v { text-align: left; }
[dir="rtl"] .store-badge { text-align: right; }
[dir="rtl"] .manage-item .chev { margin-left: 0; margin-right: auto; }
[dir="rtl"] .badge-soon { right: auto; left: 12px; }
[dir="rtl"] .manage-item .chev svg { transform: scaleX(-1); }
