:root {
  --bg: #f7f4ef;
  --paper: #ffffff;
  --ink: #1d2520;
  --muted: #5c655e;
  --line: #d9d2c6;
  --brand: #1f6a4d;
  --brand-2: #c08a3e;
  --deep: #14211b;
  --soft: #e7efe8;
  --danger: #9f2d26;
  --shadow: 0 18px 50px rgba(27, 39, 32, 0.14);
  --font-body: Inter, "Segoe UI", Arial, sans-serif;
  --font-heading: Lora, Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  opacity: 1;
  transition: opacity 0.15s ease;
}

body.is-loading {
  opacity: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

h1,
h2,
h3,
.brand strong {
  font-family: var(--font-heading);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 244, 239, 0.94);
  border-bottom: 1px solid rgba(29, 37, 32, 0.12);
  backdrop-filter: blur(18px);
}

.topbar {
  width: min(1180px, calc(100% - 32px));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--brand);
  border-radius: 10px;
}

.brand-mark svg {
  width: 26px;
  height: 26px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand small {
  color: var(--muted);
  font-size: 13px;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.header-meta a {
  color: var(--ink);
  font-weight: 750;
}

.messenger-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.messenger-link {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.messenger-link svg {
  width: 15px;
  height: 15px;
}

a.messenger-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.messenger-link.wa {
  background: #25d366;
}

.messenger-link.vb {
  background: #7360f2;
}

.messenger-link.tg {
  background: #229ed9;
}

.messenger-link.mx {
  background: linear-gradient(135deg, #4a90e2, #9b59d6);
}

.messenger-links-lg .messenger-link {
  width: 34px;
  height: 34px;
}

.messenger-links-lg .messenger-link svg {
  width: 19px;
  height: 19px;
}

.nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 22px;
  color: #3d463f;
  font-size: 15px;
}

.nav a:hover {
  color: var(--brand);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: 690px;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: #18251f;
}

.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-bg {
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(13, 24, 18, 0.9), rgba(13, 24, 18, 0.56) 48%, rgba(13, 24, 18, 0.12)),
    linear-gradient(0deg, rgba(13, 24, 18, 0.36), rgba(13, 24, 18, 0.06));
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 48px;
  align-items: end;
  padding: 88px 0 76px;
}

.hero-copy {
  color: #fff;
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow.light {
  color: #d9bc86;
}

.hero h1,
.section h2,
.admin-header h1 {
  margin: 0;
  line-height: 1.05;
}

.hero h1 {
  max-width: 780px;
  font-size: clamp(38px, 7vw, 78px);
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 620px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
}

.btn.primary {
  background: var(--brand-2);
  color: #18120a;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.36);
  color: #fff;
}

.btn.ghost:hover {
  filter: none;
  background: rgba(255, 255, 255, 0.24);
}

.btn.ghost.dark {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn.ghost.dark:hover {
  filter: none;
  background: var(--soft);
}

.btn.danger {
  background: #fff1ef;
  color: var(--danger);
  border-color: #efc5bf;
}

.btn.small {
  min-height: 38px;
  padding: 0 14px;
}

.btn.wide {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.lead-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.lead-card h2 {
  margin: 4px 0 18px;
  font-size: 28px;
}

.form-label {
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.lead-card input,
.lead-card select {
  width: 100%;
  min-height: 48px;
  margin-bottom: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.form-note,
.form-status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.form-status {
  color: var(--brand);
  font-weight: 700;
}

.form-status.is-error {
  color: var(--danger);
}

.stats-band {
  background: var(--deep);
  color: #fff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.stat {
  min-height: 126px;
  display: grid;
  align-content: center;
  padding: 24px;
  background: var(--deep);
}

.stat strong {
  font-size: 38px;
  line-height: 1;
}

.stat span {
  color: rgba(255, 255, 255, 0.72);
}

.section {
  padding: 92px 0;
}

.section.muted {
  background: var(--soft);
}

.section-head {
  max-width: 680px;
  margin-bottom: 34px;
}

.section-head.split {
  max-width: none;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 34px;
  align-items: end;
}

.section h2 {
  font-size: clamp(30px, 4vw, 48px);
}

.section-head p:not(.eyebrow) {
  margin: 12px 0 0;
  color: var(--muted);
}

.service-grid,
.work-grid,
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.service-card,
.project-card,
.work-card,
.review-card {
  background: var(--paper);
  border: 1px solid rgba(29, 37, 32, 0.1);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover,
.project-card:hover,
.work-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.service-card img,
.work-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.work-media {
  position: relative;
}

.work-card.has-gallery {
  cursor: pointer;
}

.work-card.has-gallery:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.gallery-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(20, 33, 27, 0.75);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(4px);
}

.gallery-badge svg {
  width: 13px;
  height: 13px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 14, 12, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-image {
  max-width: min(90vw, 1100px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.26);
}

.lightbox-close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 24px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 30px;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 700;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .lightbox-nav {
    width: 42px;
    height: 42px;
    font-size: 22px;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
  }
}

.service-card:hover img,
.work-card:hover img,
.project-card:hover img {
  transform: scale(1.04);
}

.service-card div,
.work-card div,
.project-card div,
.review-card {
  padding: 22px;
}

.service-card h3,
.project-card h3,
.work-card h3,
.step h3 {
  margin: 6px 0 8px;
  font-size: 22px;
  line-height: 1.2;
}

.service-card p,
.project-card p,
.work-card p,
.step p,
.review-card p {
  margin: 0;
  color: var(--muted);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.project-card {
  display: grid;
  grid-template-rows: 260px 1fr;
}

.project-media {
  position: relative;
  min-height: 0;
}

.project-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card a {
  display: inline-flex;
  margin-top: 18px;
  color: var(--brand);
  font-weight: 800;
}

.process {
  background: #fff;
}

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

.step {
  min-height: 230px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.step span {
  color: var(--brand-2);
  font-size: 34px;
  font-weight: 900;
}

.dark-offer {
  background: var(--deep);
  color: #fff;
}

.dark-offer p:not(.eyebrow) {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.76);
}

.offer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}

.review-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-card strong {
  margin-top: auto;
}

.review-card span {
  color: var(--muted);
  font-size: 14px;
}

.stars {
  color: var(--brand-2);
  letter-spacing: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 40px;
  align-items: start;
}

.contact-grid h2 {
  margin: 0 0 16px;
  font-size: 42px;
  line-height: 1.08;
}

.contact-grid p {
  max-width: 660px;
  color: var(--muted);
}

.contact-panel {
  display: grid;
  gap: 14px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.contact-panel a:first-child {
  color: var(--brand);
  font-size: 28px;
  font-weight: 850;
}

.footer {
  padding: 28px 0;
  background: var(--deep);
  color: rgba(255, 255, 255, 0.76);
}

.footer-grid {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.admin-body {
  min-height: 100vh;
  background: #f2efe8;
}

.admin-header {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.admin-header h1 {
  font-size: 36px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 40px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
}

.admin-tabs {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 8px;
}

.admin-tabs button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.admin-tabs button.active {
  background: var(--deep);
  color: #fff;
  border-color: var(--deep);
}

.editor-panel {
  min-width: 0;
}

.admin-card,
.repeat-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(29, 37, 32, 0.08);
}

.admin-card {
  padding: 24px;
}

.admin-card h2 {
  margin: 0 0 20px;
}

.admin-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.admin-card-head h2 {
  margin: 0;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field span,
.repeat-item legend {
  color: #38443d;
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.field textarea {
  resize: vertical;
}

.file-input {
  padding: 9px 12px !important;
}

.admin-preview {
  width: 220px;
  height: 130px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.repeat-list {
  display: grid;
  gap: 16px;
}

.gallery-editor {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.gallery-editor-head {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 800;
  color: #38443d;
}

.gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.gallery-thumb {
  position: relative;
  width: 84px;
  height: 84px;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.gallery-thumb-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border: 1px solid #efc5bf;
  border-radius: 50%;
  background: #fff1ef;
  color: var(--danger);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

.repeat-item {
  position: relative;
  margin: 0;
  padding: 22px 18px 18px;
}

.remove-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid #efc5bf;
  border-radius: 8px;
  background: #fff1ef;
  color: var(--danger);
  cursor: pointer;
}

.admin-status {
  min-height: 24px;
  margin: 0 0 12px;
  color: var(--brand);
  font-weight: 700;
}

.admin-status.is-error {
  color: var(--danger);
}

.not-found {
  min-height: 70vh;
  display: grid;
  align-items: center;
}

.not-found h1 {
  font-size: clamp(30px, 5vw, 48px);
  margin: 0 0 12px;
}

.not-found p {
  color: var(--muted);
  margin: 0 0 24px;
}

.lead-table {
  display: grid;
  gap: 10px;
}

.lead-table article {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.empty {
  color: var(--muted);
}

@media (max-width: 920px) {
  .header-meta {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .nav {
    display: none;
    padding: 10px 0 18px;
    flex-direction: column;
    align-items: stretch;
  }

  .nav.open {
    display: flex;
  }

  .nav-admin {
    margin-left: 0;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid,
  .section-head.split,
  .offer-grid,
  .contact-grid,
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    padding: 58px 0 44px;
  }

  .service-grid,
  .project-grid,
  .work-grid,
  .review-grid,
  .steps,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-tabs {
    position: static;
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .admin-tabs button {
    white-space: nowrap;
  }
}

.mobile-cta {
  display: none;
}

@media (max-width: 640px) {
  body {
    padding-bottom: 76px;
  }

  .mobile-cta {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    gap: 10px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--paper);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(29, 37, 32, 0.12);
  }

  .mobile-cta-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 800;
    color: var(--brand);
  }

  .mobile-cta-btn {
    flex: 1;
  }

  .container,
  .topbar,
  .nav,
  .admin-header,
  .admin-shell {
    width: min(100% - 24px, 1180px);
  }

  .topbar {
    min-height: 68px;
  }

  .brand small {
    display: none;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero-copy > p:not(.eyebrow) {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .lead-card {
    padding: 20px;
  }

  .section {
    padding: 62px 0;
  }

  .service-grid,
  .project-grid,
  .work-grid,
  .review-grid,
  .steps,
  .stats-grid,
  .field-grid,
  .lead-table article {
    grid-template-columns: 1fr;
  }

  .project-card {
    grid-template-rows: 220px 1fr;
  }

  .admin-header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-actions .btn {
    flex: 1 1 auto;
  }

  .footer-grid {
    flex-direction: column;
  }
}
