:root {
  --ink: #1a1030;
  --muted: #5f5766;
  --purple: #4b22aa;
  --purple-deep: #7b2cff;
  --cyan: #4fc3f7;
  --cyan-deep: #0284c7;
  --teal: #0284c7;
  --paper: #fdfcff;
  --soft: #f5f2ff;
  --cyan-soft: #eff8fe;
  --line: #e5ddf3;
  --white: #ffffff;

  /* Tokens semánticos */
  --success: #12603e;
  --success-bg: #eaf8f0;
  --success-line: #9ad8bb;
  --error: #8a1e1e;
  --error-bg: #fff0f0;
  --error-line: #f0b4b4;
  --ink-deep: #0a0510;

  font-family: "DM Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

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

p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1rem;
}

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

/* Focus visible accesible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============ Tipografía ============ */

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.2rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.15rem, 1.6vw, 1.3rem);
  font-weight: 600;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow.purple {
  color: var(--purple);
}

.lead {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.5;
}

/* ============ Header ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 8px clamp(20px, 5vw, 64px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand img {
  height: 38px;
  width: auto;
}

.nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  position: relative;
  padding: 12px 2px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 9px;
  height: 2px;
  background: var(--purple);
  border-radius: 2px;
  opacity: 0;
  transform: scaleX(0.6);
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav a.active,
.nav a:hover {
  color: var(--purple);
}

.nav a.active::after,
.nav a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-action,
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid var(--purple);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.header-action,
.button.primary {
  color: var(--white);
  background: var(--purple);
  border-color: var(--purple);
  box-shadow: 0 10px 22px rgba(112, 96, 248, 0.22);
}

.header-action:hover,
.button.primary:hover {
  background: var(--purple-deep);
  border-color: var(--purple-deep);
  transform: translateY(-1px);
}

.button.secondary {
  color: var(--purple-deep);
  background: var(--white);
}

.button.secondary:hover {
  background: var(--soft);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--purple-deep);
  font-weight: 600;
}

.text-link:hover {
  text-decoration: underline;
}

/* ============ Hero (home) ============ */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  padding: clamp(48px, 7vw, 96px) clamp(24px, 6vw, 72px);
  background: linear-gradient(160deg, var(--paper) 0%, var(--soft) 60%, var(--cyan-soft) 100%);
}

.hero-copy,
.page-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy h1,
.page-hero h1 {
  max-width: 720px;
  margin: 0;
}

.hero-copy p {
  max-width: 560px;
  font-size: 1.14rem;
  margin-top: 16px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-bottom: 18px;
  padding: 6px 14px;
  background: var(--cyan-soft);
  color: var(--cyan-deep);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.hero-badge svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 28px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(17, 7, 19, 0.08);
}

.hero-media img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

/* ============ Franja de confianza ============ */

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-strip article {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px clamp(20px, 4vw, 40px);
  background: var(--white);
}

.trust-strip svg {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--cyan-deep);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.trust-strip div {
  display: grid;
  gap: 2px;
}

.trust-strip strong {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
}

.trust-strip span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

/* ============ Layout general de sección ============ */

.section {
  padding: clamp(44px, 6vw, 82px) clamp(24px, 6vw, 72px);
}

.section h2,
.cta h2 {
  margin: 0;
}

.cta h2,
.site-footer h3 {
  color: var(--white);
}

.about-preview,
.history,
.mission-grid,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

.section-image,
.about-preview > img,
.history img,
.mission-grid img {
  width: 100%;
  min-height: 360px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px rgba(17, 7, 19, 0.08);
}

.lab-carousel {
  display: grid;
  min-height: 280px;
  gap: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  padding: 32px;
  box-shadow: 0 20px 40px rgba(17, 7, 19, 0.06);
  grid-template-rows: auto 1fr;
}

.lab-carousel-header {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: var(--soft);
  color: var(--purple);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lab-carousel-track {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lab-slide {
  display: grid;
  width: 100%;
  min-height: 180px;
  place-items: center;
  background: var(--white);
}

.lab-slide img {
  max-width: min(280px, 85%);
  height: auto;
}

.split {
  display: grid;
  gap: 34px;
  background: var(--cyan-soft);
}

.split > div:first-child {
  max-width: 760px;
}

/* ============ Grids ============ */

.product-grid,
.advantage-grid,
.testimonial-grid,
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 26px);
}

/* ============ Tarjetas de producto ============ */

.card,
.advantage-grid article,
.contact-panel,
.contact-form,
.testimonial-grid blockquote,
.mission-grid article,
.faq details,
.metrics article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  padding: 24px;
}

.card span,
.advantage-grid span,
.feature-row span,
.contact-panel > div > span {
  color: var(--purple);
  font-weight: 700;
}

.card h3,
.advantage-grid h3 {
  margin-top: 12px;
}

.card {
  display: grid;
  gap: 12px;
  align-content: start;
  transition: box-shadow 200ms ease, transform 200ms ease, border-color 200ms ease;
}

.card:hover {
  border-color: rgba(112, 96, 248, 0.4);
  box-shadow: 0 20px 40px rgba(17, 7, 19, 0.08);
  transform: translateY(-3px);
}

.card .card-media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  padding: 14px;
}

.card .card-media.is-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card .card-media.is-stock img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card .card-media img {
  border-radius: 4px;
}

.card p {
  margin-top: 0;
}

.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 30px clamp(24px, 6vw, 72px);
  background: var(--ink);
}

.metrics article {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.metrics strong {
  display: block;
  color: var(--cyan);
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.metrics span {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

.history {
  background: var(--white);
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
}

.history img {
  min-height: 0;
  height: clamp(260px, 30vw, 380px);
  align-self: center;
}

/* ============ Testimonios ============ */

.testimonials {
  background: var(--soft);
}

.testimonial-grid {
  margin-top: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

blockquote {
  position: relative;
  margin: 0;
  padding-top: 8px;
}

blockquote::before {
  content: "\201C";
  display: block;
  margin-bottom: 4px;
  color: var(--purple);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  font-family: Georgia, serif;
}

cite {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-style: normal;
  font-weight: 600;
  font-size: 0.9rem;
}

.band {
  background: linear-gradient(135deg, var(--cyan-soft), var(--soft));
}

.advantage-grid {
  margin-top: 32px;
}

/* ============ CTA ============ */

.cta {
  padding: clamp(48px, 6vw, 84px) clamp(24px, 6vw, 72px);
  color: var(--white);
  background: linear-gradient(135deg, var(--ink), var(--purple-deep) 120%);
}

.cta p,
.cta .eyebrow {
  color: #eef9ff;
}

/* ============ Heros internos (tipográficos) ============ */

.page-hero {
  padding: clamp(56px, 8vw, 104px) clamp(24px, 6vw, 72px);
  color: var(--ink);
  background: linear-gradient(160deg, var(--soft) 0%, var(--cyan-soft) 100%);
}

.page-hero p {
  max-width: 640px;
  margin-top: 14px;
  font-size: 1.1rem;
}

.page-hero .actions {
  margin-top: 24px;
}

.products-hero .eyebrow {
  color: var(--purple);
}

.mission-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--white);
}

.mission-grid img {
  grid-column: 1 / -1;
  max-height: 460px;
}

/* ============ FAQ ============ */

.faq {
  display: grid;
  gap: 14px;
  max-width: 980px;
}

summary {
  color: var(--ink);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* ============ Lista de productos (catálogo) ============ */

.product-list {
  display: grid;
  gap: 28px;
}

.feature-row {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  transition: box-shadow 200ms ease, border-color 200ms ease;
}

.feature-row:hover {
  border-color: rgba(112, 96, 248, 0.4);
  box-shadow: 0 20px 44px rgba(17, 7, 19, 0.07);
}

.feature-row .feature-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 260px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--white);
  overflow: hidden;
  padding: 12px;
}

.feature-row .feature-media.is-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feature-row .feature-media.is-stock img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

/* ============ Contacto ============ */

.contact-layout {
  align-items: start;
  background: var(--white);
}

.contact-panel {
  display: grid;
  gap: 22px;
}

.contact-panel div {
  display: grid;
  gap: 8px;
}

.contact-card-grid,
.social-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.contact-card,
.social-card {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--white);
  font-weight: 600;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

a.contact-card:hover,
.social-card:hover {
  border-color: rgba(112, 96, 248, 0.42);
  box-shadow: 0 12px 26px rgba(17, 7, 19, 0.1);
  transform: translateY(-2px);
  cursor: pointer;
}

.contact-card svg,
.social-card svg {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--purple);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.contact-card span {
  display: grid;
  min-width: 0;
  gap: 2px;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: var(--muted);
  font-weight: 500;
}

.contact-card strong {
  color: var(--ink);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-card.hours {
  cursor: default;
}

.social-card.facebook svg {
  fill: var(--purple);
  stroke: none;
}

.contact-panel h2,
.contact-form h2 {
  margin: 0;
}

/* ============ Formulario ============ */

.contact-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}

input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--ink);
  font: inherit;
  background: var(--paper);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(112, 96, 248, 0.15);
  outline: none;
}

textarea {
  resize: vertical;
}

select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f5766' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  cursor: pointer;
}

.form-note {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.form-note a {
  color: var(--purple-deep);
  font-weight: 600;
  text-decoration: underline;
}

.button {
  cursor: pointer;
  background: none;
}

.button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.hidden {
  display: none;
}

.form-feedback {
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 600;
  text-align: center;
}

.form-feedback.success {
  border: 1px solid var(--success-line);
  color: var(--success);
  background: var(--success-bg);
}

.form-feedback.error {
  border: 1px solid var(--error-line);
  color: var(--error);
  background: var(--error-bg);
}

.map-placeholder {
  position: relative;
  min-height: 360px;
  margin: 0 clamp(24px, 6vw, 72px) clamp(44px, 6vw, 82px);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(112, 96, 248, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(112, 96, 248, 0.08) 1px, transparent 1px),
    var(--soft);
  background-size: 42px 42px;
}

.map-placeholder iframe {
  width: 100%;
  height: 360px;
  border: 0;
}

.map-action {
  margin: -60px clamp(24px, 6vw, 72px) clamp(44px, 6vw, 82px);
}

/* ============ Footer ============ */

.site-footer {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.8fr) minmax(240px, 1.1fr);
  gap: clamp(32px, 5vw, 64px);
  padding: clamp(48px, 6vw, 72px) clamp(20px, 5vw, 64px) 28px;
  color: var(--white);
  background: var(--ink-deep);
}

.footer-brand img {
  width: 170px;
  margin-bottom: 14px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.68);
  max-width: 320px;
}

.footer-col h3 {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-links a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
  transition: color 160ms ease;
}

.footer-links a:hover {
  color: var(--cyan);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.footer-social {
  display: flex;
  gap: 14px;
  margin-top: 6px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.footer-social a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.footer-social a.facebook svg {
  fill: currentColor;
  stroke: none;
}

.footer-bottom {
  grid-column: 1 / -1;
  margin-top: clamp(24px, 4vw, 40px);
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.85rem;
  text-align: center;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.76);
  font-weight: 600;
  transition: color 160ms ease;
}

.footer-bottom a:hover {
  color: var(--cyan);
}

/* ============ Responsive ============ */

@media (max-width: 1020px) {
  .testimonial-grid,
  .feature-row {
    grid-template-columns: 1fr 1fr;
  }

  .feature-row .button {
    grid-column: 2;
    justify-self: start;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .advantage-grid,
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .site-header {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 10px clamp(16px, 5vw, 24px);
  }

  .brand img {
    height: 32px;
  }

  .nav {
    order: 3;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 16px;
  }

  .nav a {
    font-size: 0.85rem;
  }

  .header-action {
    min-height: 44px;
    margin-left: auto;
    padding: 0 16px;
    font-size: 0.85rem;
  }

  .site-footer,
  .footer-links {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: auto;
  }

  .hero,
  .split,
  .about-preview,
  .history,
  .mission-grid,
  .contact-layout,
  .feature-row {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-copy,
  .page-hero {
    padding: 0;
  }

  .page-hero {
    padding: clamp(38px, 10vw, 54px) clamp(18px, 6vw, 28px);
  }

  .product-grid,
  .advantage-grid,
  .testimonial-grid,
  .metrics {
    grid-template-columns: 1fr;
  }

  .feature-row .button {
    grid-column: auto;
  }
}
