/* ============================================================
   ROTHAR SRL — Estilos del sitio
   Identidad web: azul petróleo oscuro + azul #2D7BF0 + blanco.
   (La carpeta comercial es blanca y sobria; el sitio es más vivo.)
   ============================================================ */

:root {
  --azul: #0B57C9;
  --azul-claro: #2D7BF0;
  --azul-brillante: #6EA8FF;
  --navy: #06182E;
  --navy-2: #0A2240;
  --tinta: #17181B;
  --gris: #45474C;
  --gris-suave: #96938C;
  --fondo: #FFFFFF;
  --fondo-alt: #F7F6F3;
  --borde: rgba(0, 0, 0, 0.14);
  --borde-claro: rgba(255, 255, 255, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: Arial, "Helvetica Neue", sans-serif;
  color: var(--tinta);
  background: var(--fondo);
  line-height: 1.5;
}

.mono {
  font-family: Consolas, "Courier New", monospace;
  letter-spacing: 0.2em;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Animación de aparición al scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 24, 46, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borde-claro);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; max-width: 1080px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand img { width: 38px; height: 38px; }
.brand .name { font-weight: 800; font-size: 1.15rem; letter-spacing: 0.08em; font-style: italic; }
.brand .tag { display: block; font-size: 0.58rem; letter-spacing: 0.3em; color: var(--azul-brillante); font-weight: 700; }

.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { text-decoration: none; color: rgba(255,255,255,0.82); font-size: 0.9rem; }
.nav-links a:hover { color: #fff; }

.btn-login {
  background: var(--azul-claro); color: #fff !important;
  padding: 9px 18px; border-radius: 999px;
  font-weight: 700; font-size: 0.82rem; letter-spacing: 0.12em;
  text-decoration: none;
}
.btn-login:hover { background: var(--azul-brillante); }

.menu-toggle { display: none; background: none; border: none; font-size: 1.6rem; color: #fff; cursor: pointer; }

/* ---------- Secciones ---------- */
section { padding: 78px 0; }
.kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.kicker .line { width: 40px; height: 1px; background: var(--azul); }
.kicker span { font-size: 0.72rem; color: var(--azul); font-weight: 700; }

h1 { font-size: clamp(2.5rem, 6.5vw, 4.4rem); line-height: 1.04; font-weight: 800; letter-spacing: -1px; }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -0.5px; }
.acento { color: var(--azul); }

/* ---------- HERO (oscuro, con fondo animado tipo plano técnico) ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 55%, #0D2B52 100%);
  color: #fff;
  padding: 0;
  overflow: hidden;
}
.hero-bg, .hero-video, .hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; pointer-events: none;
}
/* el técnico está a la derecha (~65%): al recortar en pantallas angostas, mantenerlo a la vista */
.hero-img { object-position: 65% center; }
.hero-bg svg { width: 100%; height: 100%; }
.hero-video { opacity: 0.28; }
.hero-bg { opacity: 0.5; }
.hero::after { /* capa oscura para que el texto siempre lea bien sobre la foto */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6,24,46,0.92) 0%, rgba(6,24,46,0.72) 45%, rgba(6,24,46,0.45) 100%),
    linear-gradient(0deg, rgba(6,24,46,0.85) 0%, rgba(6,24,46,0.2) 55%);
}
.hero-content {
  position: relative; z-index: 2;
  padding: 130px 24px 110px;
}
.hero .kicker span { color: var(--azul-brillante); }
.hero .kicker .line { background: var(--azul-brillante); }
.hero h1 .acento { color: var(--azul-brillante); }
.hero-titulo { font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.12; max-width: 800px; }
.hero p.sub { font-size: 1.18rem; color: rgba(255,255,255,0.78); margin-top: 24px; max-width: 580px; }
.hero p.sub b { color: #fff; }

/* Bloque de misión en "Sobre nosotros" */
.mision {
  margin-top: 28px; padding: 18px 22px;
  border-left: 3px solid var(--azul); background: var(--fondo-alt);
  border-radius: 0 10px 10px 0;
}
.mision-tag { display: block; font-size: 0.68rem; letter-spacing: 0.16em; color: var(--azul); font-weight: 700; margin-bottom: 8px; }
.mision p { margin: 0; color: var(--gris); }
.hero .cta-row { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-chips { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-chips span {
  font-size: 0.66rem; color: #9DC1FF; letter-spacing: 0.15em;
  border: 1px solid rgba(110, 168, 255, 0.45); border-radius: 999px; padding: 7px 15px;
}

.btn {
  display: inline-block; padding: 14px 28px; border-radius: 999px;
  font-weight: 700; font-size: 0.9rem; letter-spacing: 0.1em; text-decoration: none;
}
.btn-azul { background: var(--azul-claro); color: #fff; }
.btn-azul:hover { background: var(--azul-brillante); }
.btn-borde { border: 2px solid rgba(255,255,255,0.6); color: #fff; }
.btn-borde:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

/* líneas de circuito animadas del hero */
.flujo { stroke-dasharray: 10 14; animation: fluir 26s linear infinite; }
.flujo.lento { animation-duration: 40s; }
@keyframes fluir { to { stroke-dashoffset: -960; } }
.pulso { animation: pulsar 5.5s ease-in-out infinite; transform-origin: center; }
@keyframes pulsar { 0%, 100% { opacity: 0.16; } 50% { opacity: 0.42; } }

/* ---------- Stats (franja sobre el hero) ---------- */
.stats-band { background: var(--navy); border-top: 1px solid var(--borde-claro); position: relative; z-index: 2; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { padding: 30px 24px; border-right: 1px solid var(--borde-claro); }
.stat:last-child { border-right: none; }
.stat .n { font-size: 2.3rem; font-weight: 800; color: var(--azul-brillante); }
.stat .n small { font-size: 1.1rem; color: #fff; }
.stat .d { font-size: 0.68rem; color: rgba(255,255,255,0.55); margin-top: 6px; }

/* ---------- Quiénes somos (claro, con ilustración) ---------- */
.nosotros-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.nosotros p { color: var(--gris); margin-top: 16px; font-size: 1.02rem; }
.nosotros p b { color: var(--tinta); }
.ilustracion { border: 1px solid var(--borde); border-radius: 16px; overflow: hidden; background: var(--fondo-alt); }
.ilustracion svg { display: block; width: 100%; height: auto; }

/* ---------- Servicios (claro, con íconos) ---------- */
.servicios { background: var(--fondo-alt); }
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 36px; }
@media (min-width: 1000px) { .svc-grid { grid-template-columns: repeat(3, 1fr); } }
.svc {
  background: #fff; border: 1px solid var(--borde); border-radius: 14px;
  padding: 24px; display: flex; gap: 18px; align-items: flex-start;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.svc:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(11, 87, 201, 0.12); }
.svc .icono {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 12px;
  background: rgba(11, 87, 201, 0.08); display: flex; align-items: center; justify-content: center;
}
.svc .icono svg { width: 30px; height: 30px; stroke: var(--azul); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svc h3 { font-size: 1.02rem; font-weight: 700; }
.svc p { font-size: 0.87rem; color: var(--gris); margin-top: 6px; }
.badge {
  display: inline-block; background: var(--azul); color: #fff;
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.18em;
  padding: 3px 9px; border-radius: 6px; vertical-align: 2px; margin-left: 8px;
}

/* ---------- Destacados (oscuro) ---------- */
.destacados {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff; position: relative; overflow: hidden;
}
.destacados .kicker span { color: var(--azul-brillante); }
.destacados .kicker .line { background: var(--azul-brillante); }
.destacados h2 .acento { color: var(--azul-brillante); }
.card-destacado {
  background: rgba(255,255,255,0.05); border: 1px solid var(--borde-claro);
  border-radius: 16px; padding: 36px; margin-top: 26px;
  backdrop-filter: blur(2px);
}
.card-destacado h3 { font-size: 1.35rem; font-weight: 800; }
.card-destacado h3 .acento { color: var(--azul-brillante); }
.card-destacado .lead { color: rgba(255,255,255,0.72); margin-top: 10px; font-size: 0.98rem; }
.chips { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 0.72rem; font-weight: 700; color: var(--azul-brillante);
  border: 1px solid rgba(110, 168, 255, 0.55); border-radius: 999px; padding: 5px 13px;
}
.card-destacado ul { margin: 18px 0 0 20px; }
.card-destacado li { font-size: 0.92rem; color: rgba(255,255,255,0.75); margin-top: 8px; }
.card-destacado li b { color: #fff; }

/* ---------- Cómo llegar ---------- */
.mapa-box { margin-top: 30px; border: 1px solid var(--borde); border-radius: 16px; overflow: hidden; }
.mapa-box svg { display: block; width: 100%; height: auto; }

/* ---------- Contacto ---------- */
.contacto { background: var(--fondo-alt); }
.contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 36px; }
.crow { display: flex; border-bottom: 1px solid var(--borde); padding: 18px 0; }
.crow:first-child { border-top: 1px solid var(--borde); }
.crow .k { width: 130px; font-size: 0.72rem; color: var(--gris-suave); padding-top: 5px; }
.crow .v { font-size: 1.1rem; }
.crow .v a { color: var(--tinta); text-decoration: none; }
.crow .v a:hover { color: var(--azul); }
.crow .v.tbd { color: var(--gris-suave); font-style: italic; font-size: 0.95rem; }

.form-card { background: #fff; border: 1px solid var(--borde); border-radius: 16px; padding: 30px; }
.form-card label { display: block; font-size: 0.75rem; color: var(--gris); font-weight: 700; margin: 16px 0 6px; letter-spacing: 0.08em; }
.form-card label:first-child { margin-top: 0; }
.form-card input, .form-card textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--borde); border-radius: 8px;
  font-family: inherit; font-size: 0.95rem; background: var(--fondo);
}
.form-card input:focus, .form-card textarea:focus { outline: 2px solid var(--azul-claro); border-color: transparent; }
.form-card button { margin-top: 22px; width: 100%; border: none; cursor: pointer; }
.form-nota { font-size: 0.78rem; color: var(--gris-suave); margin-top: 12px; text-align: center; }

/* ---------- Footer ---------- */
footer { background: var(--navy); color: rgba(255,255,255,0.6); padding: 30px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
footer .mono { font-size: 0.7rem; }

/* ---------- Admin (login / panel) ---------- */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--fondo-alt); }
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card {
  width: 100%; max-width: 420px; background: #fff;
  border: 1px solid var(--borde); border-radius: 16px; padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}
.auth-card h1 { font-size: 1.5rem; letter-spacing: 0; }
.auth-card .desc { color: var(--gris); font-size: 0.9rem; margin-top: 8px; }
.aviso {
  background: #FFF6E5; border: 1px solid #E8C87A; color: #7A5A10;
  border-radius: 10px; padding: 12px 16px; font-size: 0.82rem; margin-top: 18px;
}
.aviso.error { background: #FDECEC; border-color: #E8A0A0; color: #8A1F1F; }
.aviso.ok { background: #EAF7EE; border-color: #9CD3AC; color: #1E6B34; }

.auth-page section { background: transparent; }
.panel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.mod { background: #fff; border: 1px solid var(--borde); border-radius: 14px; padding: 26px; }
.mod h3 { font-size: 1.05rem; }
.mod p { font-size: 0.85rem; color: var(--gris); margin-top: 8px; }
.mod .estado { display: inline-block; margin-top: 14px; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.15em; color: var(--gris-suave); border: 1px solid var(--borde); border-radius: 999px; padding: 4px 12px; }
.mod.activo .estado { color: var(--azul); border-color: var(--azul); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .svc-grid, .contacto-grid, .panel-grid, .nosotros-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--borde-claro); }
  .stat:last-child { border-bottom: none; }
  .hero-content { padding: 90px 24px 80px; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--navy); border-bottom: 1px solid var(--borde-claro);
    flex-direction: column; padding: 18px 24px; align-items: flex-start;
  }
  .nav-links.abierto { display: flex; }
  .menu-toggle { display: block; }
}

/* Respeto por usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
  .flujo, .pulso { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
