/* Silent VPN portal — shared styles.
   Palette mirrors app/vpnclient.app-flutter/lib/design/app_colors.dart
   so the site and the app feel like one product. */

:root {
  --brand-cyan: #00c6fb;
  --brand-blue: #005bea;
  --brand-gradient: linear-gradient(160deg, var(--brand-cyan), var(--brand-blue));

  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --text: #303f49;
  --text-muted: #6b7680;
  --divider: rgba(156, 178, 194, 0.25);

  --success: #1fb67a;
  --warning: #ffb020;
  --danger: #e5484d;

  --radius: 14px;
  --shadow: 0 4px 24px rgba(48, 63, 73, 0.08);
  --max-width: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1419;
    --surface: #1a2129;
    --surface-raised: #1f2933;
    --text: #e7ecef;
    --text-muted: #93a1ab;
    --divider: rgba(231, 236, 239, 0.1);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--brand-blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

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

/* ─── Header ──────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--divider);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}
.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg {
  width: 18px;
  height: 18px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 760px) {
  .main-nav {
    position: fixed;
    inset: 68px 0 0 0;
    background: var(--surface);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 24px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }
  .main-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .main-nav a {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--divider);
  }
  .nav-toggle {
    display: block;
  }
}

/* ─── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover {
  text-decoration: none;
}
.btn-primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 91, 234, 0.28);
}
.btn-primary:hover {
  filter: brightness(1.06);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--divider);
}
.btn-secondary:hover {
  border-color: var(--brand-blue);
}
.btn-disabled {
  background: var(--surface);
  color: var(--text-muted);
  border-color: var(--divider);
  cursor: not-allowed;
  opacity: 0.75;
}
.btn-disabled:hover {
  text-decoration: none;
}
.btn-block {
  width: 100%;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* ─── Hero ────────────────────────────────────────────────────────────── */
.hero {
  padding: 88px 0 64px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 32px;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-badges {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.hero-badges span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ─── Sections ────────────────────────────────────────────────────────── */
section {
  padding: 56px 0;
}
.section-title {
  text-align: center;
  margin-bottom: 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 40px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.grid {
  display: grid;
  gap: 20px;
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 860px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  text-align: left;
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand-blue) 12%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--brand-blue);
}
.feature-icon svg {
  width: 22px;
  height: 22px;
}
.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ─── Download page ───────────────────────────────────────────────────── */
.platform-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.platform-card .platform-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.platform-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.platform-card h3 {
  margin: 0;
  font-size: 1.1rem;
}
.platform-card .platform-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}
.platform-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 15%, transparent);
  color: var(--success);
}
.badge-soon {
  background: color-mix(in srgb, var(--warning) 18%, transparent);
  color: #a16207;
}
@media (prefers-color-scheme: dark) {
  .badge-soon {
    color: var(--warning);
  }
}

/* ─── Legal / long-form content pages ────────────────────────────────── */
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}
.doc h1 {
  font-size: 2rem;
  margin-bottom: 4px;
}
.doc .updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
}
.doc h2 {
  font-size: 1.3rem;
  margin-top: 40px;
  margin-bottom: 12px;
}
.doc h3 {
  font-size: 1.05rem;
  margin-top: 28px;
  margin-bottom: 8px;
}
.doc p,
.doc li {
  color: var(--text);
}
.doc ul,
.doc ol {
  padding-left: 22px;
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.92rem;
}
.doc th,
.doc td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--divider);
  vertical-align: top;
}
.doc th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.callout {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-left: 3px solid var(--brand-blue);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.placeholder-flag {
  background: color-mix(in srgb, var(--warning) 14%, transparent);
  border-left-color: var(--warning);
  color: var(--text);
}
.doc-nav {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--divider);
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

/* ─── FAQ ─────────────────────────────────────────────────────────────── */
.faq-item {
  border-bottom: 1px solid var(--divider);
  padding: 18px 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 12px;
  flex-shrink: 0;
}
.faq-item[open] summary::after {
  content: "\2212";
}
.faq-item p {
  margin: 12px 0 0;
  color: var(--text-muted);
}

/* ─── CTA band ────────────────────────────────────────────────────────── */
.cta-band {
  background: var(--brand-gradient);
  border-radius: var(--radius);
  padding: 48px 32px;
  text-align: center;
  color: #fff;
}
.cta-band h2 {
  margin: 0 0 10px;
  font-size: 1.6rem;
}
.cta-band p {
  margin: 0 0 24px;
  opacity: 0.92;
}
.cta-band .btn-primary {
  background: #fff;
  color: var(--brand-blue);
  box-shadow: none;
}

/* ─── Footer ──────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--divider);
  padding: 48px 0 32px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.footer-grid h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-grid a {
  color: var(--text);
  font-size: 0.92rem;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding-top: 24px;
  border-top: 1px solid var(--divider);
}

.eyebrow {
  display: inline-block;
  color: var(--brand-blue);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}