:root {
  color-scheme: light;
  --ink: #12213b;
  --muted: #5d6878;
  --paper: #f5f8fc;
  --surface: #ffffff;
  --line: #d8e1ef;
  --accent: #f3b229;
  --accent-dark: #a96900;
  --blue: #1f5aa5;
  --blue-dark: #123568;
  --blue-soft: #e6eef9;
  --steel: #25364f;
  --shadow: 0 18px 46px rgba(18, 33, 59, 0.16);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

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

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

button {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  width: 100%;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 4vw, 54px);
  color: #fff;
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.site-header::after {
  position: absolute;
  right: clamp(18px, 4vw, 54px);
  bottom: 0;
  left: clamp(18px, 4vw, 54px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  content: "";
  opacity: 0.7;
}

.site-header.scrolled::after {
  background: linear-gradient(90deg, transparent, rgba(31, 90, 165, 0.28), transparent);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 3vw, 28px);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(17, 24, 28, 0.08);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  font-weight: 750;
}

.brand-logo {
  width: clamp(106px, 13vw, 170px);
  height: 62px;
  object-fit: contain;
}

.brand-logo.is-missing {
  display: none;
}

.brand-fallback {
  display: grid;
  width: 86px;
  height: 48px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 6px;
  font-size: 0.74rem;
  letter-spacing: 0;
}

.brand-fallback.is-hidden {
  display: none;
}

.brand-name {
  overflow: hidden;
  max-width: 52vw;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 34px);
  font-size: 0.94rem;
  font-weight: 700;
}

.site-nav a {
  opacity: 0.9;
}

.site-nav a:hover {
  opacity: 1;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.12);
}

.site-header.scrolled .language-switcher {
  border-color: var(--line);
  background: #eef4fc;
}

.language-button {
  display: inline-flex;
  min-width: 36px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
}

.flag {
  font-size: 0.95rem;
  line-height: 1;
}

.language-button.active,
.language-button:hover {
  background: var(--accent);
  color: #171204;
}

.hero {
  position: relative;
  min-height: 92svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media {
  background-image: url("../images/construction-hero.png");
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
  animation: hero-drift 18s var(--ease) both;
  will-change: transform;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(8, 31, 72, 0.82), rgba(8, 31, 72, 0.22) 62%),
    linear-gradient(0deg, rgba(8, 31, 72, 0.76), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(780px, 100%);
  padding: 150px clamp(20px, 6vw, 72px) 84px;
  animation: hero-copy-in 900ms var(--ease) 120ms both;
}

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

.hero h1,
.section-heading h2,
.contact-band h2 {
  margin: 0;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-weight: 720;
  line-height: 0.98;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(3rem, 7vw, 6.8rem);
}

.hero-copy {
  max-width: 610px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.65;
}

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

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 12px 18px;
  font-weight: 800;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.button.primary {
  background: var(--accent);
  color: #161204;
}

.button.primary:hover {
  background: #dda13b;
  box-shadow: 0 12px 24px rgba(243, 178, 41, 0.26);
  transform: translateY(-2px);
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.58);
  color: #fff;
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.intro-band {
  background: var(--blue-dark);
  color: #fff;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.intro-grid > div {
  position: relative;
  min-height: 150px;
  padding: clamp(22px, 4vw, 42px);
  background: var(--blue-dark);
  overflow: hidden;
}

.intro-grid > div::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), rgba(255, 255, 255, 0.28));
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 700ms var(--ease);
}

.intro-grid > div.is-visible::after {
  transform: scaleX(1);
}

.stat {
  display: block;
  color: var(--accent);
  font-weight: 850;
}

.intro-grid p {
  max-width: 280px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
}

.section,
.work-section {
  padding: clamp(64px, 9vw, 110px) clamp(20px, 6vw, 72px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  max-width: 1160px;
  margin: 0 auto 34px;
}

.section-heading h2,
.contact-band h2 {
  max-width: 720px;
  font-size: clamp(2.2rem, 5vw, 4.7rem);
}

.services-grid {
  display: grid;
  max-width: 1160px;
  margin: 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.service-card,
.gallery-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(41, 37, 31, 0.04);
  transition:
    border-color 180ms ease,
    box-shadow 220ms ease,
    transform 220ms var(--ease);
}

.service-card {
  min-height: 248px;
}

.service-feature {
  overflow: hidden;
}

.service-feature:hover {
  border-color: rgba(31, 90, 165, 0.22);
  box-shadow: 0 24px 54px rgba(18, 33, 59, 0.14);
  transform: translateY(-6px);
}

.service-feature img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 800ms var(--ease), filter 300ms ease;
}

.service-feature:hover img {
  filter: saturate(1.04) contrast(1.02);
  transform: scale(1.045);
}

.service-content {
  padding: 24px;
}

.service-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 6px;
  background: rgba(31, 90, 165, 0.1);
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
}

.service-card h3 {
  margin: 32px 0 10px;
  color: var(--blue-dark);
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.service-card p,
.service-card li {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.service-card ul {
  display: grid;
  gap: 9px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.service-card li {
  position: relative;
  padding-left: 24px;
  font-weight: 700;
}

.service-card li::before {
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
  transform: translateY(-50%);
}

.advantages-panel {
  display: grid;
  max-width: 1160px;
  margin: 22px auto 0;
  grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.6fr);
  gap: 24px;
  border: 1px solid rgba(31, 90, 165, 0.22);
  border-radius: 8px;
  padding: clamp(24px, 4vw, 36px);
  background:
    linear-gradient(135deg, rgba(31, 90, 165, 0.08), rgba(243, 178, 41, 0.08)),
    #fff;
  box-shadow: 0 12px 30px rgba(18, 33, 59, 0.06);
}

.advantages-panel:hover {
  border-color: rgba(31, 90, 165, 0.35);
  box-shadow: 0 24px 54px rgba(18, 33, 59, 0.1);
}

.advantages-panel h3 {
  max-width: 390px;
  margin: 0;
  color: var(--blue-dark);
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.05;
}

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

.advantages-grid article {
  border-left: 3px solid var(--accent);
  padding: 0 0 0 16px;
  transition: transform 180ms var(--ease);
}

.advantages-grid article:hover {
  transform: translateX(4px);
}

.advantages-grid span {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.advantages-grid h4 {
  margin: 8px 0 6px;
  color: var(--blue-dark);
  font-size: 1.05rem;
}

.advantages-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.work-section {
  background:
    linear-gradient(180deg, #eaf0f8 0%, #f5f8fc 100%);
}

.gallery-toolbar {
  display: flex;
  max-width: 1160px;
  margin: 0 auto 18px;
  gap: 8px;
}

.filter-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--steel);
  cursor: pointer;
  font-weight: 800;
  padding: 8px 14px;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.filter-button.active,
.filter-button:hover {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  transform: translateY(-1px);
}

.gallery-grid {
  display: grid;
  max-width: 1160px;
  margin: 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gallery-count {
  max-width: 1160px;
  margin: 0 auto 18px;
  color: var(--muted);
  font-weight: 700;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
}

.gallery-card:hover {
  border-color: rgba(31, 90, 165, 0.22);
  box-shadow: 0 24px 48px rgba(18, 33, 59, 0.13);
  transform: translateY(-4px);
}

.gallery-card:focus-visible,
.filter-button:focus-visible,
.button:focus-visible,
.dialog-close:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 220ms ease;
}

.gallery-card:hover img {
  transform: scale(1.04);
}

.gallery-info {
  min-height: 112px;
  padding: 18px;
}

.gallery-info h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.gallery-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.gallery-actions {
  display: flex;
  max-width: 1160px;
  justify-content: center;
  margin: 30px auto 0;
}

.gallery-more {
  border-color: var(--blue);
  background: transparent;
  color: var(--blue);
  cursor: pointer;
}

.gallery-more:hover {
  background: var(--blue);
  color: #fff;
}

.gallery-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.media-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 6px;
  background: rgba(18, 53, 104, 0.88);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 850;
  padding: 7px 9px;
}

.contact-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: clamp(56px, 8vw, 92px) clamp(20px, 6vw, 72px);
  background:
    radial-gradient(circle at 16% 20%, rgba(243, 178, 41, 0.16), transparent 28%),
    linear-gradient(135deg, var(--blue-dark), #0b244b);
  color: #fff;
}

.contact-band .eyebrow {
  color: var(--accent);
}

.contact-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.contact-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  font-weight: 800;
  transition:
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.contact-link:hover {
  border-color: var(--accent);
  color: #ffe0a0;
  transform: translateY(-2px);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(20px, 6vw, 72px);
  background: #161b1d;
  color: rgba(255, 255, 255, 0.75);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #fff;
  font-weight: 800;
}

.media-dialog {
  width: min(980px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: #111;
  color: #fff;
  box-shadow: var(--shadow);
}

.media-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
}

.dialog-body img,
.dialog-body video {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: #111;
}

.dialog-caption {
  padding: 18px 20px 20px;
  background: #fff;
  color: var(--ink);
}

.dialog-caption h3 {
  margin: 0 0 6px;
}

.dialog-caption p {
  margin: 0;
  color: var(--muted);
}

.reveal {
  opacity: 1;
  transform: none;
  transition:
    opacity 700ms var(--ease),
    transform 700ms var(--ease);
}

.reveal.is-observed {
  opacity: 0;
  transform: translateY(28px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.intro-grid > div:nth-child(2),
.service-card:nth-child(2),
.advantages-grid article:nth-child(2),
.gallery-card:nth-child(2),
.gallery-card:nth-child(5),
.gallery-card:nth-child(8) {
  transition-delay: 80ms;
}

.intro-grid > div:nth-child(3),
.advantages-grid article:nth-child(3),
.gallery-card:nth-child(3),
.gallery-card:nth-child(6),
.gallery-card:nth-child(9) {
  transition-delay: 150ms;
}

.advantages-grid article:nth-child(4),
.gallery-card:nth-child(4),
.gallery-card:nth-child(7) {
  transition-delay: 220ms;
}

@keyframes hero-drift {
  from {
    transform: scale(1.02);
  }

  to {
    transform: scale(1.08) translate3d(-1.2%, -1%, 0);
  }
}

@keyframes hero-copy-in {
  from {
    opacity: 0;
    transform: translateY(26px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .site-header {
    min-height: 72px;
  }

  .site-header {
    flex-wrap: wrap;
  }

  .header-actions {
    gap: 12px;
  }

  .site-nav {
    gap: 14px;
    font-size: 0.88rem;
  }

  .intro-grid,
  .services-grid,
  .gallery-grid,
  .contact-band,
  .advantages-panel,
  .advantages-grid {
    grid-template-columns: 1fr;
  }

  .intro-grid > div {
    min-height: auto;
  }

  .section-heading {
    display: block;
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .site-header {
    gap: 12px;
  }

  .brand {
    gap: 8px;
  }

  .brand-logo {
    width: 98px;
    height: 52px;
  }

  .brand-name {
    display: none;
  }

  .site-nav {
    gap: 10px;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .language-button {
    min-width: 48px;
  }

  .hero {
    min-height: 88svh;
  }

  .hero-content {
    padding-bottom: 54px;
  }

  .hero-actions,
  .gallery-toolbar,
  .site-footer {
    align-items: stretch;
  }

  .button,
  .filter-button {
    flex: 1 1 auto;
  }

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

@media (max-width: 380px) {
  .site-header {
    padding: 10px 14px;
  }

  .brand-logo {
    width: 86px;
    height: 46px;
  }

  .header-actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  .site-nav {
    order: 2;
    width: 100%;
    justify-content: space-between;
    gap: 6px;
    font-size: 0.82rem;
  }

  .language-switcher {
    order: 1;
    margin-left: auto;
  }

  .language-button {
    min-width: 38px;
    padding: 6px 5px;
  }

  .hero-content {
    padding-top: 172px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-media {
    animation: none;
  }
}
