/* UmiVPN Official — matches umivpn.com design exactly */

/* ===== LIGHT THEME (default) ===== */
:root {
  --bg:        hsl(0 0% 100%);
  --fg:        hsl(0 0% 3.9%);
  --card:      hsl(0 0% 100%);
  --card-fg:   hsl(0 0% 3.9%);
  --muted:     hsl(0 0% 96.1%);
  --muted-fg:  hsl(0 0% 45.1%);
  --primary:   hsl(0 0% 9%);
  --primary-fg:hsl(0 0% 98%);
  --border:    hsl(0 0% 89.8%);
  --input:     hsl(0 0% 89.8%);
  --radius:    0.5rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-w: 1100px;
  --header-h: 56px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow:    0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
}

/* ===== DARK THEME ===== */
.dark {
  --bg:        hsl(0 0% 3.9%);
  --fg:        hsl(0 0% 98%);
  --card:      hsl(0 0% 3.9%);
  --card-fg:   hsl(0 0% 98%);
  --muted:     hsl(0 0% 14.9%);
  --muted-fg:  hsl(0 0% 63.9%);
  --primary:   hsl(0 0% 98%);
  --primary-fg:hsl(0 0% 9%);
  --border:    hsl(0 0% 14.9%);
  --input:     hsl(0 0% 14.9%);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow:    0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,.4);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font); background: var(--bg); color: var(--fg);
  line-height: 1.6; transition: background .2s, color .2s;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }

/* ===== HEADER ===== */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.nav {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center;
  padding: 0 16px; height: 100%; gap: 4px;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0; margin-right: 8px;
}
.logo { height: 28px; width: auto; object-fit: contain; }
.dark .logo { filter: invert(1); }
.brand-name { font-size: 15px; font-weight: 600; }
.nav-links {
  display: flex; align-items: center; gap: 2px;
  list-style: none; flex: 1;
}
.nav-links li a, .nav-links li button {
  display: block; padding: 6px 10px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; color: var(--muted-fg);
  transition: color .15s, background .15s; white-space: nowrap;
  background: none; border: none; cursor: pointer; font-family: inherit;
}
.nav-links li a:hover, .nav-links li button:hover { color: var(--fg); background: var(--muted); }

/* Nav-right: theme toggle + lang + login */
.nav-right {
  margin-left: auto; display: flex; align-items: center; gap: 4px;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius);
  color: var(--muted-fg); transition: color .15s, background .15s;
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--fg); background: var(--muted); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
.dark .theme-toggle .icon-sun { display: block; }
.dark .theme-toggle .icon-moon { display: none; }

/* ===== DROPDOWN ===== */
.dropdown { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 10px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; color: var(--muted-fg);
  background: none; cursor: pointer; white-space: nowrap;
  transition: color .15s, background .15s;
}
.lang-btn:hover { color: var(--fg); background: var(--muted); }
.dropdown-panel {
  position: absolute; top: 100%; right: 0;
  margin-top: 0; padding-top: 8px;
  display: none; min-width: 130px; z-index: 1000;
}
.dropdown-panel-inner {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: 4px;
}
.dropdown-panel-inner a {
  display: block; padding: 7px 10px; border-radius: calc(var(--radius) - 2px);
  font-size: 14px; color: var(--muted-fg);
  transition: color .15s, background .15s;
}
.dropdown-panel-inner a:hover { color: var(--fg); background: var(--muted); }
.dropdown:hover .dropdown-panel,
.dropdown:focus-within .dropdown-panel,
.dropdown.open .dropdown-panel { display: block; }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 16px; border-radius: var(--radius);
  background: var(--primary); color: var(--primary-fg);
  font-size: 14px; font-weight: 500;
  transition: opacity .15s; white-space: nowrap; border: none; cursor: pointer;
}
.btn-primary:hover { opacity: .85; }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 16px; border-radius: var(--radius);
  background: transparent; color: var(--fg);
  font-size: 14px; font-weight: 500;
  border: 1px solid var(--border); cursor: pointer;
  transition: background .15s; white-space: nowrap;
}
.btn-outline:hover { background: var(--muted); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 10px 20px; font-size: 15px; }

/* ===== MOBILE NAV TOGGLE ===== */
.nav-toggle {
  display: none; width: 36px; height: 36px; font-size: 18px;
  color: var(--muted-fg); border-radius: var(--radius);
  align-items: center; justify-content: center;
  transition: color .15s, background .15s;
  order: -1; flex-shrink: 0;
}
.nav-toggle:hover { color: var(--fg); background: var(--muted); }
.mobile-lang { display: none; }

/* ===== HERO ===== */
.hero {
  padding: 72px 24px 64px; text-align: center;
  background: var(--bg);
}
.hero-logo { height: 72px; width: auto; margin: 0 auto 24px; }
.dark .hero-logo { filter: invert(1); }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem); font-weight: 700;
  letter-spacing: -.03em; margin-bottom: 28px;
}
.hero-buttons {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.hero-buttons .btn-outline {
  border-color: var(--border); background: var(--bg);
}

/* ===== FEATURES GRID ===== */
.features { padding: 48px 16px; }
.features-inner { max-width: var(--max-w); margin: 0 auto; }

/* ===== DOWNLOAD SECTION ===== */
.download-section { padding: 48px 16px; background: var(--muted); }
.section-inner { max-width: var(--max-w); margin: 0 auto; }
.section-header { margin-bottom: 28px; }
.section-header h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin-bottom: 6px; }
.section-header p { font-size: 15px; color: var(--muted-fg); }
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.dl-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
}
.dl-platform { font-size: 13px; font-weight: 600; color: var(--muted-fg); margin-bottom: 4px; }
.dl-name { font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.dl-req { font-size: 13px; color: var(--muted-fg); margin-bottom: 16px; }
.dl-actions { display: flex; flex-direction: column; gap: 8px; }
.dl-actions .btn-primary, .dl-actions .btn-outline { width: 100%; }

/* ===== PRICING SECTION ===== */
.pricing-section { padding: 48px 16px; }
.pricing-header { margin-bottom: 8px; }
.pricing-header h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin-bottom: 6px; }
.pricing-header p { font-size: 15px; color: var(--muted-fg); }
.pricing-note { font-size: 13px; color: var(--muted-fg); margin-top: 16px; }
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; max-width: 600px;
}
.plan-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm); position: relative;
}
.plan-featured { border-color: var(--fg); }
.plan-badge {
  display: inline-block; font-size: 12px; font-weight: 500;
  background: var(--fg); color: var(--bg);
  padding: 2px 8px; border-radius: 999px; margin-bottom: 12px;
}
.plan-name { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.plan-price-row { margin-bottom: 4px; }
.plan-price { font-size: 36px; font-weight: 700; }
.plan-period { font-size: 14px; color: var(--muted-fg); }
.plan-annual { font-size: 13px; color: var(--muted-fg); margin-bottom: 20px; }
.plan-feats { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.plan-feats li { font-size: 14px; color: var(--muted-fg); display: flex; align-items: center; gap: 8px; }
.plan-feats li::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--fg); border-radius: 50%; flex-shrink: 0; }
.plan-card .btn-primary, .plan-card .btn-outline { width: 100%; }

/* ===== PAGE HERO ===== */
.page-hero {
  padding: 56px 24px 40px; text-align: center;
  background: linear-gradient(to bottom, var(--muted), var(--bg));
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 700; margin-bottom: 10px; letter-spacing: -.02em; }
.page-hero p { font-size: 16px; color: var(--muted-fg); max-width: 560px; margin: 0 auto; }

/* ===== GENERIC SECTIONS ===== */
.section-pad { padding: 48px 16px; }
.container { max-width: var(--max-w); margin: 0 auto; }
.bg-muted { background: var(--muted); }
.section-head { margin-bottom: 32px; }
.section-head h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 700; margin-bottom: 8px; }
.section-head p { font-size: 15px; color: var(--muted-fg); }
.text-center { text-align: center; }

/* Generic feature grid — matches original 3-col centered icon style */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 24px; }
.feature-card { text-align: center; padding: 8px; min-width: 0; }
.feat-icon-circle {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--muted); margin: 0 auto 14px;
  flex-shrink: 0;
}
.feat-icon-circle svg { width: 22px; height: 22px; stroke: var(--fg); }
.feature-card .feat-icon { font-size: 22px; margin-bottom: 14px; }
.feature-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.feature-card p { font-size: 13px; color: var(--muted-fg); line-height: 1.6; }
@media (max-width: 680px) { .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; } }
@media (max-width: 400px) { .feature-grid { grid-template-columns: 1fr; } }

/* ===== FAQ ===== */
.faq-list { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); }
.faq-q {
  width: 100%; text-align: left; padding: 14px 16px;
  font-size: 14px; font-weight: 500; color: var(--fg);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  transition: background .15s;
}
.faq-q:hover { background: var(--muted); }
.faq-arrow { font-size: 11px; color: var(--muted-fg); flex-shrink: 0; transition: transform .2s; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a { display: none; padding: 0 16px 14px; }
.faq-item.open .faq-a { display: block; }
.faq-a p { font-size: 14px; color: var(--muted-fg); line-height: 1.7; }

/* ===== HOW IT WORKS ===== */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.step-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; background: var(--primary); color: var(--primary-fg);
  border-radius: 50%; font-size: 14px; font-weight: 700;
  margin: 20px 20px 0;
}
.step-img img { width: 100%; height: 180px; object-fit: cover; }
.step-card h3 { font-size: 15px; font-weight: 600; padding: 14px 20px 4px; }
.step-card p { font-size: 13px; color: var(--muted-fg); padding: 0 20px 18px; line-height: 1.6; }

/* ===== PROSE ===== */
.prose-inner { max-width: 720px; margin: 0 auto; }
.prose-inner h2 { font-size: 18px; font-weight: 600; margin: 32px 0 10px; }
.prose-inner h2:first-child { margin-top: 0; }
.prose-inner p { font-size: 15px; color: var(--muted-fg); line-height: 1.75; margin-bottom: 12px; }

/* ===== DOWNLOAD/CONTACT inner pages ===== */
.dl-grid-page { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.dl-card-page {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: var(--shadow-sm);
}
.dl-icon { font-size: 36px; margin-bottom: 12px; }
.dl-card-page h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.dl-card-page .dl-req { font-size: 13px; color: var(--muted-fg); margin-bottom: 16px; }
.dl-card-page .btn-primary { width: 100%; }

.req-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.req-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
}
.req-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.req-card ul { display: flex; flex-direction: column; gap: 5px; }
.req-card li { font-size: 13px; color: var(--muted-fg); padding-left: 12px; position: relative; }
.req-card li::before { content: "•"; position: absolute; left: 0; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.contact-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm);
}
.contact-card .feat-icon { font-size: 28px; margin-bottom: 12px; }
.contact-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.contact-card p { font-size: 14px; color: var(--muted-fg); margin-bottom: 20px; line-height: 1.6; }

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 16px 24px;
  background: var(--bg);
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-top {
  display: flex; flex-wrap: wrap; gap: 32px;
  align-items: flex-start; justify-content: space-between;
  margin-bottom: 32px;
}
.footer-brand { max-width: 280px; }
.footer-logo { height: 28px; width: auto; margin-bottom: 8px; }
.dark .footer-logo { filter: invert(1); }
.footer-brand-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.footer-tagline { font-size: 13px; color: var(--muted-fg); }
.footer-links {
  display: flex; flex-wrap: wrap; gap: 6px 0;
  flex-direction: column;
}
.footer-links a {
  font-size: 13px; color: var(--muted-fg); padding: 3px 0;
  transition: color .15s;
}
.footer-links a:hover { color: var(--fg); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 20px;
  font-size: 13px; color: var(--muted-fg);
}

/* ===== CTA BANNER ===== */
.cta-banner {
  background: var(--primary); color: var(--primary-fg);
  padding: 56px 16px; text-align: center;
}
.cta-banner h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; margin-bottom: 10px; }
.cta-banner p { font-size: 16px; opacity: .8; margin-bottom: 28px; max-width: 500px; margin-left: auto; margin-right: auto; }
.cta-banner .btn-primary { background: var(--bg); color: var(--fg); }
.cta-banner .btn-outline { border-color: rgba(255,255,255,.4); color: var(--primary-fg); }
.cta-banner .btn-outline:hover { background: rgba(255,255,255,.1); }
.btn-group { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .nav { padding: 0 12px; gap: 2px; }
  .brand-name { display: none; }
  /* hide desktop nav items and lang */
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: var(--header-h); left: 0; right: 0; z-index: 999;
    background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md); padding: 8px 0;
    height: auto; max-height: none; overflow: visible;
  }
  .nav-links li a, .nav-links li button {
    width: 100%; text-align: center; padding: 13px 20px; font-size: 15px;
  }
  .nav-right .lang-switcher { display: none; }
  .nav-right .btn-primary { display: none; }
  .nav-toggle { display: flex; order: 99; }
  /* mobile lang inside menu */
  .mobile-lang { display: block; }
  .nav-links li.mobile-lang {
    display: flex; flex-direction: row; justify-content: center;
    gap: 6px; padding: 10px 16px; border-top: 1px solid var(--border);
    flex-wrap: nowrap;
  }
  .nav-links li.mobile-lang a {
    width: auto; display: inline-block; padding: 6px 10px;
    font-size: 13px; white-space: nowrap; flex-shrink: 0; text-align: center;
  }
  /* btn centering */
  .btn-primary, .btn-outline {
    display: block; margin-left: auto; margin-right: auto;
    width: max-content; max-width: 92%;
  }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-buttons .btn-primary, .hero-buttons .btn-outline { width: 200px; max-width: 92%; }
  .plans-grid { max-width: 100%; }
  .dl-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { flex-direction: column; gap: 24px; }
  .footer-links { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; }
  .site-header { position: sticky; top: 0; }
}

@media (max-width: 480px) {
  .dl-grid { grid-template-columns: 1fr; }
  .dl-grid-page { grid-template-columns: 1fr; }
  .req-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
