/* ============================================================
   kit-shell.css — extras for the subsidiary home kits.
   Loaded AFTER colors_and_type.css and summum-system.css.
   ============================================================ */

/* ---------- Bento grid for services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 240px;
  gap: 12px;
}
.svc {
  grid-column: span 2;
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease;
  color: inherit;
}
.svc:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.svc.feat  { grid-column: span 3; grid-row: span 2; background: var(--ink); color: var(--inv); border-color: transparent; }
.svc.feat .desc { color: var(--inv-dim); }
.svc.feat .num  { color: var(--inv-mute); }
.svc.warm  { grid-column: span 3; background: var(--accent); color: #fff; border-color: transparent; }
.svc.warm .desc { color: rgba(255,255,255,0.92); }
.svc.warm .num  { color: rgba(255,255,255,0.7); }
.svc.cream { background: var(--paper-warm); border-color: transparent; }
.svc .num   { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; }
.svc .name  { font-family: var(--display); font-weight: 600; font-size: 24px; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
.svc .desc  { font-size: 13px; line-height: 1.5; color: var(--fg-dim); margin: 0; max-width: 36ch; }
.svc.feat .name { font-size: 36px; max-width: 14ch; }
.svc .arrow {
  position: absolute; bottom: 24px; right: 24px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--fg); color: var(--inv);
  display: grid; place-items: center; font-size: 14px;
  transition: transform 220ms ease;
}
.svc:hover .arrow { transform: translate(2px, -2px); }
.svc.feat .arrow { background: var(--accent-on-dark, var(--accent)); color: var(--ink); }
.svc.warm .arrow { background: #fff; color: var(--accent); }
.svc.feat .num.star { color: var(--accent-on-dark, var(--accent)); }

/* ============================================================
   MEGAMENU
   ============================================================ */
.has-megamenu { position: static; }
.has-megamenu .megamenu-trigger { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.has-megamenu .mm-caret { font-size: 9px; transition: transform 200ms ease; opacity: 0.6; }
.has-megamenu.mm-open .mm-caret { transform: rotate(180deg); opacity: 1; }
.has-megamenu.mm-open .megamenu-trigger { background: var(--paper-soft); }

.megamenu {
  position: fixed;
  top: var(--nav-h, 88px);
  left: 0; right: 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 28px 60px rgba(20,17,13,0.10);
  opacity: 0; pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 90;
  max-height: calc(100vh - var(--nav-h, 88px));
  overflow-y: auto;
  /* MM-FIX 2026-07-11: .megamenu vive anidado dentro de <nav class="nav-links">
     (que fuerza white-space:nowrap para la fila de enlaces superior). Esa
     propiedad se hereda por el DOM hacia .mm-desc/.mm-name aunque el megamenú
     se posicione como overlay fijo aparte. Con muchas secciones (calidad,
     sistemas) las columnas se estrechan y el texto nowrap desborda su columna
     y se solapa visualmente con la columna vecina (parece texto duplicado/
     "scramble" congelado). Se corta la herencia aquí para que todo lo de
     dentro del megamenú vuelva a envolver con normalidad. */
  white-space: normal;
}
.has-megamenu.mm-open .megamenu {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
body.mm-active::before {
  content: ""; position: fixed; inset: var(--nav-h, 88px) 0 0 0;
  background: rgba(10,10,10,0.18);
  z-index: 85; pointer-events: none;
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
}
.megamenu-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 36px clamp(20px, 4vw, 56px) 28px;
}
.mm-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}
.mm-col {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 320ms ease var(--mm-delay, 0ms),
              transform 320ms ease var(--mm-delay, 0ms);
}
.has-megamenu.mm-open .mm-col { opacity: 1; transform: translateY(0); }
.mm-col-h {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-mute);
  padding-bottom: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.mm-col-h .mm-num { color: var(--accent); font-weight: 600; }
.mm-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--fg);
  transition: background 160ms ease, transform 160ms ease;
  margin-left: -14px;
}
.mm-link:hover { background: var(--paper-soft); transform: translateX(2px); }
.mm-link .mm-name {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.mm-link .mm-desc {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-mute);
  letter-spacing: 0.04em;
  margin-top: 4px;
  line-height: 1.4;
}
.mm-foot {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.mm-foot-link {
  color: var(--fg);
  text-decoration: none;
  transition: color 160ms ease;
}
.mm-foot-link:hover { color: var(--accent); }
.mm-foot-link::after { content: " →"; color: var(--accent); }

/* ---------- Hero specific (decorative circles by brand) ---------- */
.hero-circles { position: absolute; inset: 0; pointer-events: none; }
.hero-c1 { top: 80px;  right: 8%;  width: 80px;  height: 80px; }
.hero-c2 { top: 60px;  right: 22%; width: 24px;  height: 24px; }
.hero-c3 { top: 220px; right: 4%;  width: 48px;  height: 48px; }
.hero-c4 { top: 360px; right: 14%; width: 16px;  height: 16px; }
.hero-c5 { top: 480px; right: 28%; width: 100px; height: 100px; opacity: 0.3; }

/* ---------- Quote ---------- */
.quote { padding: 120px 0; text-align: center; }
.quote p {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 auto;
  max-width: 18ch;
}
.quote p .hl { background: var(--accent-soft); padding: 0 12px; border-radius: 6px; }
.quote .attr { margin-top: 36px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--fg-mute); text-transform: uppercase; }

/* ---------- Final CTA ---------- */
.final-cta {
  background: var(--ink);
  color: var(--inv);
  padding: 120px 0 0;
  position: relative;
  overflow: hidden;
}
.final-cta h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(72px, 11vw, 200px);
  line-height: 0.88;
  letter-spacing: -0.06em;
  margin: 0 0 56px;
  max-width: 12ch;
}
.final-cta h2 .it { font-family: var(--serif); font-style: italic; color: var(--accent-on-dark, var(--accent)); font-weight: 400; }
.final-cta .row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 96px; }
.final-circle {
  position: absolute; top: 24px; right: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: var(--accent-on-dark, var(--accent));
  opacity: 0.95;
  z-index: 0;
  animation: float 9s ease-in-out infinite;
}
.final-cta h2 { position: relative; z-index: 1; }
.brand-summum .final-circle { background: var(--accent-grad); }

/* ---------- Home latest articles (editorial module) ---------- */
.home-latest {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(64px, 8vw, 120px) var(--pad-x) clamp(80px, 9vw, 140px);
}
.home-latest-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--line-strong, var(--line));
}
.home-latest-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.02em;
  margin: 0;
}
.home-latest-head a {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 160ms ease;
}
.home-latest-head a:hover { border-color: currentColor; }
.home-latest-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}
.hl-feat {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
.hl-feat:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong, var(--accent));
  box-shadow: 0 20px 40px rgba(20,17,13,0.08);
}
.hl-feat .hl-date {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.hl-feat h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.hl-feat p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-dim);
  margin: 0 0 20px;
  max-width: 52ch;
}
.hl-feat .hl-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; color: var(--fg);
}
.hl-feat .hl-arrow .arr { transition: transform 220ms ease; }
.hl-feat:hover .hl-arrow .arr { transform: translateX(4px); }
.hl-list { display: flex; flex-direction: column; }
.hl-item {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.hl-list .hl-item:last-child { border-bottom: 1px solid var(--line); }
.hl-item .hl-date {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 8px;
}
.hl-item h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.005em;
  margin: 0;
  transition: color 160ms ease;
}
.hl-item:hover h3 { color: var(--accent); }
@media (max-width: 860px) {
  .home-latest-grid { grid-template-columns: 1fr; }
}

/* ---------- Locations grid ---------- */
.loc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.loc {
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 36px 28px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.loc.hq { background: var(--accent-soft); border-color: transparent; }
.loc .city { font-family: var(--display); font-weight: 500; font-size: 32px; letter-spacing: -0.03em; }
.loc .role { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-mute); }
.loc .email { font-family: var(--mono); font-size: 12px; color: var(--fg-dim); }
.loc .dash { width: 32px; height: 1px; background: var(--accent); margin-bottom: 12px; }

/* ---------- Method grid (3 columns numbered) ---------- */
.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.method-step {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 36px 28px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
}
.method-step .step-n {
  font-family: var(--display);
  font-weight: 500;
  font-style: italic;
  font-size: 88px;
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: var(--accent);
}
.method-step h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}
.method-step p { font-size: 14px; line-height: 1.55; color: var(--fg-dim); margin: 0; }

/* ---------- Stat split (used in IA, Calidad) ---------- */
.stat-split {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 48px;
  align-items: stretch;
}
.stat-card {
  background: var(--ink);
  color: var(--inv);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 560px;
  position: relative;
  overflow: hidden;
}
.stat-card h2 {
  font-family: var(--display); font-weight: 500;
  font-size: 84px; letter-spacing: -0.045em; line-height: 0.95;
  margin: 24px 0 0;
}
.stat-card h2 .it { font-family: var(--serif); font-style: italic; color: var(--accent-on-dark, var(--accent)); font-weight: 400; }
.stat-card .body-l { color: var(--inv-dim); max-width: 44ch; margin: 32px 0 36px; }
.stat-card .bg-circle {
  position: absolute; bottom: -120px; right: -120px;
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--accent), transparent 70%);
  opacity: 0.5;
}
.brand-summum .stat-card .bg-circle { background: var(--accent-grad); opacity: 0.4; }
.stat-list { display: flex; flex-direction: column; gap: 16px; }
.stat-row {
  flex: 1;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}
.stat-row .claim {
  font-family: var(--display); font-size: 19px; line-height: 1.3;
  font-weight: 500; letter-spacing: -0.015em; margin-top: 12px;
}
.stat-row .v {
  font-family: var(--display); font-size: 88px; line-height: 1;
  font-weight: 500; letter-spacing: -0.04em; color: var(--accent);
}
.stat-row .v .u { font-size: 0.45em; color: var(--fg); }

/* ---------- Holding-specific: subsidiaries grid ---------- */
.subs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.sub-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 40px 36px 36px;
  background: var(--paper);
  border: 1px solid var(--line);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
.sub-card:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: var(--shadow-3); }
.sub-card .sub-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-mute); }
.sub-card .sub-tag .sub-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 8px; transform: translateY(-1px);
}
.sub-card h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 44px;
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin: 18px 0 4px;
}
.sub-card h3 .it { font-family: var(--serif); font-style: italic; font-weight: 400; }
.sub-card p {
  font-size: 14px; line-height: 1.5; color: var(--fg-dim);
  margin: 0; max-width: 32ch;
}
.sub-card .more {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; margin-top: 18px;
}

/* per-subsidiary accent colors used inside the holding page */
.sub-marketing   { --c: #FF5E1A; }
.sub-consultoria { --c: #0A0A0A; }
.sub-sistemas    { --c: #D89856; }
.sub-ia          { --c: #5A95D6; }
.sub-calidad     { --c: #5FB394; }
.sub-card .sub-dot { background: var(--c, var(--accent)); }
.sub-card h3 .it { color: var(--c, var(--accent)); }
.sub-card .more { color: var(--c, var(--accent)); }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .svc, .svc.feat, .svc.warm { grid-column: span 1; grid-row: auto; min-height: 220px; }
  .loc-grid, .method-grid { grid-template-columns: 1fr 1fr; }
  .stat-split { grid-template-columns: 1fr; }
  .subs-grid  { grid-template-columns: 1fr; }
  .megamenu { top: 64px; max-height: calc(100vh - 64px); }
  .mm-cols { grid-template-columns: 1fr; }
}
