:root {
  --red: #e51a2f;
  --wine: #940731;
  --navy: #1a1449;
  --indigo: #242249;
  --black: #0a090e;
  --gray: #ebebeb;
  --text-muted: rgba(235, 235, 235, 0.68);
  --line: rgba(235, 235, 235, 0.12);
  --panel: rgba(36, 34, 73, 0.62);
  --max: 1180px;
  --header: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--gray);
  font-family: "Outfit", Arial, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.section {
  position: relative;
  padding: 112px 0;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--header);
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 28px;
  padding: 0 clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 9, 14, 0.72);
  backdrop-filter: blur(18px);
  transition: background 220ms ease, border-color 220ms ease;
}

.site-header.scrolled {
  background: rgba(10, 9, 14, 0.94);
  border-color: rgba(229, 26, 47, 0.28);
}

.brand img {
  width: 172px;
  height: 48px;
  object-fit: contain;
  object-position: center;
  border-radius: 4px;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 34px;
}

.nav-link {
  position: relative;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 180ms ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--red);
  transition: transform 180ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gray);
}

.nav-link.active::after,
.nav-link:hover::after {
  transform: scaleX(1);
}

.header-cta,
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  overflow: hidden;
}

.header-cta,
.btn-primary {
  background: var(--red);
  color: var(--gray);
  box-shadow: 0 18px 52px rgba(229, 26, 47, 0.22);
}

.header-cta::after,
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-top: 14px solid rgba(235, 235, 235, 0.28);
  border-left: 14px solid transparent;
}

.btn-secondary {
  border-color: rgba(235, 235, 235, 0.22);
  background: rgba(36, 34, 73, 0.38);
  color: var(--gray);
}

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

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(36, 34, 73, 0.4);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--gray);
  transition: transform 180ms ease, opacity 180ms ease;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header) + 70px);
  overflow: hidden;
}

.hero-bg,
.services::before,
.contact::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(235, 235, 235, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(235, 235, 235, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 70% 30%, rgba(229, 26, 47, 0.16), transparent 34%),
    linear-gradient(135deg, var(--navy), var(--black) 52%);
  background-size: 44px 44px, 44px 44px, auto, auto;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 64px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 7vw, 6.3rem);
  line-height: 0.93;
  font-weight: 800;
}

h2 {
  margin-bottom: 22px;
  font-size: clamp(2.1rem, 4vw, 4.4rem);
  line-height: 1;
  font-weight: 760;
}

h3 {
  font-size: 1.35rem;
  line-height: 1.18;
}

.hero-subtitle,
.about-content > p,
.contact-copy > p {
  max-width: 680px;
  color: var(--text-muted);
  font-size: 1.16rem;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 36px 0 44px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 720px;
  margin: 0;
}

.hero-metrics div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(36, 34, 73, 0.36);
}

.hero-metrics dt {
  margin-bottom: 6px;
  color: var(--gray);
  font-size: 1.6rem;
  font-weight: 800;
}

.hero-metrics dd {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.hero-visual {
  position: relative;
}

.machine-panel {
  position: relative;
  min-height: 560px;
  border: 1px solid rgba(235, 235, 235, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(36, 34, 73, 0.86), rgba(10, 9, 14, 0.92)),
    var(--indigo);
  overflow: hidden;
  isolation: isolate;
}

.machine-panel::before {
  content: "";
  position: absolute;
  inset: 32px;
  border: 1px solid rgba(235, 235, 235, 0.08);
  background-image: linear-gradient(45deg, transparent 49%, rgba(229, 26, 47, 0.18) 50%, transparent 51%);
  background-size: 28px 28px;
  clip-path: polygon(0 0, 88% 0, 100% 12%, 100% 100%, 12% 100%, 0 88%);
}

.machine-panel img {
  position: absolute;
  inset: 50%;
  width: min(82%, 560px);
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 38px 72px rgba(10, 9, 14, 0.55));
  z-index: 2;
}

.scan-line {
  position: absolute;
  left: 11%;
  right: 11%;
  top: 40%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  z-index: 3;
}

.spec {
  position: absolute;
  z-index: 4;
  padding: 8px 10px;
  border: 1px solid rgba(229, 26, 47, 0.32);
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.spec-a {
  top: 34px;
  left: 34px;
}

.spec-b {
  right: 34px;
  bottom: 34px;
}

.split,
.contact-grid {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 70px;
}

.section-heading {
  max-width: 760px;
}

.section-heading.centered {
  margin: 0 auto 54px;
  text-align: center;
}

.capabilities,
.service-grid {
  display: grid;
  gap: 18px;
}

.capabilities {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 36px;
}

.capabilities article,
.service-card,
.contact-form {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(36, 34, 73, 0.62), rgba(10, 9, 14, 0.78));
}

.capabilities article {
  padding: 24px;
}

.icon,
.service-icon {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 38px;
  margin-bottom: 22px;
  border-left: 2px solid var(--red);
  background: rgba(229, 26, 47, 0.1);
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.capabilities p,
.service-card p {
  color: var(--text-muted);
  line-height: 1.62;
}

.services {
  overflow: hidden;
}

.service-grid {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(4, 1fr);
}

.service-card {
  min-height: 308px;
  padding: 30px;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 2px solid transparent;
  border-radius: 8px;
  transition: border-color 220ms ease;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(229, 26, 47, 0.42);
  background: linear-gradient(145deg, rgba(36, 34, 73, 0.88), rgba(10, 9, 14, 0.9));
}

.service-card:hover::after {
  border-top-color: var(--red);
}

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

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--indigo);
}

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

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease, filter 220ms ease;
}

.gallery-item span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  color: var(--gray);
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(10, 9, 14, 0.82));
}

.gallery-item:hover img {
  transform: scale(1.05);
  filter: saturate(1.05);
}

.technical-tile {
  min-height: 230px;
  background:
    linear-gradient(rgba(235, 235, 235, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(235, 235, 235, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 70% 36%, rgba(229, 26, 47, 0.28), transparent 38%),
    linear-gradient(135deg, var(--navy), var(--black));
  background-size: 28px 28px, 28px 28px, auto, auto;
}

.contact {
  overflow: hidden;
}

.contact-grid {
  position: relative;
  z-index: 1;
  align-items: start;
}

.contact-lines {
  display: grid;
  gap: 12px;
  margin-top: 34px;
  color: var(--gray);
  font-weight: 700;
}

.contact-lines a {
  width: fit-content;
  border-bottom: 1px solid rgba(229, 26, 47, 0.65);
  padding-bottom: 4px;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 28px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--gray);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.contact-form .full {
  grid-column: 1 / -1;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(235, 235, 235, 0.16);
  border-radius: 8px;
  padding: 15px 16px;
  background: rgba(10, 9, 14, 0.62);
  color: var(--gray);
  outline: none;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--red);
  box-shadow: inset 3px 0 0 var(--red);
}

.contact-form .field-error input,
.contact-form .field-error textarea {
  border-color: var(--red);
}

.form-status {
  grid-column: 1 / -1;
  min-height: 24px;
  margin: 0;
  color: var(--text-muted);
}

.form-status.success {
  color: var(--gray);
}

.form-status.error {
  color: var(--red);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0;
  background: var(--black);
}

.footer-grid {
  display: grid;
  grid-template-columns: 180px 1fr auto auto;
  gap: 28px;
  align-items: center;
}

.footer-grid img {
  width: 164px;
  border-radius: 4px;
}

.footer-grid div {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-grid a,
.footer-grid p {
  color: var(--text-muted);
}

.footer-grid p {
  margin: 0;
}

.social-placeholders span {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(235, 235, 235, 0.24);
  border-radius: 8px;
  background: var(--red);
  color: var(--gray);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: 0 20px 48px rgba(229, 26, 47, 0.3);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(10, 9, 14, 0.92);
  backdrop-filter: blur(12px);
}

.lightbox.open {
  display: grid;
}

.lightbox img {
  max-height: 78vh;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.lightbox p {
  margin: 16px 0 0;
  color: var(--gray);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(36, 34, 73, 0.7);
  color: var(--gray);
  font-size: 2rem;
  cursor: pointer;
}
