:root {
  --bg: #0f1113;
  --bg-2: #15191d;
  --panel: #1a1f24;
  --panel-2: #20262c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f5f7;
  --muted: #a7b0b8;
  --accent: #d6a24a;
  --accent-2: #f0c36b;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --max: 1200px;
  --transition: 220ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 40px 40px, 40px 40px, auto;
  color: var(--text);
  overflow-x: hidden;
}

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

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

.site-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, transparent 0, transparent calc(25% - 1px), rgba(255,255,255,0.03) calc(25% - 1px), rgba(255,255,255,0.03) 25%, transparent 25%, transparent calc(50% - 1px), rgba(255,255,255,0.03) calc(50% - 1px), rgba(255,255,255,0.03) 50%, transparent 50%, transparent calc(75% - 1px), rgba(255,255,255,0.03) calc(75% - 1px), rgba(255,255,255,0.03) 75%, transparent 75%);
  opacity: 0.4;
  z-index: 0;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(15, 17, 19, 0.82);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.logo-mark {
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, var(--accent), #8d6a2b);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.18);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.logo-text strong {
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.logo-text span {
  font-size: 0.76rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.nav-links a {
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  width: 52px;
  height: 52px;
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  transition: var(--transition);
}

.hero,
.section {
  position: relative;
  z-index: 1;
}

.hero {
  padding: 80px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 42px;
  align-items: center;
}

.eyebrow,
.section-kicker {
  color: var(--accent-2);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.7rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  max-width: 10ch;
}

.hero-placeholder {
  max-width: 630px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  min-height: 52px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  font-weight: 700;
  transition: transform var(--transition), background var(--transition),
    border-color var(--transition), box-shadow var(--transition);
}

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

.btn-primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #141414;
  box-shadow: 0 8px 24px rgba(214, 162, 74, 0.22);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.stat-card {
  min-height: 84px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: end;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.stat-label {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.machine-frame {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)),
    linear-gradient(135deg, #171b20, #0d1013);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.machine-frame::before,
.machine-frame::after {
  content: "";
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.machine-frame::before {
  inset: 20px;
}

.machine-frame::after {
  inset: 52px;
}

.machine-panel {
  position: absolute;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01));
  animation: rigidPulse 4s infinite ease-in-out;
}

.panel-a {
  top: 18%;
  left: 12%;
  width: 28%;
  height: 20%;
}

.panel-b {
  top: 30%;
  right: 14%;
  width: 24%;
  height: 34%;
  animation-delay: 0.8s;
}

.panel-c {
  bottom: 16%;
  left: 24%;
  width: 42%;
  height: 18%;
  animation-delay: 1.4s;
}

.machine-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 112px;
  height: 112px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: linear-gradient(135deg, var(--accent), #8d6a2b);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow:
    0 0 0 18px rgba(255,255,255,0.03),
    0 0 0 42px rgba(255,255,255,0.02);
  animation: mechanicalRotate 8s infinite linear;
}

.scan-line {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(240, 195, 107, 0.06) 50%,
    transparent 100%
  );
  animation: scanMove 3.4s infinite linear;
}

.section {
  padding: 92px 0;
}

.section-dark {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)),
    var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.section-head p {
  color: var(--muted);
  line-height: 1.8;
  margin: 14px 0 0;
}

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

.service-card {
  position: relative;
  padding: 28px;
  min-height: 220px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform var(--transition), border-color var(--transition);
  overflow: hidden;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(240, 195, 107, 0.28);
}

.service-card h3 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  text-transform: uppercase;
}

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

.service-index {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--accent-2);
  margin-bottom: 18px;
}

.service-open {
  display: inline-block;
  margin-top: 20px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 34px;
  align-items: center;
}

.about-panels {
  display: grid;
  gap: 14px;
}

.about-card {
  padding: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.about-card h3 {
  margin: 0 0 10px;
  text-transform: uppercase;
  font-size: 1rem;
}

.about-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.blueprint-box {
  position: relative;
  min-height: 500px;
  border-radius: 24px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(180deg, #171b20, #101418);
  background-size: 28px 28px, 28px 28px, auto;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.bp-line,
.bp-square {
  position: absolute;
  border: 1px solid rgba(240, 195, 107, 0.3);
  animation: blueprintShift 4.5s infinite ease-in-out;
}

.line-1 {
  top: 18%;
  left: 10%;
  width: 70%;
  height: 0;
}

.line-2 {
  top: 45%;
  left: 22%;
  width: 56%;
  height: 0;
  animation-delay: 0.7s;
}

.line-3 {
  top: 70%;
  left: 16%;
  width: 62%;
  height: 0;
  animation-delay: 1.2s;
}

.sq-1 {
  top: 12%;
  left: 18%;
  width: 84px;
  height: 84px;
}

.sq-2 {
  top: 34%;
  right: 18%;
  width: 120px;
  height: 120px;
  animation-delay: 0.9s;
}

.sq-3 {
  bottom: 14%;
  left: 34%;
  width: 100px;
  height: 100px;
  animation-delay: 1.5s;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 18px;
}

.contact-card,
.contact-form {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow);
}

.contact-card {
  padding: 28px;
}

.contact-card h3 {
  margin-top: 0;
  text-transform: uppercase;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 18px;
}

.contact-list li {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.contact-list span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.contact-form {
  padding: 24px;
}

.form-row {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.form-row:first-child {
  grid-template-columns: 1fr 1fr;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #111519;
  color: var(--text);
  border-radius: 12px;
  padding: 15px 16px;
  outline: none;
  transition: border-color var(--transition), transform var(--transition);
}

textarea {
  min-height: 160px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: rgba(240, 195, 107, 0.45);
  transform: translateY(-1px);
}

.map-wrap {
  margin-top: 22px;
  height: 420px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--panel);
}

.footer {
  border-top: 1px solid var(--line);
  background: #0c0f12;
  position: relative;
  z-index: 1;
}

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

.footer p,
.footer a {
  color: var(--muted);
  margin: 0;
}

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

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.12s;
}

.delay-2 {
  transition-delay: 0.22s;
}

.delay-3 {
  transition-delay: 0.32s;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}

.gallery-modal.open {
  display: block;
}

.gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
}

.gallery-panel {
  position: relative;
  width: min(1200px, calc(100% - 24px));
  height: min(92vh, 900px);
  margin: 12px auto;
  background: linear-gradient(180deg, #1c2126, #12161a);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.gallery-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.gallery-top h3 {
  margin: 0;
  text-transform: uppercase;
}

.gallery-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gallery-action,
.gallery-close {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #f3f5f7;
  cursor: pointer;
  font-size: 1.1rem;
}

.gallery-viewer {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  gap: 16px;
  align-items: center;
}

.gallery-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    #0f1317;
  background-size: 24px 24px, 24px 24px, auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.gallery-stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-nav {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255,255,255,0.04);
  color: #f3f5f7;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: transform 220ms ease, background 220ms ease, border-color 220ms ease;
}

.gallery-nav:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.08);
  border-color: rgba(240, 195, 107, 0.28);
}

.gallery-thumbs {
  margin-top: 16px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 12px;
}

.gallery-thumb {
  height: 84px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0f1317;
  cursor: pointer;
  padding: 0;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 220ms ease;
}

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

.gallery-thumb.active {
  border-color: rgba(240, 195, 107, 0.55);
  box-shadow: 0 0 0 1px rgba(240, 195, 107, 0.35);
}

.gallery-modal.is-fullscreen .gallery-panel {
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  border-radius: 0;
  border: 0;
  padding: 18px;
}

.gallery-modal.is-fullscreen .gallery-stage {
  min-height: 0;
}

@media (max-width: 900px) {
  .gallery-viewer {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    gap: 10px;
  }

  .gallery-nav {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    font-size: 1.7rem;
  }
}

@media (max-width: 700px) {
  .gallery-panel {
    width: calc(100% - 12px);
    height: calc(100vh - 12px);
    margin: 6px auto;
    padding: 14px;
  }

  .gallery-top h3 {
    font-size: 1rem;
  }

  .gallery-viewer {
    grid-template-columns: 1fr;
    grid-template-areas:
      "stage"
      "controls";
  }

  .gallery-stage {
    min-height: 300px;
  }

  .gallery-prev,
  .gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
  }

  .gallery-prev {
    left: 20px;
  }

  .gallery-next {
    right: 20px;
  }
}



@keyframes mechanicalRotate {
  0% {
    transform: translate(-50%, -50%) rotate(45deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(405deg);
  }
}

@keyframes rigidPulse {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -4px, 0) scale(1.01);
  }
}

@keyframes blueprintShift {
  0%, 100% {
    transform: translate3d(0, 0, 0);
    opacity: 0.7;
  }
  50% {
    transform: translate3d(4px, -4px, 0);
    opacity: 1;
  }
}

@keyframes scanMove {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    flex-wrap: wrap;
    padding: 14px 0;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 10px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
  }

  .services-grid,
  .hero-stats,
  .form-row:first-child,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .section {
    padding: 72px 0;
  }

  .hero h1 {
    font-size: clamp(2rem, 12vw, 3.5rem);
  }

  .footer-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 18px 0;
  }

  .gallery-item img {
    height: 220px;
  }

  .map-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
}
