/* =========================================
   Sverka Design System
   Общие токены и компоненты для лендинга,
   раздела статей и личного кабинета.

   Тёмная тема — исходная палитра проекта
   ("Dark Premium"), сохранена без изменений.
   Светлая тема — палитра по умолчанию.
   ========================================= */

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

:root{
  /* palette — светлая тема (по умолчанию)
     Карточки приподняты над фоном: страница — светло-серая,
     карточки — чистый белый лист с мягкой тенью (--shadow-card). */
  --bg:              #F8F9FB;
  --bg-card:         #FFFFFF;
  --bg-card-hover:   #F3F5F7;
  --bg-elevated:     #F1F3F5;
  --border:          #E7E9EC;
  --border-light:    #D6D9DE;
  --text:            #18181B;
  --text-secondary:  #52525B;
  --text-muted:      #71717A;
  --accent:          #0066FF;
  --accent-light:    #2E5FE8;
  --accent-glow:     rgba(0,102,255,.15);
  --accent-glow-strong: rgba(0,102,255,.28);
  --green:           #16A34A;
  --green-dim:       rgba(22,163,74,.10);
  --red:             #DC2626;
  --red-dim:         rgba(220,38,38,.08);
  --yellow:          #B45309;
  --yellow-dim:      rgba(180,83,9,.10);
  --blue-dim:        rgba(0,102,255,.08);

  /* typography */
  --font-body: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* spacing */
  --section-pad: 6rem 0;
  --container: 1140px;

  /* radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  /* shadows */
  --shadow-card: 0 1px 2px rgba(16,24,40,.04), 0 2px 6px rgba(16,24,40,.06);
  --shadow-glow: 0 0 30px var(--accent-glow), 0 0 0 1px rgba(0,102,255,.12);
  --shadow-elevated: 0 25px 60px rgba(0,0,0,.08);
}

/* palette — тёмная тема, включается атрибутом на <html> */
:root[data-theme="dark"]{
  --bg:              #0A0A0B;
  --bg-card:         #18181B;
  --bg-card-hover:   #1f1f23;
  --bg-elevated:     #111113;
  --border:          #27272A;
  --border-light:    #3f3f46;
  --text:            #FAFAFA;
  --text-secondary:  #A1A1AA;
  --text-muted:      #71717A;
  --accent:          #0066FF;
  --accent-light:    #3388FF;
  --accent-glow:     rgba(0,102,255,.25);
  --accent-glow-strong: rgba(0,102,255,.45);
  --green:           #22C55E;
  --green-dim:       rgba(34,197,94,.15);
  --red:             #EF4444;
  --red-dim:         rgba(239,68,68,.12);
  --yellow:          #EAB308;
  --yellow-dim:      rgba(234,179,8,.12);
  --blue-dim:        rgba(0,102,255,.12);

  --shadow-card: 0 1px 2px rgba(0,0,0,.3), 0 2px 10px rgba(0,0,0,.35);
  --shadow-glow: 0 0 30px var(--accent-glow), 0 0 0 1px rgba(0,102,255,.15);
  --shadow-elevated: 0 25px 60px rgba(0,0,0,.4);
}

/* --- Base --- */
html{scroll-behavior:smooth;scroll-padding-top:5rem}
body{
  font-family:var(--font-body);
  background:var(--bg);
  color:var(--text);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  min-height:100vh;
  overflow-x:hidden;
}
a{color:inherit;text-decoration:none}
button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}
ul{list-style:none}
img{max-width:100%}
input,select,textarea{color:inherit;font-family:inherit}

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

/* --- Animations --- */
@keyframes fadeUp{
  from{opacity:0;transform:translateY(20px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes fadeIn{
  from{opacity:0}
  to{opacity:1}
}
@keyframes shimmer{
  0%{background-position:-200% 0}
  100%{background-position:200% 0}
}
@keyframes pulse{
  0%,100%{opacity:1;transform:scale(1)}
  50%{opacity:.5;transform:scale(1.5)}
}
@keyframes pulseGlow{
  0%,100%{box-shadow:0 0 15px var(--accent-glow)}
  50%{box-shadow:0 0 30px var(--accent-glow-strong)}
}

/* =========================================
   BUTTONS
   ========================================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.4rem;
  padding:.7rem 1.35rem;
  border-radius:var(--r-sm);
  font-weight:700;
  font-size:.88rem;
  transition:background .2s,box-shadow .2s,color .2s,border-color .2s,transform .15s;
  border:1px solid transparent;
  cursor:pointer;
  font-family:var(--font-body);
  color:var(--text);
}
.btn-lg{padding:.75rem 1.75rem;font-size:.95rem}
.btn-primary{
  background:var(--accent);
  color:#fff;
}
.btn-primary:hover{
  background:var(--accent-light);
  box-shadow:0 0 25px var(--accent-glow);
  transform:translateY(-1px);
}
.btn-secondary{
  background:rgba(127,127,127,.06);
  border-color:var(--border);
  color:var(--text-secondary);
}
.btn-secondary:hover{
  background:rgba(127,127,127,.12);
  color:var(--text);
  border-color:var(--border-light);
  transform:translateY(-1px);
}
.btn-outline{
  background:transparent;
  border-color:var(--border-light);
  color:var(--text-secondary);
}
.btn-outline:hover{
  border-color:var(--text-secondary);
  color:var(--text);
  transform:translateY(-1px);
}
.btn-link{
  display:inline;
  padding:0;
  border:none;
  color:var(--accent-light);
  font-weight:600;
  font-size:.85rem;
  transition:color .2s;
}
.btn-link:hover{
  color:var(--text);
  text-decoration:underline;
}

/* =========================================
   CARDS
   ========================================= */
.card{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--r-md);
  box-shadow:var(--shadow-card);
  transition:border-color .3s,box-shadow .3s;
}
.card-hover:hover{
  border-color:rgba(0,102,255,.35);
  box-shadow:0 0 20px var(--accent-glow);
}

/* =========================================
   BADGES
   ========================================= */
.badge{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.4rem 1rem .4rem .75rem;
  border-radius:100px;
  font-size:.8rem;
  font-weight:600;
}
.badge-green{background:var(--green-dim);border:1px solid rgba(34,197,94,.25);color:var(--green)}
.badge-red{background:var(--red-dim);border:1px solid rgba(239,68,68,.25);color:var(--red)}
.badge-yellow{background:var(--yellow-dim);border:1px solid rgba(234,179,8,.25);color:var(--yellow)}
.badge-blue{background:var(--blue-dim);border:1px solid rgba(0,102,255,.25);color:var(--accent-light)}
.badge .dot{
  width:8px;height:8px;
  border-radius:50%;
  background:currentColor;
  animation:pulse 2s ease-in-out infinite;
}

/* =========================================
   SECTIONS
   ========================================= */
.section-label{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.35rem .9rem;
  background:var(--blue-dim);
  border:1px solid rgba(0,102,255,.2);
  border-radius:100px;
  font-size:.75rem;
  font-weight:600;
  color:var(--accent-light);
  text-transform:uppercase;
  letter-spacing:.06em;
  margin-bottom:1rem;
}
.section-title{
  font-size:2.25rem;
  font-weight:800;
  letter-spacing:-.02em;
  margin-bottom:.75rem;
}
.section-sub{
  color:var(--text-secondary);
  max-width:520px;
  font-size:1.05rem;
  line-height:1.7;
}
.section-head{text-align:center;margin-bottom:3.5rem}
.section-head .section-sub{margin:0 auto}

/* =========================================
   NAV LINKS
   ========================================= */
.nav-link{
  font-size:.875rem;
  font-weight:500;
  color:var(--text-secondary);
  transition:color .2s;
}
.nav-link:hover{color:var(--text)}
.nav-link.active{color:var(--accent-light)}

/* =========================================
   THEME TOGGLE
   ========================================= */
.theme-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:2.25rem;
  height:2.25rem;
  border-radius:var(--r-sm);
  border:1px solid var(--border);
  color:var(--text-secondary);
  background:transparent;
  transition:border-color .2s,color .2s;
  font-size:1.05rem;
  line-height:1;
}
.theme-toggle:hover{color:var(--text);border-color:var(--border-light)}
.theme-toggle .icon-dark{display:none}
:root[data-theme="dark"] .theme-toggle .icon-light{display:none}
:root[data-theme="dark"] .theme-toggle .icon-dark{display:inline}

/* Logo — тёмный логотип задуман для тёмного фона, светлый — для светлого */
.brand-logo.logo-dark{display:none}
:root[data-theme="dark"] .brand-logo.logo-light{display:none}
:root[data-theme="dark"] .brand-logo.logo-dark{display:block}
