/* ============================================================
   Panda VPN — web platform
   Identity: deep pine-ink base, bamboo-jade accent, warm sand
   for emphasis. Signature: signal-bamboo bars (bamboo + signal).
   Cyrillic-native type: Golos Text (workhorse), Unbounded (wordmark).
   ============================================================ */

:root {
  --ink:        #0E1512;   /* deep pine-black base */
  --ink-2:      #14201A;   /* raised surface */
  --ink-3:      #1B2B23;   /* cards / borders on dark */
  --paper:      #EDEBE3;   /* warm paper for light sections */
  --paper-2:    #F6F5EF;
  --jade:       #34C98A;   /* brand green — jade/mint, not neon acid */
  --jade-deep:  #17724C;
  --jade-dim:   #2A9E6E;
  --sand:       #E6C168;   /* warm accent: popular plan, urgency */
  --text:       #EAF1EC;   /* primary text on dark */
  --text-dim:   #93A79C;   /* muted text on dark */
  --ink-text:   #16211C;   /* text on paper */
  --ink-text-dim:#5C6B62;
  --danger:     #E06A5A;

  --radius:     14px;
  --radius-lg:  22px;
  --maxw:       1160px;
  --gap:        clamp(1rem, 2.5vw, 2rem);

  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Golos Text", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }

/* ---------- Type ---------- */
h1, h2, h3 { line-height: 1.08; letter-spacing: -0.02em; margin: 0; font-weight: 700; }
.display { font-family: var(--font-display); font-weight: 700; }
.eyebrow {
  font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--jade); font-weight: 600;
}
.lead { color: var(--text-dim); font-size: clamp(1.05rem, 1.6vw, 1.22rem); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: 0.85rem 1.5rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
  text-align: center; justify-content: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--jade); color: #062015; box-shadow: 0 8px 26px -12px var(--jade); }
.btn-primary:hover { background: #47d698; box-shadow: 0 12px 30px -10px var(--jade); }
.btn-sand { background: var(--sand); color: #2A2008; }
.btn-sand:hover { background: #f0cf7c; }
.btn-ghost { background: transparent; color: var(--text); border-color: rgba(255,255,255,.16); }
.btn-ghost:hover { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.03); }
.btn-block { width: 100%; }
.btn-lg { padding: 1.05rem 1.9rem; font-size: 1.06rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--ink) 82%, transparent);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav-inner { display: flex; align-items: center; gap: 1.4rem; height: 68px; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand .dot { color: var(--jade); }
.nav-links { display: flex; gap: 1.4rem; margin-left: auto; align-items: center; }
.nav-links a { color: var(--text-dim); font-size: 0.96rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; gap: 0.6rem; align-items: center; }
@media (max-width: 860px) {
  .nav-links .hide-sm { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 4.3rem); letter-spacing: -0.03em; margin-bottom: 1.1rem;
}
.hero h1 .accent { color: var(--jade); }
.hero .lead { max-width: 34ch; margin-bottom: 1.9rem; }
.hero-cta { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.hero-badges { display: flex; gap: 1.2rem; flex-wrap: wrap; color: var(--text-dim); font-size: 0.92rem; }
.hero-badges b { color: var(--text); font-weight: 600; }

/* Signature: signal-bamboo bars */
.bamboo { display: flex; align-items: flex-end; gap: 10px; height: 320px; padding: 1.2rem; }
.bamboo .stalk {
  flex: 1; border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, var(--jade) 0%, var(--jade-deep) 100%);
  position: relative; transform-origin: bottom;
  animation: sway 4s ease-in-out infinite;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.bamboo .stalk::before, .bamboo .stalk::after {
  content: ""; position: absolute; left: 8%; right: 8%; height: 2px;
  background: rgba(6,32,21,.35); border-radius: 2px;
}
.bamboo .stalk::before { top: 32%; }
.bamboo .stalk::after { top: 64%; }
.bamboo .stalk:nth-child(1) { height: 55%; animation-delay: -0.2s; }
.bamboo .stalk:nth-child(2) { height: 78%; animation-delay: -1.1s; background: linear-gradient(180deg, var(--sand), #b98f2e); }
.bamboo .stalk:nth-child(3) { height: 100%; animation-delay: -0.6s; }
.bamboo .stalk:nth-child(4) { height: 68%; animation-delay: -1.6s; }
.bamboo .stalk:nth-child(5) { height: 88%; animation-delay: -0.9s; }
@keyframes sway {
  0%, 100% { transform: scaleY(1) rotate(0deg); }
  50% { transform: scaleY(1.03) rotate(-0.6deg); }
}
.hero-panel {
  background: radial-gradient(120% 120% at 80% 0%, rgba(52,201,138,.14), transparent 60%), var(--ink-2);
  border: 1px solid var(--ink-3); border-radius: var(--radius-lg); overflow: hidden;
}

/* soft ambient glow behind hero */
.hero::before {
  content: ""; position: absolute; inset: -20% 30% auto -10%; height: 60%;
  background: radial-gradient(closest-side, rgba(52,201,138,.16), transparent);
  filter: blur(30px); z-index: -1;
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-head { max-width: 60ch; margin-bottom: 2.6rem; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin: 0.6rem 0 0.6rem; }
.section.paper { background: var(--paper); color: var(--ink-text); }
.section.paper .eyebrow { color: var(--jade-deep); }
.section.paper .lead { color: var(--ink-text-dim); }

/* ---------- Pricing ---------- */
.term-toggle { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); margin-bottom: 2rem; }
.section.paper .term-toggle { background: rgba(0,0,0,.04); border-color: rgba(0,0,0,.08); }
.term-toggle button {
  border: 0; background: transparent; color: inherit; font-family: var(--font-body);
  font-weight: 600; font-size: 0.95rem; padding: 0.5rem 1.1rem; border-radius: 999px; cursor: pointer;
  color: var(--ink-text-dim);
}
.term-toggle button.active { background: var(--ink); color: var(--text); }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; align-items: stretch; }
@media (max-width: 880px) { .plans { grid-template-columns: 1fr; max-width: 460px; } }
.plan {
  background: var(--paper-2); border: 1px solid rgba(0,0,0,.08); border-radius: var(--radius-lg);
  padding: 1.7rem; display: flex; flex-direction: column; position: relative;
}
.plan.popular { border-color: var(--jade-deep); box-shadow: 0 20px 50px -30px var(--jade-deep); }
.plan .flag {
  position: absolute; top: -12px; left: 1.6rem; background: var(--sand); color: #2A2008;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.3rem 0.7rem; border-radius: 999px;
}
.plan h3 { font-size: 1.35rem; margin-bottom: 0.2rem; }
.plan .tagline { color: var(--ink-text-dim); font-size: 0.94rem; min-height: 2.6em; }
.plan .price { display: flex; align-items: baseline; gap: 0.4rem; margin: 1rem 0 0.2rem; }
.plan .price .num { font-family: var(--font-display); font-weight: 700; font-size: 2.5rem; letter-spacing: -0.03em; }
.plan .price .per { color: var(--ink-text-dim); font-size: 0.9rem; }
.plan .sub { color: var(--ink-text-dim); font-size: 0.86rem; margin-bottom: 1.2rem; }
.plan ul { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.55rem; }
.plan li { display: flex; gap: 0.55rem; font-size: 0.95rem; align-items: flex-start; }
.plan li::before { content: "✓"; color: var(--jade-deep); font-weight: 800; }
.plan .btn { margin-top: auto; }

/* ---------- Feature grid ---------- */
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
@media (max-width: 880px) { .feats { grid-template-columns: 1fr; } }
.feat { background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--radius); padding: 1.5rem; }
.feat .ic { width: 42px; height: 42px; border-radius: 10px; background: rgba(52,201,138,.12); display: grid; place-items: center; margin-bottom: 0.9rem; color: var(--jade); }
.feat h3 { font-size: 1.12rem; margin-bottom: 0.4rem; }
.feat p { color: var(--text-dim); font-size: 0.95rem; margin: 0; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; counter-reset: step; }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 2.6rem; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0; font-family: var(--font-display);
  font-size: 1.5rem; color: var(--jade); font-weight: 700;
}
.step h3 { font-size: 1.12rem; margin-bottom: 0.4rem; }
.step p { color: var(--ink-text-dim); font-size: 0.95rem; margin: 0; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0.7rem; max-width: 760px; }
.faq details { background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--radius); padding: 0.3rem 1.2rem; }
.faq summary { cursor: pointer; padding: 1rem 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--jade); font-size: 1.3rem; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--text-dim); margin: 0 0 1rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid rgba(255,255,255,.06); padding: 2.4rem 0; color: var(--text-dim); font-size: 0.9rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.footer a { color: var(--text-dim); } .footer a:hover { color: var(--text); }

/* ---------- Auth + forms ---------- */
.auth-shell { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 2rem 1rem; }
.card {
  width: 100%; max-width: 420px; background: var(--ink-2); border: 1px solid var(--ink-3);
  border-radius: var(--radius-lg); padding: 2rem;
}
.card h1 { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 0.4rem; }
.card .sub { color: var(--text-dim); margin-bottom: 1.6rem; font-size: 0.95rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.88rem; color: var(--text-dim); margin-bottom: 0.4rem; font-weight: 500; }
.input {
  width: 100%; padding: 0.85rem 1rem; border-radius: var(--radius); font-size: 1rem;
  background: var(--ink); border: 1px solid var(--ink-3); color: var(--text); font-family: var(--font-body);
  transition: border-color .2s;
}
.input:focus { outline: none; border-color: var(--jade); }
.form-foot { margin-top: 1.2rem; text-align: center; color: var(--text-dim); font-size: 0.92rem; }
.form-foot a { color: var(--jade); font-weight: 600; }

.alert { padding: 0.85rem 1rem; border-radius: var(--radius); font-size: 0.92rem; margin-bottom: 1.2rem; }
.alert-error { background: rgba(224,106,90,.12); border: 1px solid rgba(224,106,90,.35); color: #f0a99d; }
.alert-ok { background: rgba(52,201,138,.12); border: 1px solid rgba(52,201,138,.35); color: #8fe4bd; }

/* ---------- Cabinet ---------- */
.cab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 820px) { .cab-grid { grid-template-columns: 1fr; } }
.cab-card { background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--radius-lg); padding: 1.6rem; }
.cab-card h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.status-pill { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.8rem; border-radius: 999px; font-size: 0.82rem; font-weight: 600; }
.status-active { background: rgba(52,201,138,.14); color: var(--jade); }
.status-expired { background: rgba(224,106,90,.14); color: #f0a99d; }
.status-none { background: rgba(255,255,255,.06); color: var(--text-dim); }
.copy-row { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.6rem; }
.copy-row code { flex: 1; background: var(--ink); border: 1px solid var(--ink-3); border-radius: 10px; padding: 0.7rem 0.9rem; font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--jade); font-family: ui-monospace, monospace; }

.kv { display: flex; justify-content: space-between; padding: 0.6rem 0; border-bottom: 1px solid var(--ink-3); font-size: 0.95rem; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--text-dim); }
