/* ==========================================================================
   Reliave — Landing page styles
   Design system: dark navy hero/footer bookend, light report body,
   single accent (turquoise), magenta reserved for one diagram detail.
   ========================================================================== */

/* ---- Fonts (self-hosted IBM Plex Sans — technical, engineering heritage,
   distinct from the Inter/Geist/Space Grotesk cluster every AI build reaches for) ---- */
@font-face {
  font-family: "Plex";
  src: url("../assets/fonts/plex-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plex";
  src: url("../assets/fonts/plex-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plex";
  src: url("../assets/fonts/plex-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plex";
  src: url("../assets/fonts/plex-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Design tokens ---- */
:root {
  /* Brand color */
  --navy-950: #071a33;
  --navy-900: #0b2545;
  --navy-800: #12335f;
  --navy-700: #1a4278;
  --turquoise: #2ec4b6;
  --turquoise-600: #22a79b;
  --turquoise-700: #0e7a70; /* AA-safe on light backgrounds (4.9:1); turquoise-600 only hits ~2.8:1 */
  --turquoise-300: #8fe3da;
  --magenta: #c23b7a;

  /* Light section surface */
  --bg-light: #f5f8fc;
  --surface: #ffffff;
  --border-light: #e1e8f2;
  --ink: #0b2545;
  --ink-muted: #55647e;

  /* Dark section surface (hero / footer) */
  --off-white: #eef3fa;
  --muted-dark: #a6b6d1;
  --border-dark: rgba(238, 243, 250, 0.14);

  /* Radii (locked scale: pill for interactive, md for panels, sm for inputs) */
  --radius-pill: 999px;
  --radius-md: 16px;
  --radius-sm: 10px;

  /* Shadows: neutral near-black, not brand-tinted (avoids a colored glow on dark sections) */
  --shadow-sm: 0 4px 14px -6px rgba(2, 8, 18, 0.32);
  --shadow-md: 0 20px 48px -16px rgba(2, 8, 18, 0.4);

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-fast: 150ms;
  --dur-base: 220ms;
  --dur-reveal: 560ms;

  /* Type */
  --font-sans: "Plex", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --fs-display: clamp(2.3rem, 1.5rem + 2.2vw, 2.9375rem);
  --fs-h2: clamp(2.1rem, 1.7rem + 1.5vw, 2.8125rem);
  --fs-h3: 1.9375rem;
  --fs-lg: 1.5625rem;
  --fs-body: 1.25rem;
  --fs-sm: 1rem;
  --fs-xs: 0.8125rem;

  /* Layout */
  --container: 1180px;
  --nav-h: 72px;

  /* Vertical rhythm: two named recipes, not one-off clamps per section.
     --space-section is the default for plain content on the shared background;
     --space-section-tight is reserved for a section that wraps its own bounded
     card (the card supplies its own framing, so the outer section needs less). */
  --space-section: clamp(3.5rem, 3rem + 2.5vw, 6.5rem);
  --space-section-tight: clamp(3rem, 2.6rem + 2vw, 5rem);
  --space-block: clamp(2rem, 1.6rem + 1.5vw, 3rem);
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

svg {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--turquoise);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

@media (min-width: 768px) {
  .container {
    padding-inline: 2.5rem;
  }
}

section {
  padding-block: var(--space-section);
}

.section--tight {
  padding-block: var(--space-section-tight);
}

.section-dark {
  background: linear-gradient(180deg, var(--navy-950), var(--navy-900) 60%, var(--navy-900));
  color: var(--off-white);
}

.section-head {
  margin-bottom: var(--space-block);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--turquoise-700);
  margin-bottom: 0.85rem;
}

.section-dark .eyebrow {
  color: var(--turquoise);
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.4;
}

.section-lead {
  margin-top: 0.9rem;
  font-size: var(--fs-lg);
  color: var(--ink-muted);
  max-width: 90ch;
}

.section-dark .section-lead {
  color: var(--muted-dark);
}

/* ---- Buttons (one radius per role: pill for CTAs) ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--fs-sm);
  white-space: nowrap;
  border: 1px solid transparent;
  transform: translate(var(--mx, 0px), var(--my, 0px));
  transition: transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.btn:active {
  transform: translate(var(--mx, 0px), var(--my, 0px)) scale(0.98);
}

.btn-primary {
  background: var(--turquoise);
  color: var(--navy-950);
  box-shadow: var(--shadow-sm);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: var(--turquoise-300);
    box-shadow: var(--shadow-md);
  }
}

.btn-secondary {
  background: transparent;
  border-color: var(--turquoise);
  color: var(--turquoise);
}

@media (hover: hover) and (pointer: fine) {
  .btn-secondary:hover {
    background: rgba(46, 196, 182, 0.12);
  }
}

.btn-ghost {
  background: transparent;
  color: var(--off-white);
  border-color: var(--border-dark);
}

@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover {
    background: var(--navy-700);
    border-color: var(--turquoise);
    color: var(--turquoise);
  }
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ---- Navbar ---- */
#navSentinel {
  position: absolute;
  top: 0;
  height: 1px;
  width: 1px;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(7, 26, 51, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  /* height itself is not transitioned (animating a layout property causes
     reflow thrash); it snaps instantly while background/border stay smooth. */
  transition: background-color var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out);
}

.navbar--scrolled {
  height: calc(var(--nav-h) - 12px);
  background: rgba(7, 26, 51, 0.92);
  border-bottom-color: var(--border-dark);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: var(--fs-lg);
  letter-spacing: -0.01em;
  color: var(--off-white);
}

.wordmark-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wordmark-mark svg {
  width: 18px;
  height: 18px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-actions .btn {
  padding: 0.65rem 1.1rem;
  font-size: var(--fs-xs);
}

.nav-actions .btn-primary {
  display: none;
}

@media (min-width: 640px) {
  .nav-actions .btn-primary {
    display: inline-flex;
  }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding-top: clamp(2.5rem, 2rem + 2vw, 4rem);
  padding-bottom: clamp(3rem, 2.4rem + 2vw, 4.5rem);
  overflow: hidden;
}

/* ---- Ambient background: slow orbital lines + drifting data particles,
   echoing the logo's own visual language. Dropped into any dark section
   (hero, proceso, ebook, footer) so the color-block rhythm between
   sections reads as one living system, not a static hero-only flourish.
   Purpose: living backdrop without competing with the copy (feedback tier:
   marketing/explanatory motion, can run longer and looser than UI motion). ---- */
.ambient-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-orbits {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ambient-orbits .orbit {
  fill: none;
  stroke: var(--turquoise);
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: center;
}

.orbit-1 { opacity: 0.14; animation: orbit-spin 90s linear infinite; }
.orbit-2 { opacity: 0.08; animation: orbit-spin 130s linear infinite reverse; }
.orbit-3 { opacity: 0.1; stroke: var(--magenta); animation: orbit-spin 70s linear infinite; }

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

.ambient-bg .drift {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--turquoise);
  opacity: 0;
  animation: drift-float linear infinite;
}

.drift-1 { top: 18%; left: 62%; animation-duration: 14s; animation-delay: 0s; }
.drift-2 { top: 65%; left: 78%; animation-duration: 18s; animation-delay: 2s; background: var(--off-white); }
.drift-3 { top: 40%; left: 88%; animation-duration: 16s; animation-delay: 4s; }
.drift-4 { top: 78%; left: 55%; animation-duration: 20s; animation-delay: 1s; width: 3px; height: 3px; }
.drift-5 { top: 12%; left: 82%; animation-duration: 15s; animation-delay: 5s; background: var(--magenta); width: 4px; height: 4px; }
.drift-6 { top: 55%; left: 15%; animation-duration: 22s; animation-delay: 3s; width: 3px; height: 3px; }

@keyframes drift-float {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 0.55; }
  50% { transform: translate(-24px, -34px); opacity: 0.75; }
  90% { opacity: 0.4; }
  100% { transform: translate(-48px, -68px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-orbits .orbit,
  .ambient-bg .drift {
    animation: none;
  }
  .ambient-orbits .orbit { opacity: 0.08; }
  .ambient-bg .drift { opacity: 0.35; }
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  align-items: center;
}

@media (min-width: 960px) {
  .hero .container {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.hero-copy h1 {
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--off-white);
}

.hero-copy p {
  margin-top: 1.25rem;
  font-size: var(--fs-lg);
  color: var(--muted-dark);
  max-width: 46ch;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.hero-visual {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-md);
}

.hero-visual img {
  width: 100%;
  height: auto;
}

/* ---- Problem section context strip ---- */
.context-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

@media (min-width: 720px) {
  .context-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.context-item {
  padding-top: 1.1rem;
  border-top: 2px solid var(--turquoise);
}

.context-item h3 {
  font-size: var(--fs-body);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.context-item p {
  color: var(--ink-muted);
  font-size: var(--fs-sm);
}

.problem-lead {
  font-size: var(--fs-lg);
  color: var(--ink-muted);
  max-width: 95ch;
  margin-bottom: var(--space-block);
}

.problem-close {
  margin-top: var(--space-block);
  font-size: var(--fs-lg);
  font-weight: 600;
  max-width: 90ch;
}

/* ---- RMM section ---- */
.rmm-axes {
  display: grid;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

@media (min-width: 860px) {
  .rmm-axes {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.axis-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transform: perspective(800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .axis-card:hover {
    transform: perspective(800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-3px);
    box-shadow: var(--shadow-sm);
    border-color: var(--turquoise-300);
  }
}

.axis-tag {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.6rem;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--turquoise-700);
}

.axis-card ul {
  margin-top: 1rem;
  display: grid;
  gap: 0.55rem;
}

.axis-card li {
  padding-left: 1rem;
  position: relative;
  color: var(--ink-muted);
  font-size: var(--fs-sm);
}

.axis-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--turquoise);
}

.rule-callout {
  margin-top: 2rem;
  padding: 1.75rem 2rem;
  border-radius: var(--radius-md);
  background: var(--navy-900);
  color: var(--off-white);
  display: grid;
  gap: 0.5rem;
}

.rule-callout .eyebrow {
  color: var(--turquoise);
  margin-bottom: 0;
}

.rule-callout p {
  font-size: var(--fs-lg);
  font-weight: 600;
  max-width: 90ch;
}

.rmm-diagram-wrap {
  margin-top: clamp(3rem, 2.4rem + 2vw, 4rem);
}

.staircase-svg {
  width: 100%;
  height: auto;
}

.matrix-svg {
  width: 100%;
  height: auto;
}

/* Diagram entrance: reveals column-by-column / bar-by-bar instead of popping in at once,
   dramatizing the level progression the diagrams explain. Purpose: storytelling. */
.matrix-svg rect,
.staircase-svg rect {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}

.matrix-figure.is-visible .matrix-svg rect,
.staircase-figure.is-visible .staircase-svg rect {
  opacity: 1;
  transform: scale(1);
}

.matrix-svg rect:nth-child(5n + 1) { transition-delay: 0ms; }
.matrix-svg rect:nth-child(5n + 2) { transition-delay: 45ms; }
.matrix-svg rect:nth-child(5n + 3) { transition-delay: 90ms; }
.matrix-svg rect:nth-child(5n + 4) { transition-delay: 135ms; }
.matrix-svg rect:nth-child(5n + 5) { transition-delay: 180ms; }

.staircase-svg rect:nth-of-type(1) { transition-delay: 0ms; }
.staircase-svg rect:nth-of-type(2) { transition-delay: 70ms; }
.staircase-svg rect:nth-of-type(3) { transition-delay: 140ms; }
.staircase-svg rect:nth-of-type(4) { transition-delay: 210ms; }
.staircase-svg rect:nth-of-type(5) { transition-delay: 280ms; }

.matrix-svg text,
.matrix-svg line,
.matrix-svg g[transform] circle,
.staircase-svg text {
  opacity: 0;
  transition: opacity var(--dur-reveal) var(--ease-out);
  transition-delay: 260ms;
}

.matrix-figure.is-visible .matrix-svg text,
.matrix-figure.is-visible .matrix-svg line,
.matrix-figure.is-visible .matrix-svg g[transform] circle,
.staircase-figure.is-visible .staircase-svg text {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .matrix-svg rect,
  .staircase-svg rect,
  .matrix-svg text,
  .matrix-svg line,
  .matrix-svg g[transform] circle,
  .staircase-svg text {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---- Matrix cell interaction: hover/focus a cell, see its min-rule result
   live. Purpose: recognition over recall — teaches the page's core claim
   (level = the LOWER of the two axes) interactively instead of asking the
   visitor to compute it from the axis labels. Kept off the staircase per
   critique: that content is already fully visible in the level list below,
   so a duplicate tooltip there would be pure redundancy, not disclosure. ---- */
.matrix-stage {
  position: relative;
}

.matrix-hotspots {
  position: absolute;
  inset: 0;
}

.matrix-cell {
  position: absolute;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  border-radius: 4px;
}

.matrix-cell::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 4px;
  border: 2px solid transparent;
  transition: border-color var(--dur-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .matrix-cell:hover::before {
    border-color: rgba(238, 243, 250, 0.7);
  }
}

.matrix-cell:focus-visible {
  outline: none;
}

.matrix-cell:focus-visible::before {
  border-color: var(--off-white);
}

/* Shared tooltip: lives at <body> level (see index.html), positioned via
   JS with `position: fixed` so it always escapes any ancestor's stacking
   context (a transformed reveal card, in this case) instead of getting
   silently trapped under the sticky nav. */
.matrix-tooltip {
  position: fixed;
  z-index: 200;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--navy-950);
  color: var(--off-white);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.matrix-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .matrix-tooltip {
    transition: none;
  }
}

.diagram-hint {
  margin-top: 0.75rem;
  font-size: var(--fs-xs);
  color: var(--ink-muted);
  text-align: center;
}

.diagram-hint svg {
  width: 13px;
  height: 13px;
  display: inline;
  vertical-align: -2px;
  margin-right: 0.25rem;
}

.matrix-figure,
.staircase-figure {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
  margin: 0;
}

.matrix-figure figcaption,
.staircase-figure figcaption {
  margin-top: 1rem;
  font-size: var(--fs-xs);
  color: var(--ink-muted);
  text-align: center;
}

/* "You are here" marker: a slow-spinning dashed ring plus a location-ping
   pulse on the dot. Purpose: state indication, marks a live fact (where the
   Colombian market sits today), not decoration. */
.matrix-marker-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: marker-spin 40s linear infinite;
}

@keyframes marker-spin {
  to { transform: rotate(360deg); }
}

.matrix-marker-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: marker-ping 2.2s cubic-bezier(0.23, 1, 0.32, 1) infinite;
}

@keyframes marker-ping {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(3.2); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .matrix-marker-ring,
  .matrix-marker-pulse {
    animation: none;
  }
}

.rmm-diagrams {
  display: grid;
  gap: clamp(1.5rem, 1rem + 2vw, 2.25rem);
}

@media (min-width: 960px) {
  .rmm-diagrams {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: start;
  }
}

.level-detail {
  margin-top: 1.75rem;
  display: grid;
  gap: 0.9rem;
}

@media (min-width: 720px) {
  .level-detail {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
  }
}

.level-detail li {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border-light);
  font-size: var(--fs-xs);
  color: var(--ink-muted);
  line-height: 1.5;
}

.level-detail strong {
  display: block;
  color: var(--ink);
  font-size: var(--fs-sm);
  margin-bottom: 0.2rem;
}

/* ---- Process (flow, not equal cards) ---- */
.flow {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.5rem;
  position: relative;
}

@media (min-width: 860px) {
  .flow {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }
  .flow-step {
    position: relative;
    padding-right: 2.25rem;
  }
  .flow-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 1.6rem;
    right: 0;
    width: 2.25rem;
    height: 0;
    border-top: 2px dashed var(--turquoise);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur-reveal) var(--ease-out);
  }
  .flow-step.is-visible:not(:last-child)::after {
    transform: scaleX(1);
  }
}

.flow-step {
  display: grid;
  gap: 0.75rem;
}

.flow-num {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-sm);
  background: var(--navy-700);
  color: var(--turquoise);
  font-weight: 700;
  font-size: var(--fs-h3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-step h3 {
  color: var(--off-white);
}

.flow-step p {
  color: var(--muted-dark);
  font-size: var(--fs-sm);
  max-width: 34ch;
}

.proceso-block {
  position: relative;
  overflow: hidden;
}

.proceso-block .container {
  position: relative;
  z-index: 1;
}

/* ---- Credibility ---- */
.credibility-body {
  display: grid;
  gap: 1.75rem;
  max-width: 95ch;
}

.credibility-body p {
  font-size: var(--fs-lg);
  color: var(--ink-muted);
}

.sector-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.sector-pill {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--navy-900);
  background: var(--surface);
}

/* ---- Ebook section ---- */
.ebook-section {
  background: var(--navy-900);
  color: var(--off-white);
  border-radius: var(--radius-md);
  margin-inline: auto;
  max-width: var(--container);
  padding: clamp(2.25rem, 1.8rem + 2vw, 3.5rem);
  display: grid;
  gap: clamp(2rem, 1.6rem + 2vw, 3rem);
}

@media (min-width: 860px) {
  .ebook-section {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }
}

.ebook-cover {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  background: linear-gradient(155deg, var(--navy-800), var(--navy-950) 70%);
  border: 1px solid var(--border-dark);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ebook-cover .eyebrow {
  color: var(--turquoise);
}

.ebook-cover-title {
  font-weight: 700;
  font-size: var(--fs-h3);
  line-height: 1.25;
  color: var(--off-white);
}

.ebook-cover-foot {
  font-size: var(--fs-xs);
  color: var(--muted-dark);
}

.ebook-form {
  margin-top: 1.75rem;
  display: grid;
  gap: 1rem;
  max-width: 420px;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--off-white);
}

.field input {
  font: inherit;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-dark);
  background: rgba(238, 243, 250, 0.06);
  color: var(--off-white);
  transition: border-color var(--dur-fast) var(--ease-out);
}

.field input::placeholder {
  color: var(--muted-dark);
}

.field input:focus {
  border-color: var(--turquoise);
  outline: none;
}

.field-error {
  font-size: var(--fs-xs);
  color: #ff9d9d;
  display: none;
}

.field.has-error input {
  border-color: #ff9d9d;
}

.field.has-error .field-error {
  display: block;
}

.ebook-form .btn {
  margin-top: 0.25rem;
  width: 100%;
}

.ebook-note {
  font-size: var(--fs-xs);
  color: var(--muted-dark);
}

.form-success {
  display: none;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  background: rgba(46, 196, 182, 0.12);
  border: 1px solid rgba(46, 196, 182, 0.35);
  font-size: var(--fs-sm);
}

.form-success svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--turquoise);
  margin-top: 2px;
}

.form-success a {
  color: var(--turquoise);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ebook-form.is-success .field,
.ebook-form.is-success .btn-primary {
  display: none;
}

.ebook-form.is-success .form-success {
  display: flex;
}

/* ---- Contact section ---- */
.contact-grid {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.contact-card {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--surface);
  display: grid;
  gap: 0.6rem;
  transform: perspective(800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .contact-card:hover {
    border-color: var(--turquoise);
    box-shadow: var(--shadow-sm);
    transform: perspective(800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-3px);
  }
}

.contact-card .icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--turquoise-700);
}

.contact-card .icon svg {
  width: 20px;
  height: 20px;
}

.contact-card h3 {
  font-size: var(--fs-body);
}

.contact-card p {
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}

.contact-card .contact-link {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--turquoise-700);
}

/* ---- Footer ---- */
.footer {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}

.footer .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 720px) {
  .footer .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.footer-brand p {
  margin-top: 0.6rem;
  color: var(--muted-dark);
  font-size: var(--fs-sm);
  max-width: 32ch;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
}

.footer-links a {
  font-size: var(--fs-sm);
  color: var(--off-white);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: color var(--dur-fast) var(--ease-out);
}

.footer-links a:hover {
  color: var(--turquoise);
}

.footer-links svg {
  width: 16px;
  height: 16px;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  padding-right: 4.5rem;
  border-top: 1px solid var(--border-dark);
  font-size: var(--fs-xs);
  color: var(--muted-dark);
}

@media (min-width: 640px) {
  .footer-bottom {
    padding-right: 0;
  }
}

/* ---- Floating WhatsApp button ---- */
.wa-float {
  position: fixed;
  right: max(1.1rem, env(safe-area-inset-right));
  bottom: max(1.1rem, env(safe-area-inset-bottom));
  z-index: 50;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--turquoise);
  color: var(--navy-950);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transform: translate(var(--mx, 0px), var(--my, 0px));
  transition: transform var(--dur-fast) var(--ease-out);
}

/* Live-contact ping: a persistent, always-visible CTA earns a perpetual
   micro-interaction (state indication: "someone's here to answer"). */
.wa-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--turquoise);
  animation: wa-ping 2.6s cubic-bezier(0.23, 1, 0.32, 1) infinite;
}

@keyframes wa-ping {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.9); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .wa-float::before { animation: none; display: none; }
}

.wa-float svg {
  width: 28px;
  height: 28px;
  position: relative;
}

@media (hover: hover) and (pointer: fine) {
  .wa-float:hover {
    transform: translate(var(--mx, 0px), var(--my, 0px)) scale(1.06);
  }
}

.wa-float:active {
  transform: translate(var(--mx, 0px), var(--my, 0px)) scale(0.96);
}

/* ---- Scroll reveal ----
   :where() keeps this at zero specificity so component rules (card tilt,
   button magnetism) can override `transform` normally instead of losing
   to the reveal system just because it's an attribute+class selector. */
:where([data-reveal]) {
  opacity: 0;
  transform: translateY(34px) scale(0.96);
  transition: opacity 700ms var(--ease-out),
    transform 700ms var(--ease-out);
}

:where([data-reveal].is-visible) {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  background: var(--turquoise);
  color: var(--navy-950);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--fs-sm);
  z-index: 100;
  transition: top var(--dur-fast) var(--ease-out);
}

.skip-link:focus {
  top: 1rem;
}

/* ---- Visually hidden ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
