/* ════════════════════════════════════════════════════════════
   ЗемУслуги — Redesign
   ════════════════════════════════════════════════════════════ */

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

:root {
  /* Default palette — Berry (warmer/deeper than concept) */
  --berry: #7A2F5C;
  --berry-dark: #5A2245;
  --berry-light: #9C4076;
  --accent: #C9A86C;
  --accent-soft: rgba(201, 168, 108, 0.12);
  --lavender: #8B8DB8;
  --lavender-pale: #E8E7F0;
  --bg: #FAF8F5;
  --bg-alt: #F2EEE7;
  --surface: #FFFFFF;
  --ink: #1A1A2E;
  --ink-mid: #4A4A5E;
  --ink-light: #8585A0;
  --line: #E5E2DA;

  --font-display: 'Sora', sans-serif;
  --font-body: 'Manrope', sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --section-pad: clamp(64px, 8vw, 120px) clamp(20px, 5vw, 80px);
  --max-w: 1280px;
}

/* Earth palette */
[data-palette="earth"] {
  --berry: #4A6B3A;
  --berry-dark: #354E2A;
  --berry-light: #6B8B5A;
  --accent: #C66B3D;
  --accent-soft: rgba(198, 107, 61, 0.12);
  --lavender: #8FA888;
  --lavender-pale: #E5E8DC;
  --bg: #F8F6F0;
  --bg-alt: #EFEBE0;
  --line: #DFDBCC;
}

/* Slate palette */
[data-palette="slate"] {
  --berry: #2B3A55;
  --berry-dark: #1B2740;
  --berry-light: #3F5378;
  --accent: #D89B3C;
  --accent-soft: rgba(216, 155, 60, 0.12);
  --lavender: #7888A5;
  --lavender-pale: #E2E6EE;
  --bg: #F6F5F1;
  --bg-alt: #ECEAE2;
  --line: #DDDAD0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

/* ─── Photo placeholder ─── */
.photo {
  position: relative;
  background: var(--bg-alt);
  background-image:
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 18px,
      rgba(0,0,0,0.025) 18px,
      rgba(0,0,0,0.025) 19px
    );
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}
.photo .photo-label {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  color: var(--ink-mid);
  background: rgba(255,255,255,0.85);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 6px 10px;
  border-top-right-radius: 6px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-weight: 600;
}
.photo.dark { background-color: #2A2A3A; border-color: rgba(255,255,255,0.08); }
.photo.dark .photo-label { background: rgba(0,0,0,0.5); color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.1); }
.photo.has-image {
  background-image: var(--photo-src);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: none;
}
.photo.has-image.contain {
  background-size: contain;
  background-color: #FFFFFF;
}
.photo.has-image .photo-label { display: none; }

/* ─── Header ─── */
.hdr {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.hdr.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 24px rgba(26, 26, 46, 0.04);
}

.hdr-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px clamp(20px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
}
.brand-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.brand-sub {
  font-size: 11px;
  color: var(--ink-light);
  font-weight: 500;
  margin-top: -2px;
  letter-spacing: 0.3px;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none;
  color: var(--ink-mid);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s;
}
.nav a:hover { background: var(--lavender-pale); color: var(--ink); }

.hdr-actions { display: flex; align-items: center; gap: 14px; }
.hdr-phone {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.1px;
  text-align: right;
  line-height: 1.2;
  white-space: nowrap;
}
.hdr-phone span { display: block; font-size: 11px; font-weight: 500; color: var(--ink-light); letter-spacing: 0.3px; margin-top: 3px; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  letter-spacing: 0.1px;
  white-space: nowrap;
}
.btn-primary {
  background: var(--berry);
  color: #fff;
}
.btn-primary:hover {
  background: var(--berry-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px color-mix(in oklab, var(--berry) 35%, transparent);
}
.btn-ghost {
  background: var(--lavender-pale);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--bg-alt); transform: translateY(-1px); }

.btn-light {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
}
.btn-light:hover { background: rgba(255,255,255,0.18); }

.btn-sm { padding: 9px 16px; font-size: 13px; border-radius: 9px; }

/* ─── Section primitives ─── */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--section-pad);
}
.section-full {
  padding: var(--section-pad);
}
.section-full > .inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--berry);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--berry);
  border-radius: 2px;
}
.title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--ink);
}
.title .accent { color: var(--berry); }
.subtitle {
  font-size: 16px;
  color: var(--ink-mid);
  margin-top: 14px;
  max-width: 560px;
  line-height: 1.6;
}

.section-head { margin-bottom: clamp(36px, 4vw, 60px); }

/* ─── Reveal ─── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ─── Footer ─── */
.ftr {
  background: var(--ink);
  color: rgba(255,255,255,0.6);
}
.ftr-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px clamp(20px, 5vw, 80px) 32px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
.ftr h5 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 16px;
}
.ftr a {
  display: block;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 14px;
  padding: 4px 0;
  transition: color 0.2s;
}
.ftr a:hover { color: var(--accent); }
.ftr-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px clamp(20px, 5vw, 80px);
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

/* ─── Mobile sticky CTA ─── */
.mob-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(26, 26, 46, 0.96);
  backdrop-filter: blur(12px);
  padding: 10px 14px;
  z-index: 99;
  gap: 8px;
}
.mob-bar a {
  flex: 1;
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.mob-bar .m-call { background: var(--berry); color: #fff; }
.mob-bar .m-form { border: 1.5px solid rgba(255,255,255,0.2); color: #fff; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .nav { display: none; }
  .hdr-phone { display: none; }
  .ftr-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .hdr { position: static; }
}
@media (max-width: 720px) {
  .ftr-grid { grid-template-columns: 1fr; }
  .ftr-bottom { flex-direction: column; gap: 6px; text-align: center; }
  .mob-bar { display: flex; }
  body { padding-bottom: 72px; }
}

/* ─── Utility: Tweaks-aware visibility ─── */
[data-density="subtle"] .density-balanced,
[data-density="subtle"] .density-magazine { display: none !important; }
[data-density="balanced"] .density-magazine { display: none !important; }
/* magazine shows everything */
