/* ============================================================
   KERNEL · sitio nuevo — styles.css
   Paleta basada en el azul corporativo original (#1b4566 / #0064A8)
   ============================================================ */

:root {
  --bg: #0a1929;
  --bg-2: #0d2137;
  --surface: #11283f;
  --surface-2: #16314c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #e8eef5;
  --muted: #9fb3c8;
  --brand: #2f9bd6;
  --brand-2: #0064a8;
  --brand-deep: #1b4566;
  --accent: #4fd1c5;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --maxw: 1160px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* animatable angle for the card border-beam */
@property --beam {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .brand-text { font-family: "Archivo", "Inter", sans-serif; line-height: 1.1; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  z-index: 1000; transition: width 0.1s linear;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  padding: 18px 0;
  transition: background 0.3s var(--ease), padding 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.site-header.scrolled {
  background: rgba(10, 25, 41, 0.85);
  backdrop-filter: blur(14px);
  padding: 12px 0;
  box-shadow: 0 1px 0 var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; }
.brand-logo {
  height: 50px; width: auto; display: block;
  transition: transform 0.3s var(--ease), filter 0.3s var(--ease);
}
.site-header.scrolled .brand-logo { height: 44px; }
.brand:hover .brand-logo { transform: translateY(-1px); filter: brightness(1.05); }
.brand-footer .brand-logo { height: 56px; }

/* ---- Language switch ---- */
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px; margin-left: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px;
}
.lang-switch button {
  border: 0; background: none; cursor: pointer; color: var(--muted);
  font-family: "Archivo"; font-weight: 600; font-size: 13px; letter-spacing: 0.5px;
  padding: 6px 12px; border-radius: 999px; transition: color 0.2s, background 0.2s;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.active { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative;
  padding: 9px 14px; border-radius: 999px; font-size: 15px; font-weight: 500;
  color: var(--muted); transition: color 0.22s var(--ease);
}
/* animated underline draw on the top menu */
.nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 1.5px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transform: scaleX(0); transform-origin: left; border-radius: 2px;
  transition: transform 0.28s var(--ease);
}
.nav a:not(.nav-cta):hover { color: var(--text); }
.nav a:not(.nav-cta):hover::after { transform: scaleX(1); }
.nav .nav-cta {
  color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 600; transition: filter 0.2s, transform 0.18s var(--ease);
}
.nav .nav-cta:hover { filter: brightness(1.1); transform: translateY(-1px); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s var(--ease); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  overflow: hidden; padding: 120px 0 80px;
}
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: 0; transition: opacity 1.1s ease; }
.hero-video.show { opacity: 1; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(47, 155, 214, 0.22), transparent 60%),
    linear-gradient(180deg, rgba(10, 25, 41, 0.55), rgba(10, 25, 41, 0.92));
}
.hero-content { position: relative; z-index: 2; max-width: 760px; }

.eyebrow {
  text-transform: uppercase; letter-spacing: 3px; font-size: 12px; font-weight: 600;
  color: var(--accent); margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800; letter-spacing: -1px; }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); margin: 24px 0 36px; max-width: 620px; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px; font-weight: 600; font-size: 16px;
  cursor: pointer; border: 1px solid transparent; transition: transform 0.2s var(--ease), filter 0.2s, background 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 12px 30px -12px var(--brand-2); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); }
.btn-block { width: 100%; }

.scroll-hint { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 2; }
.scroll-hint span {
  display: block; width: 26px; height: 42px; border: 2px solid var(--line); border-radius: 14px; position: relative;
}
.scroll-hint span::after {
  content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; border-radius: 2px; background: var(--accent);
  animation: scrollDot 1.6s infinite;
}
@keyframes scrollDot { 0% { opacity: 0; top: 8px; } 40% { opacity: 1; } 80% { opacity: 0; top: 22px; } 100% { opacity: 0; } }

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.section-alt { background: var(--bg-2); }
.feature { background: linear-gradient(180deg, var(--bg), var(--bg-2)); }

.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; margin: 12px 0 16px; letter-spacing: -0.5px; }
.section-lead { color: var(--muted); font-size: 1.1rem; }
.section-head .eyebrow { display: block; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 34px 30px; transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
  position: relative; overflow: hidden; cursor: pointer;
}
.card:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
/* soft static edge highlight that fades in on hover */
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, var(--brand), transparent 46%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.35s var(--ease);
}
/* traveling light that runs the border (border-beam) */
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.4px; pointer-events: none;
  background: conic-gradient(from var(--beam, 0deg),
    transparent 0 76%, var(--brand) 86%, var(--accent) 93%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.35s var(--ease);
}
.card:hover { transform: translateY(-6px); background: var(--surface-2); box-shadow: 0 30px 60px -34px rgba(0,0,0,0.85); }
.card:hover::after { opacity: 1; }
.card:hover::before { opacity: 1; animation: cardBeam 1.7s linear infinite; }
@keyframes cardBeam { to { --beam: 360deg; } }
.card-icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  font-size: 24px; margin-bottom: 20px; font-family: "Archivo"; font-weight: 700;
  background: linear-gradient(135deg, rgba(47,155,214,0.18), rgba(0,100,168,0.08));
  border: 1px solid var(--line); color: var(--brand);
  transition: transform 0.35s var(--ease), color 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card:hover .card-icon {
  color: var(--accent);
  background: linear-gradient(135deg, rgba(47,155,214,0.30), rgba(0,100,168,0.14));
  border-color: color-mix(in oklab, var(--brand) 50%, transparent);
  transform: translateY(-3px) rotate(-4deg); box-shadow: 0 14px 28px -14px var(--brand);
}
.card h3 { font-size: 1.25rem; margin-bottom: 12px; transition: color 0.3s var(--ease); }
.card:hover h3 { color: #fff; }
.card p { color: var(--muted); font-size: 0.97rem; }
.card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; color: var(--brand); font-weight: 600; font-size: 0.95rem; transition: transform 0.3s var(--ease), color 0.2s; }
.card:hover .card-link { transform: translateX(5px); }
.card-link:hover { color: var(--accent); }

/* ---------- Split layouts ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.reverse .split-media { order: 2; }
.split-text h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin: 12px 0 20px; font-weight: 800; }
.split-text p { color: var(--muted); margin-bottom: 16px; }
.split-text .muted { color: var(--muted); font-weight: 600; font-size: 0.7em; display: block; margin-top: 6px; }
.split-text .flagship-lead { color: var(--text); font-size: 1.18rem; font-weight: 600; line-height: 1.45; margin-bottom: 18px; }

/* ---------- Company (sticky scroll-telling) ---------- */
.company { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: start; }
.company-sticky { position: sticky; top: 110px; }
.company-sticky h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin: 12px 0 18px; font-weight: 800; }
.company-sticky p { color: var(--muted); margin-bottom: 14px; }
.company-media { position: relative; margin-top: 26px; }

.timeline { list-style: none; display: grid; gap: 30px; padding: 10px 0; position: relative; }
/* faint rail + accent line drawn as you scroll (JS sets --tl 0..1) */
.timeline::before {
  content: ""; position: absolute; left: 104px; top: 14px; bottom: 14px; width: 2px; background: var(--line-strong);
}
.timeline::after {
  content: ""; position: absolute; left: 104px; top: 14px; bottom: 14px; width: 2px;
  background: linear-gradient(var(--brand), var(--accent));
  transform: scaleY(var(--tl, 0)); transform-origin: top; transition: transform 0.2s linear;
}
.timeline li {
  position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 22px; align-items: center;
  padding-left: 8px;
}
/* diamond node that snaps in as its entry reveals */
.timeline li::after {
  content: ""; position: absolute; left: 105px; top: 50%;
  transform: translate(-50%, -50%) rotate(45deg) scale(0.4);
  width: 12px; height: 12px; border-radius: 2px; background: var(--bg); border: 2px solid var(--brand); z-index: 1;
  opacity: 0; transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), background 0.25s, box-shadow 0.45s;
}
.timeline li.in::after { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1); box-shadow: 0 0 0 5px rgba(47,155,214,0.14); }
.timeline li:hover::after { background: var(--brand); }
.t-year { font-family: "Archivo"; font-weight: 800; font-size: 1.4rem; color: var(--brand); position: relative; }
.timeline li > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; transition: border-color 0.3s, transform 0.3s var(--ease); }
.timeline li:hover > div { border-color: var(--line-strong); transform: translateX(4px); }
.timeline h3 { font-size: 1.1rem; margin-bottom: 6px; }
.timeline p { color: var(--muted); font-size: 0.95rem; }

.feature-list { list-style: none; margin: 8px 0 28px; display: grid; gap: 12px; }
.feature-list li { padding-left: 30px; position: relative; color: var(--muted); }
.feature-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700; }

/* ---------- Media placeholders ---------- */
.split-media { position: relative; }
.media-placeholder {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 12px, transparent 12px 24px),
    linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px dashed rgba(255,255,255,0.16);
  display: grid; place-items: center; min-height: 220px;
}
.media-placeholder::after {
  content: attr(data-label); font-family: "Archivo"; font-weight: 600; font-size: 13px; letter-spacing: 1px;
  color: var(--muted); text-align: center; padding: 14px 20px; opacity: 0.85;
}
.media-placeholder::before {
  content: "▶"; position: absolute; font-size: 0; /* shown only on video ones via label */
}
.ratio-16-9 { aspect-ratio: 16 / 9; min-height: 0; }
.ratio-4-3 { aspect-ratio: 4 / 3; min-height: 0; }
.glow { box-shadow: 0 0 80px -20px rgba(47,155,214,0.5); }

/* Real media (img / video) filling the media slots */
.media-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: var(--radius-lg); background: var(--surface);
  border: 1px solid var(--line);
}
.case .media-img { border-radius: 0; border: none; border-bottom: 1px solid var(--line); }

.float-card {
  position: absolute; bottom: -22px; right: -18px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 22px;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.float-num { font-family: "Archivo"; font-weight: 800; font-size: 1.8rem; color: var(--brand); }
.float-text { font-size: 12px; color: var(--muted); letter-spacing: 0.5px; }

/* ---------- Cases ---------- */
.cases { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.case { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: transform 0.3s var(--ease), border-color 0.3s; }
.case:hover { transform: translateY(-6px); border-color: var(--line-strong); }
.case .media-placeholder { border: none; border-radius: 0; border-bottom: 1px solid var(--line); }
.case-media { overflow: hidden; aspect-ratio: 16 / 9; }
.case-media .media-img { border: none; border-radius: 0; height: 100%; transition: transform 0.6s var(--ease); }
.case:hover .case-media .media-img { transform: scale(1.06); }
.case-body { padding: 26px 28px; }
.tag {
  display: inline-block; font-family: "Space Grotesk", sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; color: var(--brand); margin-bottom: 10px;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in oklab, var(--brand) 10%, transparent);
}
.case-body h3 { font-size: 1.2rem; margin-bottom: 10px; }
.case-body p { color: var(--muted); font-size: 0.97rem; }

/* ---------- Contact ---------- */
.contact-list { list-style: none; margin-top: 26px; display: grid; gap: 16px; }
.contact-list li { display: flex; flex-direction: column; gap: 2px; }
.contact-list span { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.contact-list a { color: var(--text); font-weight: 600; }
.contact-list a:hover { color: var(--brand); }

.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 34px; display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px; color: var(--text); font-family: inherit; font-size: 15px; resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,155,214,0.18);
}
.form-note { font-size: 14px; color: var(--accent); text-align: center; }
.form-note.is-error { color: #ff8080; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--line); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.brand-footer { margin-bottom: 16px; }
.footer-tag { color: var(--muted); font-size: 0.95rem; max-width: 320px; }
.footer-nav { display: grid; gap: 10px; align-content: start; }
.footer-nav a { color: var(--muted); font-size: 0.95rem; }
.footer-nav a:hover { color: var(--text); }
.footer-contact p { color: var(--muted); font-size: 0.95rem; margin-bottom: 14px; }
.footer-contact a { color: var(--brand); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; color: var(--muted); font-size: 13px; flex-wrap: wrap; gap: 10px; }
.footer-credits a { color: var(--brand); }
.footer-credits a:hover { color: var(--accent); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .company { grid-template-columns: 1fr; gap: 40px; }
  .company-sticky { position: static; }
}
@media (max-width: 900px) {
  .nav { position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px); flex-direction: column; align-items: stretch;
    background: var(--bg-2); padding: 100px 24px 40px; gap: 8px; transform: translateX(100%); transition: transform 0.35s var(--ease); box-shadow: var(--shadow); }
  .nav.open { transform: none; }
  .nav a { padding: 14px 18px; font-size: 17px; }
  .nav-toggle { display: flex; z-index: 950; }
  .cards { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split.reverse .split-media { order: 0; }
  .cases { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 600px) {
  .section { padding: 72px 0; }
  .cards { grid-template-columns: 1fr; }
  .float-card { right: 12px; bottom: -16px; }
  .timeline li { grid-template-columns: 70px 1fr; gap: 14px; }
  .timeline::before, .timeline::after { left: 79px; }
  .timeline li::after { left: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .timeline li::after { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1); }
  .timeline::after { transition: none; }
}

/* ============================================================
   v8 enhancements — line icons, featured service, asymmetric hero
   ============================================================ */

/* ---- Consistent line icons in the service tiles ---- */
.card-icon svg {
  width: 26px; height: 26px; stroke: currentColor; fill: none;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

/* ---- Centered hero ---- */
.hero-content { max-width: 820px; margin: 0 auto; text-align: center; }
.hero-copy { min-width: 0; margin: 0 auto; }
.hero h1 { font-size: clamp(2.7rem, 6.2vw, 5rem); letter-spacing: -0.035em; font-stretch: 115%; }
.hero-sub { margin-left: auto; margin-right: auto; }
.hero-actions { justify-content: center; }

/* ---- Featured service tile (flagship gets real hierarchy) ---- */
.card--feature {
  grid-column: 1 / -1; display: grid; grid-template-columns: 0.8fr 1.5fr;
  gap: 6px 48px; align-items: center; padding: 40px;
}
.card--feature .card-icon { grid-column: 1; grid-row: 1; width: 60px; height: 60px; }
.card--feature .card-icon svg { width: 30px; height: 30px; }
.card--feature h3 { grid-column: 1; grid-row: 2; font-size: 1.7rem; }
.card--feature .card-link { grid-column: 1; grid-row: 3; margin-top: 20px; }
.card--feature p { grid-column: 2; grid-row: 1 / 4; align-self: center; font-size: 1.08rem; max-width: 60ch; }

@media (max-width: 760px) {
  .card--feature { display: block; padding: 30px 26px; }
  .card--feature h3 { font-size: 1.4rem; margin-top: 14px; }
}

/* ============================================================
   v11 — Calypso "product plate" + Success-story case cards
   ============================================================ */

/* ---- Calypso: interactive capability accordion ---- */
.cap-list { margin: 12px 0 30px; border-top: 1px solid var(--line); }
.cap { position: relative; border-bottom: 1px solid var(--line); }
/* accent bar grows down the active item */
.cap::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(var(--brand), var(--accent));
  transform: scaleY(0); transform-origin: top; transition: transform 0.4s var(--ease);
}
.cap.is-open::before { transform: scaleY(1); }
.cap-head {
  width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  background: none; border: 0; cursor: pointer; text-align: left; color: var(--text);
  padding: 18px 16px; font-family: inherit; transition: background 0.25s var(--ease);
}
.cap-head:hover { background: rgba(47,155,214,0.05); }
.cap-num {
  font-family: "Archivo", sans-serif; font-weight: 800; font-size: 0.9rem; letter-spacing: 1px;
  color: var(--muted); font-variant-numeric: tabular-nums; transition: color 0.25s var(--ease);
}
.cap.is-open .cap-num, .cap-head:hover .cap-num { color: var(--brand); }
.cap-title { font-family: "Archivo", sans-serif; font-weight: 700; font-size: 1.14rem; letter-spacing: -0.01em; transition: color 0.25s var(--ease); }
.cap.is-open .cap-title { color: var(--brand); }
/* plus that morphs to a minus when open */
.cap-plus { position: relative; width: 15px; height: 15px; flex: none; }
.cap-plus::before, .cap-plus::after { content: ""; position: absolute; background: var(--muted); border-radius: 2px; transition: transform 0.35s var(--ease), background 0.25s var(--ease); }
.cap-plus::before { left: 0; top: 50%; width: 15px; height: 2px; transform: translateY(-50%); }
.cap-plus::after  { left: 50%; top: 0; width: 2px; height: 15px; transform: translateX(-50%); }
.cap.is-open .cap-plus::after { transform: translateX(-50%) scaleY(0); }
.cap.is-open .cap-plus::before, .cap-head:hover .cap-plus::before { background: var(--brand); }
/* collapsible body — grid-rows 0fr→1fr animates height smoothly */
.cap-body { display: grid; grid-template-rows: 1fr; opacity: 1; transition: grid-template-rows 0.4s var(--ease), opacity 0.4s var(--ease); }
.cap-list.js .cap-body { grid-template-rows: 0fr; opacity: 0; }
.cap-list.js .cap.is-open .cap-body { grid-template-rows: 1fr; opacity: 1; }
.cap-body > p { overflow: hidden; color: var(--muted); font-size: 0.97rem; line-height: 1.55; padding: 0 16px 20px 34px; max-width: 60ch; }
.float-num { font-family: "Archivo", sans-serif; }

/* ---- Success stories: immersive case cards ---- */
.tag { font-family: "Archivo", sans-serif; }
.case { position: relative; }
/* opacity entrance (staggered) + snappy transform hover, no conflict with global .reveal */
.case { transition: opacity 0.6s var(--ease) var(--d, 0s), transform 0.32s var(--ease), border-color 0.32s var(--ease), box-shadow 0.32s var(--ease); }
.case.reveal { opacity: 0; transform: none; }
.case.reveal.in { opacity: 1; }
.cases .case:nth-child(2) { --d: 0.1s; }
.case:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: 0 34px 64px -36px rgba(0,0,0,0.85); }

/* tag pill overlaid on the image, with a scrim for legibility */
.case-media { position: relative; }
.case-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(6,14,26,0) 55%, rgba(6,14,26,0.72));
}
.case-media .tag { position: absolute; left: 16px; bottom: 14px; z-index: 2; margin: 0; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.case-body { padding-top: 22px; }

@media (max-width: 760px) {
  .cap-head { padding: 16px 10px; gap: 14px; }
  .cap-body > p { padding: 0 10px 18px 30px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .case.reveal { opacity: 1; }
  .cap-body, .cap-list.js .cap-body { transition: opacity 0.2s ease; }
}

/* Estabiliza el compositing del logo: evita el parpadeo grey/degradado del texto SVG */
.brand-logo { transform: translateZ(0); backface-visibility: hidden; }
.brand:hover .brand-logo { transform: translateY(-1px) translateZ(0); }
