/* ===== ПЕРЕОПРЕДЕЛЕНИЕ ТОКЕНОВ ===== */
:root {
  --brand: #1a56db;        /* насыщенный синий */
  --brand-2: #1e3a8a;
  --accent: #f97316;       /* оранжевый для CTA */
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  --grad: linear-gradient(135deg, var(--brand) 0%, #3b82f6 100%);
  --radius-1: 8px;
  --radius-2: 12px;
  --radius-3: 16px;
  --radius-pill: 9999px;
  --shadow-1: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-2: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-3: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px rgba(0,0,0,0.04);
  --font-sans: 'Segoe UI', system-ui, -apple-system, 'Inter', Roboto, 'Helvetica Neue', sans-serif;
  --font-display: 'Georgia', 'Times New Roman', serif;
}

/* ===== БАЗОВАЯ ТИПОГРАФИКА ===== */
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

/* ===== СБРОС И УТИЛИТЫ ===== */
*, *::before, *::after { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 72px 0;
}
.section-desc {
  max-width: 600px;
  margin: 0 auto 2rem;
  text-align: center;
  color: var(--muted);
}

.bg-light { background: var(--surface); }
.center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ===== КАРТОЧКИ ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-3);
  padding: 20px;
  box-shadow: var(--shadow-2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-3);
}

/* ===== КНОПКИ ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-2);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-2);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
}
.btn-ghost:hover {
  color: var(--text);
  background: var(--bg);
}
.btn-large {
  padding: 14px 28px;
  font-size: 1.1rem;
}

/* ===== ШАПКА ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.logo:hover { color: var(--brand); }
.main-nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  font-weight: 500;
}
.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.burger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.burger-menu span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: 0.2s;
}

@media (max-width: 768px) {
  .main-nav, .header-actions {
    display: none;
  }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    padding: 20px;
    border-bottom: 1px solid var(--border);
  }
  .main-nav.open ul {
    flex-direction: column;
    gap: 12px;
  }
  .burger-menu {
    display: block;
  }
}

/* ===== ГЕРОЙ ===== */
.hero {
  padding: 80px 0 60px;
  background: linear-gradient(to bottom, #eef2ff, #f8fafc);
  text-align: center;
}
.hero-content {
  max-width: 720px;
  margin: 0 auto;
}
.hero-subtitle {
  font-size: 1.2rem;
  color: var(--muted);
  margin: 1.5rem 0;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.hero-visual {
  max-width: 700px;
  margin: 0 auto;
}
.hero-image {
  border-radius: var(--radius-3);
  box-shadow: var(--shadow-3);
}

/* ===== ШАБЛОНЫ НА ГЛАВНОЙ ===== */
.template-card img {
  border-radius: var(--radius-2);
  margin-bottom: 12px;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: #e2e8f0; /* placeholder */
}

/* ===== 4 ШАГА ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-top: 40px;
}
.step-item {
  text-align: center;
}
.step-icon {
  width: 48px;
  height: 48px;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ===== ОТЗЫВЫ ===== */
.review-card .stars {
  color: #f59e0b;
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.review-card .author {
  margin-top: 12px;
  font-weight: 600;
  color: var(--muted);
}

/* ===== FAQ аккордеон ===== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-question {
  width: 100%;
  text-align: left;
  padding: 16px 0;
  font-size: 1.05rem;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform 0.2s;
}
.faq-question.active::after {
  content: '−';
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-answer p {
  padding-bottom: 16px;
  color: var(--muted);
}

/* ===== КОНСТРУКТОР ===== */
.builder-layout {
  display: flex;
  gap: 32px;
  padding: 32px 20px;
  max-width: 1300px;
  margin: 0 auto;
}
.builder-form-panel {
  flex: 1 1 55%;
  min-width: 0;
}
.builder-preview-panel {
  flex: 1 1 45%;
  position: sticky;
  top: 90px;
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-3);
  padding: 24px;
  min-height: 500px;
  box-shadow: var(--shadow-2);
}
.step-indicators {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.step-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: 0.15s;
}
.step-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.step-content {
  display: none;
}
.step-content.active {
  display: block;
}

.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.9rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-1);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}
.form-row {
  display: flex;
  gap: 12px;
}
.form-row .form-group {
  flex: 1;
}
.experience-entry, .education-entry {
  background: var(--bg);
  padding: 16px;
  border-radius: var(--radius-2);
  margin-bottom: 12px;
  position: relative;
}
.remove-entry {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
}
.remove-entry:hover { color: #dc2626; }
.step-buttons {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-top: 24px;
}
.template-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.template-option {
  cursor: pointer;
  border: 2px solid var(--border);
  border-radius: var(--radius-2);
  padding: 8px;
  text-align: center;
  transition: border-color 0.15s;
}
.template-option input { display: none; }
.template-option img {
  border-radius: 4px;
  margin-bottom: 4px;
}
.template-option:has(input:checked) {
  border-color: var(--brand);
}
.download-actions {
  flex-wrap: wrap;
}

#resumePreview {
  font-size: 0.95rem;
  line-height: 1.5;
}
.resume-doc h2 { font-size: 1.6rem; }
.resume-doc h3 { font-size: 1.2rem; margin-top: 1.2em; }

/* ===== ПРИМЕРЫ РЕЗЮМЕ ===== */
.example-card img {
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius-2);
  margin-bottom: 12px;
  background: #e2e8f0;
}
.example-resume-view {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-3);
  padding: 40px;
  margin-top: 20px;
  max-width: 800px;
  box-shadow: var(--shadow-2);
}
.exp-block, .edu-block {
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 3px solid var(--brand);
}

/* ===== БЛОГ ===== */
.article-card h3 { margin-bottom: 0.5rem; }
.article-body {
  font-size: 1.05rem;
  line-height: 1.7;
}
.article-body img { border-radius: var(--radius-2); margin: 16px 0; }

/* ===== ФОРМЫ ===== */
.contact-form {
  max-width: 500px;
  margin-top: 20px;
}
.success-msg {
  background: #dcfce7;
  color: #166534;
  padding: 12px;
  border-radius: var(--radius-1);
}
.muted { color: var(--muted); }

/* ===== ФУТЕР ===== */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 12px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li {
  margin-bottom: 6px;
}
.footer-bottom {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
  .builder-layout {
    flex-direction: column;
  }
  .builder-preview-panel {
    position: static;
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
}