/* ============================================================
   IPxCloud — Sistema de diseño "Dark ejecutivo / Suits"
   Paleta primaria tomada de la tarjeta de presentación
   (degradado cian->azul del logo sobre el navy del wordmark)
   ============================================================ */

@font-face {
  font-family: "Actor";
  src: url("/assets/fonts/Actor-5831248588843b876ec16b53aabc7e23.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  /* Marca (tarjeta de presentación) */
  --brand-cyan: #23A9E4;
  --brand-cyan-bright: #34B0E8;
  --brand-blue: #1C74C2;
  --brand-blue-deep: #155AA8;
  --brand-navy: #14274C;

  /* Base dark ejecutiva (derivada del navy del wordmark) */
  --ipx-bg: #0A1430;
  --ipx-bg-2: #0E1C3C;
  --ipx-bg-3: #0C1733;
  --ipx-panel: rgba(255, 255, 255, 0.04);
  --ipx-panel-2: rgba(255, 255, 255, 0.06);
  --ipx-border: rgba(255, 255, 255, 0.09);
  --ipx-border-cyan: rgba(52, 176, 232, 0.30);

  /* Acentos */
  --ipx-gold: #C8A24B;
  --ipx-gold-2: #E2C173;

  /* Texto */
  --ipx-text: #E8ECF3;
  --ipx-text-muted: #9AA6BE;
  --ipx-text-dim: #6E7C97;

  /* Combinación primaria */
  --ipx-primary-grad: linear-gradient(135deg, #23A9E4, #155AA8);

  /* Tipografía */
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ipx-radius: 14px;
  --ipx-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.65);
}

/* --- Overrides de Bootstrap (tema oscuro de marca) --- */
[data-bs-theme="dark"] {
  --bs-body-bg: var(--ipx-bg);
  --bs-body-color: var(--ipx-text);
  --bs-body-font-family: var(--font-sans);
  --bs-emphasis-color: #fff;

  --bs-primary: #1C74C2;
  --bs-primary-rgb: 28, 116, 194;
  --bs-primary-text-emphasis: #8FC4EC;
  --bs-primary-bg-subtle: #0B1B33;
  --bs-primary-border-subtle: #154a7e;

  --bs-info: #23A9E4;
  --bs-info-rgb: 35, 169, 228;

  --bs-link-color: #34B0E8;
  --bs-link-color-rgb: 52, 176, 232;
  --bs-link-hover-color: #7CCBEE;
  --bs-border-color: var(--ipx-border);
  --bs-border-color-translucent: var(--ipx-border);
  --bs-focus-ring-color: rgba(35, 169, 228, 0.35);
}

/* ---------------- Base ---------------- */
body {
  background-color: var(--ipx-bg);
  color: var(--ipx-text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { max-width: 100%; }

h1, h2, h3, h4, h5, h6, .serif {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #F1F5FB;
}

p { color: var(--ipx-text-muted); }
a { text-decoration: none; }

::selection { background: rgba(35, 169, 228, 0.30); color: #fff; }

.text-cyan { color: var(--brand-cyan-bright) !important; }
.text-gold { color: var(--ipx-gold-2) !important; }
.text-muted-2 { color: var(--ipx-text-muted) !important; }

/* Capa de fondo atmosférica para secciones oscuras */
.bg-deep { background: var(--ipx-bg); }
.bg-deep-2 { background: var(--ipx-bg-2); }

/* ---------------- Eyebrow + títulos ---------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-sans);
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--brand-cyan-bright);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px;
  background: linear-gradient(90deg, var(--brand-cyan), transparent);
}
.eyebrow.gold { color: var(--ipx-gold-2); }
.eyebrow.gold::before { background: linear-gradient(90deg, var(--ipx-gold), transparent); }

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  line-height: 1.12; margin-bottom: 1rem;
}
.lead-2 {
  font-size: 1.06rem; line-height: 1.7; color: var(--ipx-text-muted);
  max-width: 46ch;
}

/* ---------------- Navbar ---------------- */
.ipx-nav {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(10, 18, 42, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--ipx-border);
}
.ipx-brand { display: inline-flex; align-items: center; gap: 0.55rem; }
.ipx-logo-mark { display: block; flex: 0 0 auto; }
.ipx-wordmark {
  font-family: var(--font-sans); font-weight: 600; font-size: 1.3rem;
  color: #EAF2FB; letter-spacing: -0.01em; line-height: 1;
}
.ipx-wordmark b { color: var(--brand-cyan-bright); font-weight: 600; }
.ipx-nav .nav-link {
  font-family: var(--font-sans); font-size: 0.92rem; font-weight: 500;
  color: var(--ipx-text-muted); padding: 0.4rem 0.9rem; position: relative;
  transition: color 0.2s ease;
}
.ipx-nav .nav-link:hover, .ipx-nav .nav-link:focus { color: #fff; }
.ipx-nav .nav-link::after {
  content: ""; position: absolute; left: 0.9rem; right: 0.9rem; bottom: 0.15rem;
  height: 1px; background: var(--brand-cyan); transform: scaleX(0);
  transform-origin: left; transition: transform 0.25s ease;
}
.ipx-nav .nav-link:hover::after { transform: scaleX(1); }
.ipx-social a { color: var(--ipx-text-muted); transition: color 0.2s ease; }
.ipx-social a:hover { color: var(--brand-cyan-bright); }

/* ---------------- Botones ---------------- */
.btn-brand {
  --bs-btn-color: #fff;
  background-image: var(--ipx-primary-grad);
  color: #fff; border: 0; font-weight: 500; letter-spacing: 0.2px;
  padding: 0.72rem 1.6rem; border-radius: 10px;
  box-shadow: 0 12px 30px -12px rgba(35, 169, 228, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-brand:hover {
  color: #fff; transform: translateY(-2px); filter: brightness(1.07);
  box-shadow: 0 18px 38px -12px rgba(35, 169, 228, 0.75);
}
.btn-outline-cyan {
  color: #AEE0F4; border: 1px solid var(--ipx-border-cyan);
  background: rgba(35, 169, 228, 0.04); font-weight: 500;
  padding: 0.72rem 1.6rem; border-radius: 10px;
  transition: all 0.2s ease;
}
.btn-outline-cyan:hover {
  color: #fff; border-color: var(--brand-cyan);
  background: rgba(35, 169, 228, 0.14); transform: translateY(-2px);
}
.btn-ghost {
  color: var(--ipx-text-muted); border: 1px solid var(--ipx-border);
  padding: 0.6rem 1.2rem; border-radius: 10px; font-weight: 500;
  transition: all 0.2s ease;
}
.btn-ghost:hover { color: #fff; border-color: var(--brand-cyan); }

/* ---------------- Glass cards ---------------- */
.ipx-glass {
  background: var(--ipx-panel);
  border: 1px solid var(--ipx-border);
  border-radius: var(--ipx-radius);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative; overflow: hidden;
}
.ipx-glass::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), transparent 40%);
}
.hover-lift { transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease; }
.hover-lift:hover {
  transform: translateY(-6px);
  border-color: var(--ipx-border-cyan);
  box-shadow: var(--ipx-shadow);
}

/* Marco "glass" para capturas de proyecto */
.ipx-frame {
  border-radius: var(--ipx-radius); overflow: hidden;
  border: 1px solid var(--ipx-border);
  box-shadow: var(--ipx-shadow);
  background: var(--ipx-bg-3);
}
.ipx-frame img { display: block; width: 100%; height: auto; }

/* ---------------- Hero + skyline ---------------- */
.hero {
  position: relative; overflow: hidden;
  min-height: clamp(560px, 84vh, 760px);
  display: flex; align-items: center;
  background: var(--ipx-bg);
}
.hero__scene {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.hero__scene svg { width: 100%; height: 100%; display: block; }
.hero__veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 18% 70%, rgba(10, 20, 48, 0.20), transparent 55%),
    linear-gradient(90deg, rgba(10, 20, 48, 0.92) 0%, rgba(10, 20, 48, 0.55) 42%, rgba(10, 20, 48, 0.10) 70%),
    linear-gradient(0deg, var(--ipx-bg) 2%, transparent 38%);
}
.hero__content { position: relative; z-index: 2; }
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4rem); line-height: 1.05;
  margin-bottom: 1.1rem; color: #EEF3FA;
}
.hero h1 em { font-style: italic; color: var(--brand-cyan-bright); font-weight: 600; }
.hero .lead {
  font-size: 1.12rem; line-height: 1.65; color: var(--ipx-text-muted);
  max-width: 30rem; margin-bottom: 2rem;
}
.hero__cues {
  position: absolute; left: 0; right: 0; bottom: 1.4rem; z-index: 2;
  text-align: center; color: var(--ipx-text-dim); font-size: 0.78rem; letter-spacing: 0.18em;
}

/* ---------------- Secciones ---------------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; position: relative; }
.section--alt { background: var(--ipx-bg-2); }
.hr-hair { height: 1px; border: 0; background: linear-gradient(90deg, transparent, var(--ipx-border-cyan), transparent); }
.hr-gold { height: 2px; width: 56px; border: 0; background: linear-gradient(90deg, var(--ipx-gold), var(--ipx-gold-2)); border-radius: 2px; }

/* Tarjetas de servicio */
.service-card { padding: 2rem 1.9rem; height: 100%; }
.service-icon {
  width: 54px; height: 54px; border-radius: 13px; display: flex;
  align-items: center; justify-content: center; margin-bottom: 1.2rem;
  background: rgba(35, 169, 228, 0.10);
  border: 1px solid var(--ipx-border-cyan); color: var(--brand-cyan-bright);
}
.service-card h3 { font-size: 1.3rem; margin-bottom: 1rem; }
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li {
  display: flex; gap: 0.7rem; align-items: flex-start; margin-bottom: 0.75rem;
  color: var(--ipx-text-muted); font-size: 0.96rem; line-height: 1.5;
}
.feature-list .tick {
  flex: 0 0 auto; margin-top: 0.15rem; color: var(--brand-cyan-bright);
}

/* Proyectos: tarjetas (casos de éxito) */
.case-card { display: block; height: 100%; color: inherit; }
.case-card .case-media { aspect-ratio: 16 / 10; overflow: hidden; }
.case-card .case-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.case-card:hover .case-media img { transform: scale(1.05); }
.case-card .case-body { padding: 1.5rem 1.6rem; }
.case-card h3 { font-size: 1.35rem; margin-bottom: 0.6rem; }
.case-card .more {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--brand-cyan-bright); font-weight: 500; font-size: 0.92rem; margin-top: 0.6rem;
}

/* Proyecto: filas alternadas */
.proj-row { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.proj-row h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1rem; }
.proj-points { list-style: none; padding: 0; margin: 0; }
.proj-points li {
  display: flex; gap: 0.7rem; margin-bottom: 0.7rem;
  color: var(--ipx-text-muted); line-height: 1.55;
}
.proj-points .tick { color: var(--brand-cyan-bright); flex: 0 0 auto; margin-top: 0.2rem; }

/* About / red */
.about-net { position: relative; }
.stat { font-family: var(--font-serif); font-size: 2.2rem; color: #fff; line-height: 1; }
.stat-label { color: var(--ipx-text-dim); font-size: 0.85rem; letter-spacing: 0.05em; }

/* CTA final */
.cta-band { position: relative; overflow: hidden; border-radius: 22px; padding: clamp(2.5rem, 6vw, 4rem); }
.cta-band__glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(80% 140% at 80% 20%, rgba(35, 169, 228, 0.20), transparent 60%);
}
.cta-band > * { position: relative; z-index: 1; }

/* ---------------- Formulario ---------------- */
.form-panel { padding: clamp(1.6rem, 4vw, 2.6rem); }
.form-label { color: var(--ipx-text); font-weight: 500; font-size: 0.92rem; }
.form-control {
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--ipx-border);
  color: var(--ipx-text); border-radius: 10px; padding: 0.7rem 0.9rem;
}
.form-control::placeholder { color: var(--ipx-text-dim); }
.form-control:focus {
  background: rgba(255, 255, 255, 0.05); color: var(--ipx-text);
  border-color: var(--brand-cyan); box-shadow: 0 0 0 0.2rem rgba(35, 169, 228, 0.18);
}

/* ---------------- Footer ---------------- */
.ipx-footer {
  background: var(--ipx-bg-2); border-top: 1px solid var(--ipx-border);
  padding: 3.5rem 0 2rem;
}
.ipx-footer a { color: var(--ipx-text-muted); transition: color 0.2s ease; }
.ipx-footer a:hover { color: var(--brand-cyan-bright); }
.ipx-footer .foot-brand { font-family: var(--font-sans); font-weight: 600; font-size: 1.4rem; color: #EAF2FB; letter-spacing: -0.01em; }
.ipx-footer .foot-brand b { color: var(--brand-cyan-bright); }
.ipx-footer a[href^="mailto"] { overflow-wrap: anywhere; }
.ipx-footer .copyright { color: var(--ipx-text-dim); font-size: 0.85rem; }

/* ---------------- 404 ---------------- */
.error-scene { position: relative; min-height: 70vh; display: flex; align-items: center; overflow: hidden; }
.error-scene__bg { position: absolute; inset: 0; z-index: 0; }
.error-scene__bg svg { width: 100%; height: 100%; }
.error-code { font-family: var(--font-serif); font-size: clamp(5rem, 18vw, 11rem); line-height: 1; color: #fff; }
.error-code span { color: var(--brand-cyan-bright); }

/* ---------------- Animaciones ---------------- */
@keyframes twinkle { from { opacity: 0.25; } to { opacity: 0.95; } }
@keyframes floaty { from { transform: translateY(0); } to { transform: translateY(-10px); } }
.tw { animation: twinkle 3.4s ease-in-out infinite alternate; }
.tw2 { animation: twinkle 2.4s ease-in-out 0.8s infinite alternate; }
.float { animation: floaty 6s ease-in-out infinite alternate; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .hover-lift:hover, .btn-brand:hover, .btn-outline-cyan:hover { transform: none; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 767.98px) {
  .hero__veil {
    background:
      linear-gradient(0deg, var(--ipx-bg) 8%, rgba(10, 20, 48, 0.55) 45%, rgba(10, 20, 48, 0.30) 100%);
  }
  .hero .lead { max-width: 100%; }
  .ipx-nav .nav-link { padding: 0.5rem 0.6rem; }
}

/* Anchos muy angostos (≤ 400px): evitar overflow horizontal */
@media (max-width: 400px) {
  .eyebrow { letter-spacing: 0.14em; font-size: 0.66rem; }
  .stat { font-size: 1.7rem; }
  .cta-band { border-radius: 16px; }
  .ipx-footer [class^="col-"] { word-break: break-word; }
}
