/* ── NIVPN site — palette mirrors app/lib/src/theme/colors.dart ───────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Brand colors — EXACTLY what colors.dart uses. Don't drift. */
  --orange:        #FF6A00;
  --orange-bright: #FF8A2A;
  --orange-deep:   #D94D00;
  --orange-glow:   #FF3B00;   /* same value the animated SVG uses */

  /* Dark theme surfaces — same hex as NIColors.* */
  --bg:            #0A0A0B;
  --surface:       #141417;
  --surface-elev:  #1C1C21;
  --text:          #F5F5F7;
  --muted:         #8A8A93;
  --dimmer:        #5C5D63;

  --success:       #22C55E;
  --danger:        #EF4444;

  --border:        rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.10);
  --border-hot:    rgba(255, 106, 0, 0.32);

  /* Match Flutter ThemeData radii: buttons 16, cards 20. */
  --radius-sm:     12px;
  --radius:        16px;
  --radius-lg:     20px;
  --radius-xl:     24px;

  --easing:        cubic-bezier(.4, 0, .2, 1);
  --easing-bounce: cubic-bezier(.34, 1.56, .64, 1);
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Ambient orange glow — soft, never overpowering content. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 600px at 15% -10%, rgba(255, 106, 0, .14), transparent 60%),
    radial-gradient(700px 600px at 95% 110%, rgba(255, 106, 0, .08), transparent 60%);
}

main { position: relative; z-index: 1; }

a {
  color: var(--orange);
  text-decoration: none;
  transition: color .15s var(--easing);
}
a:hover { color: var(--orange-bright); }

::selection { background: rgba(255, 106, 0, .35); color: #fff; }

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

/* ── layout ────────────────────────────────────────────────────────────── */

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; position: relative; }
.container-narrow { max-width: 460px; margin: 0 auto; padding: 0 24px; }

/* ── splash overlay ────────────────────────────────────────────────────── */

.site-splash {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  z-index: 1000;
  transition: opacity .5s var(--easing), visibility .5s var(--easing);
}
.site-splash.hidden { opacity: 0; visibility: hidden; }

.splash-logo {
  width: 280px; height: 280px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.splash-logo svg.nivpn-logo-anim {
  width: 240px; height: 240px;
  position: relative;
  z-index: 1;
}
.splash-logo::before {
  content: "";
  position: absolute;
  inset: -20px;
  background: radial-gradient(closest-side, rgba(255, 59, 0, .45), transparent 70%);
  filter: blur(40px);
  animation: splash-glow 2.8s ease-in-out infinite;
  z-index: 0;
}
@keyframes splash-glow {
  0%, 100% { opacity: .55; transform: scale(.92); }
  50%      { opacity: .9;  transform: scale(1.12); }
}

.splash-title {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 6px;
  color: var(--text);
  opacity: 0;
  animation: splash-fadein .6s ease-out .8s forwards;
}
.splash-subtitle {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--muted);
  margin-top: -10px;
  opacity: 0;
  animation: splash-fadein .6s ease-out 1.1s forwards;
}
@keyframes splash-fadein {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* SVG stroke-draw — classes prefixed `nivpn-` to never collide. */
.nivpn-logo-anim .nivpn-draw {
  stroke: var(--orange-glow);
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  filter: url(#nivpnOrangeGlow);
  transform-box: fill-box;
  transform-origin: center;
  animation:
    nivpn-drawLine 1.55s cubic-bezier(.65, 0, .25, 1) forwards,
    nivpn-settle   0.7s  var(--easing-bounce) forwards,
    nivpn-breathe  2.8s  ease-in-out infinite;
  animation-delay:
    calc((var(--i) - 1) * 0.28s),
    calc(1.45s + (var(--i) - 1) * 0.28s),
    calc(2.8s  + (var(--i) - 1) * 0.12s);
}
.nivpn-logo-anim .nivpn-path-1,
.nivpn-logo-anim .nivpn-path-2 { animation-duration: 1.75s, 0.7s, 2.8s; }
.nivpn-logo-anim .nivpn-path-3 { animation-duration: 2.15s, 0.7s, 2.8s; }
@keyframes nivpn-drawLine { to { stroke-dashoffset: 0; } }
@keyframes nivpn-settle {
  0%   { transform: scale(.985); }
  70%  { transform: scale(1.018); }
  100% { transform: scale(1); }
}
@keyframes nivpn-breathe {
  0%, 100% { opacity: 1;   }
  50%      { opacity: .88; }
}
@media (prefers-reduced-motion: reduce) {
  .nivpn-logo-anim .nivpn-draw { animation: none; stroke-dashoffset: 0; }
  .splash-logo::before, .splash-title, .splash-subtitle { animation: none; }
  .splash-title, .splash-subtitle { opacity: 1; }
}

/* ── header / nav ─────────────────────────────────────────────────────── */

.header {
  padding: 18px 0;
  position: sticky; top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 10, 11, .7);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 17px; color: var(--text);
  letter-spacing: 1.5px;
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #1c1d24, #0f0f13);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.brand-mark::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(closest-side, rgba(255, 106, 0, .35), transparent 70%);
}
.brand-mark svg { width: 22px; height: 22px; position: relative; z-index: 1; }

.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  color: var(--muted); padding: 9px 14px;
  border-radius: var(--radius-sm); font-weight: 500; font-size: 14.5px;
  transition: all .15s var(--easing);
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }

/* Burger for mobile */
.nav-burger {
  display: none;
  background: none; border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 10px;
  color: var(--text); cursor: pointer;
}

/* ── buttons ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-weight: 700; font-size: 15px;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s var(--easing),
              background .15s var(--easing),
              box-shadow .25s var(--easing),
              border-color .15s var(--easing);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-deep) 100%);
  color: #fff;
  box-shadow:
    0 8px 24px rgba(255, 106, 0, .35),
    inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow:
    0 12px 32px rgba(255, 106, 0, .45),
    inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  border-color: var(--border-strong);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, .08);
  border-color: var(--border-hot);
}

.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ── hero ─────────────────────────────────────────────────────────────── */

.hero {
  padding: 100px 0 60px;
  text-align: center;
  position: relative;
}
.hero .eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(255, 106, 0, .12);
  border: 1px solid var(--border-hot);
  color: var(--orange-bright);
  font-size: 12px; font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(40px, 6.5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #b8b8c0 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 36px;
  line-height: 1.55;
}
.hero-cta {
  display: flex; gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex; justify-content: center; gap: 40px; flex-wrap: wrap;
  margin-top: 64px; padding-top: 36px;
  border-top: 1px solid var(--border);
}
.hero-stat .num {
  font-size: 32px; font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff, #b8b8c0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-stat .lbl {
  font-size: 11.5px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-top: 2px;
  font-weight: 500;
}

/* ── section heading ──────────────────────────────────────────────────── */

.section { padding: 80px 0; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.025em;
  font-weight: 800;
  margin-bottom: 12px;
}
.section-head p {
  color: var(--muted);
  max-width: 540px; margin: 0 auto;
  font-size: 16px; line-height: 1.55;
}

/* ── cards / features ─────────────────────────────────────────────────── */

.features {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: .25s var(--easing);
  position: relative;
  overflow: hidden;
}
.feature::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(400px 200px at 100% 0%, rgba(255, 106, 0, .14), transparent 60%);
  opacity: 0; transition: opacity .25s var(--easing);
}
.feature:hover {
  border-color: var(--border-hot);
  transform: translateY(-3px);
  background: var(--surface-elev);
}
.feature:hover::before { opacity: 1; }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(255, 106, 0, .14);
  color: var(--orange);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; font-size: 22px;
  position: relative;
}
.feature h3 {
  font-size: 18px; margin-bottom: 8px;
  font-weight: 700; letter-spacing: -0.01em;
  position: relative;
}
.feature p {
  color: var(--muted); font-size: 14.5px; line-height: 1.6;
  position: relative;
}

/* ── pricing ──────────────────────────────────────────────────────────── */

.pricing-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 26px;
  position: relative;
  transition: .25s var(--easing);
  display: flex; flex-direction: column;
}
.pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hot);
  background: var(--surface-elev);
}
.pricing-card.popular {
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(255, 106, 0, .12), transparent 70%),
    var(--surface);
  border-color: var(--border-hot);
  box-shadow: 0 24px 60px rgba(255, 106, 0, .12);
}
.pricing-card .ribbon {
  position: absolute; top: -10px; right: 18px;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: #fff;
  font-weight: 700; font-size: 10.5px;
  padding: 5px 12px;
  border-radius: 6px;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(255, 106, 0, .4);
}
.pricing-card .plan-title {
  font-size: 13px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 2px;
  font-weight: 700;
}
.pricing-card .plan-price {
  font-size: 48px; font-weight: 800;
  letter-spacing: -0.03em;
  margin: 16px 0 4px;
  background: linear-gradient(135deg, #fff, #c4c4cc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pricing-card .plan-price .cur {
  font-size: 22px;
  vertical-align: top;
  margin-left: 3px;
  -webkit-text-fill-color: var(--muted);
  background: none;
  font-weight: 600;
}
.pricing-card .plan-period {
  color: var(--muted); font-size: 13px;
  margin-bottom: 4px;
}
.pricing-card .plan-perday {
  color: var(--dimmer); font-size: 12px;
  margin-bottom: 20px;
}
.pricing-card .plan-saving {
  display: inline-block;
  background: rgba(34, 197, 94, .15);
  color: var(--success);
  font-size: 11px; font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 20px;
  letter-spacing: .5px;
}
.pricing-card ul {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  flex: 1;
}
.pricing-card li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 7px 0;
  font-size: 14px;
  color: var(--text);
}
.pricing-card li::before {
  content: "";
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(255, 106, 0, .15);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='%23ff6a00' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6'/></svg>");
  background-position: center;
  background-size: 11px;
  background-repeat: no-repeat;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── auth card ────────────────────────────────────────────────────────── */

.auth-shell {
  min-height: calc(100vh - 90px);
  display: flex; align-items: center;
  padding: 40px 0;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 34px;
  width: 100%;
  box-shadow: 0 32px 80px rgba(0, 0, 0, .5),
              inset 0 1px 0 rgba(255, 255, 255, .04);
  position: relative;
}
.auth-card h1 {
  font-size: 28px; font-weight: 800;
  margin-bottom: 8px;
  text-align: center;
  letter-spacing: -0.02em;
}
.auth-card .subtitle {
  color: var(--muted);
  text-align: center; margin-bottom: 28px;
  font-size: 14px;
}

/* ── form ─────────────────────────────────────────────────────────────── */

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 7px;
  font-weight: 500;
  letter-spacing: .2px;
}
.input {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--text); font-size: 15px;
  font-family: inherit;
  transition: .15s var(--easing);
}
.input:focus {
  outline: none;
  border-color: var(--orange);
  background: var(--surface-elev);
  box-shadow: 0 0 0 4px rgba(255, 106, 0, .12);
}
.input::placeholder { color: var(--dimmer); }

.error {
  background: rgba(239, 68, 68, .12);
  border: 1px solid rgba(239, 68, 68, .3);
  color: var(--danger);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}

.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0;
  color: var(--muted); font-size: 12px;
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px;
  background: var(--border);
}

.foot {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
}

/* ── chips / badges ───────────────────────────────────────────────────── */

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-elev);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.chip-ok { background: rgba(34, 197, 94, .1); color: var(--success); border-color: rgba(34, 197, 94, .2); }
.chip-hot { background: rgba(255, 106, 0, .1); color: var(--orange-bright); border-color: var(--border-hot); }

/* ── download cards (used by /download) ───────────────────────────────── */

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.download-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 26px;
  transition: .25s var(--easing);
  display: flex; flex-direction: column;
}
.download-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hot);
  background: var(--surface-elev);
}
.download-card.disabled { opacity: .55; }
.download-card.disabled:hover { transform: none; border-color: var(--border); background: var(--surface); }
.download-icon { font-size: 32px; margin-bottom: 6px; }
.download-card h3 {
  font-size: 19px; margin-bottom: 6px;
  letter-spacing: -0.01em; font-weight: 700;
}
.download-card .hint {
  font-size: 12.5px; margin-top: 14px;
  color: var(--muted); line-height: 1.5;
}
.download-card .btn { margin-top: 12px; padding: 11px 22px; align-self: flex-start; }
.download-notes { margin-top: 12px; }
.download-notes summary {
  cursor: pointer; font-size: 13px;
  color: var(--orange-bright);
  list-style: none;
}
.download-notes summary::after { content: " ↓"; font-size: 10px; vertical-align: 1px; }
.download-notes[open] summary::after { content: " ↑"; }
.download-notes pre {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  white-space: pre-wrap;
  margin: 8px 0 0;
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* ── footer ──────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  margin-top: 80px;
  color: var(--muted);
  font-size: 13px;
  position: relative;
  z-index: 1;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--orange); }

/* ── misc ────────────────────────────────────────────────────────────── */

.muted { color: var(--muted); }
.text-center { text-align: center; }

/* ── responsive ──────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .nav { gap: 2px; }
  .nav a { padding: 8px 10px; font-size: 13px; }
  .nav a.btn { display: none; }     /* skip "Регистрация" CTA in nav on mobile */
  .hero { padding: 60px 0 40px; }
  .hero h1 { letter-spacing: -0.03em; }
  .hero p { margin-bottom: 26px; }
  .hero-stats { gap: 24px; margin-top: 40px; padding-top: 28px; }
  .hero-stat .num { font-size: 26px; }
  .section { padding: 60px 0; }
  .auth-card { padding: 32px 22px; }
  .brand { font-size: 16px; }
  .container { padding: 0 18px; }
}
@media (max-width: 480px) {
  .hero-cta .btn { width: 100%; }
  .footer-row { flex-direction: column; gap: 10px; }
}
