:root {
  color-scheme: dark;
  --black: #080604;
  --coal: #120e0b;
  --card: #1c1510;
  --paper: #ead8bd;
  --paper-2: #c8ad86;
  --orange: #f06b1f;
  --red: #b31319;
  --red-hot: #ef2b24;
  --text: #fff7ed;
  --muted: #b9aa98;
  --line: rgba(234, 216, 189, 0.16);
  --shadow: 0 34px 100px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: var(--black);
  color: var(--text);
  letter-spacing: 0;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 78% 12%, rgba(240, 107, 31, 0.22), transparent 28%),
    radial-gradient(circle at 14% 38%, rgba(179, 19, 25, 0.2), transparent 24%),
    linear-gradient(135deg, #080604 0%, #140d09 52%, #090604 100%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.18;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
}

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

.header {
  position: fixed;
  inset: 18px clamp(16px, 4vw, 58px) auto;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 12px;
  background: rgba(18, 14, 11, 0.78);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand > span:last-child {
  min-width: 0;
}

.brand-box {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: var(--paper);
  font-weight: 900;
}

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

.brand strong {
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.menu-toggle {
  display: none;
}

.nav a:hover,
.call:hover {
  color: var(--orange);
}

.nav-user {
  max-width: 170px;
  color: var(--paper);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call {
  padding: 15px 18px;
  background: var(--paper);
  color: #170d08;
  font-weight: 900;
  white-space: nowrap;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.82fr);
  gap: clamp(26px, 5vw, 72px);
  min-height: 100vh;
  padding: 152px clamp(18px, 6vw, 86px) 46px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8,6,4,0.94), rgba(8,6,4,0.56) 52%, rgba(8,6,4,0.88)),
    repeating-linear-gradient(115deg, rgba(234,216,189,0.05) 0 1px, transparent 1px 118px);
  pointer-events: none;
}

.hero-left,
.hero-stage,
.hero-strip {
  position: relative;
  z-index: 2;
}

.hero-left {
  align-self: center;
  max-width: 880px;
  min-width: 0;
}

.tag {
  margin: 0 0 16px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Oswald, Inter, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 26px;
  font-size: clamp(58px, 9vw, 132px);
  line-height: 0.86;
}

h1::first-line {
  color: var(--paper);
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(38px, 6vw, 82px);
  line-height: 0.92;
}

h3 {
  margin-bottom: 12px;
  font-size: 22px;
  line-height: 1.18;
}

.lead {
  max-width: 690px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.58;
  overflow-wrap: break-word;
}

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

.btn,
.contact-links a {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border: 1px solid var(--line);
  font-weight: 900;
}

.primary,
.contact-links a {
  background: linear-gradient(135deg, var(--orange), var(--red));
  border-color: transparent;
  color: white;
}

.secondary {
  background: rgba(234,216,189,0.08);
  color: var(--paper);
}

.hero-stage {
  align-self: center;
  min-height: 610px;
  background:
    radial-gradient(circle at 52% 46%, rgba(240,107,31,0.34), transparent 26%),
    radial-gradient(circle at 58% 62%, rgba(179,19,25,0.22), transparent 30%),
    linear-gradient(160deg, rgba(28,21,16,0.92), rgba(8,6,4,0.58)),
    repeating-linear-gradient(120deg, rgba(234,216,189,0.08) 0 1px, transparent 1px 72px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(240,107,31,0.18);
  box-shadow: inset 0 0 90px rgba(240,107,31,0.08);
  pointer-events: none;
}

.hero-stage::after {
  content: "EXPERTISE";
  position: absolute;
  left: 28px;
  top: 48%;
  color: rgba(234,216,189,0.06);
  font-family: Oswald, Inter, sans-serif;
  font-size: clamp(64px, 9vw, 138px);
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

#heroScene {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
}

.magnifier-overlay {
  position: absolute;
  z-index: 2;
  left: 49%;
  top: 17%;
  width: clamp(156px, 16vw, 228px);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 20px rgba(240,107,31,0.32));
  transform: translate3d(0, 0, 0) rotate(-8deg);
  will-change: transform;
  pointer-events: none;
}

.lens-glass {
  fill: url("#lensFill");
  stroke: none;
}

.lens-rim {
  fill: none;
  stroke: var(--orange);
  stroke-width: 13;
}

.lens-handle {
  fill: none;
  stroke: url("#handleFill");
  stroke-width: 17;
  stroke-linecap: round;
}

.lens-glint {
  fill: none;
  stroke: rgba(234,216,189,0.62);
  stroke-width: 4;
  stroke-linecap: round;
}

.scene-marker {
  position: absolute;
  z-index: 2;
  padding: 7px 10px;
  background: rgba(8, 6, 4, 0.74);
  border: 1px solid rgba(240,107,31,0.42);
  color: var(--paper);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}

.scene-marker::before {
  content: "";
  position: absolute;
  width: 34px;
  height: 1px;
  background: var(--orange);
}

.marker-boundary {
  left: 24%;
  bottom: 30%;
}

.marker-boundary::before {
  left: 100%;
  top: 50%;
}

.marker-measure {
  right: 23%;
  bottom: 28%;
}

.marker-measure::before {
  right: 100%;
  top: 50%;
}

.marker-defect {
  right: 28%;
  top: 40%;
}

.marker-defect::before {
  right: 100%;
  top: 50%;
}

.stage-badge {
  position: absolute;
  z-index: 2;
  width: min(280px, calc(100% - 40px));
  padding: 16px;
  background: rgba(8, 6, 4, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.stage-badge.top {
  top: 22px;
  right: 22px;
}

.stage-badge.bottom {
  left: 22px;
  bottom: 22px;
}

.stage-badge span,
.stage-badge strong {
  display: block;
}

.stage-badge span {
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.stage-badge strong {
  margin-top: 8px;
  color: var(--paper);
}

.hero-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 12px;
  background: var(--line);
  border: 1px solid var(--line);
}

.hero-strip article {
  padding: 28px;
  background: rgba(28, 21, 16, 0.84);
}

.hero-strip span,
.services-grid span,
.steps span,
.office-grid span {
  color: var(--orange);
  font-weight: 900;
}

.hero-strip strong {
  display: block;
  margin: 18px 0 8px;
  color: var(--paper);
  font-size: 20px;
}

.hero-strip p,
.split-section > p,
.services-grid p,
.court-card p,
.steps p,
.office-grid p {
  color: var(--muted);
  line-height: 1.62;
}

.page-editor-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: flex;
  max-width: min(520px, calc(100vw - 36px));
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: rgba(8, 6, 4, 0.88);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.is-page-editing .header {
  z-index: 100;
}

.page-editor-panel button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(234, 216, 189, 0.08);
  color: var(--paper);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.page-editor-panel .page-edit-toggle,
.page-editor-panel .page-edit-save {
  background: linear-gradient(135deg, var(--orange), var(--red));
  border-color: transparent;
  color: #fff;
}

.page-edit-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.is-page-editing [data-hero-field],
.is-page-editing [data-site-field] {
  outline: 1px dashed rgba(240, 107, 31, 0.38);
  outline-offset: 3px;
  cursor: text;
}

.is-page-editing [data-hero-field]:not(.scene-marker),
.is-page-editing [data-site-field]:not(.scene-marker) {
  position: relative;
  z-index: 45;
}

.is-page-editing .tag[data-hero-field],
.is-page-editing .tag[data-site-field],
.is-page-editing .stage-badge span[data-hero-field],
.is-page-editing .stage-badge span[data-site-field] {
  z-index: 70;
}

.is-page-editing [data-hero-field]:hover,
.is-page-editing [data-site-field]:hover,
.is-page-editing [data-hero-field].is-edit-target,
.is-page-editing [data-site-field].is-edit-target,
.is-page-editing [data-hero-field]:focus,
.is-page-editing [data-site-field]:focus {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
  background: rgba(240, 107, 31, 0.1);
}

.is-page-editing [data-hero-field]:focus,
.is-page-editing [data-site-field]:focus {
  outline-color: var(--orange);
}

.split-section,
.services,
.court,
.docs,
.contacts {
  padding: clamp(74px, 8vw, 122px) clamp(18px, 6vw, 86px);
}

.split-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
  gap: clamp(30px, 5vw, 74px);
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.huge-word {
  position: absolute;
  right: -2vw;
  bottom: -34px;
  color: rgba(234, 216, 189, 0.045);
  font-family: Oswald, Inter, sans-serif;
  font-size: clamp(110px, 24vw, 330px);
  font-weight: 700;
  line-height: 0.8;
  pointer-events: none;
}

.section-head {
  max-width: 940px;
  margin-bottom: 42px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.services-grid article {
  min-height: 260px;
  padding: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 20px 70px rgba(0,0,0,0.18);
}

.services-grid article:hover {
  border-color: rgba(240,107,31,0.58);
  transform: translateY(-4px);
  transition: 180ms ease;
}

.service-main {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 532px;
  background:
    linear-gradient(135deg, rgba(179,19,25,0.82), rgba(240,107,31,0.34)),
    linear-gradient(160deg, #23150d, #080604) !important;
}

.service-main h3 {
  font-family: Oswald, Inter, sans-serif;
  font-size: clamp(38px, 4.5vw, 70px);
  line-height: 0.92;
  text-transform: uppercase;
}

.court {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1fr);
  gap: 16px;
  background: linear-gradient(135deg, rgba(234,216,189,0.08), rgba(179,19,25,0.08));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.court-card {
  padding: 34px;
  background: var(--paper);
  color: #1b1009;
}

.court-card .tag {
  color: var(--red);
}

.court-card p {
  color: #5d4836;
}

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

.steps article {
  min-height: 210px;
  padding: 28px;
  background: rgba(28, 21, 16, 0.9);
  border: 1px solid var(--line);
}

.steps strong {
  display: block;
  margin: 28px 0 10px;
  color: var(--paper);
  font-size: 22px;
}

.doc-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.doc-row span {
  min-height: 104px;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(234,216,189,0.08);
  border: 1px solid var(--line);
  color: var(--paper);
  text-align: center;
  font-weight: 800;
}

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

.contact-lead {
  padding: 34px;
  background: linear-gradient(135deg, rgba(240,107,31,0.22), rgba(179,19,25,0.18));
  border: 1px solid var(--line);
}

.contact-links a {
  min-width: min(100%, 240px);
}

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

.office-grid article {
  min-height: 260px;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--line);
}

.office-grid strong {
  color: var(--paper);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(18px, 6vw, 86px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer p {
  margin: 0;
}

@media (max-width: 1120px) {
  .hero,
  .split-section,
  .court,
  .contacts {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-stage {
    min-height: 500px;
  }
}

@media (max-width: 1180px) {
  .header {
    position: absolute;
    grid-template-columns: auto auto;
    inset: 18px 18px auto;
    width: auto;
    justify-content: start;
    gap: 12px;
  }

  .menu-toggle {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--line);
    background: rgba(8, 6, 4, 0.46);
    color: var(--paper);
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .menu-toggle span + span {
    margin-top: 0;
  }

  .header.is-menu-open .menu-toggle span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .header.is-menu-open .menu-toggle span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  .nav {
    grid-column: 1 / -1;
    justify-self: start;
    width: 100%;
    display: none;
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 8px;
  }

  .header.is-menu-open .nav {
    display: grid;
  }

  .nav a,
  .nav-user {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    background: rgba(8, 6, 4, 0.38);
    white-space: normal;
  }

  .call {
    grid-column: 1 / -1;
    display: none;
    justify-self: start;
    width: 100%;
    text-align: center;
  }

  .header.is-menu-open .call {
    display: flex;
    justify-content: center;
  }

  .hero {
    padding-top: 154px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(48px, 15vw, 66px);
    line-height: 0.9;
    overflow-wrap: anywhere;
  }

  .lead {
    max-width: 100%;
    font-size: 18px;
    line-height: 1.5;
  }

  .hero-strip,
  .services-grid,
  .steps,
  .doc-row,
  .office-grid {
    grid-template-columns: 1fr;
  }

  .service-main {
    grid-column: auto;
    grid-row: auto;
    min-height: 360px;
  }
}

@media (max-width: 560px) {
  .brand small {
    display: none;
  }

  .brand {
    width: auto;
    min-width: 0;
  }

  .header {
    left: 18px;
    right: auto;
    width: calc(100vw - 36px);
    max-width: calc(100vw - 36px);
  }

  .brand-box {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
  }

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

  .nav {
    font-size: 13px;
  }

  .nav a,
  .nav-user {
    padding: 10px 0;
  }

  .hero {
    padding-top: 150px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-left {
    max-width: min(100%, 330px);
  }

  .tag {
    font-size: 11px;
    line-height: 1.5;
  }

  h1 {
    font-size: clamp(38px, 12vw, 48px);
    line-height: 0.94;
  }

  .lead {
    max-width: 330px;
    font-size: 17px;
    line-height: 1.55;
  }

  .hero-stage {
    min-height: 380px;
  }

  .stage-badge {
    display: none;
  }

  .btn,
  .contact-links a {
    width: 100%;
    min-width: 0;
    padding-left: 14px;
    padding-right: 14px;
    text-align: center;
  }

  .actions,
  .contact-links {
    width: 100%;
    max-width: 330px;
  }
}
