/* ============================================================
   DIAGNÓSTICO ORVXXIS — Sistema de diseño
   Premium dark · cyan electric accent · high-ticket consulting
   ============================================================ */

:root {
  /* Color tokens — defaults overridden by Tweaks */
  --bg: #050507;
  --bg-2: #0a0a0d;
  --surface: #0f0f14;
  --surface-2: #15151c;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f4f6;
  --text-muted: rgba(244, 244, 246, 0.62);
  --text-dim: rgba(244, 244, 246, 0.42);

  /* Marca: negro + rojo (paleta "noche", aplicada en runtime por app.jsx).
     Estos fallbacks ya coinciden con noche para que NO haya flash cian antes
     de que cargue el JS. Tonos extra (-strong/-deep) para el aurora del hero. */
  --accent: #9E1B32;
  --accent-ink: #FFFFFF;
  --accent-glow: rgba(158, 27, 50, 0.34);
  --accent-soft: rgba(158, 27, 50, 0.14);
  --accent-strong: #CE4257;
  --accent-deep: #5C0F1E;
  --accent-2: #CE4257;
  --accent-2-soft: rgba(206, 66, 87, 0.12);

  --success: #0E9F6E;
  --success-soft: rgba(14, 159, 110, 0.12);
  --warn: #C77D0A;
  --warn-soft: rgba(199, 125, 10, 0.12);
  --danger: #FF4D4D;
  --danger-soft: rgba(255, 77, 77, 0.12);

  --font-display: "Space Grotesk", "Helvetica Neue", sans-serif;
  --font-body: "Space Grotesk", "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow-glow: 0 0 40px var(--accent-glow);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  min-height: 100vh;
  scroll-behavior: smooth;
}

#root {
  min-height: 100vh;
}

::selection {
  background: var(--accent);
  color: #000;
}

/* === Background fx === */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 75%);
  z-index: 0;
}
.bg-orb {
  position: fixed;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  filter: blur(56px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
  animation: orb-drift 20s ease-in-out infinite;
}
.bg-orb.b {
  right: -200px; top: 30%;
  background: radial-gradient(circle, var(--accent-2-soft) 0%, transparent 65%);
  animation-delay: -10s;
  opacity: 0.5;
}
.bg-orb.a {
  left: -200px; top: -100px;
}
@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(60px, 40px); }
}

/* === Typography === */
h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

.mono { font-family: var(--font-mono); }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 30px -8px var(--accent);
}
.btn-primary:hover {
  background: #fff;
  border-color: #fff;
  color: #000;
  box-shadow: 0 0 0 1px #fff, 0 12px 40px -8px var(--accent-glow);
  transform: translateY(-2px);
}
/* CTA primario de marca (rojo, texto blanco) — "Empezar diagnóstico" en Nav + Hero.
   Hover mantiene el rojo (no vira a blanco como btn-primary) para no chocar con los CTA blancos. */
.btn-cta {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 12px 36px -14px var(--accent);
}
.btn-cta::before { display: none; }
.btn-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 18px 48px -14px var(--accent);
}
.btn-cta svg { stroke: #fff; }
.btn-lg {
  padding: 18px 32px;
  font-size: 16px;
}
.btn-xl {
  padding: 22px 40px;
  font-size: 18px;
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
}

/* === Cards === */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  position: relative;
}
/* === Admin panel — lift de legibilidad (no afecta el sitio público) === */
.admin-shell .card { background: #14141b; border-color: rgba(255,255,255,0.12); }
.admin-shell .text-dim   { color: rgba(244,244,246,0.60); }
.admin-shell .text-muted { color: rgba(244,244,246,0.72); }

.card-hover {
  transition: all 0.25s ease;
}
.card-hover:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-2px);
}

/* === Pills / badges === */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.025);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.pill.success { color: var(--success); border-color: rgba(59,255,201,0.25); }
.pill.success .dot { background: var(--success); box-shadow: 0 0 8px var(--success); }
.pill.danger { color: var(--danger); border-color: rgba(255,77,77,0.25); }
.pill.danger .dot { background: var(--danger); box-shadow: 0 0 8px var(--danger); animation: pulse 1.5s infinite; }
.pill.warn { color: var(--warn); border-color: rgba(255,201,59,0.25); }
.pill.warn .dot { background: var(--warn); box-shadow: 0 0 8px var(--warn); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* === Container === */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}
.container-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

/* === Nav === */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5,5,7,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  max-width: 1240px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--text);
}
.brand-mark {
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  position: relative;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.06em;
  color: var(--text);
}

/* === Inputs === */
.input, .select, .textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.input::placeholder { color: var(--text-dim); }

/* === Option chips for diagnostic === */
.opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 22px;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  transition: all 0.15s ease;
}
.opt:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateX(4px);
}
.opt.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.opt-key {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.opt.selected .opt-key {
  color: var(--accent);
  border-color: var(--accent);
}

/* === Progress === */
.progress-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  transition: width 0.4s ease;
  box-shadow: 0 0 12px var(--accent-soft);
}

/* === Score visuals === */
.score-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  position: relative;
}
.score-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(.2,.8,.2,1);
}

/* === Loader === */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === Utility === */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 40px; }
.center { align-items: center; justify-content: center; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warn { color: var(--warn); }
.text-danger { color: var(--danger); }
.hidden { display: none !important; }

@media (max-width: 720px) {
  .container, .container-narrow { padding: 0 18px; }
  .nav-inner { padding: 14px 18px; }
  .btn-xl { padding: 18px 28px; font-size: 16px; }
}

/* === Hero specific === */
.hero {
  position: relative;
  padding: 100px 0 80px;
  overflow: hidden;
}
.hero h1 {
  font-size: clamp(40px, 7vw, 88px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.hero h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.system-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

/* === Decorative X (logo mark) === */
.x-mark {
  position: relative;
  width: 24px; height: 24px;
}
.x-mark::before, .x-mark::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
  transform-origin: center;
  box-shadow: 0 0 8px var(--accent);
}
.x-mark::before { transform: translate(-50%,-50%) rotate(45deg); }
.x-mark::after  { transform: translate(-50%,-50%) rotate(-45deg); }

/* === Journey dashboard === */
.journey-stage {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px;
  position: relative;
  min-height: 140px;
  transition: all 0.2s ease;
}
.journey-stage.green {
  border-color: rgba(59,255,201,0.35);
  background: linear-gradient(180deg, rgba(59,255,201,0.08) 0%, var(--surface) 100%);
}
.journey-stage.yellow {
  border-color: rgba(255,201,59,0.35);
  background: linear-gradient(180deg, rgba(255,201,59,0.08) 0%, var(--surface) 100%);
}
.journey-stage.red {
  border-color: rgba(255,77,77,0.35);
  background: linear-gradient(180deg, rgba(255,77,77,0.10) 0%, var(--surface) 100%);
}
.journey-stage .status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  position: absolute; top: 14px; right: 14px;
}
.journey-stage.green .status-dot { background: var(--success); box-shadow: 0 0 10px var(--success); }
.journey-stage.yellow .status-dot { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.journey-stage.red .status-dot { background: var(--danger); box-shadow: 0 0 10px var(--danger); animation: pulse 1.5s infinite; }

/* === Print === */
@media print {
  .bg-grid, .bg-orb, .nav, .grain-overlay, .cursor-trail { display: none; }
  body { background: white; color: black; }
}

/* ============================================================
   DESIGN UPLIFT v2 — motion, rhythm, brand expression
   ============================================================ */

/* --- Grain / noise overlay --- */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* --- Alternating section bg --- */
section.bg-alt {
  background: var(--bg-2);
  position: relative;
  z-index: 2;
}
section.bg-alt::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at top, var(--accent-soft), transparent 60%);
  opacity: 0.4;
}

/* --- Scroll reveal (IntersectionObserver target) --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1.in { transition-delay: 0.08s; }
.reveal-delay-2.in { transition-delay: 0.16s; }
.reveal-delay-3.in { transition-delay: 0.24s; }
.reveal-delay-4.in { transition-delay: 0.32s; }
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-stagger.in > *:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.05s; }
.reveal-stagger.in > *:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.12s; }
.reveal-stagger.in > *:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.19s; }
.reveal-stagger.in > *:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.26s; }
.reveal-stagger.in > *:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.33s; }
.reveal-stagger.in > *:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 0.40s; }
.reveal-stagger.in > *:nth-child(n+7) { opacity: 1; transform: translateY(0); transition-delay: 0.47s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; transition: none; }
}

/* --- Bar fill animation --- */
.bar-fill {
  width: 0 !important;
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.bar-fill.in {
  width: var(--bar-target, 50%) !important;
}

/* --- Number display: mixed serif/sans for premium feel --- */
.num-mix {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.num-mix .num-sym {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  opacity: 0.85;
  font-size: 0.72em;
  align-self: flex-start;
  margin-top: 0.05em;
}
.num-mix .num-int {
  font-family: var(--font-display);
  font-weight: 700;
}
.num-mix .num-unit {
  font-family: var(--font-mono);
  font-size: 0.32em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.55;
  align-self: flex-end;
  margin-bottom: 0.4em;
  margin-left: 6px;
}

/* --- Button primary: arrow travel + trail --- */
.btn-primary svg {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-primary:hover svg {
  transform: translateX(6px);
}
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -40px;
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.2s;
}
.btn-primary:hover::after {
  opacity: 1;
  animation: btnTrail 0.9s linear;
}
@keyframes btnTrail {
  0% { left: -40px; opacity: 0; }
  20% { opacity: 1; }
  100% { left: 110%; opacity: 0; }
}

/* --- Glow pulse for key elements --- */
.glow-pulse {
  animation: glowPulse 3.5s ease-in-out infinite alternate;
}
@keyframes glowPulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-soft), 0 0 24px var(--accent-soft); }
  100% { box-shadow: 0 0 0 6px transparent, 0 0 48px var(--accent-glow); }
}
.glow-pulse-danger {
  animation: glowPulseDanger 2.8s ease-in-out infinite alternate;
}
@keyframes glowPulseDanger {
  0%   { box-shadow: 0 0 16px rgba(255, 77, 77, 0.18); }
  100% { box-shadow: 0 0 36px rgba(255, 77, 77, 0.45); }
}
.glow-pulse-gold {
  animation: glowPulseGold 4s ease-in-out infinite alternate;
}
@keyframes glowPulseGold {
  0%   { box-shadow: 0 0 16px var(--accent-2-soft); }
  100% { box-shadow: 0 0 38px rgba(201, 162, 74, 0.4); }
}

/* --- Cursor trail (zone-scoped) --- */
.cursor-zone { cursor: crosshair; }
.cursor-trail-particle {
  position: fixed;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent), 0 0 24px var(--accent-glow);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  opacity: 1;
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.cursor-trail-particle.fade {
  opacity: 0;
  transform: scale(0.2);
}

/* --- Section divider with X mark in center --- */
.section-divider {
  position: relative;
  height: 1px;
  background: var(--border);
  margin: 0 auto;
  max-width: 1200px;
}
.section-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background:
    linear-gradient(var(--accent), var(--accent)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 1.5px 100% no-repeat;
  background-color: var(--bg);
  padding: 8px;
}

/* --- Gold accent helpers --- */
.gold { color: var(--accent-2); }
.bg-gold-soft { background: var(--accent-2-soft); }
.border-gold { border-color: var(--accent-2) !important; }
.pill-gold {
  background: var(--accent-2-soft);
  border-color: var(--accent-2);
  color: var(--accent-2);
}
.pill-gold .dot { background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); }

/* --- Floating hero widget --- */
.hero-float {
  animation: floatY 7s ease-in-out infinite alternate;
}
@keyframes floatY {
  0%   { transform: translateY(-6px) rotate(-1.5deg); }
  100% { transform: translateY(6px) rotate(1.5deg); }
}

/* --- ReportPreview break-frame element --- */
.break-frame {
  position: absolute;
  right: -24px;
  top: 32%;
  z-index: 10;
  transform: rotate(4deg);
  filter: drop-shadow(0 18px 40px rgba(255, 77, 77, 0.35));
}
@media (max-width: 900px) {
  .break-frame {
    position: static;
    transform: none;
    margin-top: 16px;
  }
}

/* --- Orbital diagram nodes --- */
.orbit-node {
  transition: transform 0.4s ease, filter 0.4s ease;
  cursor: pointer;
}
.orbit-node:hover {
  transform: scale(1.06);
  filter: drop-shadow(0 0 16px var(--accent));
}
@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}
.orbit-ring {
  animation: orbitSpin 60s linear infinite;
  transform-origin: center;
}
.orbit-ring-reverse {
  animation: orbitSpin 90s linear infinite reverse;
  transform-origin: center;
}

/* ============================================================
   PREMIUM UPLIFT v3 — scrollbar, nav, pain, FAQ, separators
   ============================================================ */

/* --- Custom scrollbar --- */
html { scrollbar-width: thin; scrollbar-color: var(--accent) var(--bg); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 70%, black));
  border-radius: 999px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
::selection { background: var(--accent); color: #04141a; }

/* --- Nav: transforms on scroll --- */
.nav {
  transition: padding 0.4s cubic-bezier(0.16,1,0.3,1), background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}
.nav.scrolled {
  background: rgba(5,5,7,0.85);
  box-shadow: 0 8px 40px -12px rgba(0,0,0,0.8), 0 0 0 1px var(--accent-soft);
  border-bottom-color: var(--accent-soft);
}
.nav.scrolled .nav-inner { padding-top: 11px; padding-bottom: 11px; }
.nav .nav-inner { transition: padding 0.4s cubic-bezier(0.16,1,0.3,1); }

/* --- Section separator with brand X --- */
.sep {
  position: relative;
  height: 1px;
  max-width: 1240px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--border) 18%, var(--border) 82%, transparent);
}
.sep::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px; height: 9px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--bg);
  box-shadow:
    -1px -1px 0 0 var(--accent) inset,
    1px 1px 0 0 var(--accent) inset;
  border: 1px solid var(--accent);
  border-radius: 2px;
}
.sep.gold::before { border-color: var(--accent-2); box-shadow: -1px -1px 0 0 var(--accent-2) inset, 1px 1px 0 0 var(--accent-2) inset; }

/* --- Pain cards --- */
.pain-card {
  position: relative;
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.pain-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--danger);
  opacity: 0.5;
  transition: opacity 0.3s, box-shadow 0.3s;
}
.pain-card:hover {
  border-color: rgba(255,77,77,0.3);
  transform: translateY(-3px);
  box-shadow: 0 24px 50px -24px rgba(255,77,77,0.45);
}
.pain-card:hover::before { opacity: 1; box-shadow: 0 0 20px var(--danger); }
.pain-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--danger);
  opacity: 0.7;
}

/* --- FAQ accordion --- */
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 4px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 0.2s, padding-left 0.3s;
}
.faq-q:hover { color: var(--accent); padding-left: 12px; }
.faq-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  position: relative;
  transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
}
.faq-item.open .faq-icon {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: rotate(135deg);
}
.faq-icon::before, .faq-icon::after {
  content: '';
  position: absolute;
  background: currentColor;
  border-radius: 2px;
}
.faq-icon::before { width: 13px; height: 1.5px; }
.faq-icon::after { width: 1.5px; height: 13px; }
.faq-item.open .faq-icon { color: var(--accent); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.16,1,0.3,1), opacity 0.4s ease, padding 0.4s ease;
  opacity: 0;
  padding: 0 56px 0 4px;
}
.faq-item.open .faq-a {
  max-height: 320px;
  opacity: 1;
  padding-bottom: 28px;
}
.faq-a p { color: var(--text-muted); font-size: 16px; line-height: 1.65; }

/* --- Parallax decoration --- */
.parallax-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

/* ============================================================
   PREMIUM UPLIFT v4 — ambient depth, cinematic intro, polish
   ============================================================ */

/* --- Ambient aurora: fixed, slow-drifting light behind content --- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.aurora::before, .aurora::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  will-change: transform;
}
.aurora::before {
  width: 780px; height: 780px;
  top: -260px; left: -200px;
  background: radial-gradient(circle, var(--accent-glow), transparent 65%);
  animation: auroraA 26s ease-in-out infinite alternate;
}
.aurora::after {
  width: 680px; height: 680px;
  top: 18%; right: -240px;
  background: radial-gradient(circle, var(--accent-2-soft), transparent 65%);
  animation: auroraB 32s ease-in-out infinite alternate;
}
@keyframes auroraA {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(120px, 90px) scale(1.15); }
}
@keyframes auroraB {
  0%   { transform: translate(0,0) scale(1.1); }
  100% { transform: translate(-100px, 60px) scale(0.95); }
}

/* --- Vignette: focus the center, richen the edges --- */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, transparent 55%, rgba(0,0,0,0.45) 100%),
    radial-gradient(ellipse 100% 100% at 50% 120%, transparent 60%, rgba(0,0,0,0.5) 100%);
}

/* --- Content sits above ambient layers (exclude fixed bg fx) --- */
.nav, #root > *:not(.bg-grid):not(.bg-orb) { position: relative; z-index: 2; }
.bg-grid, .bg-orb { position: fixed !important; z-index: 0; }

/* --- Noche: near-black canvas. Strongly dim the burgundy ambient so the
   background reads black, with red kept as an accent (not a wash). --- */
html.theme-noche .aurora::before,
html.theme-noche .aurora::after { opacity: 0.2; }
html.theme-noche .bg-orb { opacity: 0.1; }

/* ============================================================
   LIGHT THEME — for light palettes (e.g. Niebla). The dark
   decorative layers (vignette, orbs, aurora, grain) are tuned
   for a dark canvas and muddy a light one, so tone them down,
   and flip the nav + a few hardcoded-dark surfaces to light.
   ============================================================ */
html.theme-light .vignette { display: none; }
html.theme-light .bg-orb { display: none; }
html.theme-light .bg-grid {
  background-image:
    linear-gradient(to right, rgba(17,24,39,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(17,24,39,0.04) 1px, transparent 1px);
}
html.theme-light .aurora { opacity: 0.35; mix-blend-mode: multiply; }
html.theme-light .grain-overlay { mix-blend-mode: multiply; opacity: 0.02; }
html.theme-light .nav { background: rgba(241,245,249,0.72); }
html.theme-light .nav.scrolled {
  background: rgba(255,255,255,0.85);
  box-shadow: 0 8px 40px -14px rgba(17,24,39,0.18), 0 0 0 1px var(--accent-soft);
}
html.theme-light .btn-primary:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  box-shadow: 0 0 0 1px var(--text), 0 12px 40px -8px var(--accent-glow);
}
/* hero headline drop-shadows assume a dark canvas — drop them on light */
html.theme-light .hero-h1,
html.theme-light .hero-lead,
html.theme-light .hero-content .pill { text-shadow: none; }
html.theme-light .grain-overlay { display: none; }

/* --- Cinematic hero intro (plays on load, not on scroll) --- */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroClip {
  from { opacity: 0; transform: translateY(30px); clip-path: inset(0 0 100% 0); }
  to   { opacity: 1; transform: translateY(0); clip-path: inset(0 0 -10% 0); }
}
.hero-anim { opacity: 0; animation: heroRise 0.9s cubic-bezier(0.16,1,0.3,1) both; }
.hero-anim.clip { animation: heroClip 1s cubic-bezier(0.16,1,0.3,1) both; }
@media (prefers-reduced-motion: reduce) {
  .hero-anim { opacity: 1; animation: none; }
}

/* --- Primary button: gradient + sheen sweep (derives from --accent) --- */
.btn-primary {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 82%, white) 0%,
    var(--accent) 55%,
    color-mix(in srgb, var(--accent) 82%, black) 100%);
  box-shadow: 0 0 0 1px var(--accent), 0 10px 34px -10px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-18deg);
  transition: none;
  pointer-events: none;
}
.btn-primary:hover::before { animation: btnSheen 0.85s ease; }
@keyframes btnSheen {
  from { left: -120%; }
  to   { left: 140%; }
}

/* --- Editorial section index numbers --- */
.section-index {
  font-family: var(--font-display);
  font-size: clamp(64px, 9vw, 130px);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--border-strong);
  text-stroke: 1px var(--border-strong);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

/* --- Eyebrow refinement: keep brand // prefix, add subtle glow --- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 0 18px var(--accent-soft);
}

/* ============================================================
   MOBILE-FIRST TUNING — ~90% of traffic is phone (Instagram).
   Desktop is built at 1280px; this layer makes 360–430px feel
   designed, not shrunk. Touch targets ≥44px, tighter rhythm,
   reined-in display type, and zero horizontal scroll.
   ============================================================ */

/* Kill horizontal scroll from parallax orbs / ambient decorations */
#root { overflow-x: clip; }

@media (max-width: 640px) {
  /* Vertical rhythm — 90–120px desktop sections are too tall on a phone */
  section { padding-top: 60px !important; padding-bottom: 60px !important; }

  /* Containers: comfortable side gutters */
  .container, .container-narrow { padding-left: 20px; padding-right: 20px; }

  /* Nav: compact, keep brand + action on one line */
  .nav-inner { padding: 12px 18px; }
  .brand { font-size: 16px; }
  .brand-mark { width: 24px; height: 24px; }
  .nav .btn { padding: 11px 15px; font-size: 13px; }

  /* Primary CTAs become full-width thumb targets */
  .btn-xl { width: 100%; justify-content: center; padding: 16px 22px !important; font-size: 16px !important; }

  /* Hero */
  .hero-split { padding-top: 32px !important; padding-bottom: 52px !important; }
  .hero-h1 { font-size: 33px !important; line-height: 1.1 !important; letter-spacing: -0.03em !important; }
  .hero-lead { font-size: 16px !important; }
  .hero-stat-num { font-size: 23px !important; }

  /* Section headers: less breathing room before content */
  .rp-head, .sys-head, .hiw-head { margin-bottom: 30px !important; }

  /* Editorial outlined numbers — scale down so they don't dominate */
  .sys-num, .rp2-num, .hiw-num, .pain-num-big { font-size: 30px !important; }
  .faq2-q { padding-top: 22px !important; padding-bottom: 22px !important; }

  /* Deliverable: protect the big money figure from clipping */
  .rp2-section { padding: 28px 0 !important; }
  .rp2-money-fig { font-size: 50px !important; }
  .rp2-out-label { margin-bottom: 16px !important; }

  /* Founder portrait: shorter on phones */
  .founder-stage { min-height: 360px !important; }

  /* Warm CTA + final CTA inner padding tighter */
  .warm-panel, .fcta-inner { padding-left: 22px !important; padding-right: 22px !important; }

  /* Hero question card: comfy tap rows */
  .hq-opt { padding: 14px 14px !important; }
}

@media (max-width: 400px) {
  .container, .container-narrow { padding-left: 16px; padding-right: 16px; }
  .hero-h1 { font-size: 30px !important; }
  .rp2-money-fig { font-size: 42px !important; }
  .nav .btn { padding: 10px 13px; font-size: 12.5px; }
  .sys-num, .rp2-num, .hiw-num, .pain-num-big { font-size: 27px !important; }
}

/* Diagnostic flow + lead form: tighten the tall inline vertical padding
   on phones (these screens are the core funnel for Instagram traffic). */
@media (max-width: 640px) {
  .diag-screen { padding: 36px 20px 72px !important; }
  .opt { padding: 16px 18px !important; }
}

/* ============================================================
   SCROLL-CINEMA v5 — scroll-scrub engine, draw-on-scroll,
   layered parallax, magnetic hover. Native (CSS + rAF in
   motion.js writes --p / --step). Palette-agnostic via vars.
   ============================================================ */

/* --p: 0→1 scroll/scrub progress. Registered so it can be animated (e.g. the
   hero underline drawing itself on load) and so calc() reads it as a number. */
@property --p {
  syntax: '<number>';
  initial-value: 0;
  inherits: true;
}

/* --- Lines / SVG paths that draw themselves with scroll progress.
   motion.js measures the path and sets stroke-dasharray + --draw-len; here we
   map the visible portion to the scrub progress var --p (0→1) inherited from
   the nearest scrub container, falling back to a reveal class otherwise. --- */
.draw-line {
  stroke-dashoffset: calc(var(--draw-len, 1000) * (1 - var(--p, 0)));
  transition: stroke-dashoffset 0.1s linear;
}
/* When inside a plain .reveal (no scrub), draw on enter instead. */
.reveal .draw-line { transition: stroke-dashoffset 1.4s cubic-bezier(0.22,1,0.36,1); }
.reveal.in .draw-line { --p: 1; }

/* --- Hero ----------------------------------------------------------------- */
/* Deepest parallax layer: oversized outlined wordmark behind the pitch.
   The wrap takes the parallax transform (so it can't fight text centering). */
.hero-ghost-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
}
.hero-ghost {
  font-family: var(--font-display);
  font-size: clamp(120px, 22vw, 320px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.8;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px var(--border);
  opacity: 0.5;
  user-select: none;
}
/* Accent underline under "3 sistemas" — draws itself on load. */
.hero-h1-mark { position: relative; display: inline-block; }
.hero-underline {
  position: absolute;
  left: -2%; bottom: -0.18em;
  width: 104%; height: 0.5em;
  overflow: visible;
}
.hero-underline .draw-line {
  filter: drop-shadow(0 0 6px var(--accent-soft));
  animation: heroDraw 1.1s cubic-bezier(0.22,1,0.36,1) 0.7s both;
}
@keyframes heroDraw { from { --p: 0; } to { --p: 1; } }
@media (prefers-reduced-motion: reduce) {
  .hero-underline .draw-line { animation: none; --p: 1; }
}

/* --- Sticky scrub container: tall parent, pinned stage inside. --- */
.scrub-pin { position: relative; }
.scrub-stage {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  /* Per-step theme vars (defaults = light). Overridden per data-active-step
     on desktop so the whole stage recolors as you scroll through the systems. */
  --seq-bg: transparent;
  --seq-fg: var(--text);
  --seq-fg-muted: var(--text-muted);
  --seq-accent: var(--accent);
  --seq-border: var(--border);
  --seq-chip: var(--surface);
  --seq-active-bg: var(--accent-soft);
  background-color: var(--seq-bg);
  color: var(--seq-fg);
  transition: background-color 0.6s ease, color 0.6s ease;
}
/* The .container child must span the full stage width (a row flex item would
   shrink to its content and collapse the nav+panel grid → per-word wrapping). */
.scrub-stage > .container { width: 100%; }

/* --- Layered parallax depths (used with data-parallax in motion.js).
   These just set will-change/pointer rules; transforms come from JS. --- */
.depth { will-change: transform; }

/* --- Magnetic hover target: motion.js-free, pure transform via inline
   style set by React handlers. Smooths the return. --- */
.magnetic { transition: transform 0.35s cubic-bezier(0.22,1,0.36,1); }

/* --- Scroll-progress readout rail (thin accent line that fills) --- */
.scrub-rail {
  position: relative;
  height: 2px;
  background: var(--border-strong);
  border-radius: 999px;
  overflow: hidden;
}
.scrub-rail::after {
  content: '';
  position: absolute;
  inset: 0;
  transform-origin: left;
  transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent-soft);
}

/* --- Reduced motion / touch: scrub is neutralised by motion.js (--p:1,
   --step=last). Make sure nothing animates or hides here either. --- */
@media (prefers-reduced-motion: reduce) {
  .draw-line, .reveal .draw-line { transition: none; --p: 1; }
  .magnetic { transition: none; }
}

/* On phones the sticky scrub stages unpin to normal flow (skill collapses
   the scroll-video on mobile the same way). Sections opt in via .sys-seq. */
@media (max-width: 768px) {
  .scrub-stage { position: static; min-height: 0; }
}

/* ============================================================
   PREMIUM POLISH — pase de refinamiento cohesivo ($10k feel)
   Capa aditiva: hover glows, sheen en CTA, focus accesible,
   ritmo y profundidad. Todo via tokens (negro + rojo).
   ============================================================ */

/* --- Cards: hairline superior + glow rojo sutil al hover --- */
.card-hover, .pain-card { transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease, background .3s ease; }
.card-hover:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border-strong));
  box-shadow: 0 22px 50px -28px rgba(0,0,0,0.8), 0 0 0 1px var(--accent-soft), 0 12px 60px -30px var(--accent-glow);
}
.pain-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 60px -30px rgba(0,0,0,0.85), 0 0 50px -26px var(--danger);
}

/* --- CTA de marca: barrido de luz (sheen) al hover, premium --- */
.btn-cta { position: relative; overflow: hidden; }
.btn-cta::after {
  content: '';
  position: absolute; top: 0; bottom: 0; left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-18deg);
  opacity: 0;
  transition: none;
  pointer-events: none;
}
.btn-cta:hover::after { animation: ctaSheen 0.9s cubic-bezier(0.22,1,0.36,1); }
@keyframes ctaSheen {
  0%   { left: -60%; opacity: 0; }
  12%  { opacity: 1; }
  100% { left: 130%; opacity: 0; }
}

/* --- Foco accesible coherente con la marca (teclado) --- */
a:focus-visible, button:focus-visible, .btn:focus-visible, .opt:focus-visible,
.input:focus-visible, .select:focus-visible, .textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
  border-radius: var(--r-sm);
}

/* --- Eyebrow/pill: micro-brillo y borde vivo --- */
.pill { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* --- Titulares con acento: degradado fino rojo→rosa donde se use .grad-accent --- */
.grad-accent {
  background: linear-gradient(120deg, var(--accent-strong), var(--accent) 55%, var(--accent-deep));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Profundidad: borde luminoso superior en superficies elevadas --- */
.card, .pain-card { background-image: linear-gradient(180deg, rgba(255,255,255,0.022), transparent 36%); }

/* --- Separadores: rombo con halo suave --- */
.sep::before { box-shadow: -1px -1px 0 0 var(--accent) inset, 1px 1px 0 0 var(--accent) inset, 0 0 14px -2px var(--accent-glow); }

/* --- Selección coherente --- */
::selection { background: var(--accent); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .btn-cta:hover::after { animation: none; }
}

/* ============================================================
   SISTEMA DE MOTIVOS "LUXE" (.lx-*) — hilo visual del rediseño
   Eyebrow cinético · numeral display con contorno · marco de
   instrumento (corner ticks) · banda con grano. Todo via tokens.
   ============================================================ */

/* --- Eyebrow cinético: índice + etiqueta + regla que se dibuja --- */
.lx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.lx-eyebrow .lx-eyebrow-idx {
  font-variant-numeric: tabular-nums;
  opacity: 0.95;
}
.lx-eyebrow .lx-eyebrow-txt { color: var(--text-muted); letter-spacing: 0.16em; }
.lx-eyebrow .lx-eyebrow-rule {
  flex: 0 0 auto;
  width: 56px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform-origin: left center;
  transform: scaleX(0.2);
  opacity: 0.5;
  transition: transform 0.9s cubic-bezier(0.16,1,0.3,1), opacity 0.9s ease;
}
.reveal.in .lx-eyebrow .lx-eyebrow-rule,
.lx-eyebrow.in .lx-eyebrow-rule { transform: scaleX(1); opacity: 1; }
.lx-eyebrow.center { justify-content: center; }
/* Regla espejo para eyebrows centrados (se desvanece hacia la derecha) */
.lx-eyebrow .lx-eyebrow-rule-r {
  background: linear-gradient(90deg, transparent, var(--accent));
  transform-origin: right center;
}

/* --- Numeral display gigante con contorno (motivo recurrente) --- */
.lx-num {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--accent) 42%, transparent);
  font-variant-numeric: tabular-nums;
  transition: color 0.5s cubic-bezier(0.16,1,0.3,1), -webkit-text-stroke-color 0.5s ease, text-shadow 0.5s ease;
}
.lx-num.solid { color: var(--accent); -webkit-text-stroke-color: var(--accent); text-shadow: 0 0 30px var(--accent-glow); }
.lx-num-hot:hover .lx-num,
.lx-num.lit {
  color: var(--accent);
  -webkit-text-stroke-color: var(--accent);
  text-shadow: 0 0 28px var(--accent-glow);
}

/* --- Marco de instrumento: corner ticks en L (TL + BR) --- */
.lx-frame { position: relative; }
.lx-frame::before, .lx-frame::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  pointer-events: none;
  opacity: 0.8;
}
.lx-frame::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.lx-frame::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }
/* variante con las 4 esquinas: añade un hijo .lx-frame-corners con 2 pseudos extra */
.lx-frame.four .lx-frame-corners::before,
.lx-frame.four .lx-frame-corners::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  pointer-events: none; opacity: 0.8;
}
.lx-frame.four .lx-frame-corners::before { top: -1px; right: -1px; border-left: none; border-bottom: none; }
.lx-frame.four .lx-frame-corners::after  { bottom: -1px; left: -1px; border-right: none; border-top: none; }

/* --- Banda con grano/scanline tenue (cadencia de revista en oscuro) --- */
.lx-grain { position: relative; }
.lx-grain::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.014) 0 1px, transparent 1px 3px);
  opacity: 0.5;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000, transparent 78%);
}
/* El contenido vive dentro de .container (position:relative; z-index:1), así que
   queda por encima del grano sin necesidad de forzar z-index en los hijos. */

@media (prefers-reduced-motion: reduce) {
  .lx-eyebrow .lx-eyebrow-rule { transition: none; transform: scaleX(1); opacity: 1; }
}
