/* I2B service-detail pages — shared layout
   Sits on top of /assets/site.css. */

.svc-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: start; }
.svc-hero h1 em { color: var(--i2b-red); font-style: normal; }
.svc-hero h1 .dim { color: var(--muted); display: block; }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.tag-row .chip-soft { background: rgba(255,0,0,.06); border-color: rgba(255,0,0,.20); color: var(--i2b-red); }
.svc-hero .ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.svc-hero .note { color: var(--muted); font-size: 12px; letter-spacing: .04em; font-weight: 800; margin-top: 16px; }

/* Aside stats */
.aside-stats { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.ha-card {
  position: relative; min-width: 0; padding: 22px 24px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: #fff; box-shadow: 0 14px 38px rgba(23,23,23,.05);
  overflow: hidden;
  overflow-wrap: break-word;
}
.ha-card.featured { border-color: rgba(255,0,0,.30); }
.ha-card.featured::before {
  content: ""; position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle,rgba(255,0,0,.12),transparent 70%);
  pointer-events: none;
}
.ha-n { font-family: Manrope, Inter, sans-serif; font-size: 38px; font-weight: 800; color: var(--i2b-red); line-height: 1; letter-spacing: -.04em; }
.ha-l { font-size: 13px; color: var(--graphite); margin-top: 6px; line-height: 1.45; font-weight: 800; }
.ha-src { font-size: 11px; color: var(--muted); letter-spacing: .04em; margin-top: 6px; font-weight: 800; }

/* Deliverables grid */
.dlv-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.dlv {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: #fff; box-shadow: 0 14px 38px rgba(23,23,23,.04);
  display: flex; flex-direction: column;
  overflow-wrap: break-word;
  transition: transform var(--ease), border-color var(--ease);
}
.dlv:hover { transform: translateY(-4px); border-color: rgba(255,0,0,.24); }
.dlv-n { font-size: 11px; color: var(--muted); letter-spacing: .14em; font-weight: 950; margin-bottom: 12px; }
.dlv h3 { font-size: 18px; margin-bottom: 8px; }
.dlv p { font-size: 14px; line-height: 1.65; flex: 1; }

/* Strategy / illustration section */
.illus-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: center; }
.illus-grid h2 em { color: var(--i2b-red); font-style: normal; }
.illus-svg { width: 100%; height: auto; max-width: 600px; margin-left: auto; }
.illus-svg .box { fill: #fff; stroke: var(--line); stroke-width: 1.4; }
.illus-svg .box.ghost { fill: var(--soft); stroke-dasharray: 4 4; }
.illus-svg .box.live { stroke: var(--i2b-red); stroke-width: 2; }
.illus-svg .label { font: 800 11px/1 Manrope,Inter,sans-serif; fill: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.illus-svg .label.live { fill: var(--i2b-red); }
.illus-svg .arrow { stroke: var(--i2b-red); stroke-width: 1.5; fill: none; marker-end: url(#arrow); }

/* Engagement / models grid */
.eng-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.ec { min-width: 0; padding: 32px 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; overflow-wrap: break-word; transition: transform var(--ease), border-color var(--ease); }
.ec:hover { transform: translateY(-4px); border-color: rgba(255,0,0,.24); }
.ec.featured { border-top: 3px solid var(--i2b-red); }
.ec-num { font-family: Manrope, Inter, sans-serif; font-size: 56px; font-weight: 800; color: rgba(23,23,23,.06); line-height: 1; letter-spacing: -.04em; margin-bottom: 12px; }
.ec h3 { font-size: 20px; margin-bottom: 10px; }
.ec p { font-size: 14px; line-height: 1.65; margin-bottom: 18px; }
.ec .detail { font-size: 12px; color: var(--muted); letter-spacing: .04em; line-height: 1.8; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 800; }
.ec .badge-mini { color: var(--i2b-red); font-size: 11px; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }

/* AI Business Lab hero — orbital panel */
.ai-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(380px, .88fr);
  gap: 50px;
  align-items: center;
}
.ai-hero-grid h1 em { color: var(--i2b-red); font-style: normal; }
.hero-visual { min-height: 600px; position: relative; }
.futuristic-panel {
  position: relative;
  min-height: 590px;
  border-radius: 44px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
  background:
    radial-gradient(circle at 50% 50%, rgba(255,0,0,.20), transparent 31%),
    radial-gradient(circle at 80% 20%, rgba(0,0,0,.09), transparent 22%),
    linear-gradient(145deg, #ffffff, #f2f2f4);
  box-shadow: var(--shadow-soft);
}
.futuristic-panel.dark-panel {
  border-color: rgba(255,255,255,.12);
  background:
    radial-gradient(circle at 50% 40%, rgba(255,0,0,.24), transparent 31%),
    radial-gradient(circle at 90% 10%, rgba(255,0,0,.20), transparent 24%),
    linear-gradient(145deg, #111116, #2a2a31 54%, #0a0a0d);
  box-shadow: 0 34px 100px rgba(0,0,0,.22);
}
.orb {
  position: absolute;
  left: 50%; top: 50%;
  width: 206px; height: 206px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #ff8888, var(--i2b-red) 37%, #600 75%);
  box-shadow: 0 0 0 24px rgba(255,0,0,.08), 0 0 0 58px rgba(255,0,0,.045), 0 34px 90px rgba(255,0,0,.32);
  display: grid; place-items: center;
  color: #fff;
  text-align: center;
  font-family: Manrope, Inter, sans-serif;
  font-weight: 900;
  letter-spacing: -.05em;
  font-size: 40px;
  line-height: 1;
}
.orbit {
  position: absolute;
  border: 1px solid rgba(255,0,0,.16);
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: i2bOrbitSpin 26s linear infinite;
  will-change: transform;
}
.orbit::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--i2b-red);
  box-shadow: 0 0 18px rgba(255,0,0,.74);
}
.orbit.o1 { width: 390px; height: 390px; }
.orbit.o2 { width: 510px; height: 510px; border-color: rgba(0,0,0,.10); animation-duration: 36s; animation-direction: reverse; }
.orbit.o3 { width: 670px; height: 670px; border-color: rgba(255,0,0,.08); animation-duration: 48s; }
.dark-panel .orbit.o2 { border-color: rgba(255,255,255,.10); }
.visual-node {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 18px 44px rgba(0,0,0,.10);
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  max-width: min(230px, 42%);
  line-height: 1.1;
  overflow-wrap: anywhere;
  --motion-x: 0px;
  --motion-y: -8px;
  --motion-rotate: 0deg;
  animation: i2bFloat 7.4s ease-in-out infinite;
  will-change: transform;
}
.dark-panel .visual-node { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.15); }
.visual-node::before {
  content: ""; width: 9px; height: 9px; border-radius: 999px;
  background: var(--i2b-red);
  box-shadow: 0 0 18px rgba(255,0,0,.72);
  animation: i2bDotPulse 2.9s ease-in-out infinite;
}
.node-a { top: 58px; left: 46px; --motion-x: 12px; --motion-y: -7px; --motion-rotate: -1.4deg; }
.node-b { top: 86px; right: 44px; --motion-x: -10px; --motion-y: 9px; --motion-rotate: 1.2deg; animation-delay: -1.5s; }
.node-c { top: 254px; left: 28px; --motion-x: 8px; --motion-y: 10px; --motion-rotate: 1deg; animation-delay: -3s; }
.node-d { top: 266px; right: 28px; --motion-x: -11px; --motion-y: -9px; --motion-rotate: -1.1deg; animation-delay: -2.2s; }
.node-e { bottom: 88px; left: 52px; --motion-x: 10px; --motion-y: -8px; --motion-rotate: 1.4deg; animation-delay: -4.1s; }
.node-f { bottom: 66px; right: 54px; --motion-x: -8px; --motion-y: 9px; --motion-rotate: -1deg; animation-delay: -5s; }
@media (max-width: 1080px) {
  .ai-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { min-height: auto; }
  .futuristic-panel { min-height: 510px; border-radius: 30px; }
  .orb { width: 160px; height: 160px; font-size: 32px; }
  .visual-node { max-width: 190px; padding: 10px 12px; font-size: 12px; }
  .orbit.o1 { width: 290px; height: 290px; }
  .orbit.o2 { width: 380px; height: 380px; }
  .orbit.o3 { width: 480px; height: 480px; }
}

/* Unit detail blocks + compact services (Unidades de negocio page) */
.unit-detail-block { padding: 54px 0; border-bottom: 1px solid var(--line); }
.unit-detail-block:last-child { border-bottom: 0; }
.unit-detail-head {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 34px;
  margin-bottom: 26px;
  align-items: start;
}
.unit-number {
  color: var(--i2b-red);
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 12px;
}
.unit-detail-head h3 { margin-bottom: 12px; font-size: clamp(24px, 2.4vw, 32px); }
.unit-detail-head p { font-size: 16px; line-height: 1.68; color: var(--muted); }
.compact-services {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.compact-service {
  min-width: 0;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #fff;
  min-height: 250px;
  box-shadow: 0 12px 34px rgba(23,23,23,.045);
  transition: transform var(--ease), border-color var(--ease);
  display: flex; flex-direction: column;
  overflow-wrap: break-word;
}
.compact-service:hover { transform: translateY(-4px); border-color: rgba(255,0,0,.24); }
.compact-service .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 12px;
  background: var(--i2b-red);
  color: #fff;
  font-size: 13px; font-weight: 950;
  margin-bottom: 14px;
}
.compact-service strong {
  display: block;
  font-family: Manrope, Inter, sans-serif;
  font-size: 17px; line-height: 1.18; letter-spacing: -.03em;
  margin-bottom: 10px;
  color: var(--ink);
}
.compact-service p { font-size: 13px; line-height: 1.57; color: var(--muted); }
.compact-service ul { padding-left: 16px; margin-top: 10px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.compact-service ul li { margin: 3px 0; }
@media (max-width: 1180px) {
  .compact-services { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .compact-service { min-height: auto; }
}
@media (max-width: 820px) {
  .unit-detail-head { grid-template-columns: 1fr; gap: 14px; }
  .compact-services { grid-template-columns: 1fr; }
}

/* Framework visual (4 flow boxes) — for Unidades hero */
.framework-visual {
  position: relative;
  min-width: 0;
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  overflow: hidden;
}
.flow-box {
  position: relative;
  min-width: 0;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fafafa);
  overflow: hidden;
  overflow-wrap: break-word;
  --motion-x: 0px;
  --motion-y: -6px;
  --motion-rotate: 0deg;
  animation: i2bFloat 8.4s ease-in-out infinite;
  will-change: transform;
}
.flow-box::before {
  content: ""; position: absolute; right: -36px; top: -36px;
  width: 96px; height: 96px; border-radius: 50%;
  background: rgba(255,0,0,.08);
  animation: i2bHaloPulse 4.8s ease-in-out infinite;
}
.flow-box:nth-child(1) { --motion-x: 7px; --motion-y: -6px; --motion-rotate: -.7deg; }
.flow-box:nth-child(2) { --motion-x: -6px; --motion-y: 7px; --motion-rotate: .8deg; animation-delay: -1.4s; }
.flow-box:nth-child(3) { --motion-x: 5px; --motion-y: 8px; --motion-rotate: .6deg; animation-delay: -2.8s; }
.flow-box:nth-child(4) { --motion-x: -7px; --motion-y: -5px; --motion-rotate: -.8deg; animation-delay: -4.2s; }
.flow-box .ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--i2b-red);
  color: #fff;
  font-weight: 950;
  margin-bottom: 18px;
}
.flow-box strong {
  display: block;
  font-family: Manrope, Inter, sans-serif;
  font-size: 18px; line-height: 1.1; letter-spacing: -.03em;
  color: var(--ink);
}
.flow-box p { font-size: 13px; line-height: 1.55; margin-top: 10px; color: var(--muted); }

/* Dark framework band (preview style) */
.dark-band-fw {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 18%, rgba(255,0,0,.28), transparent 30%),
    radial-gradient(circle at 10% 80%, rgba(255,0,0,.22), transparent 35%),
    linear-gradient(135deg, #101014, #292931 55%, #070708);
  color: #fff;
}
.dark-band-fw::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 72% 40%, black, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 72% 40%, black, transparent 70%);
  pointer-events: none;
}
.dark-band-fw .container { position: relative; z-index: 1; }
.dark-band-fw h2,
.dark-band-fw .lead { color: #fff; }
.dark-band-fw .lead { color: rgba(255,255,255,.74); }
.fw-split {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(420px, 1.05fr);
  gap: 46px;
  align-items: center;
}
.mini-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.mini-metric {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.88);
  font-size: 14px; font-weight: 800;
}
.framework-card {
  min-width: 0;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.075);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow-wrap: break-word;
}
.framework-title {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; margin-bottom: 22px;
}
.framework-title strong { color: #fff; font-family: Manrope, Inter, sans-serif; font-size: 19px; letter-spacing: -.03em; }
.framework-title span { color: #ff9a9a; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; font-weight: 950; }
.fw-steps { display: grid; gap: 13px; }
.fw-step {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.065);
  border: 1px solid rgba(255,255,255,.12);
}
.fw-step-num {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--i2b-red);
  color: #fff; font-weight: 950;
}
.fw-step strong { color: #fff; display: block; font-size: 15px; margin-bottom: 5px; font-family: Manrope, Inter, sans-serif; letter-spacing: -.01em; }
.fw-step p { color: rgba(255,255,255,.66); font-size: 13px; line-height: 1.5; }
@media (max-width: 1080px) {
  .fw-split { grid-template-columns: 1fr; gap: 32px; }
  .mini-metrics { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .orbit,
  .orbit::after,
  .visual-node,
  .visual-node::before,
  .flow-box,
  .flow-box::before {
    animation: none;
  }
}

/* Accordion service details (per service: qué hacemos / método / entregables) */
.accordion-list { display: grid; gap: 16px; }
details.service-detail {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(23,23,23,.05);
  overflow: hidden;
  transition: border-color var(--ease), box-shadow var(--ease);
}
details.service-detail[open] { box-shadow: var(--shadow-soft); border-color: rgba(255,0,0,.20); }
details.service-detail summary {
  list-style: none;
  cursor: pointer;
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}
details.service-detail summary::-webkit-details-marker { display: none; }
.summary-num {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: rgba(255,0,0,.08);
  color: var(--i2b-red);
  display: grid; place-items: center;
  font-weight: 950;
}
.summary-title strong { display: block; font-family: Manrope, Inter, sans-serif; font-size: 22px; letter-spacing: -.04em; line-height: 1.13; color: var(--ink); }
.summary-title span { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }
.summary-plus {
  width: 34px; height: 34px;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--i2b-red);
  font-weight: 950;
  transition: background var(--ease), color var(--ease);
}
details[open] .summary-plus { background: var(--i2b-red); color: #fff; border-color: var(--i2b-red); transform: rotate(45deg); }
.detail-body {
  padding: 0 28px 28px 90px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 18px;
}
.detail-box {
  min-width: 0;
  border-radius: 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 18px;
}
.detail-box h5 { font-size: 12px; color: var(--i2b-red); text-transform: uppercase; letter-spacing: .14em; margin-bottom: 10px; font-weight: 950; }
.detail-box ul { padding-left: 18px; color: var(--graphite); font-size: 14px; line-height: 1.7; }
.detail-box li { margin: 5px 0; }
.detail-box.full { grid-column: 1 / -1; }
@media (max-width: 820px) {
  details.service-detail summary { grid-template-columns: 38px 1fr; padding: 18px 20px; }
  .summary-plus { display: none; }
  .summary-num { width: 38px; height: 38px; }
  .summary-title strong { font-size: 18px; }
  .detail-body { grid-template-columns: 1fr; padding: 0 20px 22px; }
}

/* Proof metrics */
.metrics-row { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-top: 28px; }
.metric { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; overflow-wrap: break-word; }
.metric strong { display: block; color: var(--i2b-red); font-family: Manrope, Inter, sans-serif; font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.metric span { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.4; font-weight: 800; }

@media (max-width: 1080px) {
  .svc-hero-grid, .illus-grid { grid-template-columns: 1fr; gap: 32px; }
  .dlv-grid, .eng-grid { grid-template-columns: 1fr; }
  .metrics-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .framework-visual { grid-template-columns: 1fr; padding: 18px; gap: 12px; }
  .flow-box { padding: 18px; }
  .unit-detail-head { grid-template-columns: 1fr; gap: 14px; }
  .compact-services { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .metrics-row,
  .mini-metrics { grid-template-columns: 1fr; }
  .framework-card { padding: 22px; border-radius: 22px; }
}

@media (max-width: 820px) {
  .ai-hero-grid { gap: 22px; }
  .hero-visual { display: none; }
  .framework-visual .flow-box:nth-child(n+3),
  .mini-metrics,
  .accordion-list > details.service-detail:nth-of-type(n+4) { display: none; }
  .unit-detail-block { padding: 30px 0; }
  .unit-detail-head p { font-size: 14px; line-height: 1.55; }
  .compact-services { display: none; }
  .framework-card { padding: 20px; }
  .framework-title { margin-bottom: 16px; }
  .fw-step:nth-child(n+3) { display: none; }
  .fw-step { grid-template-columns: 36px minmax(0, 1fr); padding: 14px; }
  .fw-step-num { width: 36px; height: 36px; border-radius: 12px; }
  .dlv-grid > .dlv:nth-child(n+4),
  .eng-grid > .ec:nth-child(n+3) { display: none; }
}
