:root {
  color-scheme: light;
  --bg: #f3f7fb;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --stroke: #d5e2ee;
  --text: #152033;
  --muted: #4d5d73;
  --blue: #005eb8;
  --blue-bright: #0088e0;
  --blue-soft: #e8f3ff;
  --header: rgba(255, 255, 255, 0.9);
  --panel: #ffffff;
  --input: #f8fbfe;
  --footer: #ffffff;
  --hero-veil: linear-gradient(180deg, rgba(236, 246, 255, 0.42), rgba(244, 249, 255, 0.58));
  --hero-card: rgba(255, 255, 255, 0.92);
  --radius: 16px;
  --max: 1180px;
  --font: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --shadow: 0 18px 50px rgba(21, 52, 89, 0.1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d12;
  --bg-elevated: #141820;
  --bg-card: #171b24;
  --stroke: #2c3340;
  --text: #eef2f7;
  --muted: #a8b3c4;
  --blue: #4da3ff;
  --blue-bright: #00a3ff;
  --blue-soft: #15263c;
  --header: rgba(11, 13, 18, 0.88);
  --panel: #171b24;
  --input: #10141c;
  --footer: #0f1218;
  --hero-veil: linear-gradient(180deg, rgba(8, 10, 16, 0.45), rgba(8, 10, 16, 0.72));
  --hero-card: rgba(16, 20, 28, 0.88);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 8% -10%, rgba(0, 163, 255, 0.16), transparent 55%),
    radial-gradient(900px 420px at 100% 8%, rgba(0, 94, 184, 0.1), transparent 50%),
    var(--bg);
  min-height: 100vh;
}

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

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

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  background: var(--blue);
  color: #fff;
  padding: 8px 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: var(--header);
  border-bottom: 1px solid var(--stroke);
  transition: box-shadow 0.25s ease, min-height 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 28px rgba(21, 52, 89, 0.08);
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 96px;
  gap: 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-icon-sun {
  display: block;
}

html[data-theme="dark"] .hero-bg {
  filter: saturate(1.05) brightness(0.82);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 78px;
  width: auto;
  transition: transform 0.35s ease;
}

.logo-on-dark {
  display: none;
}

html[data-theme="dark"] .logo-on-light {
  display: none;
}

html[data-theme="dark"] .logo-on-dark {
  display: block;
}

.logo:hover img {
  transform: scale(1.04);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 12px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--blue);
  border-bottom-color: var(--blue-bright);
}

.menu-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 8px;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: calc(100vh - 96px);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -6%;
  background: #cfe8ff center / cover no-repeat;
  filter: saturate(1.15) brightness(1.12);
  animation: kenburns 22s ease-in-out alternate infinite;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-veil);
}

.hero-card,
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
}

.hero-card {
  width: min(820px, calc(100% - 32px));
  padding: 52px 44px;
  text-align: center;
  background: var(--hero-card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: floatcard 6s ease-in-out infinite;
}

h1,
h2,
h3 {
  margin: 0 0 16px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(32px, 6vw, 60px);
}

h2 {
  font-size: clamp(26px, 4vw, 38px);
}

.lede,
.muted {
  color: var(--muted);
}

.rule {
  width: 64px;
  height: 3px;
  background: var(--blue-bright);
  border: 0;
  margin: 0 0 28px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 94, 184, 0.28);
}

.btn-primary:hover {
  background: var(--blue-bright);
}

.btn-ghost {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--stroke);
}

.btn-ghost:hover {
  border-color: var(--blue);
  color: var(--blue);
}

section {
  padding: 88px 0;
  border-top: 1px solid var(--stroke);
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.stat {
  background: var(--blue-soft);
  border-radius: 12px;
  padding: 16px 10px;
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 28px;
  color: var(--blue);
}

.stat span {
  font-size: 13px;
  color: var(--muted);
}

.refs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.ref-card {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  width: 180px;
  height: 96px;
  display: grid;
  place-items: center;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(21, 52, 89, 0.06);
  transition: transform 0.25s ease;
}

.ref-card:hover {
  transform: translateY(-4px);
}

.ref-card img {
  max-height: 64px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 28px;
  min-height: 220px;
  box-shadow: 0 10px 30px rgba(21, 52, 89, 0.05);
  transition: border-color 0.2s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  border-color: var(--blue-bright);
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 22px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.service-card {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  border-radius: 22px;
  border: none;
  background: #2a2a2a;
  color: #fff;
  cursor: pointer;
  isolation: isolate;
}

.service-card:nth-child(1) {
  grid-column: span 4;
  min-height: 420px;
}

.service-card:nth-child(2) {
  grid-column: span 2;
  min-height: 420px;
}

.service-card:nth-child(n + 3) {
  grid-column: span 2;
}

.service-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: contain;
  object-position: center center;
  background: #2a2a2a;
  transition: filter 0.45s ease;
}

.service-copy {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 24px 24px;
  background: transparent;
  pointer-events: none;
}

.service-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.5);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.service-copy h3,
.service-copy p {
  position: relative;
  z-index: 1;
}

.service-copy h3 {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 28px);
  color: #fff;
  opacity: 0.92;
  transition: opacity 0.35s ease;
}

.service-copy p {
  margin: 10px 0 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(12px);
  color: #e8eef5;
  font-size: 15px;
  transition: max-height 0.45s ease, opacity 0.4s ease, transform 0.45s ease;
}

.service-card:hover img,
.service-card.is-open img,
.service-card:focus-visible img {
  filter: blur(8px);
}

.service-card:hover .service-copy::before,
.service-card.is-open .service-copy::before,
.service-card:focus-visible .service-copy::before {
  opacity: 1;
}

.service-card:hover .service-copy h3,
.service-card.is-open .service-copy h3,
.service-card:focus-visible .service-copy h3 {
  opacity: 1;
}

.service-card:hover .service-copy p,
.service-card.is-open .service-copy p,
.service-card:focus-visible .service-copy p {
  max-height: 180px;
  opacity: 1;
  transform: none;
}

.gallery-page {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 72px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 10px;
}

.gallery a {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #111;
  min-height: 0;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
  filter: saturate(1.05);
}

.gallery a:hover img {
  transform: scale(1.06);
  filter: saturate(1.15) brightness(1.04);
}

.gallery .g-hero {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery .g-tall {
  grid-row: span 2;
}

.gallery .g-wide {
  grid-column: span 2;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 16px;
}

label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  background: var(--input);
  border: 1px solid var(--stroke);
  color: var(--text);
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: 1px solid var(--blue-bright);
  border-color: var(--blue-bright);
  background: var(--bg-card);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  margin-bottom: 16px;
}

.coords p {
  margin: 8px 0 20px;
}

.map {
  margin-top: 16px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 280px;
}

.map iframe {
  width: 100%;
  height: 320px;
  border: 0;
}

.site-footer {
  border-top: 1px solid var(--stroke);
  padding: 28px 0;
  color: var(--muted);
  background: var(--footer);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.footer-inner a:hover {
  color: var(--blue);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.reveal:nth-child(2) {
  transition-delay: 0.08s;
}

.reveal:nth-child(3) {
  transition-delay: 0.16s;
}

.reveal:nth-child(4) {
  transition-delay: 0.24s;
}

.reveal:nth-child(5) {
  transition-delay: 0.32s;
}

.form-status {
  min-height: 1.4em;
  margin-top: 10px;
  color: var(--blue);
}

.form-status[data-state="error"] {
  color: #b42318;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 18, 0.9);
  display: grid;
  place-items: center;
  z-index: 80;
  padding: 24px;
  cursor: zoom-out;
  backdrop-filter: blur(10px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(1100px, 100%);
  max-height: 90vh;
  object-fit: contain;
}

@keyframes kenburns {
  from {
    transform: scale(1) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.12) translate3d(-2%, -1%, 0);
  }
}

@keyframes floatcard {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .header-inner {
    min-height: 84px;
  }

  .logo img {
    height: 62px;
  }

  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 84px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--stroke);
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .service-card,
  .service-card:nth-child(1),
  .service-card:nth-child(2),
  .service-card:nth-child(n + 3) {
    grid-column: span 6;
    min-height: 300px;
  }

  .nav.open {
    display: flex;
  }

  .split,
  .contact-grid,
  .form-row,
  .stats {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }

  .gallery .g-hero,
  .gallery .g-wide,
  .gallery .g-tall {
    grid-column: span 2;
    grid-row: span 2;
  }

  .hero-card {
    padding: 32px 20px;
    animation: none;
  }

  section {
    padding: 56px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-bg,
  .hero-card,
  .reveal,
  .card,
  .gallery img,
  .btn,
  .service-card img,
  .service-copy,
  .service-copy::before,
  .service-copy h3,
  .service-copy p {
    animation: none !important;
    transition: none !important;
  }

  .service-card img {
    filter: none;
  }

  .service-copy::before {
    opacity: 1;
  }

  .service-copy h3,
  .service-copy p {
    max-height: none;
    opacity: 1;
    transform: none;
  }

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