/* FUNDADORA — capa ambiental y componentes de la experiencia inmersiva.
   CSS sin capa: sus reglas prevalecen sobre las utilidades de Tailwind cuando coinciden. */

@property --fd-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

html {
  background: #11030d;
  scroll-behavior: smooth;
}

html.has-scrolly {
  scroll-behavior: auto;
}

select option {
  background: #250b1d;
  color: #faf6f0;
}

.no-scrollbar {
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ---------- Fondo ambiental ---------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle at 50% 48%, #4a1937 0%, #301024 38%, #1c0715 72%, #11030d 100%);
}

.ambient-orb {
  position: absolute;
  width: 52vmax;
  height: 52vmax;
  margin: -26vmax 0 0 -26vmax;
  will-change: transform;
}

.ambient-orb > span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  animation: fd-drift 14s ease-in-out infinite;
}

.ambient-orb--gold {
  left: 22%;
  top: 18%;
}

.ambient-orb--gold > span {
  background: radial-gradient(circle, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0) 62%);
}

.ambient-orb--fuchsia {
  left: 82%;
  top: 58%;
}

.ambient-orb--fuchsia > span {
  background: radial-gradient(circle, rgba(134, 25, 143, 0.28), rgba(74, 4, 78, 0) 62%);
  animation-duration: 18s;
  animation-delay: -6s;
}

.ambient-orb--plum {
  left: 40%;
  top: 92%;
}

.ambient-orb--plum > span {
  background: radial-gradient(circle, rgba(138, 63, 108, 0.32), rgba(74, 25, 55, 0) 62%);
  animation-duration: 22s;
  animation-delay: -11s;
}

.ambient-noise {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.ambient-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(17, 3, 13, 0.65) 100%);
}

/* ---------- Progreso y navegación por capítulos ---------- */

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 2px;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(207, 171, 86, 0.25), #e5c46e 65%, #faf6f0);
  box-shadow: 0 0 12px rgba(229, 196, 110, 0.6);
  pointer-events: none;
}

.chapter-dot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
}

.chapter-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(250, 246, 240, 0.3);
  transition: width 0.35s, height 0.35s, background-color 0.35s, box-shadow 0.35s;
}

.chapter-dot:hover::before {
  background: rgba(250, 246, 240, 0.75);
}

.chapter-dot.is-active::before {
  width: 9px;
  height: 9px;
  background: #e5c46e;
  box-shadow: 0 0 12px rgba(229, 196, 110, 0.85);
}

.chapter-dot__label {
  position: absolute;
  right: calc(100% + 0.9rem);
  white-space: nowrap;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #faf6f0;
  background: rgba(37, 11, 29, 0.8);
  border: 1px solid rgba(229, 196, 110, 0.22);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.chapter-dot:hover .chapter-dot__label,
.chapter-dot:focus-visible .chapter-dot__label {
  opacity: 1;
  transform: none;
}

/* ---------- Lenguaje visual de la portada ---------- */

.gold-line {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(207, 171, 86, 0.1) 15%, rgba(229, 196, 110, 0.75) 50%, rgba(207, 171, 86, 0.1) 85%, transparent 100%);
  box-shadow: 0 0 10px rgba(229, 196, 110, 0.35);
  animation: fd-glow 5.2s ease-in-out 1.4s infinite;
}

.gold-line--left {
  background: linear-gradient(90deg, rgba(229, 196, 110, 0.85), rgba(207, 171, 86, 0.25) 60%, transparent);
}

.gold-line--draw {
  transform-origin: 50% 50%;
  animation: fd-draw 1.15s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both, fd-glow 5.2s ease-in-out 1.4s infinite;
}

.gold-dust {
  -webkit-mask-image: radial-gradient(80% 100% at 50% 0, #000 28%, transparent 92%);
  mask-image: radial-gradient(80% 100% at 50% 0, #000 28%, transparent 92%);
}

.gold-dust canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.tm-mark {
  animation: fd-mark 4.6s ease-in-out 1.2s infinite;
}

.phrase-glow {
  animation: fd-phrase 4.8s ease-in-out 1.5s infinite;
}

.rise {
  animation: fd-rise 1.05s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.rise-2 {
  animation-delay: 0.95s;
}

.rise-3 {
  animation-delay: 1.15s;
}

.rise-4 {
  animation-delay: 1.35s;
}

.split-word {
  display: inline-block;
  animation: fd-word 0.95s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(0.4s + var(--i) * 55ms);
}

.diamond {
  display: block;
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  rotate: 45deg;
  background: #e5c46e;
  box-shadow: 0 0 10px rgba(229, 196, 110, 0.7);
}

/* ---------- Botón píldora ---------- */

.cta-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(207, 171, 86, 0.35);
  background: rgba(37, 11, 29, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 0.95rem 1.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250, 246, 240, 0.92);
  cursor: pointer;
  transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}

.cta-pill svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: #e5c46e;
  transition: transform 0.3s;
}

.cta-pill:hover {
  border-color: rgba(229, 196, 110, 0.75);
  background: rgba(74, 25, 55, 0.6);
  color: #faf6f0;
}

.cta-pill:hover svg {
  transform: translateX(3px);
}

.cta-pill:focus-visible {
  outline: 2px solid #e5c46e;
  outline-offset: 3px;
}

.cta-pill::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 18px rgba(229, 196, 110, 0.45);
  opacity: 0.2;
  animation: fd-invite 4s ease-in-out 1.6s infinite;
}

.cta-pill:disabled {
  opacity: 0.6;
  cursor: wait;
}

.cta-pill--sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
}

.cta-pill--solid {
  border-color: rgba(250, 246, 240, 0.35);
  background: linear-gradient(135deg, #e5c46e, #cda44b 55%, #b8892f);
  color: #250b1d;
  font-weight: 700;
}

.cta-pill--solid svg {
  color: #250b1d;
}

.cta-pill--solid:hover {
  border-color: rgba(250, 246, 240, 0.6);
  background: linear-gradient(135deg, #f0d48a, #d4af37 55%, #c0953a);
  color: #11030d;
}

/* ---------- Hero ---------- */

.scroll-hint {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(250, 246, 240, 0.45);
  animation: fd-rise 1s cubic-bezier(0.22, 1, 0.36, 1) 1.8s both;
}

.scroll-hint__line {
  width: 1px;
  height: 2.75rem;
  background: linear-gradient(to bottom, rgba(229, 196, 110, 0.9), transparent);
  transform-origin: top;
  animation: fd-scroll 2.2s ease-in-out infinite;
}

/* ---------- Manifiesto ---------- */

.strike {
  --strike: 100%;
  background-image: linear-gradient(90deg, #e5c46e, #cda44b);
  background-repeat: no-repeat;
  background-position: 0 58%;
  background-size: var(--strike) 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Consejo IA: constelación ---------- */

.council.is-constellation {
  display: block;
  position: relative;
  width: min(100%, 34rem, 72vh);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
}

.council-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.council-lines circle {
  fill: none;
  stroke: rgba(229, 196, 110, 0.16);
  stroke-width: 1;
  stroke-dasharray: 2 7;
  vector-effect: non-scaling-stroke;
}

.council-lines line {
  stroke: rgba(250, 246, 240, 0.07);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transition: stroke 0.4s;
}

.council-lines line.is-active {
  stroke: rgba(229, 196, 110, 0.85);
}

.council.is-constellation .council-card {
  position: absolute;
  left: var(--x);
  top: var(--y);
  translate: -50% -50%;
  width: auto;
  margin: 0;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(250, 246, 240, 0.12);
  background: rgba(37, 11, 29, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.35s, background-color 0.35s, box-shadow 0.35s, scale 0.35s;
}

.council.is-constellation .council-card [data-agent-name] {
  font-size: 1rem;
  line-height: 1.2;
}

.council.is-constellation .council-card[data-lead] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 9.5rem;
  height: 9.5rem;
  border-radius: 50%;
  white-space: normal;
  text-align: center;
  border-color: rgba(229, 196, 110, 0.5);
  background: radial-gradient(circle at 50% 35%, rgba(229, 196, 110, 0.3), rgba(74, 25, 55, 0.9) 70%);
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.25);
}

.council.is-constellation .council-card[data-lead] [data-agent-name] {
  font-size: 1.6rem;
}

.council.is-constellation [data-agent-role],
.council.is-constellation [data-agent-desc],
.council.is-constellation .council-card__bar {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.council.is-constellation .council-card:hover {
  border-color: rgba(229, 196, 110, 0.5);
}

.council.is-constellation .council-card.is-active {
  border-color: rgba(229, 196, 110, 0.85);
  background: rgba(90, 33, 69, 0.88);
  box-shadow: 0 0 26px rgba(229, 196, 110, 0.4);
  scale: 1.08;
}

.council.is-constellation .council-card[data-lead].is-active {
  scale: 1.04;
  box-shadow: 0 0 60px rgba(212, 175, 55, 0.45);
}

/* ---------- Ruta: scroll horizontal ---------- */

.route-line {
  position: absolute;
  left: 11px;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: linear-gradient(to bottom, #e5c46e, rgba(229, 196, 110, 0.15));
  box-shadow: 0 0 8px rgba(229, 196, 110, 0.5);
  transform-origin: top;
}

.route-filament {
  display: none;
}

.route.is-pinned {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100vh;
  overflow: hidden;
  padding-top: 5.5rem;
  padding-bottom: 2.5rem;
}

.route.is-pinned .route-viewport {
  max-width: none;
  margin-top: 2.25rem;
}

.route-track.is-horizontal {
  display: flex;
  flex-direction: row;
  gap: 1.75rem;
  width: max-content;
  padding-inline: max(1.25rem, calc((100vw - 72rem) / 2));
  will-change: transform;
  backface-visibility: hidden;
}

.route-track.is-horizontal .route-card {
  width: min(390px, 30vw);
  flex-shrink: 0;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.route-track.is-horizontal .route-filament {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 3.4rem;
  z-index: 0;
  height: 1px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(229, 196, 110, 0), #e5c46e 6%, #e5c46e 94%, rgba(229, 196, 110, 0));
  box-shadow: 0 0 10px rgba(229, 196, 110, 0.6);
}

.medal {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  font-size: 1rem;
  color: #e5c46e;
  background: radial-gradient(circle at 35% 30%, rgba(229, 196, 110, 0.28), rgba(37, 11, 29, 0.85) 70%);
  border: 1px solid rgba(229, 196, 110, 0.45);
  box-shadow: 0 0 18px rgba(229, 196, 110, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.medal--lg {
  width: 5.5rem;
  height: 5.5rem;
  font-size: 2.1rem;
}

/* ---------- Método: stepper ---------- */

.step {
  transition: opacity 0.45s, border-color 0.45s, background-color 0.45s, box-shadow 0.45s, translate 0.45s;
}

.steps.is-stepper .step {
  opacity: 0.4;
}

.steps.is-stepper .step.is-done {
  opacity: 0.75;
}

.steps .step.is-active {
  opacity: 1;
  translate: 0 -6px;
  border-color: rgba(229, 196, 110, 0.6);
  background: rgba(205, 164, 75, 0.12);
  box-shadow: 0 0 28px rgba(229, 196, 110, 0.22), inset 0 1px 0 rgba(229, 196, 110, 0.25);
}

.step-ring {
  position: relative;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 9.5rem;
  height: 9.5rem;
}

.step-ring.is-sticky {
  position: sticky;
  top: 30vh;
  align-self: flex-start;
}

.step-ring[hidden] {
  display: none;
}

.step-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  rotate: -90deg;
}

.step-ring__track {
  fill: none;
  stroke: rgba(250, 246, 240, 0.08);
  stroke-width: 3;
}

.step-ring__progress {
  fill: none;
  stroke: #e5c46e;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  filter: drop-shadow(0 0 6px rgba(229, 196, 110, 0.6));
}

.step-ring__label {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.pillar {
  animation: fd-float 6s ease-in-out infinite;
}

.pillar:nth-child(2) { animation-delay: -1.2s; }
.pillar:nth-child(3) { animation-delay: -2.4s; }
.pillar:nth-child(4) { animation-delay: -3.6s; }
.pillar:nth-child(5) { animation-delay: -4.8s; }

/* ---------- Expediente vivo ---------- */

.dossier {
  position: relative;
  width: 100%;
  max-width: 30rem;
  height: 23rem;
  margin-inline: auto;
}

.dossier__back {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 2.2rem;
  bottom: 0;
  border-radius: 1.5rem;
  background: linear-gradient(160deg, rgba(74, 25, 55, 0.8), rgba(28, 7, 21, 0.9));
  border: 1px solid rgba(229, 196, 110, 0.18);
}

.dossier__back::before {
  content: '';
  position: absolute;
  top: -1.45rem;
  left: 1.5rem;
  width: 9rem;
  height: 1.6rem;
  border-radius: 0.9rem 0.9rem 0 0;
  background: rgba(74, 25, 55, 0.85);
  border: 1px solid rgba(229, 196, 110, 0.18);
  border-bottom: 0;
}

.dossier__doc {
  position: absolute;
  left: 14%;
  right: 14%;
  top: calc(1.25rem + var(--i) * 1.65rem);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  height: 13rem;
  padding: 0.4rem 1rem;
  border-radius: 0.9rem;
  background:
    repeating-linear-gradient(to bottom, transparent 0 0.9rem, rgba(48, 16, 36, 0.08) 0.9rem calc(0.9rem + 1px)) 1rem 2.4rem / calc(100% - 2rem) 7rem no-repeat,
    linear-gradient(180deg, #f8f2e6, #eadcc2);
  color: #301024;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.28);
}

.dossier__tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.65rem;
  color: #a57d2c;
}

.dossier__front {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 11rem;
  padding: 1.5rem 1.75rem;
  border-radius: 1.5rem;
  background: linear-gradient(160deg, rgba(90, 33, 69, 0.6), rgba(37, 11, 29, 0.8));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(229, 196, 110, 0.3);
  box-shadow: inset 0 1px 0 rgba(229, 196, 110, 0.25), 0 -10px 40px -10px rgba(0, 0, 0, 0.6);
}

/* ---------- La Fundadora ---------- */

.founder-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15rem;
  height: 19rem;
  margin-inline: auto;
  border-radius: 2rem;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #5a2145, #301024 55%, #1c0715);
  border: 1px solid rgba(229, 196, 110, 0.25);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8), 0 0 40px rgba(212, 175, 55, 0.12);
}

@media (min-width: 768px) {
  .founder-card {
    width: 18rem;
    height: 23rem;
  }
}

/* ---------- Oferta ---------- */

.price-card {
  position: relative;
  isolation: isolate;
}

.price-card::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--fd-angle), rgba(229, 196, 110, 0.06), rgba(229, 196, 110, 0.95) 12%, rgba(229, 196, 110, 0.06) 25%, rgba(229, 196, 110, 0.06) 50%, rgba(229, 196, 110, 0.95) 62%, rgba(229, 196, 110, 0.06) 75%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: fd-spin 6s linear infinite;
  pointer-events: none;
}

.modal-panel {
  scrollbar-width: thin;
  scrollbar-color: rgba(229, 196, 110, 0.35) transparent;
}

#transfer-modal.flex .modal-panel {
  animation: fd-modal 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ---------- Respaldo sin backdrop-filter ---------- */

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass,
  .glass-gold,
  .glass-strong,
  .cta-pill:not(.cta-pill--solid),
  .dossier__front,
  .chapter-dot__label {
    background: rgba(37, 11, 29, 0.94) !important;
  }
}

/* ---------- Animaciones ---------- */

@keyframes fd-rise {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fd-word {
  0% { opacity: 0; transform: translateY(0.45em) rotate(2deg); filter: blur(6px); }
  100% { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes fd-draw {
  0% { opacity: 0; transform: scaleX(0.2); }
  100% { opacity: 1; transform: scaleX(1); }
}

@keyframes fd-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(229, 196, 110, 0.22); }
  50% { box-shadow: 0 0 16px rgba(229, 196, 110, 0.55); }
}

@keyframes fd-mark {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes fd-phrase {
  0%, 100% { text-shadow: 0 0 8px rgba(205, 164, 75, 0.12); }
  50% { text-shadow: 0 0 16px rgba(229, 196, 110, 0.55); }
}

@keyframes fd-invite {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.85; }
}

@keyframes fd-drift {
  0%, 100% { transform: translateY(-3rem) scale(1); }
  50% { transform: translateY(-2.25rem) scale(1.05); }
}

@keyframes fd-scroll {
  0% { transform: scaleY(0); opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(100%); opacity: 0; }
}

@keyframes fd-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

@keyframes fd-spin {
  to { --fd-angle: 360deg; }
}

@keyframes fd-modal {
  0% { opacity: 0; transform: translateY(16px) scale(0.97); }
  100% { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .rise,
  .split-word,
  .gold-line,
  .gold-line--draw,
  .tm-mark,
  .phrase-glow,
  .cta-pill::after,
  .ambient-orb > span,
  .scroll-hint,
  .scroll-hint__line,
  .pillar,
  .price-card::before,
  #transfer-modal.flex .modal-panel {
    animation: none !important;
  }
}
