:root {
  --bg: #f6f4ee;
  --bg-2: #fffdf8;
  --white: #ffffff;
  --ink: #141414;
  --ink-2: #2a2a2a;
  --muted: #6a655c;
  --line: #e6e1d6;
  --line-2: #d7d1c4;
  --gold: #e2b10f;
  --gold-2: #c79808;
  --gold-soft: #f8e7a3;
  --gold-wash: #fff6d4;
  --gray: #9a9488;
  --danger: #b42318;
  --ok: #1f7a4d;
  --shadow: 0 10px 30px rgba(20, 20, 20, .06);
  --radius: 14px;
  --radius-sm: 10px;
  --max: 1180px;
  --font: "Manrope", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.wrap { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 1.5px solid var(--ink);
  background: var(--gold);
  color: var(--ink);
  font: 700 15px/1 var(--font);
  letter-spacing: .01em;
  border-radius: 999px;
  cursor: pointer;
  transition: .18s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--ink); color: var(--gold); }
.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-white { background: #fff; }
.btn-white:hover { background: var(--ink); color: #fff; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }

.topbar {
  background: var(--ink);
  color: #fff;
  font-size: 13px;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 38px;
}
.topbar a { color: var(--gold); font-weight: 700; }
.topbar .muted { color: #cfc9bc; }

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 244, 238, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -.03em;
}
.logo-mark {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gold);
  border: 1.5px solid var(--ink);
  display: grid; place-items: center;
  font-size: 16px;
}
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.nav a:hover, .nav a.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold); }
.header-phone {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
}
.header-phone a { font-size: 18px; font-weight: 800; }
.header-phone span { font-size: 12px; color: var(--muted); }
.burger {
  display: none;
  width: 42px; height: 42px;
  border: 1.5px solid var(--ink);
  background: #fff;
  border-radius: 10px;
}

.hero {
  padding: 56px 0 28px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 28px;
  align-items: stretch;
}
.hero-card, .panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.hero-card { padding: 36px 36px 32px; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-wash);
  border: 1px solid var(--gold-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
}
h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: -.04em; margin-bottom: 14px; }
.lead { font-size: 18px; color: var(--muted); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 18px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { padding: 12px 0 0; border-top: 1px solid var(--line); }
.stat b { display: block; font-size: 20px; }
.stat span { color: var(--muted); font-size: 13px; }

.hero-side {
  padding: 22px;
  background:
    linear-gradient(180deg, var(--gold-wash), #fff 46%),
    #fff;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.coin-art {
  height: 210px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 30% 30%, #ffe58a, #e2b10f 46%, #8a6a08 100%);
  position: relative;
  overflow: hidden;
}
.coin-art::after {
  content: "24";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 84px;
  font-weight: 800;
  color: rgba(20,20,20,.22);
  letter-spacing: -.06em;
}
.side-note { font-size: 14px; color: var(--muted); }

.section { padding: 28px 0; }
.section-h {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}
h2 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -.03em; line-height: 1.15; }
.sub { color: var(--muted); max-width: 50ch; }

.grid-3, .grid-2, .grid-4 { display: grid; gap: 14px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 20px; margin: 8px 0 8px; letter-spacing: -.02em; }
.price { font-weight: 800; color: var(--ink); }
.tag {
  font-size: 12px;
  font-weight: 700;
  background: var(--gold-wash);
  border: 1px solid var(--gold-soft);
  padding: 3px 8px;
  border-radius: 999px;
}
.checklist { margin-top: 12px; display: grid; gap: 6px; }
.checklist li { position: relative; padding-left: 18px; color: var(--ink-2); font-size: 14px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); border: 1px solid var(--ink); }

.step { display: flex; gap: 14px; align-items: flex-start; }
.step-n {
  width: 46px; height: 46px; flex: none;
  border-radius: 50%;
  background: var(--gold);
  border: 1.5px solid var(--ink);
  display: grid; place-items: center;
  font-weight: 800;
}

.form { display: grid; gap: 12px; }
label { font-size: 13px; font-weight: 700; }
input:not([type="file"]), textarea, select {
  width: 100%;
  border: 1.5px solid var(--line-2);
  background: #fff;
  border-radius: 12px;
  min-height: 48px;
  padding: 10px 12px;
  font: 500 15px/1.4 var(--font);
  color: var(--ink);
  outline: none;
}
textarea { min-height: 110px; resize: vertical; }
input:not([type="file"]):focus, textarea:focus, select:focus { border-color: var(--ink); }

.upload-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.upload-label {
  font-size: 13px;
  font-weight: 700;
}
.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 132px;
  border: 1.5px dashed var(--line-2);
  border-radius: 14px;
  padding: 22px 16px;
  background: var(--bg-2);
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.drop:hover, .drop.is-over {
  border-color: var(--ink);
  background: var(--gold-wash);
}
.drop-title {
  display: block;
  width: 100%;
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
  line-height: 1.3;
}
.drop-hint {
  display: block;
  width: 100%;
  max-width: 36ch;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
}
.drop-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
  border: 0;
  padding: 0;
  margin: 0;
  min-height: 0;
  background: transparent;
}
.previews { display: flex; flex-wrap: wrap; gap: 8px; }
.previews img {
  width: 72px; height: 72px; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--line);
}

.article-card .meta { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.article-body { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 32px; }
.article-body p { margin-bottom: 14px; font-size: 17px; }
.article-body h1 { margin-bottom: 8px; }

.footer {
  margin-top: 40px;
  background: var(--ink);
  color: #ece8de;
  padding: 36px 0 20px;
}
.footer h3, .footer .logo { color: #fff; }
.footer a:hover { color: var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.footer-copy {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #2c2c2c;
  color: #9a9488;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--gold-wash);
  font-weight: 600;
}
.alert-ok { background: #e8f6ee; border-color: #b7e0c6; }
.alert-err { background: #fdecec; border-color: #f2c2c0; color: var(--danger); }

/* Admin */
.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-box { width: min(420px, 100%); padding: 28px; }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.aside {
  background: var(--ink);
  color: #fff;
  padding: 20px 14px;
}
.aside a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #ddd;
  font-weight: 600;
  margin-bottom: 4px;
}
.aside a.active, .aside a:hover { background: #2a2a2a; color: var(--gold); }
.admin-main { padding: 22px; background: var(--bg); }
.table-wrap { overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--gold-wash); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--gold-wash);
  border: 1px solid var(--gold-soft);
}
.badge-new { background: #fff3bf; }
.badge-done { background: #d3f9d8; }
.badge-work { background: #d0ebff; }

@media (max-width: 920px) {
  .hero-grid, .grid-3, .grid-2, .grid-4, .footer-grid, .admin-shell {
    grid-template-columns: 1fr;
  }
  .header { position: sticky; }
  .header-row { min-height: 64px; position: relative; }
  .nav, .header-phone { display: none; }
  .header.is-open .nav,
  .header.is-open .header-phone {
    display: flex;
  }
  .header.is-open .nav {
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    left: 0; right: 0; top: 64px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 16px;
    z-index: 20;
  }
  .header.is-open .header-phone {
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    left: 0; right: 0;
    top: 280px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 0 16px 16px;
    z-index: 20;
  }
  .burger { display: grid; place-items: center; }
  .stats { grid-template-columns: 1fr; }
  .admin-main { padding: 14px; }
}
