/* ============================================================
   Datcorp Software — styles.css
   CSS puro, sin framework. Mobile-first, tema oscuro profesional.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

/* ---------- Tokens de diseño ---------- */
:root {
  --bg:        #0b1020;
  --bg-alt:    #0f1630;
  --surface:   #141c38;
  --surface-2: #1b2545;
  --border:    #26315a;
  --text:      #e8ecf7;
  --muted:     #a6b0cf;
  --accent:    #5b8cff;
  --accent-2:  #8b5cf6;
  --accent-3:  #22d3ee;
  --ok:        #34d399;
  --shadow:    0 20px 50px -20px rgba(0, 0, 0, .6);
  --radius:    16px;
  --radius-sm: 10px;
  --maxw:      1120px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset / estilos base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

h1, h2, h3, h4, h5 { line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

.accent {
  background: linear-gradient(120deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent-3);
  margin-bottom: .6rem;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(91, 140, 255, .7);
}
.btn-primary:hover { box-shadow: 0 14px 36px -8px rgba(91, 140, 255, .85); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: #fff; }

.btn-block { width: 100%; }

.link-arrow {
  color: var(--accent);
  font-weight: 600;
  transition: gap .2s ease, color .2s ease;
}
.link-arrow:hover { color: var(--accent-3); }

/* ---------- Cabecera / navegación ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 16, 32, .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.15rem; }
.brand-mark {
  color: var(--accent);
  font-size: 1.1rem;
  filter: drop-shadow(0 0 10px rgba(91, 140, 255, .8));
}
.brand-sub { color: var(--muted); font-weight: 500; margin-left: .18rem; }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin: 0;
  padding: 0;
}
.nav-links a { color: var(--muted); font-size: .92rem; font-weight: 500; transition: color .2s ease; }
.nav-links a:hover { color: var(--text); }
.nav-links .nav-cta {
  color: #fff;
  padding: .5rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
}
.nav-links .nav-cta:hover { color: #fff; opacity: .92; }

/* Selector de idioma (ES / EN) — se muestra siempre, también en móvil */
.lang-switch {
  order: 3;
  margin-left: 1.15rem;
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.lang-btn {
  padding: .35rem .7rem;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--muted);
  transition: color .2s ease, background .2s ease;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.is-active {
  color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
}
.lang-btn:focus-visible { outline: 2px solid var(--accent-3); outline-offset: -2px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.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; padding: clamp(3rem, 8vw, 6rem) 0; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: -20% 40% auto -10%;
  height: 480px;
  background: radial-gradient(closest-side, rgba(91, 140, 255, .25), transparent);
  filter: blur(20px);
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.lead { color: var(--muted); font-size: 1.1rem; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 2rem; }

.hero-stats {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 1.4rem 0 0;
  border-top: 1px solid var(--border);
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong {
  font-size: 1.6rem;
  background: linear-gradient(120deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stats span { color: var(--muted); font-size: .85rem; }

/* Hero visual */
.hero-visual { position: relative; min-height: 320px; }
.orb {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: conic-gradient(from 90deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  filter: blur(30px);
  opacity: .5;
  animation: spin 18s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.glass-card {
  position: relative;
  background: linear-gradient(160deg, rgba(27, 37, 69, .85), rgba(20, 28, 56, .85));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.glass-row { display: flex; align-items: center; gap: .6rem; font-size: .9rem; margin-top: .8rem; color: var(--muted); }
.glass-row:first-child { margin-top: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.dot-2 { background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }
.dot-3 { background: var(--accent-3); box-shadow: 0 0 10px var(--accent-3); }
.glass-bar { height: 7px; background: var(--surface-2); border-radius: 999px; margin: .4rem 0 .2rem; overflow: hidden; }
.glass-bar i {
  display: block; height: 100%;
  width: var(--w, 50%);
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  border-radius: 999px;
}

/* ---------- Trust strip ---------- */
.trust { padding: 2rem 0; border-block: 1px solid var(--border); background: var(--bg-alt); }
.trust > .container { text-align: center; }
.trust p { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }
.trust-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }
.trust-badges span {
  padding: .45rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .85rem;
  color: var(--muted);
  background: var(--surface);
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin: 0 auto 2.6rem; text-align: center; }
.section-sub { color: var(--muted); font-size: 1.05rem; }

/* Tarjetas de líneas de negocio */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.biz-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.biz-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.biz-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  font-size: 1.5rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  margin-bottom: 1rem;
}
.biz-card p { color: var(--muted); }

/* Layouts a dos columnas */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split-reverse .split-copy { order: 2; }
.split-copy p.section-sub { margin-bottom: 1.4rem; }

.feature-list { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: .9rem; }
.feature-list li {
  position: relative;
  padding-left: 1.8rem;
  color: var(--muted);
}
.feature-list li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--ok);
  font-weight: 700;
}
.feature-list strong { color: var(--text); }

/* Diagrama de flujo del agente */
.flow {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
}
.flow-step {
  display: flex; align-items: center; gap: .8rem;
  padding: .9rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.flow-step > span:first-child {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff; font-size: .85rem; font-weight: 700;
  flex-shrink: 0;
}
.flow-step-ok > span:first-child { background: var(--ok); color: #06231a; }
.flow-line { width: 2px; height: 22px; margin-left: 2rem; background: var(--border); }

/* Stack de nube (IaaS · PaaS · SaaS) */
.cloud-stack {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.cloud-head {
  display: flex; align-items: center; gap: .9rem;
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}
.cloud-icon { font-size: 1.8rem; line-height: 1; }
.cloud-head strong { display: block; font-size: 1.05rem; }
.cloud-head div span { color: var(--muted); font-size: .85rem; }

.cloud-layer {
  position: relative;
  display: flex; align-items: center; gap: .9rem;
  padding: .85rem 1rem;
  margin-bottom: .6rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.cloud-layer::before {
  content: "";
  position: absolute; inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-3));
}
.cloud-layer p { margin: 0; color: var(--muted); font-size: .92rem; }
.cloud-tag {
  flex-shrink: 0;
  width: 62px;
  text-align: center;
  padding: .28rem 0;
  border-radius: 999px;
  font-size: .74rem; font-weight: 700; letter-spacing: .04em;
  color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
}
/* Aclaración: Datcorp asesora, no provee el servicio de nube */
.cloud-note {
  margin: 1rem 0 0;
  padding-left: .8rem;
  border-left: 2px solid var(--accent-3);
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.5;
}
.cloud-foot { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.cloud-foot span {
  padding: .3rem .8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .78rem;
  color: var(--muted);
}

/* Grilla de documentos eDocs */
.edocs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; margin: 0 0 1.6rem; }
.edocs-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .8rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
}
.edocs-item > span:first-child { font-size: 1.2rem; }

/* Factura de ejemplo */
.invoice-card {
  background: #fff;
  color: #1b2545;
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  max-width: 420px;
  margin-inline: auto;
}
.invoice-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.invoice-badge {
  background: #e7f8ef; color: #0f8a54;
  padding: .3rem .7rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700;
}
.invoice-num { font-size: .78rem; color: #64748b; font-variant-numeric: tabular-nums; }
.invoice-card h4 { color: #1b2545; margin-bottom: 1rem; }
.invoice-row { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px dashed #e2e8f0; font-size: .92rem; }
.invoice-row.muted { color: #64748b; }
.invoice-total { display: flex; justify-content: space-between; padding-top: .8rem; font-weight: 700; font-size: 1.05rem; }
.invoice-foot { margin-top: 1rem; font-size: .74rem; color: #94a3b8; text-align: center; }

/* Pasos del proceso */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.steps li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.steps p { color: var(--muted); margin: 0; font-size: .92rem; }
.step-num {
  font-size: 1.6rem; font-weight: 800;
  background: linear-gradient(120deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: .6rem;
}

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-list { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: .7rem; }
.contact-list a { color: var(--accent); }
.contact-list a:hover { color: var(--accent-3); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .4rem; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: .75rem .9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input::placeholder, .field textarea::placeholder { color: #6b7699; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, .25);
}
.field textarea { resize: vertical; }
.field.invalid input, .field.invalid select, .field.invalid textarea {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, .2);
}
.field-error { color: #f87171; font-size: .8rem; margin: .35rem 0 0; }

.form-note { margin: 1rem 0 0; font-size: .9rem; min-height: 1.2em; }
.form-note.ok  { color: var(--ok); }
.form-note.err { color: #f87171; }

/* ---------- Pie de página ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 3rem 0 1.6rem; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; }
.footer-brand p { color: var(--muted); font-size: .9rem; max-width: 36ch; margin-top: .8rem; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.footer-cols h5 { color: var(--text); margin-bottom: .8rem; font-size: .9rem; }
.footer-cols a { display: block; color: var(--muted); font-size: .9rem; padding: .2rem 0; transition: color .2s ease; }
.footer-cols a:hover { color: var(--accent); }
.footer-bottom { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .82rem; }

/* ---------- Aparición al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-links { gap: .9rem; }
  .nav-links a { font-size: .88rem; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; order: 4; }
  .lang-switch { margin-left: auto; margin-right: .4rem; }
  .nav-links {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: .5rem 20px 1.2rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav-links.open { max-height: 480px; }
  .nav-links a { padding: .8rem 0; border-bottom: 1px solid var(--border); }
  .nav-links .nav-cta { text-align: center; margin-top: .6rem; }

  .hero-inner,
  .split,
  .contact,
  .footer-inner { grid-template-columns: 1fr; }
  .split-reverse .split-copy { order: 0; }
  .cards-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hero-visual { min-height: 260px; }
}

@media (max-width: 480px) {
  .hero-stats { gap: 1.2rem; }
  .steps,
  .edocs-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
