/* Kreia · componentes de las páginas nuevas: home, hub de servicios y plantilla de servicio. */
main { display: flex; flex-direction: column; gap: clamp(64px, 9vw, 120px); padding: clamp(24px, 4vw, 48px) var(--gutter) clamp(64px, 9vw, 120px); max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; }

/* ---------- Héroe de la home ---------- */
.hero { position: relative; min-height: calc(100svh - 120px); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-align: center; gap: 24px; padding: 0 0 clamp(40px, 7vh, 80px); margin-top: -96px; padding-top: 96px; }
.hero .dashes { position: absolute; inset: 0 calc(-1 * var(--gutter)); }
.hero > *:not(.dashes) { position: relative; z-index: 1; }
.hero::after { content: ""; position: absolute; left: 50%; bottom: 0; width: min(1000px, 100%); height: 70%; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(10, 10, 11, .92) 45%, transparent); pointer-events: none; }
.hero .display { font-size: clamp(46px, 8vw, 120px); max-width: 13ch; }
.hero .lead { color: var(--text); font-size: clamp(17px, 1.6vw, 21px); font-weight: 500; letter-spacing: -.02em; max-width: 46ch; }
.dashes { display: block; width: 100%; height: 100%; pointer-events: none; }
.dashes::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, var(--bg) 96%); }
.dashes canvas { width: 100%; height: 100%; display: block; }

/* ---------- Bloque fijo con pasos (sistema KaptIA) ---------- */
.stack { position: relative; }
.stack__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.stack__track { height: calc(var(--steps, 5) * 85vh); }
.stack__pin { position: sticky; top: 96px; height: min(640px, calc(100svh - 120px)); display: grid; grid-template-columns: 1fr 1fr; }
.stack__panel { position: relative; background: var(--accent); color: var(--accent-ink); padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.stack__panel .eyebrow { color: rgba(10, 10, 11, .65); text-align: center; }
.stack__slides { position: relative; flex: 1; display: grid; }
.stack__slide { grid-area: 1 / 1; align-self: center; text-align: center; opacity: 0; transform: translateY(16px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.stack__slide.is-on { opacity: 1; transform: none; }
.stack__slide h3 { font: 500 clamp(30px, 3.6vw, 52px)/1.04 var(--f-head) !important; letter-spacing: -.035em !important; color: var(--accent-ink) !important; margin-bottom: 16px !important; }
.stack__slide p { max-width: 40ch; margin: 0 auto 18px !important; font-size: 16px; line-height: 1.5; }
.stack__slide a { font-weight: 600; font-size: 14px; color: var(--accent-ink); }
.stack__dots { display: flex; justify-content: center; gap: 6px; }
.stack__dots i { width: 18px; height: 4px; background: rgba(10, 10, 11, .25); transition: background .3s, width .3s; }
.stack__dots i.is-on { width: 34px; background: var(--accent-ink); }
.stack__art { position: relative; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); border-left: 0; }
.stack__art::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(244, 244, 241, .16) 1px, transparent 1.4px); background-size: 40px 40px; background-position: 20px 20px; }
.stack__card { position: relative; z-index: 1; width: min(78%, 420px); aspect-ratio: 1; background: var(--light); display: grid; place-items: center; }
.stack__card [data-iso] { grid-area: 1 / 1; width: 82%; opacity: 0; transition: opacity .45s var(--ease); }
.stack__card [data-iso].is-on { opacity: 1; }

/* ---------- Dos públicos ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.duo__card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); }
.duo__top { display: flex; justify-content: space-between; align-items: start; gap: 16px; padding: clamp(22px, 3vw, 34px); min-height: 220px; }
.duo__top .h2 { font-size: clamp(30px, 3.4vw, 48px); }
.duo__top [data-iso] { width: 46%; max-width: 220px; }
.duo__rows { list-style: none; margin: 0; padding: 0; }
.duo__rows li { position: relative; padding: 18px clamp(22px, 3vw, 34px) 18px calc(clamp(22px, 3vw, 34px) + 22px); border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.duo__rows li::before { content: ""; position: absolute; left: clamp(22px, 3vw, 34px); top: 26px; width: 8px; height: 8px; background: var(--accent); }
.duo__rows li a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.duo__foot { display: flex; margin-top: auto; border-top: 1px solid var(--line); }
.duo__foot a { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 52px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 15px; text-decoration: none; }
.duo__foot a + a { flex: none; width: 52px; border-left: 1px solid var(--accent-ink); }
.duo__foot a:hover { background: #ff8a2e; }

/* ---------- Secciones genéricas ---------- */
.sec { padding: clamp(24px, 3.4vw, 44px); background: var(--bg); }
.sec__head { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(26px, 3.6vw, 44px); max-width: 860px; }
.sec__head--row { max-width: none; flex-direction: row; justify-content: space-between; align-items: end; }

/* Cuadrícula de servicios */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.svc { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 230px; padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; transition: background-color .25s; }
.svc:hover { background: var(--panel); }
.svc__num { font: 500 12px/1 var(--f-mono); color: var(--muted); }
.svc__group { font: 500 11px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: auto; }
.svc__name { font: 500 clamp(22px, 2vw, 28px)/1.05 var(--f-head) !important; letter-spacing: -.03em !important; }
.svc__tag { font-size: 14px; color: var(--muted); max-width: 32ch; }
.svc__go { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius); font-size: 15px; transition: background-color .25s, color .25s, border-color .25s; }
.svc:hover .svc__go { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.svc--featured { grid-column: span 2; background: var(--accent); color: var(--accent-ink); }
.svc--featured:hover { background: #ff8a2e; }
.svc--featured .svc__num, .svc--featured .svc__group, .svc--featured .svc__tag { color: rgba(10, 10, 11, .65); }
.svc--featured .svc__name { font-size: clamp(34px, 3.6vw, 52px) !important; color: var(--accent-ink) !important; }
.svc--featured .svc__go { border-color: var(--accent-ink); }
.svc--featured:hover .svc__go { background: var(--accent-ink); color: var(--accent); }
.svc-grid--home .svc--featured { grid-row: span 2; justify-content: flex-end; }
.svc-grid--home .svc--featured .svc__group { margin-top: 0; }
.svc-grid--home .svc--featured .svc__name { font-size: clamp(48px, 6vw, 92px) !important; }
.svc-grid--home .svc--featured .svc__tag { font-size: 17px; }
.svc-grid--1 { grid-template-columns: 1fr; }
.svc-grid--4, .svc-grid--related { grid-template-columns: repeat(4, 1fr); }
.svc-grid--4 .svc--featured { grid-column: auto; }
.svc-grid--4 .svc--featured .svc__name { font-size: clamp(22px, 2vw, 28px) !important; }
.svc-grid--1 .svc { min-height: 180px; }
.svc-grid--related .svc--featured { grid-column: auto; }
.svc-grid--related .svc--featured .svc__name { font-size: clamp(22px, 2vw, 28px) !important; }

/* ---------- Cinta de clientes ---------- */
.clients { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.clients__marquee { width: 100%; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 26px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.clients__row { display: flex; width: max-content; margin: 0; padding: 0; list-style: none; animation: kbLoop 48s linear infinite; }
.clients__row li { display: flex; align-items: center; padding: 0 clamp(28px, 4vw, 56px); }
.clients__marquee:hover .clients__row { animation-play-state: paused; }
.clients .client-logo.is-image { height: 50px; width: auto; opacity: .85; display: block; }
.clients .client-logo.is-image[src*="arge"] { height: 70px; filter: grayscale(1) brightness(1.5) contrast(.9); }
.clients .client-logo.is-image[src*="laura"] { height: 40px; }
.clients .client-logo.is-text { font: 600 22px/1 var(--f-head); letter-spacing: -.03em; color: var(--text); opacity: .85; }
@keyframes kbLoop { to { transform: translateX(-50%); } }

/* ---------- Sección clara (datos) ---------- */
.light { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; padding: clamp(32px, 5vw, 72px); background: var(--light); color: var(--bg); }
.light .h2, .light h3 { color: var(--bg) !important; }
.light .lead { color: #4a4a47; }
.light__list { list-style: none; margin: 28px 0; padding: 0; display: grid; gap: 1px; background: #d6d6d0; border: 1px solid #d6d6d0; }
.light__list li { padding: 16px 18px; background: var(--light); font-size: 15px; color: #3a3a37; }
.light__list b { display: block; margin-bottom: 4px; font: 500 17px/1.2 var(--f-head); letter-spacing: -.02em; color: var(--bg); }
.light [data-iso] { width: 100%; max-width: 460px; justify-self: center; }

/* ---------- Calculadora ---------- */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); }
.calc__form { display: flex; flex-direction: column; gap: 22px; }
.calc__form label { display: flex; flex-direction: column; gap: 10px; }
.calc__form label > span { display: flex; justify-content: space-between; font-size: 14px; font-weight: 500; }
.calc__form output { font: 500 13px/1 var(--f-mono); color: var(--accent); }
.calc input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
.calc input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), var(--line) var(--p, 50%)); }
.calc input[type="range"]::-moz-range-track { height: 2px; background: var(--line); }
.calc input[type="range"]::-moz-range-progress { height: 2px; background: var(--accent); }
.calc input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -7px; background: var(--accent); border: 0; border-radius: 2px; }
.calc input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; background: var(--accent); border: 0; border-radius: 2px; }
.calc__out { padding: 26px; background: var(--accent); color: var(--accent-ink); }
.calc__out p { font-size: 14px; }
.calc__out strong { display: block; margin: 8px 0 10px; font: 600 clamp(46px, 6vw, 84px)/1 var(--f-head); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.calc small { font-size: 12px; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq, .faq__list { border-top: 1px solid var(--line); }
.faq__item, .faq-item { border-bottom: 1px solid var(--line); }
.faq__item summary, .faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; padding: 22px 0; font: 500 clamp(17px, 1.5vw, 20px)/1.3 var(--f-head); letter-spacing: -.02em; }
.faq__item summary::-webkit-details-marker, .faq-item summary::-webkit-details-marker { display: none; }
.faq__item summary::after, .faq-item summary::after { content: "+"; flex: none; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius); font: 400 18px/1 var(--f-text); color: var(--muted); transition: transform .3s var(--ease); }
.faq__item[open] summary::after, .faq-item[open] summary::after { transform: rotate(45deg); color: var(--accent); border-color: var(--accent); }
.faq__item p, .faq-item p { padding: 0 0 22px; max-width: 70ch; color: var(--muted); }

/* ---------- Cierre con barras ---------- */
.cta-bars { position: relative; overflow: hidden; min-height: 70svh; display: grid; place-items: center; text-align: center; border: 1px solid var(--line); background: var(--bg); }
.cta-bars__inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 64px var(--gutter); }
.cta-bars .lead { color: var(--text); }
.bars { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: space-between; pointer-events: none; }
.bars i { width: 3px; background: linear-gradient(180deg, transparent, var(--accent)); transform-origin: bottom; animation: kbBars 2.8s ease-in-out infinite alternate; opacity: .9; }
@keyframes kbBars { from { transform: scaleY(.35); } to { transform: scaleY(1); } }

/* ---------- Plantilla de servicio ---------- */
.s-hero { position: relative; padding: clamp(22px, 3.4vw, 44px); overflow: hidden; }
.s-hero .dashes { position: absolute; inset: 0; opacity: .55; }
.s-hero > *:not(.dashes) { position: relative; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(28px, 5vw, 64px); font: 500 12px/1 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--text); }
.s-hero__grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: end; }
.s-hero__copy { display: flex; flex-direction: column; gap: 22px; }
.s-hero .display { font-size: clamp(34px, 4.3vw, 64px); line-height: 1.02; }
.answer { max-width: 62ch; font-size: 17px; line-height: 1.6; color: #cfcfca; padding-left: 16px; border-left: 2px solid var(--accent); }
.answer strong { color: var(--text); font-weight: 600; }
.updated { font: 500 12px/1 var(--f-mono); color: var(--muted); }
.facts { background: var(--panel); border: 1px solid var(--line); padding: 20px; }
.facts dl { margin: 14px 0 0; }
.facts dl div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.facts dt { font: 500 11px/1.4 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; color: var(--text); }
.facts dd a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.facts dd a:hover { text-decoration-color: var(--accent); }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.ticks li { position: relative; padding: 20px 20px 20px 46px; background: var(--bg); font-size: 16px; line-height: 1.45; }
.ticks li::before { content: ""; position: absolute; left: 20px; top: 27px; width: 10px; height: 10px; background: var(--accent); }

.fit { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.fit__col { padding: 24px; background: var(--bg); }
.fit__col h3 { font-size: 20px !important; margin-bottom: 14px !important; }
.fit__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fit__col li { display: flex; gap: 12px; align-items: baseline; color: #cfcfca; }
.fit__col--yes li::before { content: "✓"; color: var(--green); font-weight: 700; }
.fit__col--no li::before { content: "×"; color: var(--accent); font-weight: 700; }

.cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cell { display: flex; flex-direction: column; gap: 10px; padding: 24px; background: var(--bg); min-height: 200px; }
.cell__num { font: 500 12px/1 var(--f-mono); color: var(--accent); }
.cell h3 { font-size: 20px !important; line-height: 1.15; }
.cell p { font-size: 15px; color: var(--muted); }

.slab { display: grid; grid-template-columns: 1.2fr .8fr; background: var(--accent); color: var(--accent-ink); }
.slab__text { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: clamp(28px, 4.4vw, 64px); }
.slab__text .h2 { color: var(--accent-ink) !important; }
.slab__text p:not(.eyebrow) { max-width: 56ch; font-size: 17px; line-height: 1.55; }
.slab__art { display: grid; place-items: center; padding: 24px; background: var(--light); }
.slab__art svg { width: 86%; max-width: 360px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); counter-reset: none; }
.steps__item { display: flex; flex-direction: column; gap: 10px; padding: 24px; background: var(--bg); }
.steps__num { width: 34px; height: 34px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 600 13px/1 var(--f-mono); border-radius: var(--radius); margin-bottom: 8px; }
.steps__item h3 { font-size: 19px !important; }
.steps__item p { font-size: 15px; color: var(--muted); }

.needs { border-top: 1px solid var(--line); }
.needs__row { display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; transition: padding-left .25s var(--ease), background-color .25s; }
.needs__row:hover { padding-left: 14px; background: var(--panel); }
.needs__need { font: 500 clamp(17px, 1.6vw, 22px)/1.25 var(--f-head); letter-spacing: -.02em; }
.needs__svc { flex: none; font-size: 14px; font-weight: 500; color: var(--accent); }

.guides { margin-top: 28px; }
.guides ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.guides a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.guides a:hover { text-decoration-color: var(--accent); }

/* Ilustraciones isométricas */
[data-iso] svg { display: block; width: 100%; height: auto; overflow: visible; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .svc-grid, .svc-grid--4, .svc-grid--related { grid-template-columns: repeat(2, 1fr); }
  .svc-grid--1 { grid-template-columns: 1fr; }
  .svc-grid--home .svc--featured { grid-row: auto; }
  .cells { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hero { margin-top: -84px; }
  .stack__track { height: auto; }
  .stack__pin { position: static; height: auto; grid-template-columns: 1fr; }
  .stack__slides { display: flex; flex-direction: column; gap: 32px; padding: 24px 0; }
  .stack__slide { opacity: 1; transform: none; }
  .stack__dots { display: none; }
  .stack__art { border-left: 1px solid var(--line); border-top: 0; padding: 24px 0; }
  .duo, .light, .calc, .s-hero__grid, .slab, .fit { grid-template-columns: 1fr; }
  .sec__head--row { flex-direction: column; align-items: start; }
}
@media (max-width: 640px) {
  .svc-grid, .svc-grid--4, .svc-grid--related, .cells, .steps { grid-template-columns: 1fr; }
  .svc--featured { grid-column: auto; }
  .facts dl div { grid-template-columns: 1fr; gap: 4px; }
  .duo__top [data-iso] { display: none; }
  .needs__row { flex-direction: column; align-items: start; gap: 6px; }
}

/* =====================================================================
   Fusión con la versión Atmos
   ===================================================================== */
.hero .dashes { opacity: .6; width: auto; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 98%); mask-image: linear-gradient(180deg, #000 55%, transparent 98%); }
.hero .dashes::after { display: none; }
.s-hero .dashes { opacity: .35; }
.cta-bars { background: transparent; border-color: rgba(244, 244, 241, .12); }
.svc__go, .faq__item summary::after, .faq-item summary::after, .steps__num { border-radius: var(--pill); }

/* Frases a pantalla completa que se iluminan palabra a palabra */
.say { min-height: 88svh; display: grid; place-items: center; padding: 8vh var(--gutter); }
.say__text { max-width: 22ch; margin: 0; text-align: center; font: 500 clamp(32px, 4.8vw, 68px)/1.1 var(--f-head); letter-spacing: -.035em; text-wrap: balance; color: var(--text); }
.say__text .w { opacity: .14; transition: opacity .35s linear; }
.say__text .w.lit { opacity: 1; }
.say__text .hl { color: var(--accent); }
.say--accent .say__text { color: var(--accent-ink); }

/* Esquinas del héroe: actividad en vivo y accesos rápidos */
.hero__corner { position: absolute !important; bottom: 18px; z-index: 1; text-align: left; font-size: 13px; line-height: 1.25; font-weight: 500; }
.live { left: 0; }
.live__card { position: relative; width: 176px; height: 112px; margin-bottom: 10px; overflow: hidden; border-radius: 6px; background: linear-gradient(140deg, #ff8a2e, #FF6F00 40%, #5a1d00); }
.live__feed { list-style: none; margin: 0; padding: 0; }
.live__feed li { position: absolute; inset: auto 12px 12px; color: var(--accent-ink); font: 600 13px/1.25 var(--f-text); opacity: 0; transform: translateY(8px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.live__feed li.on { opacity: 1; transform: none; }
.live__feed time { display: block; margin-bottom: 4px; font: 500 11px/1 var(--f-mono); opacity: .65; }
.live__dot { position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--light); animation: kbPing 2s infinite; }
@keyframes kbPing { 0% { box-shadow: 0 0 0 0 rgba(244, 244, 241, .7); } 70% { box-shadow: 0 0 0 10px rgba(244, 244, 241, 0); } 100% { box-shadow: 0 0 0 0 rgba(244, 244, 241, 0); } }
.live p { color: var(--muted); }
.live strong { color: var(--text); font-weight: 500; }
.hero__links { right: 0; display: flex; gap: 18px; }
.hero__links a { color: var(--text); opacity: .8; text-decoration: none; }
.hero__links a:hover { opacity: 1; }
@media (max-width: 860px) { .hero__corner { display: none; } }
