/* ============================================================
   whitebeard — общие стили лендинга и админ-панели
   Палитра: фон #F4F1EA · карточки #EFECE3 · тёмный #17160F · акцент #2B44FF
   Стиль: мягкая неоморфная вёрстка, Unbounded + Golos Text
   ============================================================ */

:root {
  --bg: #F4F1EA;
  --panel: #EFECE3;
  --panel-2: #EDEAE0;
  --head: #E9E5DA;
  --ink: #17160F;
  --ink-66: rgba(23, 22, 15, 0.66);
  --ink-55: rgba(23, 22, 15, 0.55);
  --ink-45: rgba(23, 22, 15, 0.45);
  --line: rgba(23, 22, 15, 0.12);
  --accent: #2B44FF;
  --green: #1F9D55;
  --red: #D04030;
  --font-head: 'Unbounded', sans-serif;
  --font-body: 'Golos Text', system-ui, sans-serif;
  --shadow-in: inset 6px 6px 14px rgba(23, 22, 15, 0.11), inset -6px -6px 14px rgba(255, 255, 255, 0.9);
  --shadow-in-deep: inset 9px 9px 18px rgba(23, 22, 15, 0.16), inset -8px -8px 16px rgba(255, 255, 255, 0.95);
  --shadow-out: 6px 6px 12px rgba(23, 22, 15, 0.20), -4px -4px 10px rgba(255, 255, 255, 0.9);
  --shadow-dark: inset 6px 6px 14px rgba(0, 0, 0, 0.16), inset -5px -5px 12px rgba(255, 255, 255, 0.25), 0 0 0 2px var(--accent);
  --shadow-field: inset 3px 3px 8px rgba(23, 22, 15, 0.10), inset -2px -2px 6px rgba(255, 255, 255, 0.8);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

::selection { background: var(--accent); color: #fff; }

input, textarea, select, button { outline: none; font-family: var(--font-body); }

a { color: inherit; }

/* ---------- анимации ---------- */
@keyframes wbFadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes wbPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
@keyframes wbMsg { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes wbFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* ---------- типографика ---------- */
.h-font { font-family: var(--font-head); letter-spacing: -0.02em; }

.section-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.05;
}

/* ---------- карточки ---------- */
.card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 20px;
  box-shadow: var(--shadow-in);
}

.card-hover { transition: transform .22s ease, box-shadow .22s ease; }
.card-hover:hover { transform: translateY(-1px); box-shadow: var(--shadow-in-deep); }

.card-dark {
  background: var(--ink);
  color: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 20px;
  box-shadow: var(--shadow-dark);
}

.card-dark.card-hover:hover {
  transform: translateY(-1px);
  box-shadow: inset 8px 8px 18px rgba(0, 0, 0, 0.2), inset -6px -6px 14px rgba(255, 255, 255, 0.3), 0 0 0 2px var(--accent);
}

.card-featured {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 20px;
  box-shadow: var(--shadow-dark);
  position: relative;
}

/* ---------- кнопки ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  padding: 15px 30px;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .2s ease;
}

/* Списки теней в обоих состояниях одинаковой структуры (outset, outset, inset) —
   иначе браузер не интерполирует inset↔outset и ховер дёргается. */
.btn-accent {
  background: var(--accent);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 6px 6px 12px rgba(23, 22, 15, 0.20), -4px -4px 10px rgba(255, 255, 255, 0.9), inset 0 0 0 rgba(0, 0, 0, 0);
}
.btn-accent:hover {
  transform: translateY(1px);
  box-shadow: 3px 3px 6px rgba(23, 22, 15, 0.10), -2px -2px 5px rgba(255, 255, 255, 0.5), inset 4px 4px 9px rgba(0, 0, 0, 0.28);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 6px 6px 12px rgba(23, 22, 15, 0.14), -4px -4px 10px rgba(255, 255, 255, 0.9), inset 0 0 0 rgba(23, 22, 15, 0);
}
.btn-ghost:hover {
  transform: translateY(1px);
  box-shadow: 3px 3px 6px rgba(23, 22, 15, 0.08), -2px -2px 5px rgba(255, 255, 255, 0.5), inset 4px 4px 9px rgba(23, 22, 15, 0.22);
}

.btn-dark {
  background: var(--ink);
  color: var(--bg);
  padding: 10px 18px;
  font-size: 14px;
  border: none;
}
.btn-dark:hover { background: var(--accent); transform: translateY(-1px); }

.btn-light {
  background: var(--bg);
  color: var(--ink);
  padding: 13px 26px;
  font-size: 15px;
  border: none;
  white-space: nowrap;
}
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(23, 22, 15, 0.3); }

/* админские компактные кнопки */
.abtn {
  background: var(--accent);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  box-shadow: 6px 6px 12px rgba(23, 22, 15, 0.20), -4px -4px 10px rgba(255, 255, 255, 0.9), inset 0 0 0 rgba(0, 0, 0, 0);
  padding: 12px 22px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}
.abtn:hover {
  transform: translateY(1px);
  box-shadow: 3px 3px 6px rgba(23, 22, 15, 0.10), -2px -2px 5px rgba(255, 255, 255, 0.5), inset 4px 4px 9px rgba(0, 0, 0, 0.28);
}

.abtn-ghost {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  box-shadow: 6px 6px 12px rgba(23, 22, 15, 0.14), -4px -4px 10px rgba(255, 255, 255, 0.9);
  padding: 10px 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink);
}

.icon-btn {
  background: transparent;
  border: 1px solid rgba(23, 22, 15, 0.18);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: var(--ink-45);
  font-size: 13px;
  flex-shrink: 0;
}
.icon-btn:hover { color: var(--red); border-color: rgba(208, 64, 48, 0.4); }

/* ---------- поля форм (админка) ---------- */
.field {
  border: 1px solid rgba(23, 22, 15, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  background: var(--panel-2);
  box-shadow: var(--shadow-field);
  color: var(--ink);
  resize: vertical;
  text-transform: none;
  letter-spacing: 0;
  width: 100%;
}

.field-bare {
  width: 100%;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 14.5px;
  color: var(--ink);
  padding: 6px 8px;
  border-radius: 6px;
}
.field-bare:focus { background: var(--panel-2); box-shadow: inset 3px 3px 8px rgba(23, 22, 15, 0.12); }

.pill-select {
  font-weight: 600;
  font-size: 13px;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  width: 100%;
  min-width: 0;
}

.flabel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-55);
}

/* ---------- статусные пилюли ---------- */
.tag-new    { background: rgba(43, 68, 255, 0.10);  color: #2B44FF; }
.tag-active { background: rgba(242, 179, 61, 0.18); color: #9A6B00; }
.tag-review { background: rgba(124, 108, 255, 0.14); color: #5A4BD6; }
.tag-done   { background: rgba(31, 157, 85, 0.12);  color: #1F9D55; }
.tag-todo   { background: rgba(23, 22, 15, 0.07);   color: rgba(23, 22, 15, 0.65); }
.tag-doing  { background: rgba(43, 68, 255, 0.10);  color: #2B44FF; }
.tag-high   { background: rgba(208, 64, 48, 0.10);  color: #D04030; }
.tag-med    { background: rgba(242, 179, 61, 0.18); color: #9A6B00; }
.tag-low    { background: rgba(23, 22, 15, 0.06);   color: rgba(23, 22, 15, 0.55); }
.tag-pub    { background: rgba(31, 157, 85, 0.12);  color: #1F9D55; }
.tag-draft  { background: rgba(23, 22, 15, 0.07);   color: rgba(23, 22, 15, 0.55); }

/* ---------- лендинг ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }

.nav-link {
  text-decoration: none;
  color: var(--ink-66);
  font-weight: 500;
  font-size: 15px;
  transition: color .2s ease;
}
.nav-link:hover { color: var(--accent); }

.logo-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  font-size: 16px;
  transition: transform .35s ease, background .35s ease;
  flex-shrink: 0;
}
a:hover > .logo-dot { transform: rotate(180deg); background: var(--accent); }

.logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  transition: transform .35s ease;
}
a:hover > .logo-img { transform: rotate(8deg); }

/* контакты на тёмной карточке */
.contact-link {
  text-decoration: none;
  color: rgba(244, 241, 234, 0.75);
  font-weight: 500;
  font-size: 15px;
  transition: color .2s ease;
}
.contact-link:hover { color: var(--accent); }

.hero-chip {
  padding: 9px 16px;
  background: var(--panel);
  border: 1px solid rgba(23, 22, 15, 0.10);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: transform .2s ease, border-color .2s ease, color .2s ease;
  cursor: default;
}
.hero-chip:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--accent); }

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(23, 22, 15, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
  transition: transform .25s ease;
}
.service-icon.accented { background: rgba(43, 68, 255, 0.10); color: var(--accent); }
.card:hover .service-icon { transform: scale(1.12) rotate(-6deg); }

.team-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(23, 22, 15, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-head);
  margin-bottom: 16px;
  transition: transform .25s ease;
}
.team-avatar.accented { background: rgba(43, 68, 255, 0.10); color: var(--accent); }
.card:hover .team-avatar { transform: scale(1.1) rotate(6deg); }

/* кейсы-аккордеон */
.case-card {
  cursor: pointer;
  padding: 26px;
  transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}
.case-card:hover { transform: translateY(-1px); }
.case-card.open {
  box-shadow: inset 7px 7px 16px rgba(23, 22, 15, 0.13), inset -6px -6px 14px rgba(255, 255, 255, 0.9), 0 0 0 2px var(--accent);
}

.case-chev {
  font-size: 18px;
  color: rgba(23, 22, 15, 0.4);
  transition: transform .3s ease;
  display: inline-block;
}
.case-card.open .case-chev { transform: rotate(180deg); }

.case-panel {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: 1px solid rgba(23, 22, 15, 0);
  overflow: hidden;
  transition: max-height .45s ease, opacity .35s ease, margin-top .35s ease, padding-top .35s ease;
}
.case-card.open .case-panel {
  max-height: 340px;
  opacity: 1;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(23, 22, 15, 0.10);
}

.reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- админка ---------- */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14.5px;
  background: transparent;
  color: rgba(23, 22, 15, 0.7);
  border: 1px solid transparent;
}
.nav-item.active {
  background: #E7E3D8;
  color: var(--ink);
  box-shadow: inset 4px 4px 10px rgba(23, 22, 15, 0.14), inset -3px -3px 8px rgba(255, 255, 255, 0.8);
}


.table-head {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--head);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-55);
}

.table-row {
  padding: 11px 18px;
  border-bottom: 1px solid rgba(23, 22, 15, 0.10);
  align-items: center;
}

.add-tile {
  border: 2px dashed rgba(23, 22, 15, 0.22);
  border-radius: 14px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-45);
  font-weight: 600;
  font-size: 14.5px;
}
.add-tile:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- адаптив ---------- */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
  .grid-2 { grid-template-columns: 1fr !important; }
  .lg-only { display: none !important; }
}

@media (max-width: 640px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr !important; }
}

/* ---------- адаптив админки ---------- */
.side-toggle,
.side-backdrop { display: none; }

@media (max-width: 860px) {
  /* колонки → одна колонка, сайдбар уходит off-canvas */
  .admin-shell { display: block !important; }

  .sidebar {
    position: fixed !important;
    top: 0; left: 0;
    height: 100vh !important;
    z-index: 1200;
    transform: translateX(-100%);
    transition: transform .28s ease;
  }
  .sidebar.open { transform: translateX(0); }

  .admin-main { padding: 66px 16px 48px !important; }

  .side-toggle {
    display: flex; align-items: center; justify-content: center;
    position: fixed; top: 14px; left: 14px; z-index: 1100;
    width: 44px; height: 44px; border-radius: 12px;
    border: 1px solid var(--line); background: var(--panel-2);
    font-size: 20px; cursor: pointer; color: var(--ink);
    box-shadow: 4px 4px 10px rgba(23, 22, 15, 0.10), -3px -3px 8px rgba(255, 255, 255, 0.8);
  }
  .side-backdrop.open {
    display: block;
    position: fixed; inset: 0; z-index: 1150;
    background: rgba(23, 22, 15, 0.40);
  }

  /* широкие таблицы (проекты, цены, админы) — горизонтальный скролл вместо сжатия */
  .table-wrap { overflow-x: auto !important; }
  .table-wrap .table-head,
  .table-wrap .table-row { min-width: 600px; }
}

@media (max-width: 520px) {
  .admin-main h1 { font-size: 23px !important; }
}
