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

:root {
  --bg: #F7F5F0;
  --bg2: #EFEDE6;
  --white: #FFFFFF;
  --ink: #1A1916;
  --ink2: #5C5A55;
  --ink3: #9C9A95;
  --accent: #E8452C;
  --accent-light: #FFF0ED;
  --border: rgba(26,25,22,0.10);
  --border2: rgba(26,25,22,0.06);
  --radius: 16px;
  --radius-sm: 10px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px;
  background: rgba(247,245,240,0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border2);
}
.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 20px;
  color: var(--ink); text-decoration: none;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { font-size: 14px; color: var(--ink2); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 500;
  padding: 10px 22px; border-radius: 100px;
  border: none; cursor: pointer; text-decoration: none;
  transition: all 0.2s;
}
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2d2d29; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--ink2); transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: #fff; font-size: 15px; padding: 16px 32px; }
.btn-accent:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-full { width: 100%; justify-content: center; }

/* HERO */
.hero {
  max-width: 1200px; margin: 0 auto;
  padding: 100px 48px 80px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-light); color: var(--accent);
  font-size: 13px; font-weight: 500;
  padding: 6px 14px; border-radius: 100px;
  margin-bottom: 28px;
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}
.hero h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 56px;
  line-height: 1.05; letter-spacing: -2px;
  margin-bottom: 24px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub {
  font-size: 17px; font-weight: 300; color: var(--ink2);
  line-height: 1.7; margin-bottom: 40px; max-width: 440px;
}
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-btns .btn { font-size: 15px; padding: 14px 28px; }

/* HERO CARDS */
.hero-cards { display: flex; flex-direction: column; gap: 12px; }
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.card-label { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink3); margin-bottom: 12px; }
.card-title { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.card-sub { font-size: 14px; color: var(--ink2); }
.card-pills { display: flex; gap: 8px; margin-top: 16px; }
.card-status { display: flex; align-items: center; }
.status-row { display: flex; align-items: center; gap: 14px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
.status-title { font-size: 14px; font-weight: 500; color: var(--ink); }
.status-sub { font-size: 13px; color: var(--ink2); }

/* PILLS */
.pill {
  display: inline-block;
  background: var(--bg2); color: var(--ink2);
  font-size: 12px; font-weight: 500;
  padding: 5px 12px; border-radius: 100px;
}
.pill-accent { background: var(--accent-light); color: var(--accent); }

/* STATS */
.stats-bar {
  background: var(--white);
  border-top: 1px solid var(--border2);
  border-bottom: 1px solid var(--border2);
}
.stats-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 40px 48px;
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.stat { padding: 0 40px; border-right: 1px solid var(--border2); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: none; }
.stat-num {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 40px; font-weight: 800; letter-spacing: -2px;
  color: var(--ink); line-height: 1; margin-bottom: 6px;
}
.stat-num em { color: var(--accent); font-style: normal; }
.stat-label { font-size: 14px; color: var(--ink2); font-weight: 300; }

/* SECTIONS */
.section { padding: 100px 0; }
.section--gray { background: var(--white); }
.section-inner { max-width: 1200px; margin: 0 auto; padding: 0 48px; }
.section-tag { font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink3); margin-bottom: 16px; }
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: 42px; font-weight: 800; letter-spacing: -1.5px; line-height: 1.1;
  color: var(--ink); margin-bottom: 64px; max-width: 480px;
}

/* SERVICES */
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.service-card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(26,25,22,0.08); }
.service-card--featured {
  background: var(--ink);
  grid-column: span 2;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center;
}
.service-icon { width: 48px; height: 48px; margin-bottom: 24px; color: var(--ink); }
.service-icon svg { width: 48px; height: 48px; }
.service-card--featured .service-icon { color: #fff; }
.service-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 22px; font-weight: 700; color: var(--ink); margin-bottom: 10px;
}
.service-card--featured h3 { color: #fff; }
.service-card p { font-size: 15px; font-weight: 300; color: var(--ink2); line-height: 1.65; margin-bottom: 24px; }
.service-card--featured p { color: rgba(255,255,255,0.6); }
.feature-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.feature-list li { font-size: 14px; color: var(--ink2); padding-left: 18px; position: relative; }
.feature-list li::before { content: '→'; position: absolute; left: 0; color: var(--accent); font-size: 12px; }
.service-card--featured .feature-list li { color: rgba(255,255,255,0.7); }
.featured-code {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px; padding: 24px;
}
.code-line { font-family: 'Courier New', monospace; font-size: 13px; line-height: 2; color: rgba(255,255,255,0.45); }
.code-line .kw { color: #E8452C; }
.code-line .fn { color: rgba(255,255,255,0.9); }
.code-line .str { color: rgba(255,255,255,0.55); }

/* PROCESS */
.process-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.process-step { padding: 36px 28px; border-right: 1px solid var(--border2); }
.process-step:last-child { border-right: none; }
.step-num { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 20px; }
.process-step h4 { font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.process-step p { font-size: 14px; font-weight: 300; color: var(--ink2); line-height: 1.6; }

/* PROJECTS */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.project-card {
  background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
}
.project-card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(26,25,22,0.08); }
.project-cover { aspect-ratio: 16/9; overflow: hidden; }
.project-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.project-card:hover .project-cover img { transform: scale(1.03); }
.project-info { padding: 20px 24px; }
.project-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.project-info h3 { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.project-info p { font-size: 14px; color: var(--ink2); line-height: 1.6; font-weight: 300; }

/* CTA */
.cta-section { padding: 0 0 100px; }
.cta-block {
  max-width: 1200px; margin: 0 auto;
  padding: 0 48px;
}
.cta-block > * { /* unwrap for inner */ }
.cta-section .section-inner { padding: 0 48px; }
.cta-block {
  background: var(--ink); border-radius: 24px;
  padding: 72px 64px;
  display: grid; grid-template-columns: 1fr auto;
  gap: 48px; align-items: center;
  position: relative; overflow: hidden;
}
.cta-block::before {
  content: ''; position: absolute; top: -80px; right: 80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: var(--accent); opacity: 0.08; pointer-events: none;
}
.cta-text h2 {
  font-family: 'Syne', sans-serif;
  font-size: 42px; font-weight: 800; letter-spacing: -1.5px; line-height: 1.1;
  color: #fff; margin-bottom: 16px;
}
.cta-text p { font-size: 16px; font-weight: 300; color: rgba(255,255,255,0.55); }

/* FOOTER — simple */
.footer {
  background: var(--ink);
  position: relative; overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, rgba(232,69,44,0.4) 70%, transparent);
}
.footer-inner-simple {
  max-width: 1200px; margin: 0 auto;
  padding: 32px 48px;
  display: flex; align-items: center; gap: 24px;
}
.footer-brand-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 18px;
  color: #fff; text-decoration: none;
  letter-spacing: -0.5px;
  display: flex; align-items: center; gap: 6px;
  margin-right: auto;
}

.footer-brand-logo span { color: var(--accent); }
.footer-social { display: flex; gap: 8px; }
.footer-social-link {
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.45); text-decoration: none;
  transition: all 0.2s;
}
.footer-social-link:hover {
  border-color: var(--accent);
  background: rgba(232,69,44,0.12);
  color: var(--accent);
  transform: translateY(-2px);
}
.footer-copy { font-size: 13px; color: rgba(255,255,255,0.28); }
.footer-orb {
  position: absolute; bottom: -80px; right: -40px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,69,44,0.10) 0%, transparent 70%);
  pointer-events: none;
}

/* PROJECT DETAIL */
.project-detail { padding: 60px 0 100px; }
.back-link { font-size: 14px; color: var(--ink2); text-decoration: none; display: inline-block;font-weight: 600; margin-bottom: 40px; border: 1px solid var(--border); padding: 8px 14px; border-radius: var(--radius-sm); transition: all 0.15s; }
.back-link-out { margin-top: 25px; font-size: 14px; color: var(--ink2); text-decoration: none; display: inline-block;font-weight: 600; margin-bottom: 40px; border: 1px solid var(--border); padding: 8px 14px; border-radius: var(--radius-sm); transition: all 0.15s; }
.back-link:hover { color: var(--ink); }
.back-link-out:hover { color: var(--ink); }
.detail-cover { border-radius: var(--radius); overflow: hidden; margin-bottom: 32px; }
.detail-cover img { width: 100%; max-height: 480px; object-fit: cover; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.project-detail h1 {
  font-family: 'Syne', sans-serif;
  font-size: 48px; font-weight: 800; letter-spacing: -2px; line-height: 1.1;
  margin-bottom: 20px;
}
.detail-description { font-size: 18px; color: var(--ink2); font-weight: 300; margin-bottom: 48px; }
.detail-body { font-size: 16px; line-height: 1.8; color: var(--ink2); max-width: 720px; }
.detail-body h1, .detail-body h2, .detail-body h3 { font-family: 'Syne', sans-serif; color: var(--ink); margin: 32px 0 12px; }
.detail-body p { margin-bottom: 16px; }
.detail-body img { max-width: 100%; border-radius: var(--radius-sm); margin: 24px 0; }

/* ADMIN */
.admin-login {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  background: var(--bg);
}
.login-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px; width: 100%; max-width: 400px;
}
.login-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 22px;
  color: var(--ink); margin-bottom: 32px;
}
.login-logo span { color: var(--accent); }
.login-card h1 { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; margin-bottom: 28px; }

.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--border2);
  padding: 28px 20px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 18px;
  color: var(--ink); margin-bottom: 32px;
  padding: 0 8px;
}
.sidebar-logo span { color: var(--accent); }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar-link {
  display: block; padding: 10px 12px;
  font-size: 14px; color: var(--ink2);
  text-decoration: none; border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.sidebar-link:hover { background: var(--bg2); color: var(--ink); }
.sidebar-link.active { background: var(--bg2); color: var(--ink); font-weight: 500; }
.sidebar-link--logout { color: var(--ink3); margin-top: auto; }
.admin-main { flex: 1; padding: 40px 48px; overflow-y: auto; }
.admin-main--editor { padding: 40px 48px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.admin-header h1 { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--ink2); margin-bottom: 8px; }
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"] {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif; font-size: 15px;
  background: var(--bg); color: var(--ink);
  transition: border-color 0.2s;
  outline: none;
}
.form-group input:focus { border-color: var(--ink2); }
.form-hint { font-size: 12px; color: var(--ink3); margin-top: 6px; }

.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th {
  text-align: left; padding: 10px 16px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink3); border-bottom: 1px solid var(--border2);
}
.admin-table td { padding: 14px 16px; border-bottom: 1px solid var(--border2); color: var(--ink2); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table code { font-size: 13px; background: var(--bg2); padding: 3px 8px; border-radius: 6px; }
.admin-table a { color: var(--accent); text-decoration: none; }
.table-empty { text-align: center; color: var(--ink3); padding: 40px !important; }
.table-actions { display: flex; gap: 8px; }

.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--border); background: transparent;
  color: var(--ink2); cursor: pointer; font-size: 14px;
  transition: all 0.15s;
}
.btn-icon:hover { background: var(--bg2); }
.btn-danger:hover { background: #fff0ed; border-color: var(--accent); color: var(--accent); }

.badge {
  display: inline-block; font-size: 12px; font-weight: 500;
  padding: 4px 10px; border-radius: 100px;
}
.badge-green { background: #e8f8ee; color: #1a7a3c; }
.badge-gray { background: var(--bg2); color: var(--ink3); }

.flash-success, .flash-error {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 14px; margin-bottom: 20px;
}
.flash-success { background: #e8f8ee; color: #1a7a3c; }
.flash-error { background: var(--accent-light); color: var(--accent); }

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.35);
  align-items: center; justify-content: center;
}
.modal-box {
  background: var(--white); border-radius: var(--radius);
  padding: 36px; width: 100%; max-width: 480px;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-header h2 { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; }

/* Editor layout */
.editor-layout { display: grid; grid-template-columns: 1fr 280px; gap: 24px; }
.editor-panel {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}
.editor-panel h3 { font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.checkbox-label { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.cover-preview { width: 100%; border-radius: 8px; margin-bottom: 12px; object-fit: cover; }
.file-input { font-size: 13px; color: var(--ink2); width: 100%; }

/* Quill overrides */
.ql-toolbar.ql-snow { border-radius: var(--radius-sm) var(--radius-sm) 0 0; border-color: var(--border) !important; background: var(--bg); }
.ql-container.ql-snow { border-radius: 0 0 var(--radius-sm) var(--radius-sm); border-color: var(--border) !important; font-family: 'DM Sans', sans-serif; font-size: 15px; }
.ql-editor { min-height: 400px; }

/* ═══════════════════════════════════════════════════════════
   SCROLL-IN ANIMATIONS
   ═══════════════════════════════════════════════════════════ */

.service-card,
.process-step,
.project-card,
.stat {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.service-card.visible,
.process-step.visible,
.project-card.visible,
.stat.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.services-grid .service-card:nth-child(1) { transition-delay: 0s; }
.services-grid .service-card:nth-child(2) { transition-delay: 0.1s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.2s; }

.process-step:nth-child(1) { transition-delay: 0s; }
.process-step:nth-child(2) { transition-delay: 0.1s; }
.process-step:nth-child(3) { transition-delay: 0.2s; }
.process-step:nth-child(4) { transition-delay: 0.3s; }

.projects-grid .project-card:nth-child(1) { transition-delay: 0s; }
.projects-grid .project-card:nth-child(2) { transition-delay: 0.1s; }
.projects-grid .project-card:nth-child(3) { transition-delay: 0.2s; }

.stats-inner .stat:nth-child(1) { transition-delay: 0s; }
.stats-inner .stat:nth-child(2) { transition-delay: 0.15s; }
.stats-inner .stat:nth-child(3) { transition-delay: 0.3s; }

/* Code block cursor blink while typing */
.featured-code .code-line { position: relative; }

/* ═══════════════════════════════════════════════════════════
   MOBILE ADAPTIVE  (≤ 768px)
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* NAV */
  .nav {
    padding: 14px 20px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .nav-links { display: none; }   /* скрываем пункты, оставляем лого + кнопку */

  /* HERO */
  .hero {
    grid-template-columns: 1fr;
    padding: 56px 20px 48px;
    gap: 40px;
  }
  .hero h1 {
    font-size: 38px;
    letter-spacing: -1.5px;
  }
  .hero-sub { font-size: 15px; max-width: 100%; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; justify-content: center; }
  .hero-cards { gap: 10px; }

  /* STATS */
  .stats-inner {
    grid-template-columns: 1fr;
    padding: 32px 20px;
    gap: 0;
  }
  .stat {
    padding: 20px 0;
    border-right: none;
    border-bottom: 1px solid var(--border2);
  }
  .stat:last-child { border-bottom: none; }
  .stat-num { font-size: 36px; }

  /* SECTIONS */
  .section { padding: 64px 0; }
  .section-inner { padding: 0 20px; }
  .section-title { font-size: 30px; letter-spacing: -1px; margin-bottom: 40px; }

  /* SERVICES */
  .services-grid {
    grid-template-columns: 1fr;
  }
  .service-card--featured {
    grid-column: span 1;
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .service-card { padding: 24px; }

  /* PROCESS */
  .process-grid {
    grid-template-columns: 1fr;
  }
  .process-step {
    border-right: none;
    border-bottom: 1px solid var(--border2);
    padding: 24px 20px;
  }
  .process-step:last-child { border-bottom: none; }

  /* PROJECTS */
  .projects-grid { grid-template-columns: 1fr; }

  /* CTA */
  .cta-section { padding: 0 0 64px; }
  .cta-block {
    grid-template-columns: 1fr;
    padding: 40px 28px;
    gap: 28px;
    text-align: center;
    border-radius: 16px;
  }
  .cta-text h2 { font-size: 30px; }
  .btn-accent { width: 100%; justify-content: center; }

  /* FOOTER */
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }

}

/* Tablet 769–1024px  */
@media (min-width: 769px) and (max-width: 1024px) {

  .hero { padding: 72px 32px 64px; gap: 40px; }
  .hero h1 { font-size: 44px; }
  .section-inner { padding: 0 32px; }
  .stats-inner { padding: 32px; }
  .stat { padding: 0 24px; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .process-step { border-bottom: 1px solid var(--border2); }
  .process-step:nth-child(even) { border-right: none; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; }
  .service-card--featured {
    grid-column: span 1;
    grid-template-columns: 1fr;
    gap: 24px;
  }

}


/* ═══════════════════════════════════════════════════════════
   DETAIL BODY — rich content styles
   ═══════════════════════════════════════════════════════════ */

.detail-body {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink2);
  max-width: 720px;
}

.detail-body p { margin-bottom: 18px; }

.detail-body h1,
.detail-body h2,
.detail-body h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.5px;
  margin: 40px 0 14px;
  line-height: 1.2;
}
.detail-body h1 { font-size: 32px; }
.detail-body h2 { font-size: 24px; }
.detail-body h3 { font-size: 19px; }

.detail-body strong { color: var(--ink); font-weight: 600; }
.detail-body em { font-style: italic; }
.detail-body s { text-decoration: line-through; color: var(--ink3); }

/* Inline code */
.detail-body code {
  font-family: 'Courier New', Consolas, monospace;
  font-size: 13.5px;
  background: var(--bg2);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 6px;
}

/* Code block */
.detail-body pre {
  background: var(--ink);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 28px 0;
  overflow-x: auto;
}
.detail-body pre code {
  background: none;
  color: rgba(255,255,255,0.85);
  font-size: 13.5px;
  padding: 0;
  border-radius: 0;
}

/* Quill code-block (uses .ql-syntax or pre inside .ql-code-block-container) */
.detail-body .ql-code-block-container,
.detail-body .ql-syntax {
  background: var(--ink) !important;
  border-radius: 12px !important;
  padding: 24px 28px !important;
  margin: 28px 0 !important;
  overflow-x: auto;
  font-family: 'Courier New', Consolas, monospace !important;
  font-size: 13.5px !important;
  color: rgba(255,255,255,0.85) !important;
  line-height: 1.75 !important;
}

/* Blockquote */
.detail-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 28px 0;
  padding: 4px 0 4px 24px;
  color: var(--ink2);
  font-size: 17px;
  font-style: italic;
}

/* Lists */
.detail-body ul,
.detail-body ol {
  margin: 0 0 18px 0;
  padding-left: 0;
  list-style: none;
}
.detail-body ul li,
.detail-body ol li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  color: var(--ink2);
}
.detail-body ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 13px;
  top: 2px;
}
.detail-body ol {
  counter-reset: ol-counter;
}
.detail-body ol li {
  counter-increment: ol-counter;
}
.detail-body ol li::before {
  content: counter(ol-counter) '.';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  top: 1px;
}

/* Links */
.detail-body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.detail-body a:hover { color: var(--accent); }

/* Images */
.detail-body img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 28px 0;
  display: block;
}

/* Quill padding reset (it adds padding by default) */
.detail-body.ql-editor {
  padding: 0 !important;
  overflow: visible !important;
}


/* ═══════════════════════════════════════════════════════════
   SECTION TITLES scroll-in
   ═══════════════════════════════════════════════════════════ */

.section-tag,
.section-title,
.cta-block {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.section-tag.visible,
.section-title.visible,
.cta-block.visible {
  opacity: 1;
  transform: translateY(0);
}
.section-title { transition-delay: 0.08s; }

/* ═══════════════════════════════════════════════════════════
   NAV active link
   ═══════════════════════════════════════════════════════════ */
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.25s ease;
}
.nav-links a.active,
.nav-links a:hover { color: var(--ink); }
.nav-links a.active::after { width: 100%; }

/* ═══════════════════════════════════════════════════════════
   SMOOTH SCROLL на уровне CSS (fallback)
   ═══════════════════════════════════════════════════════════ */
html { scroll-behavior: smooth; }

/* ═══════════════════════════════════════════════════════════
   PROJECT STATUS PILLS — animated
   ═══════════════════════════════════════════════════════════ */

.pill-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 100px;
}
.pill-done {
  background: #e8f8ee; color: #1a7a3c;
}
.pill-inprogress {
  background: #fff4e0; color: #b45309;
}
.pill-unfinished {
  background: #fef3f2; color: #b91c1c;
}
.pill-paused {
  background: var(--bg2); color: var(--ink2);
}

/* Animated status icons */
.status-anim { display: inline-block; }

/* Hammer bounces up-down */
@keyframes hammer {
  0%,100% { transform: rotate(-15deg) translateY(0); }
  40%      { transform: rotate(10deg)  translateY(-3px); }
  70%      { transform: rotate(-5deg)  translateY(-1px); }
}
.status-hammer { animation: hammer 0.8s ease-in-out infinite; transform-origin: bottom right; }

/* Checkmark pop */
@keyframes checkpop {
  0%,80%,100% { transform: scale(1); }
  90%         { transform: scale(1.35); }
}
.status-check { animation: checkpop 2.4s ease-in-out infinite; display: inline-block; }

/* Hourglass flip */
@keyframes hourglass {
  0%,45%  { transform: rotate(0deg); }
  50%,95% { transform: rotate(180deg); }
  100%    { transform: rotate(360deg); }
}
.status-clock { animation: hourglass 2s ease-in-out infinite; display: inline-block; }

/* Pause pulse */
@keyframes pausepulse {
  0%,100% { opacity: 1; }
  50%     { opacity: 0.4; }
}
.status-pause { animation: pausepulse 1.6s ease-in-out infinite; display: inline-block; }

/* Status dot variants */
.status-dot--available {
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.4);
  animation: ping-green 1.6s ease-in-out infinite;
}
@keyframes ping-green {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50%     { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}
.status-dot--busy {
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239,68,68,0.4);
  animation: ping-red 1.6s ease-in-out infinite;
}
@keyframes ping-red {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50%     { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}
.status-dot--away {
  background: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245,158,11,0.4);
  animation: ping-yellow 1.6s ease-in-out infinite;
}
@keyframes ping-yellow {
  0%,100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.4); }
  50%     { box-shadow: 0 0 0 6px rgba(245,158,11,0); }
}

/* Card with link */
.card-project-link {
  text-decoration: none; color: inherit; display: block;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card-project-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(26,25,22,0.10);
}

/* ═══════════════════════════════════════════════════════════
   ADMIN — availability panel
   ═══════════════════════════════════════════════════════════ */

.avail-panel {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.avail-panel-title {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink3); margin-bottom: 16px;
  display: flex; align-items: center; gap: 6px;
}
.avail-form {}
.avail-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.avail-status-btns {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.avail-radio {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 100px;
  border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 500; color: var(--ink2);
  cursor: pointer; transition: all 0.18s;
  user-select: none;
}
.avail-radio input { display: none; }
.avail-radio:hover { border-color: var(--ink2); color: var(--ink); }
.avail-radio.active,
.avail-radio:has(input:checked) {
  border-color: var(--ink); color: var(--ink);
  background: var(--bg2);
}
.avail-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.avail-dot--green  { background: #22c55e; }
.avail-dot--red    { background: #ef4444; }
.avail-dot--yellow { background: #f59e0b; }
.avail-inputs {
  display: flex; gap: 10px; flex: 1; min-width: 280px;
}
.avail-input {
  flex: 1;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  background: var(--bg); color: var(--ink);
  outline: none; transition: border-color 0.2s;
}
.avail-input:focus { border-color: var(--ink); background: var(--white); }

/* ═══════════════════════════════════════════════════════════
   ADMIN — status selector in editor
   ═══════════════════════════════════════════════════════════ */

.status-selector {
  display: flex; flex-direction: column; gap: 6px;
}
.status-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  border: 1.5px solid var(--border);
  cursor: pointer; transition: all 0.18s;
  user-select: none;
}
.status-option input { display: none; }
.status-option:hover { border-color: var(--ink2); background: var(--bg); }
.status-option.selected,
.status-option:has(input:checked) {
  border-color: var(--ink); background: var(--bg2);
}
.so-icon { font-size: 16px; width: 22px; text-align: center; }
.so-label { font-size: 13.5px; font-weight: 500; color: var(--ink); }

/* Admin badge variants */
.badge-inprogress { background: #fff4e0; color: #b45309; }
.badge-yellow     { background: #fef9c3; color: #854d0e; }

/* Footer responsive */
@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    padding: 48px 20px 40px;
    gap: 32px;
  }
  .footer-brand { grid-column: span 2; }
  .footer-bottom {
    padding: 20px;
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .avail-row { flex-direction: column; align-items: stretch; }
  .avail-inputs { min-width: unset; flex-direction: column; }
}
