:root {
  --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);
  --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);
}

*,
*::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;
}

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

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

.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: #fff;
  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: linear-gradient(180deg, rgba(236, 246, 255, 0.42), rgba(244, 249, 255, 0.58));
}

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

.hero-card {
  width: min(820px, calc(100% - 32px));
  padding: 52px 44px;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  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: #fff;
  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;
}

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

.flip {
  min-height: 320px;
  height: 320px;
  perspective: 1100px;
  cursor: pointer;
  outline: none;
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transform-style: preserve-3d;
}

.flip.is-flipped .flip-inner {
  transform: rotateY(180deg);
}

.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(21, 52, 89, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.flip-front {
  background: #fff;
}

.flip-front img {
  width: 148px;
  height: 148px;
  object-fit: cover;
  border-radius: 18px;
  background: #2d2d2c;
  margin-bottom: 16px;
}

.flip-front h3,
.flip-back h3 {
  margin: 0;
  font-size: 20px;
}

.flip-back {
  background: linear-gradient(180deg, #eef6ff, #ffffff);
  border-color: var(--blue-bright);
  transform: rotateY(180deg);
}

.flip-back p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
}

@media (hover: hover) and (pointer: fine) {
  .flip:hover .flip-inner,
  .flip:focus-visible .flip-inner {
    transform: rotateY(180deg);
  }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

.gallery a {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  min-height: 220px;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 220px;
  transition: transform 0.6s ease;
}

.gallery a:hover img {
  transform: scale(1.07);
}

.gallery .wide {
  grid-column: span 7;
}

.gallery .narrow {
  grid-column: span 5;
}

.gallery .full {
  grid-column: span 12;
}

.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: #f8fbfe;
  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: #fff;
}

.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: #fff;
  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);
}

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

.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: #fff;
    border-bottom: 1px solid var(--stroke);
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .nav.open {
    display: flex;
  }

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

  .gallery .wide,
  .gallery .narrow,
  .gallery .full {
    grid-column: span 12;
  }

  .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,
  .flip-inner {
    animation: none !important;
    transition: none !important;
  }

  .flip {
    height: auto;
    min-height: 0;
  }

  .flip-inner,
  .flip-back {
    transform: none !important;
  }

  .flip-face {
    position: relative;
    backface-visibility: visible;
  }

  .flip-back {
    margin-top: 8px;
  }

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