/* ===== Базовые стили: тёмная тема в стиле портфолио ===== */
:root {
  --bg: #0b0a11;
  --card: #13111c;
  --subtle: #1c1929;
  --border: #232033;
  --border-hover: #4a4563;
  --fg: #ededed;
  --muted: #a3a3a3;
  --dim: #6b6b78;
  --white: #ffffff;
  --accent: #ffffff;
  --radius: 4px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: #2a2540; color: #fff; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3b3654; }

a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.muted { color: var(--muted); }
.hint { color: var(--dim); font-size: 13px; }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.r { text-align: right; }
.strong { font-weight: 600; color: #fff; }

.ph { width: 100%; height: 100%; background: var(--card); }

/* ===== Шапка ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 10, 17, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.bar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
}
.menu { display: flex; gap: 32px; }
.menu a {
  position: relative;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 4px 0;
  transition: color 0.2s;
}
.menu a:hover { color: #fff; }
.menu a.on { color: #fff; }
.menu a.on::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1.5px;
  background: #fff;
}

.burger {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.burger span { display: block; width: 22px; height: 2px; background: var(--muted); }

.mobile-menu { display: none; border-top: 1px solid var(--border); background: var(--bg); }
.mobile-menu a {
  display: block;
  padding: 14px 24px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
}

/* ===== Главная: о себе ===== */
main.wrap { padding-top: 40px; padding-bottom: 80px; }

.bio { display: grid; gap: 16px; max-width: 900px; margin-bottom: 48px; }
.bio-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.bio-text {
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 300;
  line-height: 1.4;
  color: #f2f2f2;
  letter-spacing: -0.01em;
  white-space: pre-line;
}
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.social {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #cfcfcf;
  transition: color 0.2s, border-color 0.2s;
}
a.social:hover { color: #fff; border-color: var(--border-hover); }

/* ===== Галерея (плотная сетка, наведение) ===== */
.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.block-head h3 { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 768px) { .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.tile-g {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: zoom-in;
}
.tile-g img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.tile-g:hover img { transform: scale(1.06); }
.tile-over {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(11, 10, 17, 0.72);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.tile-g:hover .tile-over { opacity: 1; }
.tile-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  border-bottom: 1px solid #fff;
  padding-bottom: 4px;
  text-align: center;
}

/* ===== Общие блоки страниц ===== */
.page-head { margin-bottom: 32px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.page-title {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border: 1px solid #5b5672;
  border-radius: var(--radius);
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: #fff; color: #000; border-color: #fff; }
.btn.solid { background: #fff; color: #000; border-color: #fff; }
.btn.solid:hover { background: #e5e5e5; }

/* ===== Услуги ===== */
.rules { margin-bottom: 24px; }
.rules ul { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 8px; }
.rules li { font-size: 14px; }

.services { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.service { display: flex; flex-direction: column; gap: 14px; }
.svc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.svc-head h3 { font-size: 18px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #fff; }
.svc-price { font-size: 16px; font-weight: 600; color: var(--muted); }
.svc-desc { color: #c9c9c9; font-size: 14px; white-space: pre-line; }
.svc-format { color: var(--dim); font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; }

.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thumbs img, .thumbs .ph {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.service .btn { align-self: stretch; }

/* ===== Статус ===== */
.status-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .status-grid { grid-template-columns: 1fr 1fr; } }
.status-block .block-head { margin-bottom: 0; border-bottom: 0; padding-bottom: 12px; }
.live { color: #34d399; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; }

.table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--subtle);
  border-bottom: 1px solid var(--border);
}
td { padding: 13px 16px; border-bottom: 1px solid var(--border); color: #d4d4d4; }
tr:last-child td { border-bottom: 0; }
th.r, td.r { text-align: right; }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #e5e5e5;
  background: var(--subtle);
}

/* ===== Контакты ===== */
.contact-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 2fr; align-items: start; } }
.side { display: grid; gap: 16px; }
.chan { display: grid; gap: 4px; margin-bottom: 16px; }
.chan .label { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.chan a { color: #e5e5e5; text-decoration: none; }
.chan a:hover { color: #fff; }
.tip { font-size: 13px; color: var(--muted); background: var(--subtle); }

.form-card { }
.sent {
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 1px solid #14532d;
  background: #052e16;
  color: #bbf7d0;
  border-radius: var(--radius);
  font-size: 14px;
}
.brief { display: grid; gap: 18px; }
.row2 { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } }
.brief label {
  display: grid;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d4d4d4;
}
.brief input, .brief select, .brief textarea, .admin-form input, .admin-form select, .admin-form textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg);
  color: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  font-size: 14px;
  letter-spacing: normal;
  text-transform: none;
  font-weight: 400;
}
.brief input:focus, .brief select:focus, .brief textarea:focus { outline: none; border-color: #6b6b78; }
.brief textarea { resize: vertical; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ===== Подвал ===== */
.foot {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===== Лайтбокс ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(11, 10, 17, 0.95);
  backdrop-filter: blur(8px);
}
.lightbox.open { display: flex; }
.lightbox img {
  max-height: 80vh;
  max-width: 100%;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.lightbox p {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d4d4d4;
  text-align: center;
}
.lb-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}
.lb-close:hover { color: #fff; }

/* ===== Мобильная версия ===== */
@media (max-width: 860px) {
  .menu { display: none; }
  .burger { display: flex; }
  .topbar.open .mobile-menu, .mobile-menu.open { display: block; }
}

/* ===== Админка ===== */
.admin-body { background: #0f0e16; }
.admin-top { background: var(--card); border-bottom: 1px solid var(--border); }
.admin-bar { height: 56px; display: flex; align-items: center; justify-content: space-between; }
.admin-nav { display: flex; gap: 20px; }
.admin-nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.admin-nav a:hover { color: #fff; }
.admin-main { padding-top: 32px; padding-bottom: 80px; max-width: 980px; }
.admin-main h1 { font-size: 22px; margin-bottom: 8px; }
.admin-main a { color: #d4d4d4; }
.flash {
  margin: 16px 0;
  padding: 12px 16px;
  border: 1px solid #14532d;
  background: #052e16;
  color: #bbf7d0;
  border-radius: var(--radius);
}
.page-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.link-card { display: block; text-decoration: none; color: #fff; font-weight: 600; transition: border-color 0.2s; }
.link-card:hover { border-color: var(--border-hover); }

.admin-form { display: grid; gap: 16px; margin-top: 16px; }
.admin-form fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 16px 18px 18px;
  display: grid;
  gap: 12px;
}
.admin-form legend { font-size: 13px; font-weight: 600; color: #e5e5e5; padding: 0 6px; }
.admin-form label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.admin-form label.check { display: flex; align-items: center; gap: 8px; }
.admin-form label.check input { width: auto; }
.admin-form input[type="color"] { width: 64px; height: 38px; padding: 2px; }
.admin-form input[type="number"] { width: 120px; }
.admin-form input[type="file"] { color: var(--muted); }
.style-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; }
.style-row label { min-width: 160px; }
.img-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.thumb { width: 180px; height: 135px; object-fit: cover; border: 1px solid var(--border); border-radius: var(--radius); }
.ph-box { display: flex; align-items: center; justify-content: center; color: var(--dim); font-size: 12px; }
.img-inputs { display: grid; gap: 10px; flex: 1; min-width: 240px; }
.sticky-save { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 40%); }
.admin-body td.pre { white-space: pre-wrap; }

/* ===== Плашки оплаты, уведомление, индикатор, подвал ===== */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pill {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--subtle); color: #d4d4d4;
}
.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 70; max-width: 360px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.35s ease; transition: opacity 0.3s, transform 0.3s;
}
.toast.hide { opacity: 0; transform: translateY(24px); }
.toast-title { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #fff; margin-bottom: 6px; }
.toast-text { font-size: 13px; color: var(--muted); }
@keyframes toast-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #34d399; margin-right: 6px; animation: live-pulse 2s infinite;
}
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.foot-in { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.foot-links { display: flex; gap: 24px; }
.foot-links a { color: var(--dim); text-decoration: none; }
.foot-links a:hover { color: #fff; }

.zoomable { cursor: zoom-in; }
.zoomable:hover { border-color: var(--border-hover); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: 0; padding: 12px 16px;
  color: var(--muted); font-size: 56px; line-height: 1; cursor: pointer;
}
.lb-nav:hover { color: #fff; }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
