:root {
  --red: #c51224;
  --red-dark: #940f1d;
  --cream: #f7f1e7;
  --white: #ffffff;
  --text: #292929;
  --muted: #696969;
  --line: #e8e2dc;
  --shadow: 0 20px 50px rgba(78, 14, 22, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

h1, h2, h3 { font-family: "Playfair Display", serif; }
img { max-width: 100%; }
a { color: inherit; }

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid rgba(0,0,0,.07);
  backdrop-filter: blur(12px);
}

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

.brand img {
  width: 245px;
  height: 64px;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.main-nav {
  display: flex;
  gap: 24px;
}

.main-nav a {
  text-decoration: none;
  color: #222;
  font-weight: 600;
  font-size: .92rem;
}

.main-nav a:hover { color: var(--red); }

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
}

.hero {
  position: relative;
  min-height: 680px;
  display: flex;
  align-items: center;
  background: url("assets/portada-innova-lex.jpg") center/cover no-repeat;
  color: var(--white);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(80,0,10,.92) 0%, rgba(140,0,20,.75) 50%, rgba(197,18,36,.25) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  padding: 90px 0;
}

.eyebrow {
  display: inline-block;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 700;
  font-size: .78rem;
  margin-bottom: 14px;
}

.light { color: #ffe7bf; }

.hero h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 1.02;
  margin: 0 0 24px;
}

.hero p {
  font-size: 1.12rem;
  color: rgba(255,255,255,.88);
  max-width: 720px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin: 32px 0;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 14px 22px;
  border-radius: 7px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
}

.btn-primary:hover { background: var(--red-dark); }

.btn-secondary {
  border-color: rgba(255,255,255,.55);
  color: var(--white);
  background: rgba(255,255,255,.08);
}

.iso-badge {
  display: inline-flex;
  flex-direction: column;
  border-left: 4px solid #ffe7bf;
  padding: 8px 0 8px 16px;
  margin-top: 12px;
}

.iso-badge span { color: rgba(255,255,255,.8); }

.section { padding: 88px 0; }
.section-alt { background: var(--cream); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
}

.section h2,
.contact-section h2 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.15;
  margin: 0;
}

.section-copy p,
.section-heading p,
.service-card p,
.step p,
.cert-copy p {
  color: var(--muted);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 42px;
}

.cards, .steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.service-card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 15px;
  padding: 28px;
  box-shadow: 0 12px 35px rgba(95,10,20,.06);
}

.icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.service-card h3,
.step h3 { font-size: 1.4rem; }

.certification {
  background: linear-gradient(180deg, #fff, #fbf7f2);
}

.cert-grid {
  display: grid;
  grid-template-columns: 1fr .78fr;
  gap: 64px;
  align-items: center;
}

.cert-details {
  border-left: 4px solid var(--red);
  padding-left: 18px;
  margin-top: 28px;
}

.cert-details p {
  margin: 6px 0;
  color: #444;
}

.certificate-preview {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.certificate-preview img {
  display: block;
  max-height: 610px;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.certificate-preview span {
  display: block;
  margin-top: 12px;
  color: var(--red);
  font-weight: 700;
}

.step {
  padding-top: 20px;
  border-top: 2px solid var(--line);
}

.step span {
  color: var(--red);
  font-weight: 700;
}

.contact-section {
  background: linear-gradient(135deg, #780916, var(--red));
  color: var(--white);
  padding: 88px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

.contact-section h2 { color: var(--white); }
.contact-section > .container > div > p { color: rgba(255,255,255,.82); }

.contact-data { margin-top: 30px; }
.contact-data p { margin: 10px 0; }
.contact-data a { color: var(--white); }

.contact-form {
  background: var(--white);
  color: var(--text);
  border-radius: 15px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 16px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  margin-top: 7px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.full { width: 100%; }

.contact-form small {
  display: block;
  color: var(--muted);
  margin-top: 12px;
}

footer {
  background: #480610;
  color: rgba(255,255,255,.72);
  padding: 28px 0;
}

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

.footer-wrap strong { color: var(--white); }
.footer-wrap p { margin: 2px 0; }

.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  background: #25d366;
  color: white;
  text-decoration: none;
  padding: 13px 18px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,.86);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.modal.open { display: flex; }

.modal img {
  max-height: 92vh;
  max-width: 92vw;
  object-fit: contain;
}

.modal-close {
  position: fixed;
  right: 24px;
  top: 18px;
  color: #fff;
  background: transparent;
  border: 0;
  font-size: 3rem;
  cursor: pointer;
}

@media (max-width: 850px) {
  .hero { min-height: 620px; }
  .hero-overlay {
    background: linear-gradient(90deg, rgba(90,0,12,.94), rgba(170,0,24,.72));
  }

  .two-col,
  .contact-grid,
  .cert-grid,
  .cards,
  .steps {
    grid-template-columns: 1fr;
  }

  .menu-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: 82px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 22px;
    border-bottom: 1px solid var(--line);
  }

  .main-nav.open { display: flex; }
  .brand img { width: 205px; }
  .footer-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}
