/* ============================================================
   Biobell — hoja de estilos
   Paleta minimalista y futurista, una sola tipografía,
   líneas finas, microanimaciones suaves.
   ============================================================ */

:root {
  /* Paleta */
  --bg: #fafafa;
  --bg-soft: #f2f4f6;          /* tono muy suave derivado del azul del logo */
  --text: #0a0a0a;
  --text-muted: #525252;
  --line: #e5e5e5;
  --line-strong: #d4d4d4;
  --accent: #6fb7b7;            /* cian apagado */
  --accent-soft: rgba(111, 183, 183, 0.12);

  /* Tipografía */
  --font: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --max-w: 1200px;
  --pad-x: clamp(20px, 5vw, 64px);

  /* Animaciones */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 180ms;
  --t-med: 360ms;
  --t-slow: 700ms;
}

/* ============================================================
   Reset suave
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

/* ============================================================
   Grid sutil de fondo (apenas perceptible)
   ============================================================ */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(10, 10, 10, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10, 10, 10, 0.035) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 80%);
}

/* Contenido por encima del grid */
main,
.nav,
.footer {
  position: relative;
  z-index: 1;
}

/* ============================================================
   Navegación
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad-x);
  background: rgba(250, 250, 250, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-med) var(--ease),
              background var(--t-med) var(--ease);
}

.nav.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(250, 250, 250, 0.92);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

/* Logo oficial de Biobell — altura controlada, opacidad sutil en hover */
.nav-logo-img {
  height: 26px;
  width: auto;
  display: block;
  transition: opacity var(--t-fast) var(--ease),
              transform var(--t-med) var(--ease);
}

.nav-logo:hover .nav-logo-img {
  opacity: 0.85;
  transform: scale(1.02);
}

.nav-links {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 400;
}

.nav-links a {
  position: relative;
  color: var(--text-muted);
  transition: color var(--t-fast) var(--ease);
}

/* El :not(.nav-cta) evita que esta regla pelee con .nav-cta:hover,
   que necesita poder pintar el texto en blanco al pasar el mouse. */
.nav-links a:not(.nav-cta):hover {
  color: var(--text);
}

/* Subrayado fino animado */
.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med) var(--ease);
}

.nav-links a:not(.nav-cta):hover::after {
  transform: scaleX(1);
}

.nav-cta {
  padding: 8px 16px;
  border: 1px solid var(--text);
  border-radius: 999px;
  color: var(--text);
  transition: background var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}

.nav-cta:hover {
  background: var(--text);
  color: #ffffff;
}

/* En mobile escondemos los enlaces secundarios, solo dejamos el CTA */
@media (max-width: 640px) {
  .nav-links a:not(.nav-cta) {
    display: none;
  }
}

/* ============================================================
   Botones
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: #1a1a1a;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--text);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px var(--pad-x) 80px;
  text-align: center;
}

.hero-inner {
  max-width: 880px;
  margin: 0 auto;
}

.hero-eyebrow {
  margin: 0 0 28px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-title {
  margin: 0 0 24px;
  font-size: clamp(64px, 14vw, 180px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.03em;
  /* Pequeño shimmer estilo "metal frío" muy sutil */
  background: linear-gradient(180deg, #0a0a0a 0%, #2a2a2a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Subtítulo del título: actúa como "categoría" del laboratorio,
   debajo del nombre Biobell y antes del tagline descriptivo. */
.hero-subtitle {
  margin: 0 0 32px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-tagline {
  margin: 0 auto 20px;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 400;
  color: var(--text);
  max-width: 640px;
}

.hero-sub {
  margin: 0 auto 40px;
  font-size: 16px;
  color: var(--text-muted);
  max-width: 560px;
}

.hero-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* Indicador de scroll discreto */
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, transparent, var(--line-strong));
  position: relative;
  overflow: hidden;
}

.hero-scroll-line::after {
  content: "";
  position: absolute;
  top: -50%;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--text);
  animation: scrollPulse 2.4s var(--ease) infinite;
}

@keyframes scrollPulse {
  0%   { transform: translateY(0);    opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translateY(300%); opacity: 0; }
}

/* ============================================================
   Secciones genéricas
   ============================================================ */
.section {
  padding: 140px var(--pad-x);
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Sección con fondo claro: ocupa el ancho completo, pero el contenido
   vive dentro de .section-wrap para mantener la misma "rejilla" visual
   que las secciones regulares (max-width 1200 + padding lateral). */
.section-soft {
  background: var(--bg-soft);
  max-width: none;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}

.section-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.section-head {
  max-width: 720px;
  margin-bottom: 72px;
}

.section-eyebrow {
  margin: 0 0 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  margin: 0;
  font-size: clamp(28px, 4.4vw, 48px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 20px 0 0;
  font-size: 17px;
  color: var(--text-muted);
}

/* ============================================================
   Cards de servicios
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;                       /* la "línea" entre cards = fondo */
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.card {
  position: relative;
  background: var(--bg);
  padding: 40px 32px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background var(--t-med) var(--ease);
}

.card::before {
  /* Línea fina superior con color de acento que crece en hover */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 1px;
  width: 0;
  background: var(--accent);
  transition: width var(--t-slow) var(--ease);
}

.card:hover {
  background: #ffffff;
}

.card:hover::before {
  width: 100%;
}

.card-index {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 500;
}

.card-title {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.card-text {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   Timeline (proceso)
   ============================================================ */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
}

/* Línea horizontal continua que cruza los 4 pasos */
.timeline::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line-strong);
}

.timeline-step {
  position: relative;
  padding-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--text);
  transition: background var(--t-med) var(--ease),
              transform var(--t-med) var(--ease);
}

.timeline-step:hover .timeline-dot {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.15);
}

.timeline-index {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  font-weight: 500;
}

.timeline-title {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.timeline-text {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Timeline vertical en mobile */
@media (max-width: 820px) {
  .timeline {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .timeline::before {
    top: 0;
    left: 7px;
    right: auto;
    bottom: 0;
    width: 1px;
    height: auto;
  }
  .timeline-step {
    padding-top: 0;
    padding-left: 36px;
  }
  .timeline-dot {
    top: 6px;
  }
}

/* ============================================================
   Sobre Biobell
   ============================================================ */
.about {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-copy .section-eyebrow,
.about-copy .section-title {
  /* mismas reglas que .section-head */
}

.about-copy .section-title {
  margin-bottom: 32px;
}

.about-text {
  margin: 0 0 16px;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
}

.about-text strong {
  color: var(--text);
  font-weight: 500;
}

.about-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.fact {
  padding: 24px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 110px;
  transition: background var(--t-fast) var(--ease);
}

.fact:hover {
  background: var(--accent-soft);
}

.fact-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.fact-value {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}

@media (max-width: 880px) {
  .about {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* ============================================================
   Contacto
   ============================================================ */
.contact {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: start;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field input,
.field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  padding: 12px 0;
  font-size: 16px;
  color: var(--text);
  resize: vertical;
  transition: border-color var(--t-fast) var(--ease);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #a3a3a3;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--text);
}

.form-submit {
  align-self: flex-start;
  margin-top: 8px;
}

.form-note {
  margin: 0;
  font-size: 13px;
  color: var(--accent);
  min-height: 1.2em;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}

.contact-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-value {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  transition: color var(--t-fast) var(--ease);
}

a.contact-value:hover {
  color: var(--accent);
}

@media (max-width: 880px) {
  .contact {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  padding: 32px var(--pad-x);
  background: var(--bg);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.footer-logo {
  height: 20px;
  width: auto;
  display: block;
  transition: opacity var(--t-fast) var(--ease);
}

.footer-brand:hover .footer-logo {
  opacity: 0.8;
}

/* ============================================================
   Microanimaciones de scroll (fade-in + lift)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 800ms var(--ease),
              transform 800ms var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger: pequeño delay incremental cuando hay varios reveal hermanos */
.reveal:nth-child(2)  { transition-delay: 60ms; }
.reveal:nth-child(3)  { transition-delay: 120ms; }
.reveal:nth-child(4)  { transition-delay: 180ms; }
.reveal:nth-child(5)  { transition-delay: 240ms; }

/* Respetar usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   Selección de texto
   ============================================================ */
::selection {
  background: var(--accent);
  color: var(--bg);
}
