/* ==========================================================================
   ZAITA SAS · Portal corporativo
   Paleta inspirada en el logo de OTC (azules y verdes territoriales)
   ========================================================================== */

:root {
  --navy: #0b2559;
  --navy-2: #123a7e;
  --blue: #1557d6;
  --blue-2: #1ea7f5;
  --green: #f57c00;
  --lime: #ffb020;
  --orange: #ff8a00;
  --orange-2: #ff4f1f;
  --ink: #0f1b2d;
  --muted: #5b6a80;
  --line: #e4eaf3;
  --bg: #ffffff;
  --bg-soft: #f5f8fc;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(10, 31, 68, .12);
  --shadow-sm: 0 6px 18px rgba(10, 31, 68, .08);
  --grad: linear-gradient(135deg, var(--blue) 0%, var(--blue-2) 100%);
  --grad-warm: linear-gradient(135deg, #ffc247 0%, var(--orange) 50%, var(--orange-2) 100%);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy); }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: min(100% - 40px, var(--max)); margin-inline: auto; }
.skip-link {
  position: absolute; left: -9999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100;
}
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .85em 1.5em; border-radius: 999px; font-weight: 700; font-size: .98rem;
  border: 2px solid transparent; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s;
  text-decoration: none; font-family: inherit;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary {
  background: var(--grad-warm); border-color: #ff8a00; color: #fff;
  box-shadow: 0 10px 24px rgba(255, 138, 0, .35);
}
.btn-primary:hover {
  border-color: var(--orange-2); box-shadow: 0 14px 30px rgba(255, 79, 31, .4);
  filter: saturate(1.08) brightness(1.03); color: #fff;
}
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-ghost-dark { color: var(--navy); border-color: var(--navy); }
.btn-ghost-dark:hover { background: var(--navy); color: #fff; }
.btn-small {
  padding: .55em 1.1em; font-size: .9rem; background: var(--grad-warm);
  border-color: #ff8a00; color: #fff;
}
.btn-small:hover {
  color: #fff; border-color: var(--orange-2);
  background: linear-gradient(135deg, #ff9a1f, #ed4a18);
  filter: none; box-shadow: 0 8px 18px rgba(255, 79, 31, .28);
}
.btn-block { width: 100%; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); }
.brand:hover { text-decoration: none; }
.brand-logo { height: 42px; width: auto; flex: 0 0 auto; }
.brand-logo-light { background: #fff; border-radius: 10px; padding: 4px; height: 46px; }
  background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--line); max-width: 250px; margin-bottom: 26px;
}
.brand-showcase img { width: 100%; height: auto; }
.brand-text { font-weight: 900; font-size: 1.35rem; letter-spacing: .08em; line-height: 1; }
.brand-text small {
  display: block; font-size: .62rem; letter-spacing: .32em; color: var(--green); font-weight: 700; margin-top: 3px;
}
.brand-light .brand-text { color: #fff; }


.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  color: var(--navy); font-weight: 600; font-size: .95rem; padding: .5em .85em; border-radius: 999px;
  transition: background .2s, color .2s;
}
.main-nav a:hover { background: var(--bg-soft); text-decoration: none; }
.main-nav a.nav-highlight {
  color: var(--blue); background: rgba(11, 95, 214, .08);
}
.main-nav a.nav-highlight:hover { background: rgba(11, 95, 214, .16); }
.main-nav .btn-small:hover { background: linear-gradient(135deg, #ff9a1f, #ed4a18); }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: var(--bg-soft); border-radius: 12px; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 600px at 85% -10%, #1a6fd1 0%, transparent 60%),
              linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 55%, #1d4f9e 100%);
  padding: clamp(70px, 10vw, 120px) 0 clamp(90px, 12vw, 140px);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: float 14s ease-in-out infinite; }
.blob-1 { width: 420px; height: 420px; background: var(--blue-2); top: -120px; right: -80px; }
.blob-2 { width: 380px; height: 380px; background: var(--green); bottom: -160px; left: -100px; animation-delay: -6s; }
.grid-overlay {
  position: absolute; inset: 0; opacity: .12;
  background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
@keyframes float { 0%,100% { transform: translate(0,0); } 50% { transform: translate(30px,-24px); } }

.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; }
.hero .lead { color: rgba(255,255,255,.85); font-size: 1.15rem; max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hl-cyan { color: #7cd4ff; }
.hl-orange { color: #ffa726; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--lime); background: rgba(255,176,32,.14); border: 1px solid rgba(255,176,32,.4);
  padding: .4em .9em; border-radius: 999px; margin-bottom: 18px;
}
.eyebrow-green { color: #d95f00; background: rgba(255,138,0,.1); border-color: rgba(255,138,0,.35); }

/* Dispositivo ilustrativo */
.hero-visual { position: relative; display: flex; justify-content: center; }
.device {
  width: min(330px, 80vw); aspect-ratio: 9/18.5; border-radius: 40px; padding: 14px;
  background: linear-gradient(160deg, #1d2b44, #05101f);
  box-shadow: 0 40px 80px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.08);
  transform: rotate(-4deg); transition: transform .5s;
}
.hero-visual:hover .device { transform: rotate(0deg) translateY(-6px); }
.device-screen {
  height: 100%; border-radius: 28px; background: #f6fff9; position: relative; overflow: hidden;
}
.device-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.pin-dot {
  position: absolute; left: 12%; top: 62%; width: 14px; height: 14px; border-radius: 50%; margin: -7px 0 0 -7px;
  background: #e88a00; border: 2px solid #fff; box-shadow: 0 0 0 0 rgba(232,138,0,.6); animation: pulse 2s infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(232,138,0,.6);} 70% { box-shadow: 0 0 0 14px rgba(232,138,0,0);} 100% { box-shadow: 0 0 0 0 rgba(232,138,0,0);} }


.float-badge {
  position: absolute; background: #fff; color: var(--navy); font-weight: 700; font-size: .9rem;
  padding: .6em 1em; border-radius: 14px; box-shadow: var(--shadow); animation: float 9s ease-in-out infinite;
}
.fb-1 { top: 74%; left: -6px; }
.fb-2 { bottom: 12%; right: 0; animation-delay: -4s; }


/* ---------- Botón volver al inicio ---------- */
.back-to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 50; width: 52px; height: 52px; border: 0; border-radius: 16px;
  background: var(--grad-warm); color: #fff; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 12px 28px rgba(245,124,0,.35);
  opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, box-shadow .2s;
}
.back-to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { box-shadow: 0 16px 34px rgba(245,124,0,.5); }
.back-to-top:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .back-to-top { transition: none; } }


/* ---------- Cifras ---------- */
.stats-band { background: #fff; position: relative; margin-top: -56px; z-index: 2; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.stat { padding: 28px 22px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-size: 2.4rem; font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: .92rem; }

/* ---------- Secciones ---------- */
.section { padding: clamp(70px, 9vw, 110px) 0; }
.section-alt { background: var(--bg-soft); }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.section-head-light h2 { color: #fff; }
.section-head-light p { color: rgba(255,255,255,.75); }
.section-head .eyebrow { margin-inline: auto; }

/* ---------- Producto OTC ---------- */
.product { background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%); }
.product-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: center; }
.product-media { position: relative; }
.product-logo-card {
  background: linear-gradient(145deg, #fff 20%, #f0f8ff 100%); border-radius: 28px; padding: 32px; box-shadow: var(--shadow);
  border: 1px solid var(--line); transition: transform .4s;
}
.product-logo-card:hover { transform: translateY(-6px) rotate(-1deg); }
.product-logo-card img { width: 100%; max-height: 520px; height: auto; object-fit: contain; border-radius: 16px; }
.product-badge {
  position: absolute; top: -14px; left: 24px; background: var(--grad-warm); color: #fff; font-weight: 800;
  font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; padding: .5em 1em; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.product-copy .lead { color: var(--muted); font-size: 1.08rem; }
.product-copy strong { color: var(--navy); }
.feature-list { list-style: none; padding: 0; margin: 26px 0 30px; display: grid; gap: 14px; }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; }
.feature-list li > div { color: var(--ink); }
.check {
  flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  color: #fff; background: var(--green); font-size: .9rem; margin-top: 2px;
}

/* ---------- Pasos ---------- */
.steps-section { background: #fff; }
.steps {
  list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: s;
}
.step {
  position: relative; background: var(--bg-soft); border-radius: var(--radius); padding: 30px 26px;
  border: 1px solid var(--line); transition: transform .3s, box-shadow .3s, background .3s;
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow); background: #fff; }
.step-num {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px;
  background: var(--grad); color: #fff; font-weight: 900; margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.step p { color: var(--muted); margin: 0; }

/* ---------- Tarjetas ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px;
  transition: transform .3s, box-shadow .3s, border-color .3s; position: relative; overflow: hidden;
}
.card::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--grad);
  transform: scaleX(0); transform-origin: left; transition: transform .4s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::after { transform: scaleX(1); }
.card-icon {
  width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; font-size: 1.7rem;
  background: rgba(11,95,214,.08); margin-bottom: 18px;
}
.card p { color: var(--muted); margin: 0; }

/* ---------- Nosotros ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-copy p { color: var(--muted); font-size: 1.06rem; }
.values { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.value {
  background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm);
  display: flex; gap: 14px; align-items: flex-start; transition: transform .3s;
}
.value:hover { transform: translateY(-4px); }
.value > span { font-size: 1.6rem; }
.value h4 { margin: 0 0 4px; font-size: 1.02rem; }
.value p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Tecnología ---------- */
.tech {
  color: #fff; background: radial-gradient(900px 400px at 10% 0%, rgba(11,95,214,.5), transparent 70%),
              linear-gradient(160deg, var(--navy) 0%, #0d3380 100%);
}
.tech-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.tech-pills span {
  padding: .6em 1.2em; border-radius: 999px; color: #fff; font-weight: 600;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  transition: background .25s, transform .25s;
}
.tech-pills span:hover { background: rgba(255,176,32,.2); transform: translateY(-3px); }
.ai-capabilities {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 34px;
}
.ai-capabilities article {
  padding: 28px; border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.ai-capabilities h3 { color: #fff; }
.ai-capabilities p { color: rgba(255,255,255,.75); margin: 0; }
.ai-icon {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 18px;
  border-radius: 14px; color: var(--navy); background: var(--grad-warm); font-size: 1.4rem; font-weight: 900;
  box-shadow: 0 10px 24px rgba(255,138,0,.22);
}

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-copy p { color: var(--muted); font-size: 1.06rem; }
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.contact-list li { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--navy); }
.contact-list li > span {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-soft);
}
.contact-form {
  background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 34px; box-shadow: var(--shadow);
}
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--navy); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); padding: .8em 1em; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--bg-soft); transition: border-color .2s, background .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: #fff; }
.field.invalid input, .field.invalid textarea { border-color: #d64545; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 14px 0 0; font-weight: 600; min-height: 1.4em; text-align: center; }
.form-status.ok { color: #1f9d55; }
.form-status.error { color: #c63636; }

/* ---------- Pie ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.75); padding-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-note { margin-top: 14px; color: rgba(255,255,255,.65); max-width: 320px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.site-footer nav a, .site-footer > .container a {
  display: block; color: rgba(255,255,255,.75); margin-bottom: 8px; text-decoration: none;
}
.site-footer nav a:hover, .site-footer > .container a:hover { color: var(--lime); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding: 22px 0; font-size: .88rem; color: rgba(255,255,255,.55);
}

/* ---------- Revelado al desplazar ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .product-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 20px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .ai-capabilities { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: #fff; padding: 12px 20px 20px; gap: 4px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm); transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .25s, transform .25s;
  }
  .main-nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .main-nav a { padding: .85em 1em; }
  .main-nav .btn-small { text-align: center; margin-top: 8px; }
  .steps, .cards, .values { grid-template-columns: 1fr; }
  .contact-form { padding: 24px; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat { padding: 20px 12px; }
  .stat b { font-size: 1.9rem; }
  .float-badge { font-size: .78rem; }
  .fb-2 { right: 6px; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
