/* COMEXT-WEB-007: reconstrucción limpia de la portada, a partir de comext_reconstructor.
   Cargado SOLO en la home (ver _Layout.cshtml) — no necesita namespacing defensivo porque
   nunca se descarga ni se parsea en las páginas interiores.
   Variables, botones, header y footer compartidos siguen viviendo en theme.css. */

:root {
  --ch-navy: #03172d;
  --ch-navy-2: #02172b;
  --ch-cyan: #1edcf7;
  --ch-cyan-soft: rgba(224, 242, 253, 0.8);
  --ch-light: #f8fbff;
  --ch-amber: #ffb92d;
}

/* Inter for body copy, Poppins for headings/buttons (set per-component below) — matches the
   reconstructor's own typographic pairing. COMEXT-WEB-007A-R1: scoped to `main`, not `body` —
   the shared header/footer are siblings of <main>, not descendants, so this can never again
   leak into them regardless of what else changes in this file. (theme.css additionally pins
   .comext-header/.comext-footer to Bootstrap's own font variable as a second, independent
   safeguard against the same class of bug.) */
body.comext-home main {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

/* ---------- Fondo continuo (header + hero + banner + tarjetas + features) ---------- */
/* La notebook, el globo, sus órbitas, sombras, base y reflejos ya están integrados en esta
   imagen — no se superpone ninguna otra notebook ni otro globo encima. */
/* COMEXT-WEB-007I-R2 root cause (the real one — 007I's .comext-finale gradient fix was a false
   lead): hero-bg.webp is a plain 3840x2160 raster with no alpha, rendered at `100% auto` /
   `1536px auto`, so its own rendered height is always exactly viewport-width × (2160/3840) —
   864px at the master's own 1536px design width. background-repeat:no-repeat means nothing fills
   BELOW that edge except this element's flat background-color, and the image's own bottom-row
   pixels (~rgb(0,20,54), measured directly from the file) never matched --ch-navy-2
   (rgb(2,23,43)) closely enough to hide the seam — confirmed with a real screenshot showing a
   hard horizontal line exactly at that height, which happens to land inside the four tech cards'
   own section because of where their content starts, not because of anything the cards or their
   wrapper set. First attempt at a fade layer used `background-size: 100% auto` on the gradient
   too, which does NOT do what it does for the image: a CSS gradient has no intrinsic width/height
   ratio for "auto" to resolve against, so the browser stretches it to the element's FULL height
   (1340px+) instead of the image's 864px — confirmed by a second real screenshot showing the seam
   completely unmoved. Fixed by sizing the gradient with `56.25vw` (2160/3840 as a vw percentage)
   instead of `auto`, which reproduces the same width→height relationship the image gets from its
   own aspect ratio, without depending on CSS resolving an aspect ratio a gradient doesn't have. */
.comext-visual-stage {
  position: relative;
  isolation: isolate;
  background-color: var(--ch-navy-2);
  background-image:
    linear-gradient(180deg, transparent 0%, transparent 82%, var(--ch-navy-2) 100%),
    url("/images/home/hero-bg.webp");
  background-position: center top, center top;
  background-repeat: no-repeat, no-repeat;
  background-size: 100% 56.25vw, 100% auto;
}

/* COMEXT-WEB-007: tested at 1920px (a required breakpoint) — "100% auto" renders the background
   proportionally TALLER as the viewport gets WIDER, so past the master's own 1536px design width
   the laptop graphic grew tall enough to bleed down into the banner below the fixed-height hero.
   Past 1536px the background instead holds at its designed 1536px width (flat navy fills the
   extra width either side), matching the master's composition exactly instead of stretching it. */
@media (min-width: 1537px) {
  .comext-visual-stage {
    /* 1536 × 0.5625 = 864px — same value 56.25vw reaches exactly at the 1536px breakpoint, so the
       fade's own height stays frozen in lockstep with the image once IT freezes too. */
    background-size: 1536px 864px, 1536px auto;
  }
}

.comext-visual-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 5, 18, 0.07) 0%, transparent 48%, rgba(0, 11, 27, 0.04) 73%, rgba(0, 13, 29, 0.28) 100%);
}

.comext-stage-tail {
  height: 7px;
}

/* ---------- Hero ---------- */
/* COMEXT-WEB-007A-R1 root cause (Defect 3): a fixed `height` was sized for the (shorter) English
   copy; Spanish wraps to more lines at the same width (longer eyebrow/title/description/
   micro-pillars) and, with no overflow handling, spilled past a fixed-height hero into the
   banner below. min-height keeps the English layout pixel-identical (content already fits within
   it) while letting the hero grow for whichever language actually needs more room — the banner
   that follows in normal document flow is pushed down with it, never overlapped. */
.comext-hero {
  min-height: 383px;
  position: relative;
}

/* COMEXT-WEB-007K-R2: was `max-width:770px; margin-left:4.52%` with no capped/centered parent —
   .comext-hero (the parent) spans the full viewport, so that 4.52% resolved against the raw
   viewport width and kept growing unbounded past 1536px, while every other section (header,
   both card grids, the CTA, the footer) is centered within a 1536px-or-narrower cap. Measured at
   3840px: hero text started at x=174 while everything else clustered at x=1152-1290 — a ~1000px
   drift, confirmed with a real screenshot from the owner. Fixed by giving this element the same
   max-width/margin-inline:auto system as .comext-shell. The original 69px offset (4.52% of
   1536px, the width the offset was actually designed against) is now a FIXED px padding instead
   of a %, specifically because padding-left/margin-left percentages are defined by spec to
   resolve against the CONTAINING BLOCK's width (the parent, .comext-hero) — switching % from
   margin to padding alone would not have fixed anything, since the parent is still full-width;
   only a fixed value stops scaling with it. The 770px text-column cap moves to the child
   selector below so the outer box can grow to 1536px for centering purposes without the title/
   description/CTAs stretching wide enough to invade the notebook artwork at 1366-1536px. */
.comext-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 1536px;
  margin-inline: auto;
  padding-left: 69px;
  padding-top: 15px;
  box-sizing: border-box;
}

.comext-hero-copy > * {
  max-width: 770px;
}

.comext-eyebrow {
  font-size: 17px;
  letter-spacing: 0.04em;
  margin: 0 0 10px;
  color: #d2f2ff;
  white-space: nowrap;
}

.comext-eyebrow span {
  display: inline-block;
  margin: 0 16px;
  color: #aed2e5;
  font-size: 16px;
}

.comext-eyebrow span:first-child {
  margin-left: 0;
}

.comext-hero-title {
  font-family: Poppins, "Segoe UI", Arial, sans-serif;
  font-weight: 700;
  font-size: 47px;
  line-height: 1.095;
  letter-spacing: -1.45px;
  margin: 0 0 12px;
  color: #fff;
  white-space: nowrap;
}

/* COMEXT-WEB-007A-R1 (Defect 2): the reconstructor's own master recipe is a vertical gradient
   (lighter gold at top, settling to amber), not a flat color — restored verbatim from
   comext_reconstructor/css/styles.css's `.hero h1 .gold`. Solid --ch-amber stays as the
   background-clip fallback for the rare browser without text-clip support. */
.comext-hero-title .accent {
  display: block;
  color: var(--ch-amber);
  background: linear-gradient(180deg, #ffc83a, #f3a21c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(255, 184, 28, 0.25));
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .comext-hero-title .accent {
    -webkit-text-fill-color: unset;
    background: none;
    color: var(--ch-amber);
  }
}

.comext-hero-description {
  font-size: 18px;
  line-height: 1.26;
  letter-spacing: -0.13px;
  max-width: 620px;
  margin: 0 0 17px;
}

.comext-hero-ctas {
  display: flex;
  gap: 24px;
}

.comext-hero-ctas .btn {
  height: 46px;
  padding: 0 30px;
  font-size: 17px;
  min-width: 184px;
}

.comext-hero-ctas .btn-comext-gold {
  min-width: 273px;
}

/* COMEXT-WEB-007A-R1: the earlier line-height:0 + transform hack was compensating for
   inline-box centering that flexbox now handles on the button itself (see theme.css) — with
   the button as the flex container, this only needs to size and space the glyph. */
.comext-arrow {
  font-size: 20px;
  line-height: 1;
  font-family: Arial, sans-serif;
  display: inline-flex;
  align-items: center;
}

.comext-hero-qualities {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 18px;
  width: 675px;
}

.comext-quality {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.comext-quality img {
  height: 41px;
  width: 41px;
  object-fit: contain;
  flex: none;
}

.comext-quality small {
  font-size: 13px;
  line-height: 1.25;
  color: #fff;
  white-space: nowrap;
}

.comext-quality-divider {
  height: 33px;
  width: 1px;
  background: var(--ch-cyan-soft);
}

/* ---------- Banner central biselado ---------- */
.comext-banner-wrap {
  position: relative;
  z-index: 2;
  height: 65px;
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

.comext-banner-wrap::after {
  content: "";
  position: absolute;
  z-index: -1;
  /* COMEXT-WEB-007H: was a hardcoded `top: 61px` (4px above the wrap's old fixed 65px height) —
     expressed relative to the wrap's own bottom edge instead, so it still sits 4px above it once
     the ≤430px tier below lets the wrap grow taller than that fixed height for wrapped Spanish
     text. Identical position at every width that still uses the original fixed height. */
  top: calc(100% - 4px);
  height: 13px;
  width: 100%;
  background: radial-gradient(ellipse at center, rgba(45, 223, 255, 0.82), rgba(10, 166, 241, 0.28) 50%, transparent 88%);
  filter: blur(3px);
  pointer-events: none;
}

/* COMEXT-WEB-007J: padding-inline is the real-world safety margin against banner-plate.svg's own
   bevel, which measured ~12px narrower than the box's own edge at its widest bulge (viewBox path
   runs to x=845/857 on the right, x=39/857 flat on the left) — found by sweeping every 15px from
   320–960px, not just a handful of breakpoints: the Spanish heading's bounding-box "margin" looked
   positive (12–18px) through 820–950px, where font-size climbs from the ≤820px mobile clamp
   toward the 34px desktop value, but that margin was being eaten by the bevel's real paint, not
   the content box. Because .comext-banner-plate is absolutely positioned with inset:0, its
   containing block is this element's PADDING box, not its content box — so this padding pulls the
   icon/heading group inward at every width without shrinking the plate SVG by a single pixel. */
.comext-banner {
  height: 65px;
  width: min(857px, 92%);
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-inline: 18px;
}

/* COMEXT-WEB-007H: geometry (viewBox 857x65, the same beveled-rhombus path) is the approved
   asset and is NOT redrawn — only its depth is reinforced. filter:drop-shadow (not box-shadow)
   is used deliberately: it follows the SVG's own alpha silhouette, so the added shadow/glow
   hugs the diagonal bevels instead of producing the rectangular halo box-shadow would. The two
   chained drop-shadows adapt banner-separador-comext.html's ambient-depth + cyan-glow pair
   (0 10px 30px -5px rgba(0,0,0,.7) / 0 0 25px rgba(14,165,233,.2)), toned down to sit behind an
   already-busy hero background instead of a plain dark page. */
.comext-banner-plate {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  z-index: -1;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 16px rgba(14, 165, 233, 0.22));
  transition: filter 0.35s ease;
}

/* Discreet hover reinforcement (not a button — no cursor:pointer, no transform that would shift
   the hero/cards around it): only the plate's own glow and the icon's halo brighten slightly. */
.comext-banner:hover .comext-banner-plate {
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 22px rgba(56, 189, 248, 0.38));
}

/* Shimmer sweep (COMEXT-WEB-007H, from banner-separador-comext.html's .comext-badge::before),
   recreated as its own layer masked to banner-plate.svg so the sweep is clipped by the exact
   rhombus silhouette per the directive ("recortado por la misma silueta SVG aprobada") instead
   of bleeding past the bevels the way a plain rectangular overlay would. */
.comext-banner-shimmer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: url("/images/home/banner-plate.svg");
  mask-image: url("/images/home/banner-plate.svg");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.comext-banner-shimmer::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.16), transparent);
  transform: skewX(-25deg);
  animation: comext-banner-shimmer-sweep 5s infinite ease-in-out;
}

@keyframes comext-banner-shimmer-sweep {
  0%, 65% { left: -60%; }
  100% { left: 160%; }
}

.comext-banner-icon {
  position: relative;
  z-index: 1;
  width: 68px;
  height: 57px;
  object-fit: contain;
  margin-left: -5px;
  filter: drop-shadow(0 0 7px rgba(56, 189, 248, 0.4));
  transition: filter 0.35s ease;
}

.comext-banner:hover .comext-banner-icon {
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.65));
}

/* COMEXT-WEB-007H: measured against Portada.png (cap-height ~25px at a 1536px-wide capture,
   implying ~34-36px for Poppins Bold's ~0.70 cap-height ratio) — the inherited 29px undershot
   the approved master's real title presence. min(34px, 3.65vw) keeps that exact 34px from
   931px upward (857/0.92, where .comext-banner itself stops shrinking) and shrinks in the same
   proportion as the banner's own `min(857px, 92%)` below that, instead of a flat px value that
   would start crowding the plate before the dedicated ≤820px tier takes over. Letter-spacing in
   em (not px) so it scales with font-size and keeps the same -0.55px/29px ratio at every width,
   per the standing rule against shrinking Spanish disproportionately: both languages measured to
   fit the 857px plate at 34px with real clearance (16px ES, 66px EN) before reaching for it. */
.comext-banner-heading {
  position: relative;
  z-index: 1;
  font-family: Poppins, "Segoe UI", Arial, sans-serif;
  font-size: min(34px, 3.65vw);
  font-weight: 700;
  letter-spacing: -0.019em;
  line-height: 1;
  white-space: nowrap;
  margin: 0;
  color: #fff;
}

.comext-banner-heading .accent {
  color: #a6eeff;
}

/* COMEXT-WEB-007K: explicit owner feedback — the Spanish heading ("COMEXT Plataforma Digital de
   Negocios B2B") still read as crowding the plate's bevel at a smaller font-size than the padding
   safety margin alone could fully resolve, and was asked for directly: "Dale un tamaño de fuente
   un poco menos" for Spanish specifically. 30px keeps the same "mirror the banner's own
   min(857px, 92%) width formula" technique as the base rule (30 × 0.92 / 857 ≈ 3.22vw, so it
   still reaches exactly 30px right at the same 931px crossover, not a disconnected flat value) —
   English keeps its master-measured 34px since it was never the one crowding.
   Scoped to min-width:821px: `html[lang="es"] .comext-banner-heading` is a compound selector
   with higher specificity than the plain `.comext-banner-heading` the ≤820px/≤430px mobile tiers
   use, so left unscoped it would silently outrank and break those tiers' own font-size at every
   width regardless of source order — the exact class of bug COMEXT-WEB-007C-R1 already names
   elsewhere in this file as this project's main recurring CSS pitfall. */
@media (min-width: 821px) {
  html[lang="es"] .comext-banner-heading {
    font-size: min(30px, 3.22vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .comext-banner-shimmer::before {
    animation: none;
    opacity: 0;
  }
  .comext-banner-plate,
  .comext-banner-icon {
    transition: none;
  }
}

/* ---------- Dos tarjetas principales ---------- */
#platform-section {
  margin-top: 16px;
}

/* COMEXT-WEB-007G: navy "notebook" card design approved by the owner in
   tarjetas-comext-notebooks.html, transcribed with its own values. Both cards share one class —
   the source file gives them identical treatment, only card 2 adds a sibling badge — replacing
   the old absolutely-positioned overlay layout (.comext-offer-art anchored/overlapped against a
   fixed-width text column). The new layout is plain CSS Grid with no fixed height anywhere, so
   the 007D CTA-clipping bug class (fixed height + overflow:hidden + longer Spanish text) cannot
   recur here structurally, not just by a narrower margin. */
.comext-notebook-grid {
  max-width: 1260px;
  margin: 7px auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.comext-notebook-card {
  position: relative;
  min-width: 0;
  background-color: #0b1120;
  background-image: linear-gradient(145deg, #111827 0%, #090d16 100%);
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-top: 1px solid rgba(56, 189, 248, 0.5);
  padding: 36px 28px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.comext-notebook-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: 0 22px 45px -12px rgba(2, 132, 199, 0.35);
}

/* Spotlight glow tracking the cursor — driven by --mouse-x/--mouse-y from the same shared
   comext-card-spotlight.js already used by .comext-tech-card further down this file. */
.comext-notebook-spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    480px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(56, 189, 248, 0.16),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.comext-notebook-card:hover .comext-notebook-spotlight {
  opacity: 1;
}

.comext-notebook-left {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.comext-notebook-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.comext-notebook-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  transition: all 0.3s ease;
}

.comext-notebook-card:hover .comext-notebook-icon {
  background: rgba(56, 189, 248, 0.25);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
  transform: scale(1.05);
}

.comext-notebook-title {
  font: 700 22px/1.25 Poppins, "Segoe UI", Arial, sans-serif;
  color: #fff;
  display: block;
}

.comext-notebook-desc {
  font-size: 14.5px;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 28px;
  display: block;
}

.comext-notebook-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: flex-start;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #090d16;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 20px -6px rgba(245, 158, 11, 0.5);
  transition: all 0.25s ease;
}

.comext-notebook-btn:hover,
.comext-notebook-btn:focus {
  background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
  color: #090d16;
  box-shadow: 0 12px 25px -4px rgba(245, 158, 11, 0.7);
  transform: translateY(-2px);
}

.comext-notebook-btn:focus-visible {
  outline: 3px solid var(--c-cyan, #38bdf8);
  outline-offset: 2px;
}

.comext-notebook-btn .comext-arrow {
  transition: transform 0.25s ease;
}

.comext-notebook-btn:hover .comext-arrow {
  transform: translateX(4px);
}

.comext-notebook-right {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 205px;
}

.comext-notebook-glow {
  position: absolute;
  width: 85%;
  height: 75%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.45) 0%, transparent 70%);
  filter: blur(22px);
  transition: transform 0.45s ease, opacity 0.45s ease;
  z-index: 1;
}

.comext-notebook-card:hover .comext-notebook-glow {
  transform: scale(1.2);
  opacity: 0.95;
}

.comext-notebook-mockup {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.75));
}

.comext-notebook-card:hover .comext-notebook-mockup {
  transform: translateY(-8px) scale(1.04);
  filter: drop-shadow(0 25px 32px rgba(2, 132, 199, 0.45));
}

.comext-notebook-mockup img {
  width: 100%;
  height: auto;
  display: block;
}

.comext-notebook-pill {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 4;
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

/* ---------- Cuatro tarjetas inferiores ---------- */
/* COMEXT-WEB-007F: glass tech-card design approved by the owner in DOCTYPE.html, transcribed
   with its own values (not an approximation). Scoped under comext-tech-* so it can't collide
   with Bootstrap or any interior-page class, per the directive's isolation requirement. The
   global `body`/`*` reset from that source file is NOT copied — COMEXT already has its own
   global stylesheet, so only the card-specific rules below are ported. */
.comext-tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 12px auto 0;
}

.comext-tech-card {
  position: relative;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 32px 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(56, 189, 248, 0.35);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
}

/* Spotlight glow that follows the cursor (set via --mouse-x/--mouse-y in comext-tech-cards.js). */
.comext-tech-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    400px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(56, 189, 248, 0.18),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

/* Glowing border ring that follows the cursor. */
.comext-tech-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: radial-gradient(
    300px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(56, 189, 248, 0.8),
    transparent 60%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.comext-tech-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -15px rgba(2, 132, 199, 0.25);
}

.comext-tech-card:hover::before,
.comext-tech-card:hover::after {
  opacity: 1;
}

.comext-tech-icon-box {
  position: relative;
  z-index: 3;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(14, 165, 233, 0.05) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  margin-bottom: 24px;
  transition: all 0.3s ease;
  flex: none;
}

.comext-tech-card:hover .comext-tech-icon-box {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #7dd3fc;
  transform: scale(1.06);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
}

.comext-tech-card h3 {
  position: relative;
  z-index: 3;
  font: 600 1.15rem/1.35 Inter, "Segoe UI", Arial, sans-serif;
  color: #f8fafc;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.comext-tech-card p {
  position: relative;
  z-index: 3;
  font-size: 0.925rem;
  color: #94a3b8;
  line-height: 1.6;
  margin: 0;
}

/* Touch/no-fine-pointer fallback (COMEXT-WEB-007F §5, extended for 007G's notebook cards):
   comext-card-spotlight.js never attaches the mousemove listener on such devices, so
   --mouse-x/--mouse-y stay at their off-card default and the glow never appears — this just
   guarantees the hover-only transform/shadow don't get stuck on after a tap, since touch UAs can
   briefly match :hover until the next tap elsewhere. */
@media (hover: none), (pointer: coarse) {
  .comext-tech-card:hover {
    transform: none;
    box-shadow: none;
  }
  .comext-notebook-card:hover {
    transform: none;
    border-color: rgba(56, 189, 248, 0.25);
    box-shadow: none;
  }
  .comext-notebook-card:hover .comext-notebook-mockup {
    transform: none;
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.75));
  }
  .comext-notebook-card:hover .comext-notebook-glow {
    transform: none;
    opacity: 1;
  }
}

/* ---------- Cierre comercial (exclusivo de Home) ---------- */
/* COMEXT-WEB-007B: planeta completo, sin recortar — el borde inferior se desvanece por
   mask-image (86%→100% transparente) en vez del overflow:hidden "duro" que usaba el cierre
   anterior, por eso ya no hace falta una altura fija ni recortar la imagen con object-fit.
   Referencia: comext_footer_preview .contact-finale/.finale-* (aprobado), con el prefijo
   comext- de este stylesheet y sin el acento `::after` de desvanecido hacia el footer: ese
   degradado se resuelve solo con la transición de color entre esta sección y
   .comext-institutional-footer (theme.css), ya que no hay salto brusco de tono entre ambas. */
/* COMEXT-WEB-007I root cause: this gradient's own top stop (#041c39) never matched
   .comext-visual-stage's flat background-color (var(--ch-navy-2), #02172b) that fills the page
   everywhere the hero-bg.webp image doesn't reach — confirmed by sampling real rendered pixels
   immediately above/below this section's top edge (#02162a → #04173... a real, measured ~15-unit
   jump in the blue channel, not a visual artifact). .comext-finale sits INSIDE .comext-visual-stage
   in the DOM, so there was never a reason for its own gradient to start on a different color.
   Starting it on the same variable instead of a hardcoded close-but-different hex removes the
   seam by construction — the deepening toward the planet's night-sky tone (65%/100% stops,
   unchanged) now reads as a continuous, progressive darkening instead of a pasted-on band. */
.comext-finale {
  position: relative;
  isolation: isolate;
  min-height: 265px;
  background:
    radial-gradient(ellipse at 25% 88%, rgba(0, 153, 244, 0.19), transparent 47%),
    linear-gradient(180deg, var(--ch-navy-2) 0%, #03223f 65%, #03192e 100%);
  overflow: hidden;
}

/* COMEXT-WEB-007K-R3: unlike .comext-finale-earth's old `left: -14px` (a fixed px value that
   was already reference-width-correct below 1536px by construction), this glow's `at 25%` is a
   genuine percentage that scales correctly at every width up to and including 1536px — so the
   base rule above is left untouched and keeps rendering identically at mobile/narrow widths.
   Only past the 1536px reference width does `25%` of the unbounded viewport drift away from the
   planet's new centered position: at 1536px, 25% = 384px, 12px left of the planet's own center
   (396px, see the .comext-finale-earth fix below). This override reproduces that exact 384px
   value at 1536px (50% - 384px = 768px - 384px = 384px, a seamless join with the base rule) and
   then tracks the planet's center minus 12px for every wider viewport. .comext-finale::before's
   separate glow (at 56% 30%) sits near the headline text, not the planet, so it is out of scope
   for this fix and left untouched. */
@media (min-width: 1537px) {
  .comext-finale {
    background:
      radial-gradient(ellipse at calc(50% - 384px) 88%, rgba(0, 153, 244, 0.19), transparent 47%),
      linear-gradient(180deg, var(--ch-navy-2) 0%, #03223f 65%, #03192e 100%);
  }
}

.comext-finale::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 56% 30%, rgba(28, 108, 160, 0.07), transparent 55%);
}

/* COMEXT-WEB-007K-R3: left:-14px anchored to .comext-finale, which (unlike .comext-finale-inner,
   .comext-shell, etc.) has no max-width — it spans the raw viewport. Below 1536px that's a
   no-op (the viewport itself never exceeds the 1536px design canvas, so -14px IS the canvas-
   relative position), but past 1536px the planet stayed pinned to the literal left edge of an
   ever-widening viewport while the rest of the page stayed centered on the 1536px canvas —
   confirmed by the owner's own zoom-out screenshot and a fresh getBoundingClientRect() read.
   `max(-14px, calc(50% - 782px))` keeps -14px unchanged up to 1536px (50% of 1536 - 782 = -14,
   so max() picks -14 for every narrower width too, since the alternative is more negative) and
   above 1536px switches to tracking the canvas's own centered left edge instead
   ((viewport/2 - 768) + the original -14px offset = viewport/2 - 782) — same technique already
   used for .comext-hero-copy in 007K-R2, expressed as a single responsive formula instead of a
   separate ≥1537px media query since there's no second dimension (height) to also keep in sync
   here. The ≤1350/1050/760/430px tiers below each set their OWN explicit `left` (or inherit this
   one unchanged, since it still resolves to -14px under 1536px) — none of them needed touching. */
.comext-finale-earth {
  position: absolute;
  left: max(-14px, calc(50% - 782px));
  bottom: -3px;
  width: min(820px, 55vw);
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 86%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 86%, transparent 100%);
}

.comext-finale-earth img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
}

.comext-finale-inner {
  position: relative;
  z-index: 2;
  width: min(1464px, calc(100% - 72px));
  max-width: 1464px;
  min-height: 265px;
  margin-inline: auto;
  padding-left: min(52%, 760px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.comext-finale-message {
  min-width: 0;
  flex: 1;
  display: flex;
  gap: 25px;
  align-items: center;
}

.comext-finale-accent {
  align-self: center;
  height: 72px;
  width: 6px;
  flex: none;
  border-radius: 6px;
  background: var(--ch-cyan);
  box-shadow: 0 0 18px rgba(15, 209, 252, 0.45);
}

.comext-finale-message h2 {
  font-family: Poppins, "Segoe UI", Arial, sans-serif;
  font-weight: 750;
  letter-spacing: -0.65px;
  font-size: clamp(23px, 2.08vw, 33px);
  line-height: 1.18;
  margin: 0;
  text-wrap: balance;
  color: #fff;
}

.comext-finale-message h2 span {
  display: block;
}

.comext-finale-cta {
  min-height: 54px;
  min-width: 188px;
  padding: 0 22px;
  gap: 12px;
  white-space: nowrap;
  flex: none;
  font-size: 17px;
}

.comext-finale-cta .comext-arrow {
  font-size: 22px;
}

html[lang="es"] .comext-hero-title {
  font-size: 41px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  /* COMEXT-WEB-007: tested at 1024px (a required breakpoint) — 70% let the description's last
     line brush the background laptop graphic's left edge. The background scales with the stage
     at a roughly fixed ~53% starting point regardless of viewport, so a narrower text column
     (matching the ~50% used at ≥1536px) keeps clear of it at every width in this tier. */
  /* COMEXT-WEB-007K-R2: this tier needs the text flush against the LEFT edge (clearing the
     laptop graphic to its right) — margin-inline:auto from the base rule above would center a
     52%-wide box instead, undoing the exact thing this tier exists for. Reset explicitly. */
  .comext-hero-copy { max-width: 52%; margin-inline: 0; }
  .comext-hero-title { font-size: clamp(32px, 3.5vw, 46px); white-space: normal; }
  .comext-eyebrow { font-size: 13px; }
  .comext-hero-description { font-size: 16px; max-width: 480px; }
}

/* COMEXT-WEB-007F/007G: both card grids' own breakpoints (1024px/600px for the tech cards,
   1024px/640px for the notebook cards — each matching its own approved reference exactly), kept
   separate from the tiers above since they govern different components and don't need to move
   in lockstep with each other. */
@media (max-width: 1024px) {
  .comext-tech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comext-notebook-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .comext-notebook-card { grid-template-columns: 1fr; padding: 28px 24px; }
}

@media (max-width: 600px) {
  .comext-tech-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 10px; }
  .comext-tech-card { padding: 24px 20px; }
}

/* ---------- Cierre comercial: breakpoints propios (iguales a comext_footer_preview) ---------- */
@media (max-width: 1350px) {
  .comext-finale-earth { width: min(740px, 57vw); }
  .comext-finale-inner { padding-left: 51%; gap: 18px; }
  .comext-finale-message { gap: 16px; }
  .comext-finale-cta { min-width: 158px; font-size: 15px; }
}

@media (max-width: 1050px) {
  .comext-finale { min-height: 250px; }
  .comext-finale-inner { min-height: 250px; padding-left: 47%; }
  .comext-finale-earth { width: 60vw; left: -8%; }
  .comext-finale-message h2 { font-size: clamp(20px, 2.2vw, 25px); }
  .comext-finale-message { gap: 12px; }
  .comext-finale-accent { height: 62px; width: 4px; }
  .comext-finale-cta { min-width: 142px; font-size: 13px; min-height: 46px; padding-inline: 12px; }
}

@media (max-width: 760px) {
  /* COMEXT-WEB-007C-R1 (Foto 10): the CTA's bottom edge and the globe's top edge measured 1px
     apart (effectively touching). The globe is bottom-anchored to .comext-finale's own box, so
     a bigger flex `gap` just shuffles where inside the SAME fixed height the collision happens
     instead of fixing it — the real fix is more total height (342→392px), which pushes the
     bottom-anchored globe down while the top-anchored title/button stay put. */
  .comext-finale { min-height: 392px; }
  .comext-finale-inner {
    width: calc(100% - 42px);
    min-height: 392px;
    padding: 26px 0 218px;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 20px;
  }
  .comext-finale-message { flex: none; }
  .comext-finale-message h2 { font-size: clamp(21px, 4.6vw, 30px); }
  .comext-finale-accent { height: 61px; }
  .comext-finale-cta { min-width: 150px; min-height: 40px; margin-left: 17px; font-size: 13px; padding-inline: 16px; }
  .comext-finale-earth { width: 690px; max-width: none; left: -145px; bottom: -9px; opacity: 0.86; }
}

@media (max-width: 430px) {
  .comext-finale { min-height: 390px; }
  .comext-finale-inner { min-height: 390px; padding-bottom: 215px; gap: 18px; }
  .comext-finale-message h2 { font-size: 21px; }
  .comext-finale-earth { width: 585px; left: -115px; bottom: -7px; }
}

/* COMEXT-WEB-007: tested at 768px (a required breakpoint) and found the hero copy (max-width:
   90%, from the reconstructor's original >900px tier) collided with the background laptop
   graphic — that tier assumes a narrower text column relative to the image than 768px actually
   leaves room for. Only the hero/banner's own stacked-mobile treatment is pulled up from 650px to
   820px to cover it, with a layout already proven to work at narrower widths; the cards/features/
   final sections below keep their original 650px threshold since they weren't affected. */
@media (max-width: 820px) {
  /* COMEXT-WEB-007I-R2: this fixed floor was taller than either language's actual mobile content
     (eyebrow+title+description+CTAs+micro-pillars, after the 270px top padding that clears the
     background art), so the box always ended exactly at 580px regardless of content height —
     and since the banner that follows sits right after this box closes, whichever language had
     more "slack" below its own content (English, with less text wrapping than Spanish) got a
     correspondingly bigger, content-independent gap before the banner (measured: 49px for
     English vs 8px for Spanish, for the identical 8px margin-top below). Removing the floor lets
     the box always hug its real content in both languages, so the margin on .comext-banner-wrap
     below becomes the sole, language-independent source of that gap. */
  .comext-hero { min-height: 0; }
  .comext-visual-stage { background-size: auto 420px; background-position: 68% 65px; }
  .comext-visual-stage::before { background: linear-gradient(180deg, rgba(1, 14, 30, 0.08) 0%, rgba(1, 15, 30, 0.36) 48%, rgba(1, 15, 30, 0.42) 100%); }
  /* COMEXT-WEB-007K-R2: padding-left:0 resets the base rule's new 69px fixed offset, which isn't
     relevant here (and wasn't before — the base rule's old margin-left:4.52% was already fully
     superseded by this tier's own `margin: 0 17px` shorthand either way). */
  .comext-hero-copy { margin: 0 17px; max-width: none; padding-top: 270px; padding-left: 0; }
  .comext-eyebrow { font-size: 9.7px; letter-spacing: 0; white-space: normal; margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 3px 7px; }
  .comext-eyebrow span { margin: 0; }
  .comext-hero-title { font-size: clamp(26px, 6.5vw, 39px); line-height: 1.05; letter-spacing: -1.1px; margin-bottom: 9px; }
  .comext-hero-description { font-size: 13px; line-height: 1.33; max-width: 100%; margin-bottom: 13px; }
  .comext-hero-ctas { gap: 11px; }
  .comext-hero-ctas .btn, .comext-hero-ctas .btn-comext-gold { min-width: 0; padding: 0 12px; height: 41px; font-size: 12px; }
  .comext-arrow { font-size: 19px; }
  /* COMEXT-WEB-007C-R5: explicit direction to keep these three horizontal (not stacked as a
     block), adjusting whatever's needed to make them fit. Each pillar switches from icon-left/
     text-right to icon-on-top/text-below (centered), so three narrow columns sit side by side
     instead of one column needing the section's full width. Text is still allowed to wrap
     (white-space: normal) across its two hard-broken segments (title/description) rather than
     being force-fit onto one line, which is what keeps the font size close to the 12-14px
     legibility target instead of repeating the earlier rejected 8.5px shrink. The vertical
     dividers don't read well between 3 narrow columns at this width, so they stay hidden. */
  /* COMEXT-WEB-007I-R2: owner-specified exact 5px gap to the CTAs above (was 14px). */
  .comext-hero-qualities { width: 100%; margin-top: 5px; flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 6px; }
  .comext-quality { flex-direction: column; align-items: center; text-align: center; gap: 6px; flex: 1 1 0; min-width: 0; }
  .comext-quality img { height: 28px; width: 28px; }
  .comext-quality small { font-size: 12px; line-height: 1.2; white-space: normal; }
  .comext-quality-divider { display: none; }
  /* COMEXT-WEB-007I-R2: owner-specified exact 5px gap from the micro-pillars above (was 8px, and
     effectively much more for English before the .comext-hero min-height fix above). */
  .comext-banner-wrap { height: 63px; margin-top: 5px; }
  .comext-banner { height: 62px; gap: 6px; width: calc(100% - 24px); }
  .comext-banner-icon { width: 36px; height: 44px; }
  .comext-banner-heading { font-size: clamp(12px, 3.35vw, 20px); letter-spacing: -0.4px; }
  /* COMEXT-WEB-007I-R2: owner-specified exact 5px gap to the first main card below (was 16px,
     unscoped, applying this same value at every width — kept at 16px above 820px per "en
     resoluciones mayores deben mantenerse los espaciados del diseño aprobado", overridden only
     here for the mobile composition). .comext-notebook-grid's own `margin: 7px auto 0` (also
     unscoped) collapses with this margin per normal CSS rules — adjacent top margins with no
     padding/border between parent and child collapse to the LARGER value, not their sum, so
     leaving it at 7px would have silently produced a 7px gap no matter what this one was set to;
     zeroed here (mobile only) so this 5px is the only contributor left to collapse with. */
  #platform-section { margin-top: 5px; }
  .comext-notebook-grid { margin-top: 0; }
}

/* COMEXT-WEB-007H: real measurement at 320px (a required breakpoint, flagged directly against a
   screenshot) found the Spanish heading ("COMEXT Plataforma Digital de Negocios B2B") crowding
   past the plate's visible bevel even at the ≤820px tier's 12px clamp floor — below ~358px that
   clamp is pinned at 12px flat while .comext-banner itself keeps shrinking (`calc(100% - 24px)`),
   so the gap only grows as the viewport narrows further. English never hits this (its shorter
   string already clears every width down to 320px), and the natural one-line overflow here is
   only ~0.3px — nowhere near enough for flex-shrink alone to force an actual line break. Per the
   directive's own explicit allowance ("permitir que el texto utilice dos líneas cuando sea
   necesario") this caps the heading's own width (not a flat px, so it still scales with the
   banner across 320–430px) comfortably under Spanish's one-line width, forcing a real wrap
   instead of shrinking a floor already established elsewhere in this file as the legibility
   minimum (MicroPillarMobileText_StaysReadable_NotShrunkBelow12px). Verified against real
   rendering: English never wraps in this range (its one-line width already clears the cap),
   Spanish wraps to exactly 2 lines with no clipping. No height change needed: the icon's own 44px
   is already taller than two wrapped 12px lines, so the existing fixed 62/63px boxes have spare
   room either way. */
@media (max-width: 430px) {
  .comext-banner-heading { white-space: normal; min-width: 0; max-width: calc(100% - 55px); line-height: 1.15; text-align: left; }
}

/* The cards/features/final sections were never part of the 768px collision — they already laid
   out correctly in the >820px (2-column) tier down to 768px, so their own stacked-mobile
   treatment keeps the reconstructor's original, narrower 650px threshold instead of being pulled
   up alongside the hero fix above. */
@media (max-width: 650px) {
  .comext-stage-tail { height: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .comext-tech-card { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .comext-tech-card, .comext-tech-card::before, .comext-tech-card::after, .comext-tech-icon-box {
    transition: none;
  }
  .comext-notebook-card,
  .comext-notebook-spotlight,
  .comext-notebook-icon,
  .comext-notebook-glow,
  .comext-notebook-mockup,
  .comext-notebook-btn,
  .comext-notebook-btn .comext-arrow {
    transition: none;
  }
}

