/* ============================================================
   iDefNet VPN — site styles
   Palette matches the app icon: deep black background with a
   cyan → blue → violet gradient. Brand colors are defined once
   here (see README for the replacement procedure).
   ============================================================ */

:root {
  --bg: #05060a;
  --bg-soft: #0b0d15;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-solid: #10131d;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(56, 182, 232, 0.45);
  --text: #f2f4fc;
  --text-muted: #9aa0bd;
  --accent: #2b9fdb;
  --accent-2: #38b6e8;
  --violet: #6a34d9;
  --accent-grad: linear-gradient(160deg, #2fb4e6 0%, #2a6fd2 45%, #6a34d9 100%);
  --accent-grad-h: linear-gradient(90deg, #38b6e8 0%, #3f7fe0 50%, #8a55f0 100%);
  --glow: 0 10px 40px -8px rgba(47, 180, 230, 0.45), 0 4px 60px -12px rgba(106, 52, 217, 0.4);
  --radius: 18px;
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* `clip` blocks horizontal panning on iOS Safari, where `hidden`
     on body alone is ignored; keep `hidden` as a fallback. */
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

/* Subtle global backdrop: faint grid + top glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 75%);
  pointer-events: none;
}

::selection { background: rgba(47, 180, 230, 0.35); }

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { letter-spacing: -0.02em; }

/* Gradient text helper */
.grad-text {
  background: var(--accent-grad-h);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 6, 10, 0.55);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.site-header.scrolled {
  background: rgba(5, 6, 10, 0.82);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 32px -12px rgba(0, 0, 0, 0.7);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 16px;
}
.logo {
  display: flex; align-items: center; gap: 11px;
  font-weight: 800; font-size: 1.15rem; color: var(--text);
  transition: opacity 0.2s;
}
.logo:hover { text-decoration: none; opacity: 0.85; }
.logo img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1px var(--border), 0 4px 16px -4px rgba(47, 180, 230, 0.5); }

.main-nav { display: flex; gap: 6px; align-items: center; }
.main-nav a:not(.btn) {
  color: var(--text-muted); font-weight: 500; font-size: 0.95rem;
  padding: 8px 14px; border-radius: 10px;
  transition: color 0.2s, background 0.2s;
}
.main-nav a:not(.btn):hover { color: var(--text); background: rgba(255, 255, 255, 0.06); text-decoration: none; }
.main-nav a.active { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.main-nav .btn { margin-left: 10px; }

.nav-toggle {
  display: none; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; padding: 7px 12px; font-size: 1.1rem; cursor: pointer;
  transition: border-color 0.2s;
}
.nav-toggle:hover { border-color: var(--border-hover); }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-block; padding: 13px 30px; border-radius: 999px;
  font-weight: 700; font-size: 0.95rem; cursor: pointer; border: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
  overflow: hidden;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary { background: var(--accent-grad); color: #fff; box-shadow: var(--glow); }
.btn-primary::after {
  content: "";
  position: absolute; top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s var(--ease);
}
.btn-primary:hover::after { left: 130%; }
.btn-primary:hover { box-shadow: 0 14px 48px -8px rgba(47, 180, 230, 0.6), 0 6px 70px -10px rgba(106, 52, 217, 0.55); }

.btn-outline { background: rgba(255, 255, 255, 0.03); color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--border-hover); background: rgba(56, 182, 232, 0.08); }
.btn-lg { padding: 17px 44px; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero { padding: 100px 0 80px; text-align: center; position: relative; }

.hero .orb {
  position: absolute; border-radius: 50%; filter: blur(90px);
  pointer-events: none; z-index: -1; opacity: 0.55;
  animation: orb-float 14s ease-in-out infinite alternate;
}
.hero .orb-1 { width: 480px; height: 480px; top: -180px; left: 8%; background: radial-gradient(circle, rgba(47, 180, 230, 0.55), transparent 65%); }
.hero .orb-2 { width: 520px; height: 520px; top: -120px; right: 4%; background: radial-gradient(circle, rgba(106, 52, 217, 0.5), transparent 65%); animation-delay: -7s; }

@media (max-width: 640px) {
  .hero .orb { animation: none; filter: blur(64px); }
  .hero .orb-1 { width: 240px; height: 240px; top: -90px; left: 4%; }
  .hero .orb-2 { width: 260px; height: 260px; top: -60px; right: 4%; }
}

@keyframes orb-float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(40px, 36px, 0) scale(1.12); }
}

.hero > .container { position: relative; }

.hero-icon {
  width: 92px; height: 92px; margin: 0 auto 30px; position: relative;
  animation: icon-bob 5s ease-in-out infinite;
}
.hero-icon img { width: 100%; height: 100%; border-radius: 22px; box-shadow: 0 0 0 1px var(--border), var(--glow); }
.hero-icon::before, .hero-icon::after {
  content: ""; position: absolute; inset: -14px; border-radius: 32px;
  border: 1px solid rgba(56, 182, 232, 0.35);
  animation: ring-pulse 3s var(--ease) infinite;
}
.hero-icon::after { animation-delay: 1.5s; }

@keyframes icon-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes ring-pulse {
  0%   { transform: scale(0.85); opacity: 0; }
  35%  { opacity: 1; }
  100% { transform: scale(1.35); opacity: 0; }
}

.hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.9rem); line-height: 1.08; font-weight: 800; margin-bottom: 22px; }
.hero .subtitle { color: var(--text-muted); font-size: 1.2rem; max-width: 640px; margin: 0 auto 34px; }

.hero .badges { display: flex; gap: 12px; justify-content: center; margin-bottom: 42px; flex-wrap: wrap; }
.hero .badges span {
  color: var(--text-muted); font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border);
  padding: 8px 18px; border-radius: 999px;
  backdrop-filter: blur(8px);
}
.hero .badges strong { color: var(--text); }

/* ---------- Offer card ---------- */
.offer-card {
  position: relative;
  display: inline-block; background: var(--bg-card-solid);
  border-radius: var(--radius); padding: 34px 46px; margin-top: 10px;
  text-align: center;
}
/* gradient border */
.offer-card::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(160deg, rgba(56, 182, 232, 0.6), rgba(255, 255, 255, 0.08) 40%, rgba(106, 52, 217, 0.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.offer-card .tag {
  display: inline-block; background: var(--accent-grad); color: #fff;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em;
  padding: 5px 14px; border-radius: 999px; margin-bottom: 14px;
  box-shadow: 0 4px 18px -4px rgba(47, 180, 230, 0.5);
}
.offer-card .price { font-size: 2.6rem; font-weight: 800; }
.offer-card .price .old { font-size: 1.2rem; color: var(--text-muted); text-decoration: line-through; margin-right: 10px; font-weight: 500; }
.offer-card .price .period { font-size: 1rem; color: var(--text-muted); font-weight: 500; }
.offer-card .terms-note { color: var(--text-muted); font-size: 0.87rem; margin: 10px auto 20px; max-width: 330px; }
.offer-card .guarantee { color: var(--accent-2); font-size: 0.87rem; font-weight: 600; margin-top: 16px; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; position: relative; }
.section.alt {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.02) 18%, rgba(255, 255, 255, 0.02) 82%, transparent);
}
.section.alt::before, .section.alt::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 30%, var(--border) 70%, transparent);
}
.section.alt::before { top: 0; }
.section.alt::after { bottom: 0; }

.section h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; text-align: center; margin-bottom: 14px; }
.section .section-sub { text-align: center; color: var(--text-muted); max-width: 620px; margin: 0 auto 54px; font-size: 1.05rem; }

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px;
  transition: transform 0.35s var(--ease), border-color 0.35s, background 0.35s, box-shadow 0.35s var(--ease);
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  background: rgba(56, 182, 232, 0.04);
  box-shadow: 0 18px 48px -18px rgba(47, 180, 230, 0.28);
}
.card .icon {
  font-size: 1.5rem; margin-bottom: 18px;
  width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, rgba(47, 180, 230, 0.16), rgba(106, 52, 217, 0.16));
  border: 1px solid rgba(56, 182, 232, 0.25);
  border-radius: 14px;
  transition: transform 0.35s var(--ease);
}
.card:hover .icon { transform: scale(1.08) rotate(-4deg); }
.card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 0.95rem; }
.card ul { list-style: none; margin-top: 12px; }
.card ul li { color: var(--text-muted); font-size: 0.93rem; padding: 4px 0 4px 26px; position: relative; }
.card ul li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-2); font-weight: 700; }

.platform-card { text-align: center; }
.platform-card .icon { margin-left: auto; margin-right: auto; }

.cta-center { text-align: center; margin-top: 52px; }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; margin-top: 30px; }
.plan {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px 30px; display: flex; flex-direction: column; position: relative;
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s var(--ease);
}
.plan:hover { transform: translateY(-5px); border-color: var(--border-hover); }
.plan.featured {
  background: linear-gradient(180deg, rgba(47, 180, 230, 0.07), rgba(106, 52, 217, 0.07)), var(--bg-card-solid);
  border-color: rgba(56, 182, 232, 0.5);
  box-shadow: 0 20px 70px -20px rgba(47, 180, 230, 0.35);
}
.plan.featured:hover { box-shadow: 0 26px 80px -20px rgba(47, 180, 230, 0.45); }
.plan .plan-tag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent-grad); color: #fff;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.09em;
  padding: 6px 16px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 6px 20px -6px rgba(47, 180, 230, 0.6);
}
.plan h3 { font-size: 1.15rem; margin-bottom: 18px; }
.plan .plan-price { font-size: 2.5rem; font-weight: 800; line-height: 1.1; }
.plan .plan-price .period { font-size: 0.95rem; color: var(--text-muted); font-weight: 500; }
.plan .billing-note { color: var(--text-muted); font-size: 0.88rem; margin: 12px 0 26px; min-height: 44px; }
.plan .btn { margin-top: auto; text-align: center; }

.disclosure {
  margin-top: 38px; padding: 24px 28px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-muted); font-size: 0.92rem;
}
.disclosure strong { color: var(--text); }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  margin-bottom: 12px; padding: 4px 24px;
  transition: border-color 0.3s, background 0.3s;
}
.faq details:hover { border-color: var(--border-hover); }
.faq details[open] { background: rgba(56, 182, 232, 0.04); border-color: var(--border-hover); }
.faq summary { cursor: pointer; font-weight: 600; padding: 18px 0; list-style: none; position: relative; padding-right: 34px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; color: var(--accent-2);
  border: 1px solid var(--border); border-radius: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s var(--ease), background 0.3s;
}
.faq details[open] summary::after { content: "–"; transform: translateY(-50%) rotate(180deg); background: rgba(56, 182, 232, 0.12); }
.faq details p { color: var(--text-muted); padding-bottom: 20px; font-size: 0.96rem; animation: faq-in 0.35s var(--ease); }

@keyframes faq-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Server list ---------- */
.region-tabs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.region-tabs .tab {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted);
  border-radius: 999px; padding: 10px 22px; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  font-family: inherit;
  transition: color 0.25s, border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}
.region-tabs .tab:hover { color: var(--text); border-color: var(--border-hover); transform: translateY(-2px); }
.region-tabs .tab.active { background: var(--accent-grad); color: #fff; border-color: transparent; box-shadow: 0 8px 24px -8px rgba(47, 180, 230, 0.55); }

.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.server-item {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 16px; font-size: 0.93rem; display: flex; align-items: center; gap: 10px;
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
  animation: server-in 0.4s var(--ease) backwards;
}
.server-item:hover { border-color: var(--border-hover); background: rgba(56, 182, 232, 0.05); transform: translateY(-2px); }
.server-item .flag { font-size: 1.25rem; }

@keyframes server-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Store badges ---------- */
.store-badges { display: flex; gap: 14px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 24px; color: #fff; font-weight: 600; font-size: 0.92rem;
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.store-badge:hover {
  border-color: var(--border-hover); text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -10px rgba(47, 180, 230, 0.35);
}

/* ---------- Legal pages ---------- */
.legal { max-width: 820px; margin: 0 auto; padding: 70px 24px 90px; }
.legal h1 { font-size: 2.3rem; margin-bottom: 8px; }
.legal .effective { color: var(--text-muted); margin-bottom: 40px; font-size: 0.95rem; }
.legal h2 { font-size: 1.32rem; margin: 40px 0 12px; }
.legal h3 { font-size: 1.05rem; margin: 26px 0 8px; }
.legal p, .legal li { color: var(--text-muted); font-size: 0.97rem; margin-bottom: 12px; }
.legal ul, .legal ol { padding-left: 24px; margin-bottom: 16px; }
.legal .notice {
  background: linear-gradient(160deg, rgba(47, 180, 230, 0.07), rgba(106, 52, 217, 0.07));
  border: 1px solid rgba(56, 182, 232, 0.3);
  border-radius: 14px; padding: 18px 22px; margin: 24px 0;
}
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.92rem; }
.legal th, .legal td { border: 1px solid var(--border); padding: 11px 14px; text-align: left; color: var(--text-muted); }
.legal th { color: var(--text); background: rgba(255, 255, 255, 0.03); }

/* ---------- Contact ---------- */
.contact-box { max-width: 680px; margin: 0 auto; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(47, 180, 230, 0.04));
  padding: 60px 0 36px; margin-top: 48px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 44px; }
.footer-grid h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 16px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--text); font-size: 0.93rem; opacity: 0.85; transition: opacity 0.2s; }
.footer-grid a:hover { opacity: 1; }
.footer-about p { color: var(--text-muted); font-size: 0.9rem; margin-top: 14px; max-width: 320px; }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 26px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--text-muted); font-size: 0.85rem;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4, .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .plan.featured { grid-column: span 2; }
}
@media (max-width: 640px) {
  .main-nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    background: rgba(5, 6, 10, 0.96); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 18px 22px; align-items: stretch; gap: 4px;
  }
  .main-nav.open { display: flex; animation: nav-in 0.3s var(--ease); }
  .main-nav a:not(.btn) { padding: 12px 14px; }
  .main-nav .btn { margin: 10px 0 4px; text-align: center; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3, .grid-4, .pricing-grid { grid-template-columns: 1fr; }
  .plan.featured { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 56px; }
  .offer-card { padding: 28px 26px; width: 100%; }
  .section { padding: 64px 0; }
}

@keyframes nav-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
