/* Tipografía de marca: Carnas (Hoftype). Licencia comercial: confirmar que cubre este sitio. */
@font-face { font-family: "Carnas"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/Carnas-Regular.woff2") format("woff2"), url("../fonts/Carnas-Regular.woff") format("woff"); }
@font-face { font-family: "Carnas"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("../fonts/Carnas-Medium.woff2") format("woff2"), url("../fonts/Carnas-Medium.woff") format("woff"); }
@font-face { font-family: "Carnas"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/Carnas-Bold.woff2") format("woff2"), url("../fonts/Carnas-Bold.woff") format("woff"); }
@font-face { font-family: "Carnas"; font-weight: 800; font-style: normal; font-display: swap;
  src: url("../fonts/Carnas-Extra-Bold.woff2") format("woff2"), url("../fonts/Carnas-Extra-Bold.woff") format("woff"); }
@font-face { font-family: "Carnas"; font-weight: 900; font-style: normal; font-display: swap;
  src: url("../fonts/Carnas-Black.woff2") format("woff2"), url("../fonts/Carnas-Black.woff") format("woff"); }

:root {
  --font: "Carnas", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ink: #140a2e;
  --purple: #39196e;
  --purple-2: #5b2fb0;
  --blue: #1d9bd8;
  --yellow: #ffc20e;
  --pink: #e8216b;
  --text: #241a3d;
  --muted: #5d5575;
  --tint: #f4f1fa;
  --line: #e2dcf0;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(20, 10, 46, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap--narrow { max-width: 760px; }

/* Barra superior */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(20, 10, 46, .96); backdrop-filter: blur(6px); }
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.brand img { display: block; }
.topbar .btn { white-space: nowrap; padding: 8px 12px; font-size: .82rem; }
@media (min-width: 480px) { .topbar .btn { padding: 9px 16px; font-size: .9rem; } }
.nav { display: none; gap: 22px; }
.nav a { color: #d9d2ee; text-decoration: none; font-size: .95rem; }
.nav a:hover, .nav a:focus-visible { color: var(--white); }
@media (min-width: 900px) { .nav { display: flex; } }

/* Botones */
.btn {
  display: inline-block; padding: 14px 24px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center;
}
.btn--sm { padding: 9px 16px; font-size: .9rem; }
.btn--block { width: 100%; }
.btn--accent { background: var(--yellow); color: var(--ink); }
.btn--accent:hover { background: #ffd24a; }
.btn--ghost { border-color: rgba(255, 255, 255, .55); color: var(--white); }
.btn--ghost:hover { background: rgba(255, 255, 255, .1); }
.sec:not(.sec--dark) .btn--ghost, .result .btn--ghost { border-color: var(--purple); color: var(--purple); }
.btn:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--blue); outline-offset: 2px;
}

/* Portada */
/* Fondo de marca: triángulos facetados (el mismo de credinnova.com) + formas con relieve */
.hero, .chero, .sec--dark, .calc {
  background: linear-gradient(rgba(20, 10, 46, .30), rgba(20, 10, 46, .52)), url("../img/fondo-poligonos.jpg") center / cover no-repeat, var(--ink);
}
.hero, .chero, .bhero, .sec--dark { position: relative; overflow: hidden; }
.deco, .deco img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.deco { display: block; z-index: 0; }
.hero > .wrap, .chero > .wrap, .bhero > .wrap, .sec--dark > .wrap { position: relative; z-index: 1; }

/* Vista ilustrativa del producto (lado derecho de la portada) */
.mock { display: none; position: relative; }
.mock__win { background: rgba(255, 255, 255, .97); color: var(--text); border-radius: 16px; box-shadow: 0 24px 60px rgba(8, 3, 24, .55); overflow: hidden; transform: perspective(1400px) rotateY(-6deg) rotateX(2deg); }
.mock__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--purple); color: #fff; font-size: .8rem; }
.mock__bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .45); }
.mock__bar span { margin-left: 8px; font-weight: 700; }
.mock__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 14px 6px; }
.mock__kpis div { padding: 10px 12px; border-radius: 10px; background: var(--tint); }
.mock__kpis small { display: block; color: var(--muted); font-size: .72rem; }
.mock__kpis strong { font-size: 1.15rem; color: var(--ink); }
.mock__kpis .mock__warn { color: var(--pink); }
.mock__chart { display: flex; align-items: flex-end; gap: 8px; height: 96px; margin: 8px 14px; padding: 0 4px; border-bottom: 1px solid var(--line); }
.mock__chart b { flex: 1; height: var(--h); border-radius: 5px 5px 0 0; background: linear-gradient(var(--blue), var(--purple-2)); }
.mock__chart b:last-child { background: linear-gradient(var(--yellow), var(--pink)); }
.mock__list { margin: 0; padding: 4px 14px 14px; list-style: none; display: grid; gap: 6px; font-size: .85rem; }
.mock__list li { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.mock__list em { font-style: normal; font-weight: 800; color: var(--purple); }
.mock__phone { position: absolute; right: -18px; bottom: -66px; width: 200px; padding: 14px 12px; border-radius: 22px; background: var(--ink); color: #fff; border: 3px solid #3a2a66; box-shadow: 0 18px 40px rgba(8, 3, 24, .55); display: grid; gap: 8px; }
.mock__phone small { font-weight: 700; color: var(--yellow); }
.mock__row { display: flex; justify-content: space-between; gap: 8px; white-space: nowrap; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .09); font-size: .78rem; }
.mock__btn { display: block; padding: 9px; border-radius: 999px; text-align: center; background: var(--yellow); color: var(--ink); font-weight: 800; font-size: .8rem; }
.mock__tag { margin: 54px 0 0; width: calc(100% - 222px); text-align: left; color: #a99fc7; font-size: .78rem; }
/* Variante con foto: se activa sola si existe assets/img/equipo.jpg */
.mock__photo { display: none; }
.mock.has-photo .mock__photo { display: block; position: relative; width: 100%; aspect-ratio: 5 / 4; border-radius: 20px; background-size: cover; background-position: center; box-shadow: 0 24px 60px rgba(8, 3, 24, .55); overflow: hidden; }
.mock.has-photo .mock__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 10, 46, 0) 45%, rgba(20, 10, 46, .55)); }
.mock.has-photo .mock__win { position: absolute; left: -28px; bottom: -44px; width: 60%; transform: none; }
.mock.has-photo .mock__chart { height: 60px; }
.mock.has-photo .mock__list { display: none; }
.mock.has-photo .mock__kpis { grid-template-columns: repeat(2, 1fr); }
.mock.has-photo .mock__kpis div:nth-child(3) { display: none; }
.mock.has-photo .mock__tag { margin-top: 70px; }
@media (min-width: 1000px) {
  .hero__in, .chero__in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
  .mock { display: block; }
}

.hero { color: var(--white); padding: 72px 0 80px; }
.eyebrow { margin: 0 0 14px; color: var(--yellow); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .85rem; }
.hero h1 { margin: 0 0 18px; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.12; max-width: 18ch; }
.lead { margin: 0 0 28px; max-width: 58ch; font-size: 1.15rem; color: #d9d2ee; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 28px 0 0; padding: 0; list-style: none; color: #cfc5ea; font-size: .95rem; }
.hero__facts li::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--blue); }

/* Secciones */
.sec { padding: 72px 0; }
.sec--tint { background: var(--tint); }
.sec--dark { background: var(--ink); color: var(--white); }
.sec h2 { margin: 0 0 8px; font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.2; }
.sub { margin: 0 0 36px; color: var(--muted); max-width: 62ch; }
.sec--dark .sub { color: #cfc5ea; }
.note { margin: 28px 0 0; color: var(--muted); font-size: .95rem; }
.note--light { color: #a99fc7; }

.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card, .feat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card { border-top: 4px solid var(--pink); }
.feat { border-top: 4px solid var(--blue); box-shadow: none; }
.card h3, .feat h3 { margin: 0 0 8px; font-size: 1.08rem; line-height: 1.3; }
.card p, .feat p { margin: 0; color: var(--muted); font-size: .97rem; }

/* Pasos */
.steps { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 0; padding: 0; list-style: none; }
.steps li { background: var(--white); border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.steps__n { display: inline-grid; place-items: center; width: 36px; height: 36px; margin-bottom: 12px; border-radius: 50%; background: var(--purple); color: var(--white); font-weight: 800; }
.steps h3 { margin: 0 0 6px; font-size: 1.08rem; }
.steps p { margin: 0; color: var(--muted); font-size: .97rem; }

/* Testimonios */
.testi { margin: 0; }
.testi__video { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--purple); color: #cfc5ea; font-weight: 700; }
.testi--empty .testi__video { background: transparent; border: 2px dashed var(--line); color: var(--muted); }
.testi figcaption { margin-top: 10px; color: var(--muted); font-size: .92rem; }

/* Planes */
.plans { align-items: stretch; }
.plan { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; }
.plan--rec { border: 2px solid var(--pink); box-shadow: var(--shadow); }
.plan__tag { position: absolute; top: -13px; left: 22px; margin: 0; padding: 3px 12px; border-radius: 999px; background: var(--pink); color: var(--white); font-size: .8rem; font-weight: 700; }
.plan h3 { margin: 0; font-size: 1.2rem; }
.plan__price { margin: 6px 0 14px; color: var(--muted); }
.plan__price strong { font-size: 2.4rem; color: var(--text); }
.plan ul { margin: 0; padding-left: 18px; color: var(--muted); }
.plan li { margin-bottom: 4px; }

.install { display: grid; gap: 14px 32px; grid-template-columns: 1fr; margin-top: 22px; padding: 22px; border-radius: var(--radius); background: var(--ink); color: var(--white); }
@media (min-width: 800px) { .install { grid-template-columns: 1fr 1.4fr; align-items: center; } }
.install h3 { margin: 0 0 4px; color: var(--yellow); }
.install p { margin: 0; color: #cfc5ea; }
.install ul { margin: 0; padding-left: 18px; columns: 1; color: #e6e0f5; }
@media (min-width: 560px) { .install ul { columns: 2; } }

/* Formulario */
.form { display: grid; gap: 16px; padding: 24px; border-radius: var(--radius); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .15); }
.form__grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form__grid { grid-template-columns: 1fr 1fr; } }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.form input[type="text"], .form input[type="tel"], .form select {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid #5a4b87; background: #1d1240; color: var(--white); font: inherit;
}
.form fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.form legend { padding: 0; margin-bottom: 8px; font-weight: 600; line-height: 1.45; }
.form .radio { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.form .radio input { width: 18px; height: 18px; accent-color: var(--yellow); }
.form__error { margin: 0; padding: 10px 14px; border-radius: 10px; background: rgba(232, 33, 107, .18); color: #ffd3e3; }

.result { margin-top: 18px; padding: 24px; border-radius: var(--radius); background: var(--white); color: var(--text); }
.result h3 { margin: 0 0 8px; }
.result p { margin: 0 0 14px; color: var(--muted); }
.agenda-slot { margin-bottom: 16px; padding: 28px 16px; border: 2px dashed var(--line); border-radius: 10px; text-align: center; color: var(--muted); }

/* Preguntas */
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-weight: 700; }
details p { margin: 10px 0 0; color: var(--muted); }

/* Pie */
.foot { background: var(--ink); color: #cfc5ea; padding: 36px 0; }
.foot__in { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .foot__in { grid-template-columns: 1.4fr 1fr 1fr; } .foot__small { grid-column: 1 / -1; } }
.foot p { margin: 8px 0 0; }
.foot a { color: #e6e0f5; }
.foot__h { margin: 0 0 8px; font-size: .95rem; color: var(--white); }
.foot__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.foot__small { margin: 0; font-size: .85rem; color: #a99fc7; }
.foot__small a { color: #cfc5ea; text-decoration: underline; }
.social { display: flex; flex-wrap: wrap; gap: 10px; }
.social a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; text-decoration: none !important; background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .28); transition: background .2s, color .2s, transform .2s; }
.social a:hover, .social a:focus-visible { background: var(--yellow); color: var(--ink); transform: translateY(-2px); }
.social svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.form__legal a { color: #cfc5ea; text-decoration: underline; }
.form__legal { margin: 0; font-size: .85rem; color: #a99fc7; text-align: center; }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
