:root {
  --blood: #B91C1C;
  --blood-light: #DC2626;
  --blood-deep: #7F1D1D;
  --void: #4a4a4a;
  --void-up: #525252;
  --void-surface: #505050;
  --void-edge: #606060;
  --bone: #EDE8E1;
  --bone-mid: #9C9690;
  --bone-dim: #636058;
}

::selection {
  background: var(--blood);
  color: white;
}

body {
  overflow-x: clip;
}

html {
  scroll-behavior: smooth;
}

.topbar {
  z-index: 60;
  transition: transform 0.35s ease;
}

.topbar.hidden-bar {
  transform: translateY(-100%);
}

.main-nav {
  top: 40px;
  transition: top 0.35s ease, background 0.35s;
}

.mobile-menu {
  top: 104px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.3s ease,
              top 0.35s ease;
}

.mobile-menu.menu-open {
  max-height: 500px;
  opacity: 1;
}

.mob-link-stagger {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu.menu-open .mob-link-stagger {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.menu-open .mob-link-stagger:nth-child(1) { transition-delay: 0.06s; }
.mobile-menu.menu-open .mob-link-stagger:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.menu-open .mob-link-stagger:nth-child(3) { transition-delay: 0.14s; }
.mobile-menu.menu-open .mob-link-stagger:nth-child(4) { transition-delay: 0.18s; }
.mobile-menu.menu-open .mob-link-stagger:nth-child(5) { transition-delay: 0.22s; }
.mobile-menu.menu-open .mob-link-stagger:nth-child(6) { transition-delay: 0.26s; }

.hero-section {
  padding-top: 104px;
  padding-bottom: 56px;
  min-height: 60vh;
  position: relative;
}

.hero-section .hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(74, 74, 74, 0.45);
  z-index: 1;
}

.hero-section > * {
  position: relative;
  z-index: 2;
}

.hero-stagger > * {
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-stagger > *:nth-child(1) { animation-delay: 0.15s; }
.hero-stagger > *:nth-child(2) { animation-delay: 0.3s; }
.hero-stagger > *:nth-child(3) { animation-delay: 0.45s; }
.hero-stagger > *:nth-child(4) { animation-delay: 0.6s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

.ticker {
  display: flex;
  animation: ticker 30s linear infinite;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.reveal-el {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1);
}

.reveal-el.shown {
  opacity: 1;
  transform: none;
}

.reveal-d1 { transition-delay: 0.12s; }
.reveal-d2 { transition-delay: 0.24s; }
.reveal-d3 { transition-delay: 0.36s; }

input:focus, textarea:focus {
  outline: none;
  border-color: var(--blood);
  box-shadow: 0 0 0 3px rgba(185,28,28,0.12);
}

.link-slide {
  position: relative;
  text-decoration: none;
}
.link-slide::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.3s;
}
.link-slide:hover::after { width: 100%; }

.svc-card {
  transition: border-color 0.3s, transform 0.3s;
}
.svc-card:hover {
  border-color: var(--blood);
  transform: translateY(-2px);
}

.hero-title {
  font-size: clamp(3.5rem, 10vw, 9rem);
  line-height: 0.88;
}

.section-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 0.95;
}

.ghost-text {
  font-size: clamp(3rem, 8vw, 7rem);
}

.ghost-ae-text {
  color: rgb(220, 38, 38);
}

.text-body-lg {
  line-height: 1.9;
}

.text-body-relaxed {
  line-height: 1.85;
}

.tracking-label {
  letter-spacing: 0.25em;
}

.tracking-wide-custom {
  letter-spacing: 0.2em;
}

.tracking-ticker {
  letter-spacing: 0.3em;
}

.border-subtle {
  border-color: rgba(255,255,255,0.15);
}

.border-medium {
  border-color: rgba(255,255,255,0.2);
}

.nav-bottom-line {
  background: none;
}

.hero-gradient {
  background: none;
}

.hero-line {
  background: none;
}

.sensor-bg {
  background: linear-gradient(145deg, #f0ece6, #e0dbd3);
}

.stat-gap {
  background: rgba(255,255,255,0.12);
}

#contact-form {
  max-width: 100%;
  overflow: hidden;
}

#contact-form .g-recaptcha {
  transform-origin: left center;
  max-width: 100%;
}

@media (max-width: 640px) {
  #contact-form {
    overflow-x: hidden;
  }
  .grid > div {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 400px) {
  #contact-form .g-recaptcha {
    transform: scale(0.85);
  }
}

@media (max-width: 340px) {
  #contact-form .g-recaptcha {
    transform: scale(0.75);
  }
}
