/* Estilo compartido de xorbim.com — misma identidad que CDE Platform y BIMSIDE:
   azul marino #16325B (primario), naranja #E55302 (acento, solo íconos, bordes
   y detalles), naranja oscuro #B84302 para fondos con texto blanco (contraste AA),
   Montserrat y tema claro. */

:root {
  --primary: #16325B;
  --primary-dark: #0E2240;
  --primary-soft: #4A6A99;
  --accent: #E55302;
  --accent-strong: #B84302;
  --fg: #16325B;
  --text: #33465F;
  --muted: #5B6B80;
  --bg: #FFFFFF;
  --bg-soft: #F3F6FA;
  --scene: #E6ECF4;
  --border: #D6DEE9;
  --green: #2E7D32;
  --yellow: #F9A825;
  --red: #C62828;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(22, 50, 91, .06), 0 8px 24px rgba(22, 50, 91, .08);
  --shadow-lg: 0 2px 4px rgba(22, 50, 91, .06), 0 20px 48px rgba(22, 50, 91, .14);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-strong); }
strong { color: var(--fg); font-weight: 600; }
h1, h2, h3, h4 { color: var(--fg); line-height: 1.2; font-weight: 700; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--primary);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 760px; }

/* ── Barra superior ───────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .bar { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--primary); font-weight: 800; font-size: 18px; letter-spacing: .5px; }
.brand svg { width: 30px; height: 30px; flex-shrink: 0; }
.brand small { display: block; font-size: 10px; font-weight: 600; letter-spacing: 1.2px; color: var(--muted); text-transform: uppercase; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: var(--primary); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 8px 12px; border-radius: 8px; transition: background .15s;
}
.site-nav a:hover { background: var(--bg-soft); }
.site-nav a[aria-current="page"] { color: var(--accent-strong); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.site-nav .btn { margin-left: 8px; }
.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--border);
  border-radius: 8px; width: 42px; height: 42px; color: var(--primary); cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; margin: auto; }

@media (max-width: 1000px) {
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .site-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border); padding: 8px 16px 16px;
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); }
  .site-nav .btn { margin: 8px 0 0; justify-content: center; }
}

/* ── Botones ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1;
  padding: 13px 22px; border-radius: 8px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
.btn-accent { background: var(--accent-strong); color: #fff; }
.btn-accent:hover { background: #9E3902; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--border); }
.btn-outline:hover { background: var(--bg-soft); border-color: var(--primary-soft); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.btn-sm { font-size: 14px; padding: 10px 16px; }

/* ── Secciones ────────────────────────────────────────────── */
section { padding: 88px 0; }
section.soft { background: var(--bg-soft); }
section.tight { padding: 64px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--accent-strong); margin-bottom: 12px;
}
.eyebrow::before { content: ''; width: 18px; height: 2px; background: var(--accent); }
.section-title { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; margin-bottom: 14px; letter-spacing: -.3px; }
.section-sub { font-size: 17px; color: var(--muted); max-width: 680px; margin-bottom: 44px; }
.center { text-align: center; }
.center .section-sub { margin-left: auto; margin-right: auto; }

/* ── Héroe (azul marino, como el menú lateral de CDE y BIMSIDE) ── */
.hero {
  background: var(--primary); color: #fff; padding: 96px 0 104px; position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -160px; top: -160px; width: 520px; height: 520px;
  border-radius: 50%; border: 80px solid rgba(255, 255, 255, .04); pointer-events: none;
}
.hero h1 { color: #fff; font-size: clamp(34px, 5.4vw, 58px); font-weight: 800; letter-spacing: -.8px; margin-bottom: 20px; max-width: 860px; }
.hero h1 .hl { color: #FFB27A; }
.hero p.lead { font-size: clamp(16px, 2vw, 19px); color: rgba(255, 255, 255, .86); max-width: 720px; margin-bottom: 32px; }
.hero .eyebrow { color: #FFB27A; }
.hero .eyebrow::before { background: var(--accent); }
.hero strong { color: #fff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 18px; font-size: 13px; color: rgba(255, 255, 255, .7); }
.hero.compact { padding: 72px 0 80px; }
.hero-shot { margin-top: 48px; border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 64px rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .15); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .4px;
  padding: 5px 11px; border-radius: 999px; background: var(--scene); color: var(--primary);
}
.chip.light { background: rgba(255, 255, 255, .12); color: #fff; }
.chip.accent { background: #FCE9DE; color: var(--accent-strong); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ── Tarjetas y grillas ───────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: 0 1px 2px rgba(22, 50, 91, .04);
}
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { font-size: 15px; color: var(--muted); }
.icon {
  width: 44px; height: 44px; border-radius: 10px; background: var(--scene); color: var(--primary);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.icon svg { width: 22px; height: 22px; }
.icon.accent { background: #FCE9DE; color: var(--accent-strong); }

/* Tarjeta de producto en el inicio */
.product {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s;
}
.product:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.product-top { background: var(--primary); color: #fff; padding: 26px 26px 22px; border-bottom: 4px solid var(--accent); }
.product-top .kind { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: #FFB27A; }
.product-top h3 { color: #fff; font-size: 26px; font-weight: 800; margin: 6px 0 6px; }
.product-top p { color: rgba(255, 255, 255, .85); font-size: 15px; }
.product-body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.product-body .who { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.product-actions { margin-top: auto; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }

.checks { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.checks li { position: relative; padding-left: 28px; font-size: 15px; }
.checks li::before {
  content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--scene) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B84302' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat;
}

/* Flujo en pasos */
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; counter-reset: paso; }
.flow-step { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 20px; }
.flow-step::before {
  counter-increment: paso; content: counter(paso, decimal-leading-zero);
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px; background: var(--primary); color: #fff;
  font-weight: 700; font-size: 14px; margin-bottom: 14px;
}
.flow-step.orange::before { background: var(--accent-strong); }
.flow-step h3 { font-size: 16px; margin-bottom: 6px; }
.flow-step p { font-size: 14px; color: var(--muted); }
.flow-step .tag { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent-strong); margin-bottom: 4px; }

/* Ecosistema: tres etapas conectadas */
.eco { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 12px; }
.eco-arrow { display: flex; align-items: center; color: var(--accent); }
.eco-arrow svg { width: 28px; height: 28px; }
.eco .card { text-align: left; }
.eco .card .stage { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent-strong); }
.eco .card h3 { font-size: 20px; margin: 4px 0 8px; }
@media (max-width: 860px) {
  .eco { grid-template-columns: 1fr; }
  .eco-arrow { justify-content: center; transform: rotate(90deg); }
}

/* Tabla */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; position: relative; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--bg-soft); color: var(--primary); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; }
tr:last-child td { border-bottom: none; }
td:first-child { font-weight: 600; color: var(--fg); white-space: nowrap; }

/* Capturas con pestañas */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tab {
  font-family: inherit; font-size: 14px; font-weight: 600; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff; color: var(--primary); cursor: pointer;
}
.tab:hover { border-color: var(--primary-soft); }
.tab[aria-selected="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.shot { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-lg); background: var(--scene); }
.shot img { width: 100%; transition: opacity .15s; }
.shot-caption { font-size: 14px; color: var(--muted); margin-top: 14px; text-align: center; }

/* Bloque destacado */
.band { background: var(--primary); color: #fff; border-radius: 16px; padding: 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.band h2 { color: #fff; font-size: clamp(24px, 3vw, 32px); margin-bottom: 8px; }
.band p { color: rgba(255, 255, 255, .85); max-width: 620px; }
@media (max-width: 640px) { .band { padding: 32px 24px; } }

/* Persona */
.person { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; }
.person img { width: 220px; height: 220px; object-fit: cover; object-position: top; border-radius: 16px; background: var(--scene); border: 4px solid #fff; box-shadow: var(--shadow); }
.person h3 { font-size: 26px; }
.person .role { color: var(--accent-strong); font-weight: 700; font-size: 14px; letter-spacing: .6px; text-transform: uppercase; margin: 4px 0 14px; }
.person p { color: var(--muted); margin-bottom: 18px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 720px) { .person { grid-template-columns: 1fr; text-align: left; } }

/* Requisitos */
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.spec { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.spec span { display: block; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.spec strong { font-size: 15px; }

/* Precio */
.price-card { max-width: 520px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--accent); border-radius: 16px; padding: 36px; box-shadow: var(--shadow); text-align: left; }
.price { font-size: 52px; font-weight: 800; color: var(--primary); line-height: 1; margin-bottom: 20px; }
.price span { font-size: 16px; font-weight: 500; color: var(--muted); }

/* Ilustración de tablero BIMSIDE (esquemática, sin datos reales) */
.mock { display: grid; grid-template-columns: 150px 1fr; border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 64px rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .15); background: #fff; margin-top: 48px; }
.mock-side { background: var(--primary-dark); padding: 18px 12px; display: flex; flex-direction: column; gap: 8px; }
.mock-side i { display: block; height: 10px; border-radius: 4px; background: rgba(255, 255, 255, .2); }
.mock-side i.on { background: var(--accent-strong); }
.mock-side i.logo { width: 60%; height: 12px; background: rgba(255, 255, 255, .55); margin-bottom: 10px; }
.mock-main { padding: 20px; display: grid; gap: 14px; background: var(--bg-soft); }
.mock-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mock-kpi { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.mock-kpi b { display: block; font-size: 22px; color: var(--primary); line-height: 1.1; }
.mock-kpi small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.mock-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
.mock-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.mock-card > small { display: block; font-size: 10px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 10px; }
.mock-line { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mock-line i { flex: 1; height: 8px; border-radius: 4px; background: var(--scene); }
.mock-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.mock-heat { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.mock-heat i { height: 16px; border-radius: 3px; }
.mock-bars { display: flex; align-items: flex-end; gap: 8px; height: 76px; }
.mock-bars i { flex: 1; background: var(--primary-soft); border-radius: 3px 3px 0 0; }
.mock-bars i:nth-child(3n) { background: var(--accent); }
@media (max-width: 720px) {
  .mock { grid-template-columns: 1fr; }
  .mock-side { display: none; }
  .mock-kpis { grid-template-columns: repeat(2, 1fr); }
  .mock-row { grid-template-columns: 1fr; }
}

/* Pie de página */
.site-footer { background: var(--primary-dark); color: rgba(255, 255, 255, .78); padding: 56px 0 32px; font-size: 14px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.site-footer .brand { color: #fff; margin-bottom: 12px; }
.site-footer .brand small { color: rgba(255, 255, 255, .6); }
.site-footer h4 { color: #fff; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.site-footer a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .legal { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 20px; font-size: 12px; color: rgba(255, 255, 255, .6); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
@media (max-width: 720px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* Utilidades */
.mt-0 { margin-top: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.muted { color: var(--muted); }
.note { display: flex; gap: 12px; background: var(--bg-soft); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 10px; padding: 16px 18px; font-size: 15px; }

/* El botón de contacto del menú mantiene su color sobre el estilo de los enlaces. */
.site-nav a.btn-accent { color: #fff; background: var(--accent-strong); }
.site-nav a.btn-accent:hover { background: #9E3902; }

/* Tarjetas que son enlaces */
a.card { display: block; color: inherit; transition: border-color .15s, box-shadow .15s; }
a.card:hover { border-color: var(--primary-soft); box-shadow: var(--shadow); }
.band .eyebrow { color: #FFB27A; }

/* Los dos botones de cada tarjeta de producto, siempre uno al lado del otro. */
.product-actions { flex-wrap: nowrap; }
.product-actions .btn { flex: 1 1 auto; justify-content: center; white-space: nowrap; padding-left: 14px; padding-right: 14px; }
@media (min-width: 641px) and (max-width: 1180px) { .product-actions .btn { font-size: 13px; padding-left: 10px; padding-right: 10px; } }
@media (min-width: 721px) and (max-width: 960px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }

/* Formulario de contacto en ventana */
.contact-dialog { margin: auto; border: none; border-radius: 16px; padding: 32px 28px 28px; width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px); color: var(--text); box-shadow: var(--shadow-lg); border-top: 4px solid var(--accent); }
.contact-dialog::backdrop { background: rgba(14, 34, 64, .55); }
.contact-dialog h2 { color: var(--fg); font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.contact-sub { color: var(--muted); margin-bottom: 20px; }
.contact-dialog form { display: flex; flex-direction: column; gap: 14px; }
.contact-dialog label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--fg); }
.contact-dialog input { font: inherit; font-size: 15px; font-weight: 400; color: var(--fg); padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.contact-dialog input:focus { outline: none; border-color: var(--primary-soft); box-shadow: 0 0 0 3px rgba(74, 106, 153, .18); }
.contact-dialog button[type="submit"] { justify-content: center; margin-top: 6px; }
.contact-dialog button[disabled] { opacity: .7; cursor: wait; }
.contact-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-error { color: var(--red); font-size: 14px; }
.contact-close { position: absolute; top: 10px; right: 12px; border: none; background: none; font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.contact-close:hover { color: var(--fg); }
.contact-step[data-step="done"] { text-align: center; padding: 8px 0; }
.contact-ok { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; background: var(--green); color: #fff; font-size: 28px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
