/* ============================================
   CIBIEIT — Consultoría y Soporte IT
   Sistema de diseño con identidad de marca
   ============================================ */

/* ---------- Tipografía de marca: Metropolis ---------- */
@font-face {
  font-family: "Metropolis";
  src: url("../fonts/metropolis-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Metropolis";
  src: url("../fonts/metropolis-medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Metropolis";
  src: url("../fonts/metropolis-semibold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Metropolis";
  src: url("../fonts/metropolis-bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  /* Paleta exacta de marca Cibieit (extraída del logo) */
  --paper:      #F6F8FB;   /* fondo papel */
  --paper-line: #E4E9F1;   /* líneas de grilla suaves */
  --ink:        #152730;   /* tinta de marca (texto "Cibieit") */
  --ink-soft:   #556066;   /* texto secundario (gris de marca) */
  --blueprint:  #0056E2;   /* azul primario de marca — acento */
  --blueprint-d:#0043A9;   /* azul medio — hover */
  --blueprint-x:#00357F;   /* azul oscuro — detalles */
  --line:       #C9CFDA;   /* hairline */
  --white:      #FFFFFF;
  --accent:     #0056E2;   /* acento */

  /* Tipografía — Metropolis (marca) */
  --display: "Metropolis", system-ui, sans-serif;
  --body:    "Metropolis", system-ui, -apple-system, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* Escala */
  --maxw: 1180px;
  --gut: clamp(1.25rem, 4vw, 3rem);
  --radius: 2px;
}

/* ---------- Tema oscuro ---------- */
[data-theme="dark"] {
  --paper:      #0E1B24;   /* fondo oscuro de marca */
  --paper-line: #1C2C38;   /* líneas de grilla */
  --ink:        #EAF0F6;   /* texto claro */
  --ink-soft:   #93A3B2;   /* texto secundario */
  --blueprint:  #4D9BFF;   /* azul más luminoso para contraste */
  --blueprint-d:#6FB0FF;   /* hover */
  --blueprint-x:#A9CCFF;   /* detalles */
  --line:       #294150;   /* hairline */
  --white:      #152730;   /* "blanco" pasa a superficie oscura */
  --accent:     #4D9BFF;
}

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

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

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  /* grilla técnica de fondo */
  background-image:
    linear-gradient(var(--paper-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-line) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: -1px -1px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

img { max-width: 100%; display: block; }
a { color: var(--blueprint); text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blueprint);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--blueprint); display: inline-block; }

.lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-soft); max-width: 60ch; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,248,250,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 34px; width: auto; display: block; }
.brand .tick { width: 10px; height: 10px; border: 2px solid var(--blueprint); display: inline-block; }
.nav-links { display: flex; align-items: center; gap: 1.8rem; list-style: none; }
.nav-links a { color: var(--ink-soft); font-size: 0.95rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 1.2rem; }

.lang-switch { display: flex; align-items: center; gap: 0.25rem; border: 1px solid var(--line); border-radius: var(--radius); padding: 2px; }
.lang-switch a { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.32rem 0.5rem; border-radius: var(--radius); font-family: var(--mono); font-size: 0.74rem; color: var(--ink-soft); transition: background 0.2s, color 0.2s, box-shadow 0.2s; }
.lang-switch a:hover { color: var(--ink); background: rgba(0,86,226,0.06); }
.lang-switch a.active { color: var(--ink); background: rgba(0,86,226,0.08); box-shadow: 0 4px 14px rgba(0,86,226,0.22); font-weight: 600; }
[data-theme="dark"] .lang-switch a.active { background: rgba(77,155,255,0.12); box-shadow: 0 4px 14px rgba(77,155,255,0.28); }
[data-theme="dark"] .lang-switch a:hover { background: rgba(77,155,255,0.08); }
.lang-switch a .flag { width: 18px; height: 13px; border-radius: 1px; display: block; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(0,0,0,0.08); }
.lang-switch a .flag.globe { width: 16px; height: 16px; box-shadow: none; color: var(--ink-soft); }
.lang-switch a.active .flag.globe { color: var(--blueprint); }
.lang-switch a .flag svg { display: block; width: 100%; height: 100%; }
@media (max-width: 980px) { .lang-switch a .lang-code { display: none; } }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--body); font-weight: 600; font-size: 0.95rem;
  padding: 0.7rem 1.4rem; border-radius: var(--radius);
  background: var(--blueprint); color: var(--white);
  border: 1px solid var(--blueprint);
  transition: background 0.2s, transform 0.1s; cursor: pointer;
}
.btn:hover { background: var(--blueprint-d); border-color: var(--blueprint-d); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--white); border-color: var(--ink); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); display: block; transition: 0.3s; }

/* ---------- Hero ---------- */
.hero { padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(3rem, 8vw, 6rem); position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { margin: 1.2rem 0; }
.hero h1 .hl { color: var(--blueprint); }
.hero .lede { margin-bottom: 2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Panel técnico estilo "cajetín de plano" */
.titleblock {
  border: 1.5px solid var(--ink); background: var(--white);
  border-radius: var(--radius);
  font-family: var(--mono); font-size: 0.82rem;
  box-shadow: 6px 6px 0 rgba(11,31,58,0.06);
}
.titleblock-row { display: grid; grid-template-columns: auto 1fr; border-bottom: 1px solid var(--line); }
.titleblock-row:last-child { border-bottom: none; }
.titleblock-row .k { padding: 0.7rem 0.9rem; background: var(--paper); color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.68rem; border-right: 1px solid var(--line); white-space: nowrap; display: flex; align-items: center; }
.titleblock-row .v { padding: 0.7rem 0.9rem; color: var(--ink); display: flex; align-items: center; }
.titleblock .v strong { color: var(--blueprint); }

/* ---------- Secciones ---------- */
section { padding: clamp(3rem, 8vw, 6rem) 0; position: relative; }
.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head h2 { margin: 0.8rem 0; }

/* ---------- Servicios (cards) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card { background: var(--white); padding: 2rem 1.8rem; transition: background 0.25s; position: relative; }
.card:hover { background: #FBFCFE; }
.card .num { font-family: var(--mono); font-size: 0.75rem; color: var(--blueprint); letter-spacing: 0.1em; }
.card h3 { margin: 0.8rem 0 0.6rem; }
.card p { color: var(--ink-soft); font-size: 0.96rem; }
.card ul { list-style: none; margin-top: 1rem; }
.card ul li { font-size: 0.9rem; color: var(--ink-soft); padding-left: 1.2rem; position: relative; margin-bottom: 0.4rem; }
.card ul li::before { content: "—"; position: absolute; left: 0; color: var(--blueprint); }

/* ---------- AEC stack ---------- */
.stack-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.chip { font-family: var(--mono); font-size: 0.8rem; padding: 0.45rem 0.85rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.chip.on { border-color: var(--blueprint); color: var(--blueprint); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,5vw,4rem); align-items: start; }
.feature-list { list-style: none; }
.feature-list li { padding: 1.1rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: 1rem; }
.feature-list li:first-child { padding-top: 0; }
.feature-list .fnum { font-family: var(--mono); color: var(--blueprint); font-size: 0.85rem; }
.feature-list h4 { font-family: var(--display); font-size: 1.05rem; margin-bottom: 0.3rem; }
.feature-list p { font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- CTA band ---------- */
.cta-band { background: #152730; color: var(--white); border-radius: var(--radius); padding: clamp(2.5rem,6vw,4rem); text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(0,86,226,0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(0,86,226,0.12) 1px, transparent 1px); background-size: 28px 28px; }
.cta-band > * { position: relative; }
.cta-band h2 { color: #FFFFFF; margin-bottom: 1rem; }
.cta-band p { color: #AEBBD0; max-width: 50ch; margin: 0 auto 2rem; }
.cta-band .btn-ghost { color: #FFFFFF; border-color: rgba(255,255,255,0.3); background: transparent; }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: #FFFFFF; color: #FFFFFF; }

/* ---------- Formulario ---------- */
.form-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.8rem, 4vw, 2.6rem); box-shadow: 6px 6px 0 rgba(11,31,58,0.05); }
.field { margin-bottom: 1.3rem; }
.field label { display: block; font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); margin-bottom: 0.5rem; }
.field input, .field textarea { width: 100%; font-family: var(--body); font-size: 1rem; padding: 0.8rem 0.9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); transition: border-color 0.2s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blueprint); background: var(--white); }
.field textarea { resize: vertical; min-height: 120px; }
.form-msg { font-size: 0.9rem; padding: 0.8rem 1rem; border-radius: var(--radius); margin-top: 1rem; display: none; }
.form-msg.ok { display: block; background: #E7F2EA; color: #1B6B3A; border: 1px solid #B5DBC2; }
.form-msg.err { display: block; background: #FBEAEA; color: #A12B2B; border: 1px solid #E5B5B5; }

.contact-aside { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-item { display: flex; gap: 1rem; align-items: flex-start; }
.contact-item .ci-icon { width: 44px; height: 44px; flex-shrink: 0; border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--blueprint); background: var(--white); transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.contact-item .ci-icon svg { width: 22px; height: 22px; }
.contact-item:hover .ci-icon { border-color: var(--blueprint); transform: translateY(-2px); }
.contact-item .ci-k { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); margin-bottom: 0.2rem; }
.contact-item a, .contact-item span { font-size: 1.05rem; color: var(--ink); }
.contact-item a:hover { color: var(--blueprint); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--white); padding: 3rem 0 2rem; margin-top: 2rem; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2rem; align-items: flex-start; }
.footer-brand { max-width: 30ch; }
.footer-brand p { color: var(--ink-soft); font-size: 0.9rem; margin-top: 0.8rem; }
.footer-links { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-col h5 { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); margin-bottom: 0.9rem; }
.footer-col a { display: block; color: var(--ink); font-size: 0.92rem; margin-bottom: 0.5rem; }
.footer-col a:hover { color: var(--blueprint); }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--paper-line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.82rem; color: var(--ink-soft); font-family: var(--mono); }

/* ---------- Page hero (interior) ---------- */
.page-hero { padding: clamp(3rem,7vw,5rem) 0 clamp(2rem,4vw,3rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { margin: 1rem 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .nav-links { position: fixed; inset: 68px 0 auto 0; background: var(--paper); flex-direction: column; padding: 1.5rem var(--gut); gap: 1.2rem; border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform 0.3s; }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: flex; }
  .footer-grid { flex-direction: column; }
}

/* ============================================
   Secciones nuevas: respuesta rápida, proceso, planes
   ============================================ */

/* ---------- Franja de respuesta rápida ---------- */
.fast-band { background: var(--blueprint); color: var(--white); border-radius: var(--radius); padding: clamp(1.6rem,4vw,2.2rem) clamp(1.5rem,4vw,2.6rem); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; position: relative; overflow: hidden; }
.fast-band::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px); background-size: 24px 24px; }
.fast-band > * { position: relative; }
.fast-left { display: flex; align-items: center; gap: 1.2rem; }
.fast-clock { width: 52px; height: 52px; flex-shrink: 0; border: 2px solid rgba(255,255,255,0.5); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.fast-clock svg { width: 26px; height: 26px; }
.fast-text h3 { color: var(--white); font-size: clamp(1.15rem,2.5vw,1.5rem); margin-bottom: 0.2rem; }
.fast-text p { color: rgba(255,255,255,0.85); font-size: 0.95rem; }
.fast-band .btn-ghost { color: var(--white); border-color: rgba(255,255,255,0.4); white-space: nowrap; }
.fast-band .btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }

/* ---------- Proceso de trabajo (timeline) ---------- */
.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; counter-reset: step; }
.process-step { background: var(--white); padding: 1.8rem 1.6rem; position: relative; transition: background 0.25s; }
.process-step:hover { background: #FAFBFE; }
.process-step .step-n { font-family: var(--mono); font-size: 0.8rem; color: var(--blueprint); letter-spacing: 0.12em; display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; }
.process-step .step-n::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-size: 1.6rem; font-weight: 700; font-family: var(--display); color: var(--blueprint); opacity: 0.25; }
.process-step h4 { font-family: var(--display); font-size: 1.1rem; margin-bottom: 0.4rem; }
.process-step p { color: var(--ink-soft); font-size: 0.92rem; }

/* ---------- Planes / abonos ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; max-width: 760px; margin: 0 auto; }
.plan { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 1.8rem; display: flex; flex-direction: column; transition: border-color 0.25s, transform 0.2s, box-shadow 0.25s; }
.plan:hover { border-color: var(--blueprint); transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,86,226,0.08); }
.plan.featured { border-color: var(--blueprint); border-width: 1.5px; box-shadow: 6px 6px 0 rgba(0,86,226,0.06); }
.plan .plan-tag { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--blueprint); margin-bottom: 0.8rem; display: inline-block; }
.plan h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.plan .plan-desc { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 1.3rem; }
.plan ul { list-style: none; margin-bottom: 1.6rem; flex-grow: 1; }
.plan ul li { font-size: 0.92rem; color: var(--ink); padding-left: 1.6rem; position: relative; margin-bottom: 0.7rem; }
.plan ul li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 8px; height: 8px; border: 2px solid var(--blueprint); border-radius: 50%; }
.plan .btn { width: 100%; justify-content: center; }
.plan.featured .btn { background: var(--blueprint); }
.plans-note { text-align: center; font-size: 0.9rem; color: var(--ink-soft); margin-top: 1.8rem; font-family: var(--mono); }

/* ---------- FAQ (por si se usa luego) ---------- */
.faq-item { border-bottom: 1px solid var(--line); padding: 1.3rem 0; }
.faq-item h4 { font-family: var(--display); font-size: 1.08rem; margin-bottom: 0.5rem; }
.faq-item p { color: var(--ink-soft); font-size: 0.95rem; }

@media (max-width: 860px) {
  .fast-band { flex-direction: column; align-items: flex-start; }
}

/* ============================================
   Animaciones
   ============================================ */

/* Aparición al scroll */
[data-anim] { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1); will-change: opacity, transform; }
[data-anim].in { opacity: 1; transform: translateY(0); }
[data-anim="fade"] { transform: none; }
[data-anim="left"] { transform: translateX(-28px); }
[data-anim="left"].in { transform: translateX(0); }
[data-anim="scale"] { transform: scale(0.96); }
[data-anim="scale"].in { transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  [data-anim] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* Micro-interacciones reforzadas */
.card { transition: background 0.25s, transform 0.25s, box-shadow 0.25s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(21,39,48,0.07); z-index: 1; }
.chip { transition: border-color 0.2s, color 0.2s, transform 0.2s, background 0.2s; }
.chip:hover { transform: translateY(-2px); border-color: var(--blueprint); color: var(--blueprint); }
.btn { transition: background 0.2s, transform 0.12s, box-shadow 0.2s; }
.btn:hover { box-shadow: 0 6px 18px rgba(0,86,226,0.25); }
.feature-list li { transition: transform 0.2s; }
.feature-list li:hover { transform: translateX(4px); }
.process-step .step-n::before { transition: opacity 0.3s, transform 0.3s; }
.process-step:hover .step-n::before { opacity: 0.5; transform: scale(1.08); }

/* Isotipo animado del hero (red de nodos) */
.hero-network { width: 100%; height: auto; display: block; }
.hn-line { stroke: var(--blueprint); stroke-width: 2; opacity: 0; stroke-dasharray: 200; stroke-dashoffset: 200; animation: drawLine 1.2s ease forwards; }
.hn-node { fill: var(--blueprint); opacity: 0; transform-origin: center; animation: popNode 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards; }
.hn-node.alt { fill: var(--blueprint-x); }
.hn-ring { fill: none; stroke: var(--blueprint); stroke-width: 1.5; opacity: 0.18; }
.hn-pulse { fill: none; stroke: var(--blueprint); stroke-width: 2; opacity: 0; transform-origin: center; animation: pulse 3s ease-out infinite; }

@keyframes drawLine { to { opacity: 0.55; stroke-dashoffset: 0; } }
@keyframes popNode { to { opacity: 1; } }
@keyframes pulse { 0% { opacity: 0.5; transform: scale(0.4); } 100% { opacity: 0; transform: scale(1.4); } }

/* Float sutil para el cajetín y visuales */
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.float-soft { animation: floatY 5s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .hn-line, .hn-node, .hn-pulse, .float-soft { animation: none !important; opacity: 1 !important; stroke-dashoffset: 0 !important; }
  .hn-line { opacity: 0.55 !important; }
}

/* Íconos de servicio (gráficos vectoriales propios) */
.card-icon { width: 44px; height: 44px; margin-bottom: 0.4rem; color: var(--blueprint); }
.card-icon svg { width: 100%; height: 100%; }
.card:hover .card-icon { color: var(--blueprint-d); }
.ci-stroke { stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ci-dot { fill: currentColor; }

/* ---------- Hero: escena cinematográfica con zoom a terminal ---------- */
.hero-stage { position: relative; width: 100%; aspect-ratio: 640 / 520; border-radius: 10px; overflow: hidden; border: 1px solid rgba(77,155,255,0.22); box-shadow: 0 24px 50px rgba(0,0,0,0.35); background: #0E1B24; }

/* Capa de la escena (dashboard de monitoreo IT) */
.hero-scene { position: absolute; inset: 0; z-index: 1; }
.hero-scene-svg { width: 100%; height: 100%; display: block; }

/* fondo de código: aparece y se desplaza muy lento */
.code-bg { opacity: 0; animation: codeIn 1s ease 0.1s forwards, codeDrift 24s linear infinite; }
@keyframes codeIn { to { opacity: 1; } }
@keyframes codeDrift { 0% { transform: translateY(0); } 100% { transform: translateY(-16px); } }

/* panel principal: aparece */
.panel-main { opacity: 0; transform: translateY(14px); animation: panelIn 0.7s cubic-bezier(0.22,1,0.36,1) 0.3s forwards; }
@keyframes panelIn { to { opacity: 1; transform: translateY(0); } }

/* dot ONLINE pulsa */
.pulse-dot { animation: pulseDot 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulseDot { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* filas de servicios + métricas: aparecen de a una */
.svc-row, .uptime-block, .metric-card, .ping-line { opacity: 0; transform: translateX(-12px); }
.svc-row[data-i="1"]    { animation: rowIn 0.45s ease 0.8s forwards; }
.svc-row[data-i="2"]    { animation: rowIn 0.45s ease 0.95s forwards; }
.svc-row[data-i="3"]    { animation: rowIn 0.45s ease 1.1s forwards; }
.svc-row[data-i="4"]    { animation: rowIn 0.45s ease 1.25s forwards; }
.uptime-block[data-i="5"] { animation: rowIn 0.45s ease 1.45s forwards; }
.metric-card[data-i="6"]  { animation: cardIn 0.5s cubic-bezier(0.34,1.56,0.64,1) 1.7s forwards; }
.metric-card[data-i="7"]  { animation: cardIn 0.5s cubic-bezier(0.34,1.56,0.64,1) 1.85s forwards; }
.metric-card[data-i="8"]  { animation: cardIn 0.5s cubic-bezier(0.34,1.56,0.64,1) 2.0s forwards; }
.ping-line[data-i="9"]    { animation: fadeIn 0.6s ease 2.2s forwards; }
@keyframes rowIn { to { opacity: 1; transform: translateX(0); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fadeIn { to { opacity: 0.9; transform: translateX(0); } }

/* barra de uptime se llena */
.uptime-bar { transform-box: fill-box; transform-origin: left center; transform: scaleX(0); animation: fillBar 1.4s cubic-bezier(0.22,1,0.36,1) 1.7s forwards; }
@keyframes fillBar { to { transform: scaleX(0.9998); } }

/* punto del ping recorre la línea */
.ping-dot { animation: pingMove 3.5s ease-in-out 2.6s infinite; }
@keyframes pingMove {
  0%   { transform: translate(-100px, -16px); opacity: 0; }
  10%  { opacity: 1; }
  50%  { transform: translate(60px, -28px); }
  90%  { opacity: 1; }
  100% { transform: translate(300px, -16px); opacity: 0; }
}

.hero-term { width: 100%; height: 100%; border-radius: 0; overflow: hidden; background: #0E1B24; border: none; box-shadow: none; font-family: var(--mono); display: flex; flex-direction: column; }
.term-bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 0.9rem; background: #152730; border-bottom: 1px solid rgba(255,255,255,0.06); flex-shrink: 0; }
.term-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.term-dot.r { background: #FF5F56; }
.term-dot.y { background: #FFBD2E; }
.term-dot.g { background: #27C93F; }
.term-title { margin-left: 0.6rem; font-size: 0.72rem; color: #6B7A85; letter-spacing: 0.04em; }
.term-body { padding: 1.1rem 1.2rem; font-size: 0.84rem; line-height: 1.75; flex-grow: 1; overflow: hidden; color: #C7D2DB; }
.term-line { white-space: pre-wrap; word-break: break-word; }
.tk-c { color: #6E8597; font-style: italic; }
.tk-p { color: #2EE6A6; }
.tk-k { color: #5AA6FF; font-weight: 600; }
.tk-x { color: #C7D2DB; }
.tk-g { color: #2EE6A6; }
.tk-n { color: #FFB454; }
.term-cursor { display: inline-block; width: 8px; height: 1.05em; background: #5AA6FF; vertical-align: text-bottom; margin-left: 2px; animation: termBlink 1s step-end infinite; }
@keyframes termBlink { 0%,50% { opacity: 1; } 50.01%,100% { opacity: 0; } }

/* Etiqueta inferior */
.hero-stage-badge { position: absolute; left: 14px; bottom: 12px; z-index: 3; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: #5AA6FF; display: flex; align-items: center; gap: 0.5rem; }
.hero-stage-badge .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #16C04F; box-shadow: 0 0 0 0 rgba(22,192,79,0.5); animation: liveDot 2s infinite; }
@keyframes liveDot { 0% { box-shadow: 0 0 0 0 rgba(22,192,79,0.5); } 70% { box-shadow: 0 0 0 8px rgba(22,192,79,0); } 100% { box-shadow: 0 0 0 0 rgba(22,192,79,0); } }

@media (prefers-reduced-motion: reduce) {
  .code-bg, .panel-main, .svc-row, .uptime-block, .metric-card, .ping-line { animation: none !important; opacity: 1 !important; transform: none !important; }
  .uptime-bar { animation: none !important; transform: scaleX(1) !important; }
  .pulse-dot, .ping-dot { animation: none !important; }
  .code-bg { opacity: 0.45 !important; }
}

/* ---------- Footer con íconos ---------- */
.footer-col a.with-icon { display: flex; align-items: center; gap: 0.6rem; }
.footer-col a.with-icon svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--blueprint); transition: transform 0.2s; }
.footer-col a.with-icon:hover svg { transform: translateX(2px); }

/* ============================================
   Ajustes específicos del tema oscuro
   ============================================ */
[data-theme="dark"] body { background-color: var(--paper); }

/* Header translúcido oscuro */
[data-theme="dark"] .site-header { background: rgba(14,27,36,0.85); }

/* La banda CTA ya es oscura; en dark le damos un tono distinto para que se separe */
[data-theme="dark"] .cta-band { background: #08131A; border: 1px solid var(--line); }
[data-theme="dark"] .cta-band h2 { color: #FFFFFF; }
[data-theme="dark"] .cta-band p { color: #AEBBD0; }
[data-theme="dark"] .cta-band .btn-ghost { color: #FFFFFF; border-color: rgba(255,255,255,0.35); }
[data-theme="dark"] .cta-band .btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: #FFFFFF; }

/* Tarjetas y superficies usan --white (que en dark es #152730) — ya cubierto.
   Reforzamos sombras más sutiles en oscuro */
[data-theme="dark"] .card:hover { box-shadow: 0 14px 30px rgba(0,0,0,0.35); }
[data-theme="dark"] .plan:hover { box-shadow: 0 12px 30px rgba(0,0,0,0.4); }
[data-theme="dark"] .form-wrap,
[data-theme="dark"] .titleblock { box-shadow: 0 8px 24px rgba(0,0,0,0.3); }

/* Logo: en oscuro usamos la versión blanca */
[data-theme="dark"] .brand img.logo-light { display: none; }
.brand img.logo-dark { display: none; }
[data-theme="dark"] .brand img.logo-dark { display: block; }

/* Inputs en oscuro */
[data-theme="dark"] .field input,
[data-theme="dark"] .field textarea { background: #0E1B24; color: var(--ink); }
[data-theme="dark"] .field input:focus,
[data-theme="dark"] .field textarea:focus { background: #0B161E; }

/* Lang switch e iconos contacto en oscuro */
[data-theme="dark"] .contact-item .ci-icon { background: var(--white); }

/* La terminal se mantiene oscura siempre (es una terminal), sin cambios */

/* Botón toggle de tema */
.theme-wrap { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.theme-toggle { background: none; border: 1px solid var(--line); border-radius: var(--radius); width: 38px; height: 32px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-soft); transition: color 0.2s, border-color 0.2s, background 0.2s; padding: 0; }
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-soft); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
.theme-label { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.04em; color: var(--ink-soft); text-transform: uppercase; white-space: nowrap; }
.theme-label .lbl-tolight { display: none; }
.theme-label .lbl-todark { display: inline; }
[data-theme="dark"] .theme-label .lbl-tolight { display: inline; }
[data-theme="dark"] .theme-label .lbl-todark { display: none; }
@media (max-width: 860px) { .theme-label { display: none; } }
