/* ============================================================
   CI Comercializadora — Registration Form
   Tokens are driven by [data-aesthetic], [data-density], [data-shape], [data-dark]
   ============================================================ */

/* ---- Base reset ---- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

/* ---- Fonts ---- */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=JetBrains+Mono:wght@400;500&display=swap");

/* ============================================================
   ROOT TOKENS — defaults (corporate aesthetic, regular density, rounded shape, light)
   ============================================================ */
:root {
  /* Brand */
  --navy: #1b2d6b;
  --navy-2: #0e1d4f;
  --navy-3: #2f4a9e;
  --sky: #5b8de0;
  --gold: #c89a3a;
  --gold-2: #e2b557;
  --terracotta: #b35a31;
  --ochre: #d4763a;
  --cream: #f6f1e6;
  --pasture: #4a6b3a;

  /* Surface */
  --bg: #f4f5f7;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: #e2e5ec;
  --border-strong: #c7ccd6;
  --text: #0f172a;
  --text-2: #5a6172;
  --text-mute: #8a90a0;

  /* Accent role */
  --primary: var(--navy);
  --primary-2: var(--navy-2);
  --primary-soft: #e8edfb;
  --accent: var(--gold);
  --error: #c0392b;
  --error-soft: #fdecea;
  --success: #2e7d57;
  --success-soft: #e6f3ec;

  /* Type */
  --font-sans: "Inter", -apple-system, system-ui, sans-serif;
  --font-display: "Inter", -apple-system, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Sizing */
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 14px;
  --field-h: 46px;
  --gap-y: 18px;
  --section-pad: 28px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
}

/* ============================================================
   AESTHETIC — 4 directions
   ============================================================ */

/* 1. CORPORATE PREMIUM — clean white + navy + gold (default) */
[data-aesthetic="corporate"] {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #fafbfd;
  --text: #0f172a;
  --text-2: #4f5667;
  --border: #e2e5ec;
  --font-sans: "Inter", system-ui, sans-serif;
  --font-display: "Inter", system-ui, sans-serif;
}

/* 2. EDITORIAL HACIENDA — warm cream, navy + ochre, serif display */
[data-aesthetic="editorial"] {
  --bg: #f3ede0;
  --surface: #fbf7ee;
  --surface-2: #f3ede0;
  --text: #2a1f12;
  --text-2: #6a5b46;
  --text-mute: #968871;
  --border: #e3d9c4;
  --border-strong: #c9bca0;
  --font-sans: "Inter", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --shadow: 0 6px 24px rgba(80, 50, 20, 0.10);
}

/* 3. PLATAFORMA B2B — dark grafite, cyan+gold, mono numerics */
[data-aesthetic="b2b"] {
  --bg: #0e1116;
  --surface: #161a22;
  --surface-2: #1c2230;
  --text: #e8ebf2;
  --text-2: #9aa3b5;
  --text-mute: #6b7387;
  --border: #2a3142;
  --border-strong: #3a4258;
  --primary: #4d8cff;
  --primary-2: #6aa3ff;
  --primary-soft: rgba(77, 140, 255, 0.16);
  --accent: #ffb84a;
  --error: #ff6b6b;
  --error-soft: rgba(255, 107, 107, 0.14);
  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, 0.14);
  --font-sans: "Inter", system-ui, sans-serif;
  --font-display: "Inter", system-ui, sans-serif;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

/* 4. INMERSIVO — overlay glass on photo */
[data-aesthetic="immersive"] {
  --bg: #0d1330;
  --surface: rgba(20, 30, 70, 0.55);
  --surface-2: rgba(20, 30, 70, 0.35);
  --text: #f6f7fb;
  --text-2: #bcc5e0;
  --text-mute: #8a96b8;
  --border: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.28);
  --primary: #f6c97a;
  --primary-2: #ffd699;
  --primary-soft: rgba(246, 201, 122, 0.20);
  --accent: #f6c97a;
  --font-sans: "Inter", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
}

/* ============================================================
   DARK MODE (forced) — overrides on top of any aesthetic
   ============================================================ */
[data-dark="true"][data-aesthetic="corporate"],
[data-dark="true"][data-aesthetic="editorial"] {
  --bg: #0e1116;
  --surface: #161a22;
  --surface-2: #1c2230;
  --text: #e8ebf2;
  --text-2: #9aa3b5;
  --text-mute: #6b7387;
  --border: #2a3142;
  --border-strong: #3a4258;
  --primary-soft: rgba(91, 141, 224, 0.18);
}

/* ============================================================
   DENSITY
   ============================================================ */
[data-density="compact"] {
  --field-h: 40px;
  --gap-y: 12px;
  --section-pad: 18px;
}
[data-density="regular"] {
  --field-h: 46px;
  --gap-y: 18px;
  --section-pad: 28px;
}
[data-density="spacious"] {
  --field-h: 54px;
  --gap-y: 26px;
  --section-pad: 36px;
}

/* ============================================================
   SHAPE
   ============================================================ */
[data-shape="sharp"]   { --radius-sm: 2px; --radius: 2px; --radius-lg: 4px; }
[data-shape="rounded"] { --radius-sm: 8px; --radius: 10px; --radius-lg: 14px; }
[data-shape="pill"]    { --radius-sm: 999px; --radius: 999px; --radius-lg: 18px; }

/* ============================================================
   APP SHELL
   ============================================================ */
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  transition: background-color 0.3s ease;
}

.ci-app {
  min-height: 100vh;
  position: relative;
}

/* ============================================================
   FIELDS — base
   ============================================================ */
.ci-field { display: flex; flex-direction: column; gap: 6px; }
.ci-field-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; color: var(--text);
  letter-spacing: -0.005em;
}
.ci-req { color: var(--accent); font-weight: 700; }
.ci-tooltip-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 999px;
  color: var(--text-mute); cursor: help;
  transition: color 0.15s;
}
.ci-tooltip-icon:hover { color: var(--primary); }

.ci-tooltip-wrap { position: relative; display: inline-flex; }
.ci-tooltip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--surface);
  padding: 8px 12px; border-radius: 8px; font-size: 12px; font-weight: 500;
  white-space: normal; width: max-content; max-width: 240px;
  box-shadow: var(--shadow); z-index: 50; line-height: 1.4;
  pointer-events: none;
}
.ci-tooltip::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--text);
}

.ci-field-error {
  color: var(--error); font-size: 12.5px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
  animation: ci-shake 0.4s;
}
.ci-field-hint { color: var(--text-mute); font-size: 12.5px; }

@keyframes ci-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

/* ---- Text input ---- */
.ci-input {
  width: 100%; height: var(--field-h);
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14.5px;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
  outline: none;
}
.ci-input::placeholder { color: var(--text-mute); }
.ci-input:hover { border-color: var(--border-strong); }
.ci-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.ci-input.is-error { border-color: var(--error); }
.ci-input.is-error:focus { box-shadow: 0 0 0 3px var(--error-soft); }
.ci-input:disabled { opacity: 0.5; cursor: not-allowed; background: var(--surface-2); }

.ci-subsection-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-2); margin: 0;
}

/* ---- Searchable select ---- */
.ci-select { position: relative; }
.ci-select-trigger {
  width: 100%; height: var(--field-h);
  padding: 0 12px 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14.5px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ci-select-trigger:hover { border-color: var(--border-strong); }
.ci-select.is-open .ci-select-trigger {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.ci-select.is-error .ci-select-trigger { border-color: var(--error); }
.ci-select.is-disabled .ci-select-trigger {
  opacity: 0.55; cursor: not-allowed; background: var(--surface-2);
}
.ci-select-value { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-select-value.is-placeholder { color: var(--text-mute); }
.ci-select-trigger svg { color: var(--text-mute); transition: transform 0.2s; }
.ci-select.is-open .ci-select-trigger svg { transform: rotate(180deg); color: var(--primary); }

.ci-select-pop {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: ci-pop 0.18s ease-out;
}
[data-shape="pill"] .ci-select-pop { border-radius: 18px; }

@keyframes ci-pop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.ci-select-search {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-mute);
}
.ci-select-search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 14px; color: var(--text);
}
.ci-select-search input::placeholder { color: var(--text-mute); }
.ci-select-clear {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 999px;
  background: var(--border); color: var(--text-2);
}
.ci-select-list { max-height: 240px; overflow-y: auto; padding: 4px; }
.ci-select-list::-webkit-scrollbar { width: 8px; }
.ci-select-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }

.ci-select-opt {
  width: 100%; padding: 9px 12px; border-radius: calc(var(--radius) - 4px);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 14px; color: var(--text); text-align: left;
  transition: background-color 0.12s;
}
.ci-select-opt.is-active { background: var(--primary-soft); color: var(--primary); }
.ci-select-opt.is-selected { font-weight: 600; }
.ci-select-opt svg { color: var(--primary); }
.ci-select-empty { padding: 16px; text-align: center; color: var(--text-mute); font-size: 13px; }

/* ---- Card picker ---- */
.ci-cards {
  display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 10px;
}
.ci-card {
  position: relative;
  padding: 16px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: left;
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color 0.15s, background-color 0.15s, transform 0.1s;
}
[data-shape="pill"] .ci-card { border-radius: 18px; }
.ci-card:hover { border-color: var(--border-strong); }
.ci-card.is-selected {
  border-color: var(--primary); background: var(--primary-soft);
}
.ci-card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--primary-soft); color: var(--primary);
  margin-bottom: 6px;
}
.ci-card.is-selected .ci-card-icon { background: var(--primary); color: var(--surface); }
.ci-card-icon img { width: 100%; height: 100%; object-fit: contain; }
.ci-card.is-selected .ci-card-icon img { filter: brightness(0) invert(1); }
.ci-card-label { font-weight: 600; font-size: 14.5px; color: var(--text); }
.ci-card-desc { color: var(--text-2); font-size: 12.5px; line-height: 1.4; }
.ci-card-tick {
  position: absolute; top: 10px; right: 10px;
  width: 18px; height: 18px; border-radius: 999px;
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.6);
  transition: opacity 0.15s, transform 0.15s;
}
.ci-card.is-selected .ci-card-tick { opacity: 1; transform: scale(1); }

/* ---- Segmented ---- */
.ci-segmented {
  display: inline-flex; padding: 0; gap: 8px;
  background: transparent; border: none;
  width: 100%;
}
.ci-seg {
  flex: 1; padding: 0 16px; height: calc(var(--field-h) - 12px);
  border-radius: calc(var(--radius) - 2px);
  font-size: 14px; font-weight: 500; color: var(--text-2);
  border: 1.5px solid var(--border);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.ci-seg:not(.is-selected):hover { background: var(--surface); color: var(--text); }
.ci-seg.is-selected { background: var(--surface); color: var(--primary); font-weight: 600; box-shadow: var(--shadow-sm); border-color: var(--primary); }
[data-aesthetic="b2b"] .ci-seg.is-selected { background: var(--primary); color: white; }

/* ---- Checkbox ---- */
.ci-checkbox {
  display: inline-flex; align-items: flex-start; gap: 10px;
  cursor: pointer; font-size: 14px; color: var(--text);
  line-height: 1.5;
}
.ci-checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.ci-checkbox-box {
  flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px;
  border: 1.5px solid var(--border-strong); border-radius: 6px;
  background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent; transition: all 0.15s;
}
[data-shape="pill"] .ci-checkbox-box { border-radius: 6px; }
.ci-checkbox input:checked + .ci-checkbox-box {
  background: var(--primary); border-color: var(--primary); color: white;
}
.ci-checkbox:hover .ci-checkbox-box { border-color: var(--primary); }
.ci-checkbox-label a { color: var(--primary); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.ci-checkbox.is-error .ci-checkbox-box { border-color: var(--error); }

/* ---- Phone input ---- */
.ci-phone {
  display: flex; height: var(--field-h);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ci-phone:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.ci-phone.is-error { border-color: var(--error); }
.ci-phone-dial {
  display: inline-flex; align-items: center;
  padding: 0 12px; border-right: 1px solid var(--border);
  font-weight: 600; color: var(--text-2); background: var(--surface-2);
  font-family: var(--font-mono); font-size: 13.5px;
}
.ci-phone-input {
  flex: 1; border: 0; outline: 0; background: transparent;
  padding: 0 14px; font-size: 14.5px; font-variant-numeric: tabular-nums;
}

/* ---- Phone dial searchable dropdown ---- */
.ci-phone-wrap { position: relative; }
.ci-phone-dial-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0 10px 0 12px; border: 0; outline: 0; cursor: pointer;
  border-right: 1px solid var(--border); background: var(--surface-2);
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  color: var(--text-2); height: 100%;
  transition: background 0.12s, color 0.12s; white-space: nowrap;
}
.ci-phone-dial-btn:hover { background: var(--primary-soft); color: var(--primary); }
.ci-phone-pop {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 200;
  width: 280px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.ci-phone-list { max-height: 220px; overflow-y: auto; padding: 4px; }
.ci-phone-list::-webkit-scrollbar { width: 6px; }
.ci-phone-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
.ci-phone-opt {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 10px; border: 0; background: transparent; cursor: pointer;
  font-size: 13.5px; border-radius: calc(var(--radius) - 2px); text-align: left;
  transition: background 0.1s, color 0.1s;
}
.ci-phone-opt:hover { background: var(--primary-soft); color: var(--primary); }
.ci-phone-opt.is-selected { font-weight: 600; }
.ci-phone-opt-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-phone-code { font-family: var(--font-mono); font-size: 12px; color: var(--text-mute); }
.ci-phone-opt.is-selected .ci-phone-code { color: var(--primary); }

/* ---- NIT specific: mono digits ---- */
.ci-input--mono { font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.02em; }

/* ---- Button ---- */
.ci-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--field-h); padding: 0 22px;
  background: var(--primary); color: white;
  border-radius: var(--radius);
  font-size: 14.5px; font-weight: 600;
  transition: background-color 0.15s, transform 0.05s, box-shadow 0.15s;
  border: 1px solid transparent;
  letter-spacing: -0.005em;
}
.ci-btn:hover { background: var(--primary-2); }
.ci-btn:active { transform: translateY(1px); }
.ci-btn--ghost {
  background: transparent; color: var(--text); border-color: var(--border);
}
.ci-btn--ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.ci-btn--lg { height: calc(var(--field-h) + 6px); padding: 0 30px; font-size: 15px; }
.ci-btn--block { width: 100%; }
.ci-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
   ANIMATION on reveal
   ============================================================ */
[data-anim="true"] .ci-reveal {
  animation: ci-reveal 0.35s ease-out;
}
@keyframes ci-reveal {
  from { opacity: 0; transform: translateY(-8px); max-height: 0; }
  to   { opacity: 1; transform: translateY(0); max-height: 800px; }
}

/* ============================================================
   STAGE — letterbox 1440 wide
   ============================================================ */
.ci-stage {
  width: 100%;
  min-height: 100vh;
  display: flex; align-items: flex-start; justify-content: center;
}

/* ============================================================
   COMMON LAYOUT — split panel (form left, hero right)
   ============================================================ */
.ci-layout {
  display: grid;
  grid-template-columns: 1fr minmax(380px, 40vw);
  min-height: 100vh;
  width: 100%;
}
.ci-layout--full { grid-template-columns: 1fr; }

.ci-form-side {
  padding: 56px 64px 80px;
  background: var(--bg);
  overflow: hidden;
}
.ci-hero-side {
  position: sticky;
  top: 0;
  height: 100vh;
  align-self: start;
  background: var(--navy-2);
  overflow: hidden;
}
.ci-hero-photo {
  position: absolute; inset: 0;
  background-image: url("./assets/imagen-lateral.webp");
  background-size: cover; background-position: center;
}
.ci-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(155deg, rgba(11, 24, 67, 0.65) 0%, rgba(11, 24, 67, 0.35) 60%, rgba(11, 24, 67, 0.85) 100%);
}
.ci-hero-content {
  position: relative; z-index: 2;
  height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 56px 56px;
  color: #fff;
}

/* Header */
.ci-header { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; }
.ci-logo { height: 44px; width: auto; }
.ci-header-text { display: flex; flex-direction: column; }
.ci-header-eyebrow {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-mute); font-weight: 600;
}
.ci-header-title { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }

.ci-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 38px); font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1; color: var(--text);
  margin: 0 0 8px;
}
.ci-subtitle {
  font-size: 15px; color: var(--text-2); line-height: 1.55;
  margin: 0 0 32px;
  max-width: 56ch;
}

.ci-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--section-pad);
  margin-bottom: var(--gap-y);
  box-shadow: var(--shadow-sm);
}
[data-aesthetic="b2b"] .ci-section { box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset; }

.ci-section-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
}
.ci-section-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--primary-soft); color: var(--primary);
  font-weight: 700; font-size: 13px;
  font-family: var(--font-mono);
}
.ci-section-title {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 600; color: var(--text);
  letter-spacing: -0.01em;
  margin: 0;
}
.ci-section-sub { font-size: 13px; color: var(--text-2); margin: 4px 0 0; }

.ci-grid { display: grid; gap: var(--gap-y); }
.ci-grid--2 { grid-template-columns: 1fr 1fr; }
.ci-grid--nit { grid-template-columns: 1fr 90px; }
.ci-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 720px) {
  .ci-grid--2, .ci-grid--3 { grid-template-columns: 1fr; }
  .ci-grid--nit { grid-template-columns: 1fr 80px; }
}

/* Hero panel */
.ci-hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.22);
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  color: #fff; backdrop-filter: blur(8px);
  width: max-content;
}
.ci-hero-tag .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--gold-2); box-shadow: 0 0 12px var(--gold-2); }

.ci-hero-headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 600; line-height: 1.05; letter-spacing: -0.03em;
  margin: 28px 0 16px;
}
.ci-hero-headline .accent { color: #fff; font-style: italic; }
.ci-hero-headline em { font-family: "Fraunces", Georgia, serif; font-style: italic; font-weight: 500; color: #fff; }

.ci-hero-body { font-size: 15.5px; line-height: 1.6; color: rgba(255,255,255,0.85); max-width: 42ch; }

.ci-hero-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px;
  padding: 20px 0; border-top: 1px solid rgba(255,255,255,0.18);
  border-bottom: 1px solid rgba(255,255,255,0.18);
  margin-top: 22px;
}
.ci-hero-stat { display: flex; flex-direction: column; gap: 2px; }
.ci-hero-stat-num { font-family: var(--font-display); font-size: 28px; font-weight: 600; color: #fff; letter-spacing: -0.02em; }
.ci-hero-stat-lbl { font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.7); }

.ci-hero-footnote {
  font-size: 12px; color: rgba(255,255,255,0.7);
  display: flex; align-items: center; gap: 10px;
}
.ci-hero-aliados { display: flex; gap: 14px; align-items: center; }
.ci-hero-aliado {
  height: 36px; padding: 0 12px;
  display: inline-flex; align-items: center;
  background: rgba(255,255,255,0.92); color: var(--navy);
  border-radius: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}

/* ============================================================
   PROGRESS / STEPS
   ============================================================ */
.ci-progress {
  display: flex; gap: 0; align-items: center;
  margin: 0 0 32px;
}
.ci-step {
  flex: 1; display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-mute); font-weight: 500;
}
.ci-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 999px;
  border: 1.5px solid var(--border-strong); background: var(--surface);
  color: var(--text-mute); font-weight: 700; font-size: 12px;
  flex-shrink: 0;
  transition: all 0.2s;
}
.ci-step.is-active .ci-step-num { background: var(--primary); border-color: var(--primary); color: white; }
.ci-step.is-active { color: var(--text); font-weight: 600; }
.ci-step.is-done .ci-step-num { background: var(--success); border-color: var(--success); color: white; }
.ci-step-bar { flex: 1; height: 2px; background: var(--border); border-radius: 999px; }
.ci-step.is-done + .ci-step-bar { background: var(--success); }
button.ci-step {
  background: none; border: none; padding: 0; font: inherit;
  cursor: pointer; text-align: left;
  transition: opacity 0.15s;
}
button.ci-step:hover:not(.is-active) { opacity: 0.75; }

/* ============================================================
   AESTHETIC OVERRIDES — EDITORIAL HACIENDA
   ============================================================ */
[data-aesthetic="editorial"] .ci-form-side {
  padding: 72px 80px 96px;
  background:
    radial-gradient(ellipse at top right, rgba(212, 118, 58, 0.06), transparent 40%),
    var(--bg);
}
[data-aesthetic="editorial"] .ci-title { font-style: italic; font-weight: 500; }
[data-aesthetic="editorial"] .ci-section {
  background: var(--surface);
  border: 0;
  border-top: 1px solid var(--border-strong);
  border-radius: 0;
  box-shadow: none;
  padding: 28px 0;
  margin: 0;
}
[data-aesthetic="editorial"] .ci-section:first-of-type { border-top: 0; padding-top: 0; }
[data-aesthetic="editorial"] .ci-section-num {
  background: transparent; color: var(--accent); border: 1px solid var(--accent);
  border-radius: 999px; font-family: var(--font-display); font-style: italic;
}
[data-aesthetic="editorial"] .ci-section-title { font-family: var(--font-display); font-weight: 500; font-style: italic; font-size: 22px; }
[data-aesthetic="editorial"] .ci-input,
[data-aesthetic="editorial"] .ci-select-trigger,
[data-aesthetic="editorial"] .ci-phone {
  background: transparent;
  border: 0; border-bottom: 1px solid var(--border-strong);
  border-radius: 0; padding-left: 2px;
}
[data-aesthetic="editorial"] .ci-input:focus,
[data-aesthetic="editorial"] .ci-phone:focus-within { box-shadow: none; border-bottom-color: var(--primary); border-bottom-width: 2px; }
[data-aesthetic="editorial"] .ci-select.is-open .ci-select-trigger { box-shadow: none; border-bottom-color: var(--primary); }
[data-aesthetic="editorial"] .ci-phone-dial { background: transparent; border-right: 1px solid var(--border-strong); padding-left: 0; }

/* ============================================================
   AESTHETIC OVERRIDES — B2B / DARK TECH
   ============================================================ */
[data-aesthetic="b2b"] body,
body[data-aesthetic="b2b"] { background: var(--bg); }
[data-aesthetic="b2b"] .ci-form-side { background: var(--bg); padding: 48px 56px 72px; }
[data-aesthetic="b2b"] .ci-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
[data-aesthetic="b2b"] .ci-input,
[data-aesthetic="b2b"] .ci-select-trigger,
[data-aesthetic="b2b"] .ci-phone {
  background: var(--surface-2);
  border-color: var(--border);
}
[data-aesthetic="b2b"] .ci-input:focus { box-shadow: 0 0 0 3px rgba(77, 140, 255, 0.22); }
[data-aesthetic="b2b"] .ci-phone-dial { background: rgba(0,0,0,0.25); border-right-color: var(--border); }
[data-aesthetic="b2b"] .ci-section-num {
  font-family: var(--font-mono); background: transparent;
  border: 1px solid var(--primary); color: var(--primary);
  border-radius: 4px;
}
[data-aesthetic="b2b"] .ci-section-title::before {
  content: "//"; color: var(--primary); margin-right: 8px;
  font-family: var(--font-mono); font-weight: 500;
}
[data-aesthetic="b2b"] .ci-segmented { background: var(--bg); }
[data-aesthetic="b2b"] .ci-card { background: var(--surface-2); }
[data-aesthetic="b2b"] .ci-card.is-selected { background: rgba(77, 140, 255, 0.10); }

/* ============================================================
   AESTHETIC OVERRIDES — IMMERSIVE (full-bleed photo)
   ============================================================ */
[data-aesthetic="immersive"] .ci-app {
  background:
    linear-gradient(160deg, rgba(11, 22, 60, 0.92) 0%, rgba(11, 22, 60, 0.78) 50%, rgba(11, 22, 60, 0.95) 100%),
    url("./assets/brahman.webp") center / cover fixed no-repeat,
    var(--bg);
  min-height: 100vh;
}
[data-aesthetic="immersive"] .ci-layout { grid-template-columns: 1fr; max-width: 760px; }
[data-aesthetic="immersive"] .ci-form-side {
  background: transparent;
  padding: 48px 48px 72px;
}
[data-aesthetic="immersive"] .ci-hero-side { display: none; }
[data-aesthetic="immersive"] .ci-title { color: white; }
[data-aesthetic="immersive"] .ci-subtitle { color: rgba(255,255,255,0.78); }
[data-aesthetic="immersive"] .ci-header-title { color: white; }
[data-aesthetic="immersive"] .ci-header-eyebrow { color: rgba(255,255,255,0.65); }
[data-aesthetic="immersive"] .ci-section {
  background: rgba(20, 30, 70, 0.42);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
}
[data-aesthetic="immersive"] .ci-input,
[data-aesthetic="immersive"] .ci-select-trigger,
[data-aesthetic="immersive"] .ci-phone {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  color: white;
}
[data-aesthetic="immersive"] .ci-input::placeholder { color: rgba(255,255,255,0.5); }
[data-aesthetic="immersive"] .ci-phone-dial { background: rgba(0,0,0,0.18); border-right-color: rgba(255,255,255,0.18); color: rgba(255,255,255,0.85); }
[data-aesthetic="immersive"] .ci-select-pop {
  background: rgba(28, 36, 80, 0.95);
  backdrop-filter: blur(20px); border-color: rgba(255,255,255,0.18);
}
[data-aesthetic="immersive"] .ci-select-search { border-bottom-color: rgba(255,255,255,0.12); }
[data-aesthetic="immersive"] .ci-segmented { background: rgba(0,0,0,0.18); border-color: rgba(255,255,255,0.12); }
[data-aesthetic="immersive"] .ci-seg.is-selected { background: rgba(255,255,255,0.12); color: var(--accent); }
[data-aesthetic="immersive"] .ci-card { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.14); }
[data-aesthetic="immersive"] .ci-card.is-selected { background: rgba(246, 201, 122, 0.14); border-color: var(--accent); }
[data-aesthetic="immersive"] .ci-card-icon { background: rgba(246, 201, 122, 0.18); color: var(--accent); }
[data-aesthetic="immersive"] .ci-card.is-selected .ci-card-icon { background: var(--accent); color: var(--navy-2); }
[data-aesthetic="immersive"] .ci-btn { color: var(--navy-2); background: var(--accent); }
[data-aesthetic="immersive"] .ci-btn:hover { background: var(--primary-2); }
[data-aesthetic="immersive"] .ci-step-num { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.22); }

/* ============================================================
   SUMMARY VIEW
   ============================================================ */
.ci-summary { padding: 8px 0; }
.ci-summary-row {
  display: grid; grid-template-columns: 200px 1fr; gap: 16px;
  padding: 14px 0; border-bottom: 1px dashed var(--border);
  font-size: 14px;
}
.ci-summary-row:last-child { border-bottom: 0; }
.ci-summary-key { color: var(--text-2); font-weight: 500; }
.ci-summary-val { color: var(--text); font-weight: 600; word-break: break-word; }
.ci-summary-val.is-empty { color: var(--text-mute); font-weight: 400; font-style: italic; }

.ci-success {
  text-align: center; padding: 48px 24px;
}
.ci-success-badge {
  width: 84px; height: 84px; border-radius: 999px;
  background: var(--success-soft); color: var(--success);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.ci-success-title {
  font-family: var(--font-display); font-size: 32px; font-weight: 600;
  letter-spacing: -0.02em; margin: 0 0 8px;
}
.ci-success-body { color: var(--text-2); font-size: 15px; max-width: 44ch; margin: 0 auto 28px; }

/* ============================================================
   BANNERS / INLINE ALERTS
   ============================================================ */
.ci-banner {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: 10px;
  font-size: 14px; line-height: 1.45; margin-bottom: 20px;
}
.ci-banner--info {
  background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe;
}
.ci-banner--info svg { flex-shrink: 0; margin-top: 1px; }

/* ============================================================
   PROCESSING / LOADER
   ============================================================ */
.ci-processing {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 64px 24px; text-align: center;
}
.ci-loader-img {
  width: 148px; height: 148px; object-fit: contain; margin-bottom: 24px;
}
.ci-processing-label {
  font-family: var(--font-display); font-size: 20px; font-weight: 600;
  margin: 0 0 6px;
}
.ci-processing-sub { color: var(--text-mute); font-size: 14px; margin: 0; }

/* ============================================================
   DOCS PREVIEW
   ============================================================ */
.ci-docs-header {
  text-align: center; padding: 32px 24px 0;
}
.ci-docs-preview {
  display: flex; flex-direction: column; gap: 16px;
  padding: 24px 0;
}
.ci-doc-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--surface);
}
.ci-doc-card-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: 14px; color: var(--text);
  background: var(--surface-2);
}
.ci-doc-card-header > span { flex: 1; }
.ci-doc-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 500; color: var(--primary);
  text-decoration: none; white-space: nowrap;
}
.ci-doc-link:hover { text-decoration: underline; }
.ci-doc-iframe-wrap {
  position: relative; width: 100%; padding-top: 56.25%; /* 16:9 */
  background: #f0f0f0;
}
.ci-doc-iframe-wrap iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

/* ============================================================
   EVENTS picker
   ============================================================ */
.ci-event {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left; transition: all 0.15s;
  color: var(--text-2);
}
.ci-event:hover { border-color: var(--border-strong); color: var(--text); }
.ci-event.is-selected { border-color: var(--primary); background: var(--primary-soft); color: var(--text); }
.ci-event-tick {
  width: 22px; height: 22px; border-radius: 6px;
  border: 1.5px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent; flex-shrink: 0;
}
.ci-event-tick.is-on { background: var(--primary); border-color: var(--primary); color: white; }
.ci-event-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ci-event-title { font-weight: 600; color: var(--text); font-size: 14.5px; }
.ci-event-desc { font-size: 12.5px; color: var(--text-2); }
.ci-event svg:last-child { color: var(--text-mute); }
.ci-event.is-selected svg:last-child { color: var(--primary); }

/* ============================================================
   FOOTER ACTIONS
   ============================================================ */
.ci-actions {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; margin-top: 28px;
  padding-top: 24px; border-top: 1px solid var(--border);
}

/* ============================================================
   AESTHETIC INDICATOR (corner badge)
   ============================================================ */
.ci-aesthetic-badge {
  position: fixed; bottom: 16px; left: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 12px 6px 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow);
  z-index: 100; pointer-events: none;
  color: var(--text-2);
  text-transform: uppercase;
}
.ci-aesthetic-badge .dot {
  width: 8px; height: 8px; border-radius: 999px; background: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .ci-layout { grid-template-columns: 1fr; }
  .ci-hero-side { min-height: 280px; }
  .ci-hero-content { padding: 32px 28px; }
  .ci-form-side { padding: 32px 24px 60px !important; }
  [data-aesthetic="editorial"] .ci-form-side { padding: 40px 28px 60px !important; }
}
@media (max-width: 560px) {
  .ci-cards { grid-template-columns: 1fr !important; }
  .ci-step { gap: 6px; }
  .ci-step span:not(.ci-step-num) { display: none; }
  .ci-summary-row { grid-template-columns: 1fr; gap: 4px; }
  .ci-summary-key { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
}
