/* Kitsu VPN — Claude/Apple aesthetic via Claude Design handoff
 * Geist + Instrument Serif, warm cream bg with 6px dot grid, oklch palette.
 */

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

:root {
  --bg:           oklch(96% 0.012 60);
  --bg2:          oklch(93% 0.015 58);
  --card:         #ffffff;
  --ink:          oklch(14% 0.012 55);
  --ink2:         oklch(45% 0.010 55);
  --ink3:         oklch(65% 0.008 55);
  --accent:       oklch(57% 0.13 38);
  --accent-light: oklch(94% 0.04 45);
  --accent-hover: oklch(52% 0.13 38);
  --green:        oklch(52% 0.13 148);
  --green-bg:     oklch(93% 0.06 148);
  --warn:         oklch(62% 0.14 62);
  --warn-bg:      oklch(95% 0.06 62);
  --err:          oklch(57% 0.16 25);
  --err-bg:       oklch(95% 0.04 25);
  --border:       oklch(88% 0.010 55);
  --border-strong:oklch(80% 0.012 55);
  --shadow-sm: 0 1px 3px oklch(0% 0 0 / 0.06), 0 1px 2px oklch(0% 0 0 / 0.04);
  --shadow-md: 0 4px 16px oklch(0% 0 0 / 0.08), 0 2px 6px oklch(0% 0 0 / 0.05);
  --shadow-lg: 0 12px 40px oklch(0% 0 0 / 0.12), 0 4px 12px oklch(0% 0 0 / 0.06);
  --r:    14px;
  --r-sm: 9px;
}

html {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image: radial-gradient(oklch(72% 0.015 58 / 0.28) 0.9px, transparent 0.9px);
  background-size: 6px 6px;
  background-attachment: fixed;
  position: relative;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 30%, oklch(96% 0.012 60 / 0.55), transparent 75%);
}
main, .container, .topbar, .footer { position: relative; z-index: 1; }

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

/* ── Keyframes ────────────────────────────────────────────── */
@keyframes fadeUp  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }
@keyframes pulse   { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); max-height: 0; } to { opacity: 1; transform: translateY(0); max-height: 360px; } }

/* ── Topbar ───────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 24px;
  height: 56px; padding: 0 24px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
}
.topbar.scrolled {
  background: oklch(96% 0.012 60 / 0.82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom-color: var(--border);
}
.topbar .brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 600; color: var(--ink);
  letter-spacing: -0.02em;
}
.topbar .brand-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.topbar nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.topbar nav a {
  color: var(--ink2); font-size: 14px; font-weight: 400;
  padding: 6px 0; border-bottom: 1.5px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.topbar nav a:hover { color: var(--ink); }
.topbar nav a.cta {
  color: #fff; background: var(--ink); border: none;
  padding: 8px 16px; border-radius: var(--r-sm); font-weight: 600;
}
.topbar nav a.cta:hover { background: #2a2a2a; color: #fff; }
.topbar nav a.ghost { color: var(--ink3); }

/* ── Layout ───────────────────────────────────────────────── */
.container, main.container {
  max-width: 1120px; margin: 0 auto; padding: 0 20px 80px;
}
.container.narrow { max-width: 760px; padding: 32px 20px 80px; }

/* ── Footer ───────────────────────────────────────────────── */
.footer { max-width: 1120px; margin: 0 auto; padding: 24px 20px 48px; text-align: center; color: var(--ink3); font-size: 12px; }
.footer small { line-height: 1.7; }
.footer a { color: var(--accent); }

/* ── Home: hero + features + pricing ──────────────────────── */
.hero {
  padding-top: 64px; padding-bottom: 56px;
  animation: fadeUp 0.6s ease both;
}
.hero-grid { display: block; }
.hero-visual { display: none; }
.hero h1 {
  font-size: clamp(36px, 8vw, 48px);
  font-weight: 700; line-height: 1.05; letter-spacing: -0.035em;
  margin-bottom: 22px;
}
.hero h1 em {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic; font-weight: 400; color: var(--accent);
}
.hero .lead {
  font-size: 16px; color: var(--ink2); line-height: 1.65;
  margin-bottom: 32px; max-width: 460px;
}
.cta-row {
  display: flex; flex-direction: column; gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--r-sm);
  font-size: 15px; font-weight: 500; font-family: inherit;
  letter-spacing: -0.01em; cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--ink); color: #fff; border-color: var(--ink);
  font-weight: 600;
}
.btn-primary:hover { background: #2a2a2a; color: #fff; }
.btn-primary:active { transform: scale(0.99); background: #111; }
.btn-ghost {
  background: transparent; color: var(--ink); border-color: var(--border);
}
.btn-ghost:hover { background: var(--card); border-color: var(--ink); color: var(--ink); }

/* Hero mockup (desktop only) */
.hero-visual-inner {
  position: relative; aspect-ratio: 1 / 1; max-width: 440px; margin-left: auto;
}
.hero-visual-glow {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, oklch(94% 0.05 45), transparent 70%);
  border-radius: 50%;
}
.hero-browser {
  position: absolute; inset: 12% 12%; border-radius: 24px;
  background: var(--card); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); overflow: hidden;
  display: flex; flex-direction: column;
}
.hero-browser .tab {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 6px;
}
.hero-browser .dot { width: 8px; height: 8px; border-radius: 50%; }
.hero-browser .dot.r { background: #ff5f56; }
.hero-browser .dot.y { background: #ffbd2e; }
.hero-browser .dot.g { background: #27c93f; }
.hero-browser .url {
  margin-left: 10px; font-size: 11px; color: var(--ink3); font-family: ui-monospace, monospace;
}
.hero-browser .body {
  flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.hero-browser .bar { height: 8px; background: var(--bg2); border-radius: 4px; }
.hero-browser .video {
  height: 80px; border-radius: 8px; margin-top: 6px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, oklch(94% 0.04 45), oklch(90% 0.06 38));
}
.hero-browser .play {
  width: 0; height: 0;
  border-top: 10px solid transparent; border-bottom: 10px solid transparent;
  border-left: 16px solid var(--accent);
}
.hero-browser .small-bar { height: 6px; border-radius: 3px; background: var(--bg2); }
.hero-browser .status {
  padding: 12px 16px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.hero-browser .status .conn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--green); font-weight: 500;
}
.hero-browser .status .ping { font-size: 11px; color: var(--ink3); font-family: ui-monospace, monospace; }
.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); animation: pulse 2.5s ease infinite;
}

/* Features as row-cards */
.features {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 72px; animation: fadeUp 0.6s 0.1s ease both;
}
.features .card {
  background: oklch(98% 0.006 58 / 0.5);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: all 0.22s ease;
}
.features .card:hover {
  background: var(--card); border-color: var(--border-strong);
  box-shadow: var(--shadow-md); transform: translateY(-2px);
}
.features .card .icon { font-size: 24px; }
.features .card h3 { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.features .card p { font-size: 13.5px; color: var(--ink2); line-height: 1.6; }

/* Pricing section */
.tariffs-wrap { animation: fadeUp 0.6s 0.2s ease both; }
.tariffs-title {
  font-size: 24px; font-weight: 600; letter-spacing: -0.02em;
  margin-bottom: 24px; text-align: center;
}
.tariffs-grid { display: flex; flex-direction: column; gap: 10px; }

.device-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: -6px auto 18px;
  padding: 5px;
  max-width: 520px;
  background: oklch(91% 0.014 58 / 0.72);
  border: 1px solid var(--border);
  border-radius: 13px;
}
.device-switch.compact { margin: 0 0 16px; max-width: none; }
.device-option {
  appearance: none;
  border: 0;
  border-radius: 9px;
  min-height: 40px;
  padding: 0 10px;
  background: transparent;
  color: var(--ink2);
  font: 600 13px/1 'Geist', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.device-option.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.tariff-card[hidden] { display: none !important; }


.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 22px 20px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card.featured { border: 2px solid var(--accent); }
.card.featured .price { color: var(--accent); }

.badge {
  position: absolute; top: 14px; left: 20px;
  background: var(--accent-light); color: var(--accent);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 20px;
}
.badge-ok   { background: var(--green-bg); color: var(--green); }
.badge-warn { background: var(--warn-bg);  color: var(--warn); }

.card .period-label {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink3); margin-top: 14px;
}
.card.featured .period-label { margin-top: 34px; }
.card .old-price { font-size: 12.5px; color: var(--ink3); text-decoration: line-through; }
.card .price-row { display: flex; align-items: baseline; gap: 3px; }
.card .price { font-size: 36px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.card .currency { font-size: 13px; color: var(--ink3); font-weight: 400; }
.card .per-month { font-size: 12px; color: var(--accent); font-weight: 500; }
.card .savings {
  display: inline-flex; align-self: flex-start;
  background: var(--bg2); color: var(--ink2);
  font-size: 11.5px; padding: 3px 9px; border-radius: 20px; font-weight: 500;
}
.card.featured .savings { background: var(--accent-light); color: var(--accent); }
.card .savings-placeholder { height: 20px; }

.pay-btn {
  width: 100%; padding: 12px 0; border-radius: var(--r-sm);
  border: none; background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 600; font-family: inherit;
  text-align: center; cursor: pointer; margin-top: auto;
  transition: background 0.15s ease;
  display: block;
}
.pay-form {
  width: 100%;
  margin: 0;
}
.pay-form .pay-btn {
  appearance: none;
}

.nav-form {
  display: inline-flex;
  margin: 0;
}

.nav-button {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  padding: 6px 0;
  color: var(--ink3);
}

.topbar nav .nav-button:hover {
  color: var(--ink);
}
.pay-btn:hover { background: #2a2a2a; color: #fff; }
.pay-btn-featured { background: var(--accent); }
.pay-btn-featured:hover { background: var(--accent-hover); }

/* ── Account page ─────────────────────────────────────────── */
.account-wrap {
  max-width: 760px; margin: 0 auto; padding: 32px 20px 80px;
  animation: fadeUp 0.5s ease both;
}
.account-wrap h1 {
  font-size: 28px; font-weight: 600; letter-spacing: -0.025em;
  margin-bottom: 28px;
}
.account-grid { display: flex; flex-direction: column; gap: 14px; }

/* Generic card block used on /account */
.panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.panel h2 {
  font-size: 17px; font-weight: 600; letter-spacing: -0.015em;
  margin-bottom: 16px;
}
.panel h2 + .panel-sub { margin-top: -10px; margin-bottom: 18px; }
.panel-sub { font-size: 13.5px; color: var(--ink2); line-height: 1.6; }

/* Info card: email + status */
.kv {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.kv > div { display: flex; flex-direction: column; gap: 5px; }
.kv .muted {
  font-size: 11.5px; color: var(--ink3); font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.kv b { font-size: 14px; font-weight: 400; color: var(--ink); }
.kv .badge {
  position: static; display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 8px; font-size: 13px; font-weight: 500;
  text-transform: none; letter-spacing: normal;
  background: var(--bg2); color: var(--ink2);
  align-self: flex-start;
}

/* Telegram link badge */
.link-tg-row {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px 24px;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.link-tg-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--ink2); font-weight: 400;
}
.link-tg-badge::before {
  content: ''; width: 16px; height: 16px; flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'><path d='M4 12C4 6 8 4 12 4s8 2 8 8-4 8-8 8-8-2-8-8z' stroke='black' stroke-width='1.5'/><path d='M8 11.5l2.5 2.5 5.5-5.5' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'><path d='M4 12C4 6 8 4 12 4s8 2 8 8-4 8-8 8-8-2-8-8z' stroke='black' stroke-width='1.5'/><path d='M8 11.5l2.5 2.5 5.5-5.5' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
  color: var(--green);
}
.link-tg-row .btn { margin-right: 8px; }
.link-tg-hint { font-size: 13px; color: var(--ink3); flex-basis: 100%; }

/* Connection section with ConnectBtn */
.connect-list { display: flex; flex-direction: column; gap: 8px; }
.connect-btn {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
  cursor: pointer; width: 100%;
  text-align: left; text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.connect-btn:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.connect-btn:active { transform: scale(0.995); }
.connect-tile {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 1px 2px rgba(0,0,0,0.1);
}
.connect-tile.mobile  { background: linear-gradient(135deg, oklch(68% 0.14 38), oklch(58% 0.13 38)); }
.connect-tile.desktop { background: linear-gradient(135deg, oklch(22% 0.01 55), oklch(14% 0.01 55)); }
.connect-tile svg { display: block; }
.connect-body { flex: 1; min-width: 0; }
.connect-app { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; margin-bottom: 2px; }
.connect-plat { font-size: 12.5px; color: var(--ink3); font-weight: 400; }
.connect-chev {
  flex-shrink: 0; color: var(--ink3);
  transition: transform 0.2s ease;
}
.connect-btn:hover .connect-chev { transform: translateX(2px); }

/* Copy link collapsible */
.sub-fallback { margin-top: 8px; }
.sub-fallback summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 0; font-size: 13.5px; color: var(--ink2);
  transition: color 0.15s;
}
.sub-fallback summary::-webkit-details-marker { display: none; }
.sub-fallback summary::before {
  content: '▶'; font-size: 10px; transition: transform 0.2s;
}
.sub-fallback[open] summary::before { transform: rotate(90deg); }
.sub-fallback summary:hover { color: var(--ink); }
.sub-fallback[open] > div {
  animation: slideDown 0.22s ease both;
  overflow: hidden; margin-top: 6px;
}
.sub-box {
  background: var(--bg2); border-radius: var(--r-sm);
  padding: 12px 14px; display: flex; gap: 10px; align-items: center;
  border: 1px solid var(--border);
}
.sub-url {
  flex: 1; font-size: 11.5px; color: var(--ink2);
  word-break: break-all; line-height: 1.5;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  background: none; border: none; padding: 0;
  white-space: pre-wrap;
}
.copy-btn {
  flex-shrink: 0; background: var(--ink); color: #fff;
  border: none; border-radius: var(--r-sm); padding: 8px 14px;
  font-size: 13px; font-weight: 500; font-family: inherit;
  cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
  transition: background 0.2s ease, color 0.2s ease;
}
.copy-btn:hover { background: #2a2a2a; color: #fff; }
.copy-btn.copied { background: var(--green-bg); color: var(--green); }
.copy-btn.copied::before {
  content: ''; width: 14px; height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'><path d='M3 8l3.5 3.5L13 5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'><path d='M3 8l3.5 3.5L13 5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
}

/* Connection-section bottom links */
.connect-links {
  margin-top: 14px; display: flex; gap: 16px;
}
.connect-links a { color: var(--accent); font-size: 13.5px; font-weight: 500; }

/* Renew grid (inside Account) */
.renew-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.renew-grid .card { padding: 16px 14px; gap: 10px; }
.renew-grid .card .price { font-size: 30px; }
.renew-grid .card.featured .period-label { margin-top: 28px; }
.renew-grid .pay-btn { font-size: 13px; padding: 9px 0; }

/* Referral card */
.referral-cta {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  display: flex; gap: 14px; align-items: flex-start;
}
.referral-cta::before { content: '🎁'; font-size: 24px; flex-shrink: 0; line-height: 1; }
.referral-cta .body { flex: 1; }
.referral-cta h2 { font-weight: 600; font-size: 15px; margin-bottom: 5px; }
.referral-cta p { font-size: 13.5px; color: var(--ink2); line-height: 1.65; margin: 0; }
.referral-cta a { color: var(--accent); font-weight: 500; }

/* Trial CTA */
.trial-cta {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.trial-cta h2 { font-size: 17px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.015em; }
.trial-cta p { font-size: 13.5px; color: var(--ink2); margin-bottom: 14px; }
.trial-cta form { margin: 0; }

/* Status pills */
.success, .error, .notice {
  padding: 10px 14px; border-radius: var(--r-sm); font-size: 13.5px; margin-bottom: 14px;
}
.success { background: var(--green-bg); color: var(--green); }
.error   { background: var(--err-bg);   color: var(--err); }
.notice  { background: rgba(30, 111, 255, 0.10); color: #1e56b8; }

/* ── Auth / forms (login / signup / verify / forgot / reset) ─ */
.form-card {
  max-width: 440px; margin: 60px auto 40px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 32px 28px;
  box-shadow: var(--shadow-md); animation: fadeUp 0.45s ease both;
}
.form-card.wide { max-width: 760px; padding: 32px 28px; }
.form-card h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 6px; }
.form-card .muted { color: var(--ink3); font-size: 13.5px; margin-bottom: 20px; }
.form-card label { display: block; margin: 14px 0 6px; font-size: 13px; color: var(--ink2); }
.form-card input[type=email],
.form-card input[type=password],
.form-card input[type=text] {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  font-family: inherit; font-size: 14.5px; color: var(--ink);
  background: var(--card); transition: border-color 0.15s;
}
.form-card input:focus { outline: none; border-color: var(--ink); }
.form-card .btn { width: 100%; margin-top: 18px; padding: 12px 16px; }
.form-card .foot {
  margin-top: 22px; font-size: 13px; color: var(--ink3); text-align: center;
}
.form-card .foot a { color: var(--accent); }

/* ── FAQ / knowledge-base ─────────────────────────────────── */
.kb { max-width: 820px; margin: 0 auto; padding: 40px 20px 80px; }
.kb h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.025em; margin-bottom: 12px; }
.kb > p.lead { color: var(--ink2); margin-bottom: 28px; }
.kb-section { margin-bottom: 34px; }
.kb-section h2 { font-size: 18px; font-weight: 600; margin-bottom: 14px; letter-spacing: -0.015em; }
.kb-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 16px 20px; margin-bottom: 10px; box-shadow: var(--shadow-sm);
}
.kb-card summary { cursor: pointer; font-weight: 500; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kb-card summary::-webkit-details-marker { display: none; }
.kb-card summary .chev { transition: transform 0.2s; color: var(--ink3); }
.kb-card[open] summary .chev { transform: rotate(90deg); }
.kb-card .kb-body { padding: 14px 0 4px; color: var(--ink2); font-size: 14px; line-height: 1.65; }
.kb-card .kb-body ol, .kb-card .kb-body ul { padding-left: 20px; }
.kb-card .kb-body li { margin: 5px 0; }
.kb-card .kb-body strong { color: var(--ink); font-weight: 600; }
.media-placeholder {
  display: inline-block; background: var(--bg2); color: var(--ink3);
  padding: 8px 12px; border-radius: var(--r-sm); font-size: 12.5px; margin-top: 10px;
}

/* ── Legal (privacy/terms) ────────────────────────────────── */
.legal { max-width: 760px; margin: 0 auto; padding: 40px 20px 80px; }
.legal h1 { font-size: 26px; font-weight: 600; margin-bottom: 18px; letter-spacing: -0.02em; }
.legal h2 { font-size: 17px; font-weight: 600; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--ink2); line-height: 1.7; margin: 8px 0; }
.legal ul, .legal ol { padding-left: 22px; }

/* ── Telegram link modal ──────────────────────────────────── */
.tg-link-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: oklch(14% 0.012 55 / 0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease both;
}
.tg-link-modal[hidden] { display: none; }
.tg-link-card {
  background: var(--card); border-radius: 18px;
  padding: 28px 24px; max-width: 380px; width: 100%;
  text-align: center; box-shadow: var(--shadow-lg);
  animation: scaleIn 0.25s ease both;
}
.tg-link-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.tg-link-card p { font-size: 13.5px; color: var(--ink2); margin-bottom: 8px; line-height: 1.55; }
.tg-link-card .tg-link-code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 32px; letter-spacing: 8px; font-weight: 600;
  padding: 16px; background: var(--bg2); border-radius: 12px;
  margin: 16px 0;
}
.tg-link-card .btn { width: 100%; }
.tg-link-card .tg-link-ttl { margin-top: 12px; font-size: 12px; color: var(--ink3); }
.tg-link-card button.btn-ghost { margin-top: 8px; }

/* ── Desktop responsive ───────────────────────────────────── */
@media (min-width: 820px) {
  .hero { padding-top: 80px; padding-bottom: 96px; }
  .hero-grid {
    display: grid; grid-template-columns: 1.15fr 1fr;
    gap: 64px; align-items: center;
  }
  .hero-visual { display: block; }
  .hero h1 { font-size: 72px; }
  .cta-row { flex-direction: row; gap: 12px; }
  .cta-row .btn { width: auto; flex: 0 0 auto; padding: 14px 24px; }
  .features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .tariffs-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .tariffs-title { text-align: center; }
  .renew-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .account-wrap { max-width: 760px; padding: 40px 40px 100px; }
}

/* ── Mobile tweaks ────────────────────────────────────────── */
@media (max-width: 819px) {
  .cta-row .btn { width: 100%; }
  .topbar { padding: 0 16px; }
  .topbar nav { gap: 14px; }
  .topbar nav a:not(.cta) { display: none; }
  .topbar nav a.cta, .topbar nav a[href='/login'], .topbar nav a[href='/logout'] { display: inline-flex; }
}

/* Orange UX polish layer: interaction, motion, and tariff picker. */
html { scroll-behavior: smooth; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 2000;
  transform: translateY(-140%);
  background: var(--ink);
  color: #fff;
  padding: 10px 13px;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-md);
}
.skip-link:focus { transform: translateY(0); }

.topbar nav a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

a, button, input, summary {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 3px solid oklch(76% 0.09 38 / 0.42);
  outline-offset: 3px;
}

@keyframes revealUp {
  from { opacity: 0; transform: translateY(22px) scale(0.985); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes heroDrift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-0.2deg); }
  50% { transform: translate3d(0, -10px, 0) rotate(0.35deg); }
}
@keyframes scanLine {
  0% { transform: translateY(-120%); opacity: 0; }
  18% { opacity: 0.48; }
  50% { opacity: 0.18; }
  100% { transform: translateY(240%); opacity: 0; }
}
@keyframes tariffSwitch {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

body.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(22px) scale(0.985);
  filter: blur(8px);
}
body.reveal-ready [data-reveal].is-visible {
  animation: revealUp 1.05s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms) both;
}

.hero-copy { max-width: 560px; }
.hero-visual-inner {
  will-change: transform;
  animation: heroDrift 11s ease-in-out infinite;
}
.hero-browser {
  isolation: isolate;
  transform: translateZ(0);
}
.hero-browser::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, oklch(100% 0 0 / 0.30) 49%, transparent 58%);
  animation: scanLine 9s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
.hero-browser .video {
  position: relative;
  overflow: hidden;
}
.hero-browser .video::before {
  content: '';
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 30% 30%, oklch(100% 0 0 / 0.42), transparent 36%);
  transform: rotate(18deg);
}
.hero-browser .play { position: relative; z-index: 1; }

.btn,
.pay-btn,
.device-option,
.connect-btn,
.kb-card summary {
  transition:
    transform 380ms cubic-bezier(0.16, 1, 0.3, 1),
    background 380ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 380ms cubic-bezier(0.16, 1, 0.3, 1),
    color 380ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 380ms cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover,
.pay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px oklch(47% 0.08 38 / 0.18);
}
.btn:active,
.pay-btn:active,
.device-option:active {
  transform: translateY(1px) scale(0.99);
}

.section-heading {
  max-width: 660px;
  margin: 0 auto 22px;
  text-align: center;
}
.section-heading .eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.section-heading p {
  color: var(--ink2);
  font-size: 15px;
  line-height: 1.65;
  text-wrap: pretty;
}

.device-switch {
  position: relative;
  background: oklch(92% 0.018 58 / 0.82);
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.68), var(--shadow-sm);
}
.device-option:hover {
  color: var(--ink);
  background: oklch(97% 0.012 58 / 0.64);
}
.device-option.active {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 18px oklch(20% 0.018 55 / 0.16);
}
.tariff-picker.is-changing .tariff-card:not([hidden]) {
  animation: tariffSwitch 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
}
body.reveal-ready .tariff-card.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
  animation: none;
}
body.reveal-ready .tariff-picker.is-changing .tariff-card.is-visible:not([hidden]) {
  animation: tariffSwitch 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.tariff-card {
  min-height: 238px;
}
.tariff-card.featured {
  background:
    linear-gradient(180deg, oklch(99% 0.006 58), oklch(96% 0.028 48)),
    var(--card);
  box-shadow: 0 16px 42px oklch(57% 0.13 38 / 0.16);
}
.tariff-card.featured::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 80% 15%, oklch(87% 0.09 45 / 0.34), transparent 34%);
}
.tariff-card > * { position: relative; z-index: 1; }

.card {
  will-change: transform;
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 0%, oklch(89% 0.07 43 / 0.28), transparent 38%);
  transition: opacity 420ms cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover::after { opacity: 1; }

.server-map {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1.18fr);
  gap: clamp(22px, 4vw, 44px);
  align-items: center;
  margin: -34px 0 72px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    radial-gradient(circle at 78% 24%, oklch(94% 0.045 45 / 0.66), transparent 34%),
    radial-gradient(circle at 16% 100%, oklch(92% 0.035 58 / 0.58), transparent 34%),
    linear-gradient(135deg, oklch(99% 0.004 58 / 0.90), oklch(95% 0.018 58 / 0.82));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.server-map::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(oklch(72% 0.015 58 / 0.20) 0.9px, transparent 0.9px);
  background-size: 6px 6px;
  mask-image: linear-gradient(90deg, transparent, #000 16%, #000 86%, transparent);
  opacity: 0.65;
}
.server-map-copy {
  position: relative;
  z-index: 3;
  max-width: 430px;
}
.server-map-copy h2 {
  max-width: 520px;
  margin: 8px 0 14px;
  color: var(--ink);
  font-size: clamp(30px, 4.6vw, 48px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.server-map-copy h2 em {
  display: inline-block;
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.server-map-copy .eyebrow {
  display: inline-flex;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.server-map-copy p {
  max-width: 430px;
  color: var(--ink2);
  line-height: 1.7;
}
.server-map-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 20px;
}
.server-map-tabs span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: oklch(100% 0 0 / 0.58);
  color: var(--ink2);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.server-map-tabs .active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.server-map-cta {
  width: fit-content;
}
.server-list {
  list-style: none;
}
.server-country-list {
  grid-column: 1 / -1;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: -8px;
}
.server-list li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: oklch(100% 0 0 / 0.58);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.server-list b {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.map-panel {
  position: relative;
  z-index: 2;
  min-height: clamp(300px, 34vw, 430px);
  border: 1px solid oklch(86% 0.012 55);
  border-radius: 22px;
  background:
    radial-gradient(circle at 54% 38%, oklch(94% 0.045 45 / 0.62), transparent 27%),
    linear-gradient(180deg, oklch(100% 0 0 / 0.64), oklch(97% 0.010 58 / 0.70));
  box-shadow:
    inset 0 1px 0 oklch(100% 0 0 / 0.82),
    0 18px 46px oklch(33% 0.06 42 / 0.10);
  overflow: hidden;
}
.dotted-world-map {
  position: absolute;
  inset: 7% 5%;
  display: block;
  width: 90%;
  height: 78%;
  object-fit: contain;
  opacity: 0.92;
}
.map-dot {
  position: absolute;
  z-index: 4;
  width: 11px;
  height: 11px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 0 0 7px oklch(57% 0.13 38 / 0.14),
    0 0 24px oklch(57% 0.13 38 / 0.42);
  cursor: default;
}
.map-dot::after {
  content: '';
  position: absolute;
  inset: -15px;
  border: 1px solid oklch(57% 0.13 38 / 0.22);
  border-radius: 50%;
  animation: mapPulse 5.4s ease-in-out infinite;
}
.map-dot::before {
  content: attr(data-country);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 14px);
  z-index: 6;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: oklch(100% 0 0 / 0.92);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 240ms ease, transform 240ms ease;
  pointer-events: none;
}
.map-dot:hover::before,
.map-dot:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, 0);
}
.pin-fi { left: 53%; top: 25%; }
.pin-de { left: 48%; top: 37%; }
.pin-nl { left: 46%; top: 36%; }
.pin-de::after { animation-delay: 0.4s; }
.pin-nl::after { animation-delay: 0.8s; }
.map-note {
  position: absolute;
  left: 22px;
  bottom: 22px;
  z-index: 3;
  display: grid;
  gap: 3px;
  max-width: min(290px, calc(100% - 44px));
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: oklch(100% 0 0 / 0.76);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}
.map-note strong {
  color: var(--ink);
  font-size: 14px;
}
.map-note span {
  color: var(--ink2);
  font-size: 12.5px;
  line-height: 1.45;
}
@keyframes mapPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.40; }
  50% { transform: scale(1.18); opacity: 0.10; }
}

.payment-note {
  max-width: 800px;
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.payment-note span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: oklch(98% 0.006 58 / 0.72);
  box-shadow: var(--shadow-sm);
}
.payment-note strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.payment-note small {
  color: var(--ink2);
  font-size: 12px;
  line-height: 1.4;
}

.auth-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.auth-links.single {
  justify-content: center;
}
.auth-links span {
  color: var(--ink3);
}
.auth-links a {
  font-weight: 600;
}

.form-card {
  transform-origin: 50% 40%;
}
.form-card input[type=email]:focus,
.form-card input[type=password]:focus,
.form-card input[type=text]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px oklch(57% 0.13 38 / 0.10);
}

.kb-head {
  margin-bottom: 26px;
}
.kb-head p {
  color: var(--ink2);
  line-height: 1.7;
  max-width: 720px;
}
.kb-card {
  transition:
    transform 360ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 360ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 360ms cubic-bezier(0.16, 1, 0.3, 1);
}
.kb-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.kb-card[open] {
  border-color: oklch(78% 0.052 45);
}
.kb-card .kb-body {
  animation: tariffSwitch 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.kb-foot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 34px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 0%, oklch(94% 0.045 45 / 0.58), transparent 38%),
    oklch(99% 0.005 58 / 0.84);
  box-shadow: var(--shadow-md);
}
.kb-foot-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.kb-foot-icon img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.kb-foot h2 {
  margin: 0 0 3px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.kb-foot p {
  margin: 0;
  color: var(--ink2);
  font-size: 13.5px;
  line-height: 1.55;
}
.kb-foot .btn {
  min-width: 198px;
  box-shadow: 0 12px 24px oklch(57% 0.13 38 / 0.16);
}

.tg-link-error {
  margin: 10px 0 0;
  color: var(--err);
  font-size: 13px;
}
.tg-link-error[hidden] { display: none; }

@media (min-width: 820px) {
  .tariffs-wrap {
    padding-top: 10px;
  }
  .tariffs-grid {
    align-items: stretch;
  }
}

@media (max-width: 819px) {
  body.reveal-ready [data-reveal] {
    transform: translateY(16px);
    filter: blur(5px);
  }
  .hero-visual-inner {
    animation-duration: 8.5s;
  }
  .section-heading {
    text-align: left;
    margin-bottom: 18px;
  }
  .device-switch {
    max-width: none;
  }
  .device-option {
    font-size: 12px;
    min-height: 38px;
  }
  .payment-note {
    grid-template-columns: 1fr;
  }
  .server-map {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: -24px 0 56px;
    padding: 18px;
    border-radius: 20px;
  }
  .map-panel {
    min-height: 300px;
  }
  .map-dot {
    width: 10px;
    height: 10px;
  }
  .map-note {
    left: 14px;
    right: 14px;
    bottom: 14px;
    max-width: none;
  }
  .server-map-copy {
    max-width: none;
  }
  .server-map-copy h2 {
    font-size: clamp(30px, 11vw, 44px);
  }
  .server-map-tabs {
    gap: 8px;
    margin: 18px 0 16px;
  }
  .server-map-cta {
    width: 100%;
  }
  .server-country-list {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 0;
  }
  .kb-foot {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .kb-foot .btn {
    width: 100%;
    min-width: 0;
  }
  .auth-links {
    font-size: 12.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
