/* ============================================================================
   motivaciones.css — Prueba social previa a pricing + experiencia inmersiva
   Namespace: .motives / .motives-dialog
   ============================================================================ */

.motives {
  overflow: clip;
  isolation: isolate;
  scroll-margin-top: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(76, 155, 230, .11), transparent 32%),
    radial-gradient(circle at 86% 72%, rgba(232, 200, 106, .12), transparent 34%),
    linear-gradient(180deg, rgba(15, 39, 80, .18), rgba(7, 20, 44, .56));
}

.motives::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .32;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}

.motives__intro {
  position: relative;
  z-index: 2;
}

.motives__intro .section__title {
  max-width: 18ch;
}

.motives__intro .section__lead {
  max-width: 64ch;
  margin-left: auto;
  margin-right: auto;
}

.motives__stage {
  position: relative;
  min-height: 470px;
  padding: clamp(28px, 5vw, 64px);
  overflow: hidden;
  border: 1px solid rgba(232, 200, 106, .24);
  border-radius: clamp(24px, 4vw, 44px);
  background:
    linear-gradient(135deg, rgba(255,255,255,.055), transparent 42%),
    rgba(8, 23, 51, .72);
  box-shadow:
    0 32px 80px rgba(2, 8, 23, .42),
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 0 80px rgba(76, 155, 230, .04);
}

.motives__stage::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,.055) 48%, transparent 70%);
  transform: translateX(-110%);
  animation: motives-sheen 9s ease-in-out infinite;
}

@keyframes motives-sheen {
  0%, 62% { transform: translateX(-110%); }
  82%, 100% { transform: translateX(110%); }
}

.motives__aurora {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(760px, 80vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(232,200,106,.16), rgba(76,155,230,.08) 28%, transparent 66%);
  filter: blur(12px);
  animation: motives-breathe 7s ease-in-out infinite;
}

@keyframes motives-breathe {
  0%, 100% { opacity: .62; transform: translate(-50%, -50%) scale(.92); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

.motives__words {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.motives__words span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: rotate(var(--r));
  color: rgba(232, 200, 106, .11);
  font-family: var(--f-title);
  font-size: clamp(24px, 4vw, 64px);
  font-weight: 800;
  letter-spacing: -.04em;
  white-space: nowrap;
  text-transform: uppercase;
}

.motives__featured {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 16px);
  align-items: stretch;
}

.motives__quote {
  position: relative;
  min-height: 154px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  justify-content: flex-start;
  gap: 10px;
  padding: clamp(15px, 1.8vw, 20px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 18px;
  background:
    linear-gradient(150deg, rgba(255,255,255,.095), rgba(255,255,255,.025)),
    rgba(11, 30, 63, .8);
  box-shadow: 0 18px 38px rgba(0,0,0,.24);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform var(--t-mid), border-color var(--t-mid), box-shadow var(--t-mid);
}

.motives__quote:nth-child(3n + 2) { border-color: rgba(232,200,106,.3); }

.motives__quote:hover {
  transform: translateY(-6px);
  border-color: rgba(232,200,106,.5);
  box-shadow: 0 22px 50px rgba(0,0,0,.32), 0 0 28px rgba(232,200,106,.1);
}

.motives__quote::before {
  content: "“";
  position: absolute;
  right: 16px;
  top: -30px;
  color: rgba(232,200,106,.12);
  font-family: Georgia, serif;
  font-size: 132px;
  line-height: 1;
}

.motives__name {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(232,200,106,.38);
  border-radius: var(--r-full);
  background: rgba(232,200,106,.1);
  color: var(--c-gold-2);
  font-family: var(--f-title);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .01em;
}

.motives__semester { white-space: nowrap; }

.motives__quote p {
  position: relative;
  z-index: 1;
  color: #fff;
  font-family: var(--f-title);
  font-size: clamp(13px, 1.05vw, 15px);
  font-weight: 560;
  line-height: 1.42;
  text-wrap: pretty;
}

.motives__quote p::before { content: "“"; color: var(--c-gold); }
.motives__quote p::after { content: "”"; color: var(--c-gold); }

.motives__actions {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: clamp(30px, 5vw, 52px);
}

.motives__open {
  position: relative;
  display: inline-grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  max-width: 560px;
  min-height: 72px;
  padding: 10px 14px 10px 10px;
  overflow: hidden;
  border: 1px solid rgba(232,200,106,.62);
  border-radius: var(--r-full);
  background: linear-gradient(135deg, rgba(232,200,106,.2), rgba(76,155,230,.13));
  color: #fff;
  box-shadow: 0 16px 36px rgba(0,0,0,.25), 0 0 28px rgba(232,200,106,.12);
  text-align: left;
  transition: transform var(--t-mid), box-shadow var(--t-mid), border-color var(--t-mid);
}

.motives__open[hidden] { display: none; }

.motives__open::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.16), transparent 72%);
  transform: translateX(-110%);
  transition: transform .65s ease;
}

.motives__open:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: var(--c-gold-2);
  box-shadow: 0 20px 44px rgba(0,0,0,.32), 0 0 36px rgba(232,200,106,.2);
}

.motives__open:hover::before { transform: translateX(110%); }

.motives__open:focus-visible,
.motives-dialog button:focus-visible,
.motives-dialog__item:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.motives__open-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--c-gold-2), var(--c-gold-dark));
  color: #0b1e3f;
  box-shadow: 0 8px 20px rgba(232,200,106,.24);
}

.motives__open-icon span {
  height: 43px;
  font-family: Georgia, serif;
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
}

.motives__open-copy { display: flex; flex-direction: column; gap: 2px; }
.motives__open-copy strong { font-family: var(--f-title); font-size: 16px; }
.motives__open-copy small { color: var(--c-gray-1); font-size: 12px; line-height: 1.35; }
.motives__open-arrow { color: var(--c-gold-2); font-size: 28px; transition: transform var(--t-mid); }
.motives__open:hover .motives__open-arrow { transform: translateX(4px); }

.motives__source {
  color: var(--c-gray-2);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .04em;
  text-align: center;
}

/* ===== FULLSCREEN DIALOG ===== */

.motives-dialog {
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #061329;
  color: #fff;
  overscroll-behavior: none;
}

.motives-dialog:not([open]) { display: none; }

.motives-dialog[open] {
  display: block;
  animation: motives-dialog-in .42s cubic-bezier(.22,1,.36,1);
}

.motives-dialog::backdrop { background: #061329; }

@keyframes motives-dialog-in {
  from { opacity: 0; transform: scale(1.015); }
  to { opacity: 1; transform: none; }
}

.motives-dialog__shell {
  position: relative;
  z-index: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(76,155,230,.22), transparent 32%),
    radial-gradient(circle at 82% 78%, rgba(232,200,106,.2), transparent 30%),
    linear-gradient(145deg, #061329, #0b2146 58%, #071832);
}

.motives-dialog__shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .22;
  pointer-events: none;
  background-image:
    radial-gradient(circle at center, rgba(255,255,255,.75) 0 1px, transparent 1.5px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, #000, transparent 76%);
}

.motives-dialog__glow {
  position: absolute;
  left: 50%;
  top: 54%;
  z-index: -1;
  width: min(82vw, 1100px);
  aspect-ratio: 1.8;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(232,200,106,.08);
  filter: blur(78px);
  pointer-events: none;
}

.motives-dialog__header {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding:
    max(18px, env(safe-area-inset-top))
    max(22px, env(safe-area-inset-right))
    16px
    max(22px, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(6,19,41,.96), rgba(6,19,41,.72));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.motives-dialog__heading { max-width: 720px; }
.motives-dialog__eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--c-gold-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.motives-dialog__heading h2 {
  max-width: none;
  margin: 0;
  font-size: clamp(23px, 3vw, 42px);
  letter-spacing: -.035em;
}

.motives-dialog__heading p {
  margin-top: 6px;
  color: var(--c-gray-1);
  font-size: 13px;
}

.motives-dialog__controls {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.motives-dialog__motion,
.motives-dialog__close {
  min-width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--r-full);
  background: rgba(255,255,255,.07);
  color: #fff;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}

.motives-dialog__motion { padding: 0 15px; font-size: 12px; font-weight: 700; }
.motives-dialog__close { padding: 0; font-size: 29px; line-height: 1; }
.motives-dialog__motion:hover,
.motives-dialog__close:hover { background: rgba(255,255,255,.14); border-color: rgba(232,200,106,.5); }
.motives-dialog__motion:active,
.motives-dialog__close:active { transform: scale(.96); }

.motives-dialog__body {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.motives-dialog__body::before,
.motives-dialog__body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 12;
  height: 13%;
  pointer-events: none;
}

.motives-dialog__body::before { top: 0; background: linear-gradient(#061329, transparent); }
.motives-dialog__body::after { bottom: 0; background: linear-gradient(transparent, #071832); }

.motives-dialog__letters {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.motives-dialog__letter {
  position: absolute;
  left: var(--letter-x);
  top: var(--letter-y);
  color: rgba(232,200,106,.075);
  font-family: var(--f-title);
  font-size: var(--letter-size);
  font-weight: 800;
  line-height: 1;
  animation: motives-letter-drift var(--letter-duration) ease-in-out infinite alternate;
  animation-delay: var(--letter-delay);
}

@keyframes motives-letter-drift {
  from { transform: translate3d(-8px, -12px, 0) rotate(-5deg); }
  to { transform: translate3d(10px, 16px, 0) rotate(6deg); }
}

.motives-dialog__rain {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent 0, #000 11%, #000 89%, transparent 100%);
}

.motives-dialog__item {
  --item-width: clamp(170px, 15vw, 238px);
  position: absolute;
  left: var(--x-desktop);
  top: -42vh;
  width: var(--item-width);
  padding: 0;
  color: inherit;
  text-align: left;
  animation: motives-rain var(--duration) linear infinite;
  animation-delay: var(--delay);
  will-change: transform;
}

@keyframes motives-rain {
  from { transform: translate3d(0, -28vh, 0) rotate(var(--tilt)); }
  to { transform: translate3d(0, 158vh, 0) rotate(var(--tilt)); }
}

.motives-dialog__item-card {
  display: block;
  padding: 12px 13px;
  overflow: visible;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.035)),
    rgba(8,24,51,.82);
  box-shadow: 0 18px 38px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--t-mid), background var(--t-mid), transform var(--t-mid), box-shadow var(--t-mid);
}

.motives-dialog__item:hover,
.motives-dialog__item:focus-visible { z-index: 9; animation-play-state: paused; }

.motives-dialog__item:hover .motives-dialog__item-card,
.motives-dialog__item:focus-visible .motives-dialog__item-card {
  transform: scale(1.035);
  border-color: rgba(232,200,106,.68);
  background:
    linear-gradient(145deg, rgba(232,200,106,.18), rgba(76,155,230,.08)),
    rgba(8,24,51,.94);
  box-shadow: 0 24px 54px rgba(0,0,0,.45), 0 0 30px rgba(232,200,106,.13);
}

.motives-dialog__item-name {
  display: inline-flex;
  margin-bottom: 7px;
  color: var(--c-gold-2);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .01em;
}

.motives-dialog__item-quote {
  display: block;
  color: #fff;
  font-family: var(--f-title);
  font-size: clamp(11.5px, .82vw, 13.5px);
  font-weight: 560;
  line-height: 1.38;
}

.motives-dialog__item .motives-dialog__item-quote::before { content: "“"; color: var(--c-gold); }
.motives-dialog__item .motives-dialog__item-quote::after { content: "”"; color: var(--c-gold); }

.motives-dialog.is-paused .motives-dialog__item,
.motives-dialog.is-pinned .motives-dialog__item { animation-play-state: paused; }

.motives-dialog.is-pinned .motives-dialog__rain {
  opacity: .2;
  filter: blur(7px);
  transition: opacity var(--t-mid), filter var(--t-mid);
}

.motives-dialog__pinned {
  position: absolute;
  inset: clamp(18px, 5vw, 72px);
  z-index: 20;
  max-width: 850px;
  max-height: 560px;
  margin: auto;
  padding: clamp(28px, 5vw, 62px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  overflow: auto;
  border: 1px solid rgba(232,200,106,.42);
  border-radius: clamp(24px, 4vw, 40px);
  background:
    radial-gradient(circle at 50% 0, rgba(232,200,106,.13), transparent 42%),
    rgba(5,17,38,.95);
  box-shadow: 0 38px 100px rgba(0,0,0,.62), inset 0 1px 0 rgba(255,255,255,.1);
  text-align: center;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: motives-pin-in .3s cubic-bezier(.22,1,.36,1);
}

.motives-dialog__pinned[hidden] { display: none; }

@keyframes motives-pin-in {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to { opacity: 1; transform: none; }
}

.motives-dialog__pinned-close {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  color: #fff;
  font-size: 24px;
}

.motives-dialog__pinned-name {
  color: var(--c-gold-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
}

.motives-dialog__pinned blockquote {
  max-width: 22ch;
  color: #fff;
  font-family: var(--f-title);
  font-size: clamp(24px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.motives-dialog__pinned blockquote::before { content: "“"; color: var(--c-gold); }
.motives-dialog__pinned blockquote::after { content: "”"; color: var(--c-gold); }
.motives-dialog__resume {
  min-height: 46px;
  padding: 10px 22px;
  border: 1px solid rgba(232,200,106,.5);
  border-radius: var(--r-full);
  background: rgba(232,200,106,.12);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.motives-dialog__footer {
  position: relative;
  z-index: 30;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px max(18px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(6,19,41,.82);
  color: rgba(230,232,239,.72);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.motives-dialog__footer-sep { color: var(--c-gold); }

.motives-dialog__rain.is-static {
  position: relative;
  inset: auto;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  align-content: start;
  gap: 10px;
  padding: 24px clamp(14px, 3vw, 44px) 64px;
  overflow: auto;
  mask-image: linear-gradient(to bottom, transparent, #000 5%, #000 95%, transparent);
}

.motives-dialog__rain.is-static .motives-dialog__item {
  position: relative;
  left: auto;
  top: auto;
  width: auto;
  height: max-content;
  min-height: max-content;
  align-self: start;
  animation: none;
  transform: none;
}

html.has-motives-dialog { overflow: hidden; }

@media (max-width: 900px) {
  .motives__featured { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; margin: 0 auto; }
  .motives__quote { min-height: 0; }
  .motives__quote:nth-child(n) { transform: none; }
  .motives__quote:hover { transform: translateY(-4px); }
  .motives-dialog__item { left: var(--x-tablet); --item-width: min(29vw, 225px); }
  .motives-dialog__rain.is-static { grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); }
}

@media (max-width: 640px) {
  .motives { padding-top: var(--s-7); padding-bottom: var(--s-7); }
  .motives__intro .section__lead { margin-bottom: var(--s-5); }
  .motives__stage { min-height: 0; padding: 20px 14px 24px; border-radius: 26px; }
  .motives__words span { opacity: .5; }
  .motives__featured {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(66vw, 1fr);
    max-width: none;
    margin: 0 -14px;
    padding: 8px 18px 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .motives__featured::-webkit-scrollbar { display: none; }
  .motives__quote { scroll-snap-align: center; min-height: 156px; padding: 15px; }
  .motives__actions { margin-top: 24px; }
  .motives__open { width: 100%; gap: 11px; border-radius: 22px; }
  .motives__open-icon { width: 48px; height: 48px; }
  .motives__open-copy strong { font-size: 14px; }
  .motives__open-copy small { font-size: 11px; }
  .motives__open-arrow { font-size: 22px; }

  .motives-dialog__header { align-items: center; padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: 11px; }
  .motives-dialog__eyebrow { font-size: 9px; }
  .motives-dialog__heading h2 { font-size: clamp(20px, 6vw, 28px); line-height: 1.05; }
  .motives-dialog__heading p { display: none; }
  .motives-dialog__controls { gap: 7px; }
  .motives-dialog__motion { width: 46px; padding: 0; }
  .motives-dialog__motion [data-motives-motion-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .motives-dialog__item {
    left: var(--x-mobile);
    --item-width: min(46vw, 176px);
    will-change: auto;
  }
  .motives-dialog__item-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .motives-dialog__item-card { padding: 10px 11px; }
  .motives-dialog__item-name { font-size: 9px; margin-bottom: 5px; }
  .motives-dialog__item-quote { font-size: 10.5px; line-height: 1.34; }
  .motives-dialog__rain.is-static { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 14px 10px 54px; }
  .motives-dialog__pinned { inset: 12px; padding: 56px 22px 28px; border-radius: 26px; }
  .motives-dialog__pinned blockquote { max-width: 19ch; font-size: clamp(22px, 7.2vw, 34px); }
  .motives-dialog__footer { justify-content: center; min-height: 36px; font-size: 8px; }
  .motives-dialog__footer-sep,
  .motives-dialog__footer [data-motives-status] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .motives__stage::after,
  .motives__aurora,
  .motives-dialog__letter,
  .motives-dialog__item { animation: none !important; }
  .motives-dialog__rain { mask-image: none; }
}

html[data-mode="lite"] .motives__stage::after,
html[data-mode="lite"] .motives__aurora,
html[data-mode="lite"] .motives-dialog__letter,
html[data-mode="lite"] .motives-dialog__item { animation: none !important; }

html[data-mode="lite"] .motives__quote,
html[data-mode="lite"] .motives-dialog__item-card,
html[data-mode="lite"] .motives-dialog__header,
html[data-mode="lite"] .motives-dialog__footer,
html[data-mode="lite"] .motives-dialog__pinned {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.motives-in-view .sticky-bar {
  opacity: 0;
  pointer-events: none;
  transform: translateY(110%);
}

.sticky-bar {
  transition: opacity var(--t-mid), transform var(--t-mid);
}

/* ========================================================================
   CONCEPTO PAPEL — mensajes directos, sin cajón ni clasificación
   ======================================================================== */

.motives {
  color: #171a20;
  background:
    radial-gradient(circle at 18% 22%, rgba(226, 181, 67, .16), transparent 28%),
    radial-gradient(circle at 84% 78%, rgba(83, 132, 164, .12), transparent 26%),
    #f1ede3;
}

.motives::before {
  opacity: .22;
  background-image:
    radial-gradient(circle, rgba(29, 32, 38, .23) 0 1px, transparent 1.2px),
    linear-gradient(96deg, transparent 49.5%, rgba(95, 78, 48, .05) 50%, transparent 50.5%);
  background-size: 27px 27px, 48px 48px;
  mask-image: none;
}

.motives .section__eyebrow {
  color: #6e5214;
  border-color: rgba(110, 82, 20, .42);
  background: rgba(255, 255, 255, .58);
}

.motives .section__title {
  color: #171a20;
  text-shadow: none;
}

.motives .section__lead {
  color: #44413a;
}

.motives__stage {
  min-height: 0;
  padding: 22px 0 4px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.motives__stage::after { display: none; }

.motives__featured {
  gap: 14px;
  align-items: stretch;
  padding: 16px 8px 12px;
}

.motives__quote {
  min-height: 138px;
  height: auto;
  max-height: none;
  padding: 17px 18px;
  overflow: visible;
  border: 1px solid rgba(36, 34, 29, .23);
  border-radius: 3px;
  background: #fffef9;
  color: #171a20;
  box-shadow: 5px 7px 0 rgba(56, 50, 38, .1), 0 12px 26px rgba(57, 48, 32, .09);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.motives__quote:nth-child(1) { transform: rotate(-1.6deg) translateY(5px); }
.motives__quote:nth-child(2) { transform: rotate(.8deg) translateY(-4px); background: #fff8dc; }
.motives__quote:nth-child(3) { transform: rotate(-.5deg) translateY(7px); background: #f5fbff; }
.motives__quote:nth-child(4) { transform: rotate(1.3deg) translateY(-2px); background: #fff2ef; }
.motives__quote:nth-child(5) { transform: rotate(-1deg) translateY(6px); background: #f4fff2; }
.motives__quote:nth-child(6) { transform: rotate(.7deg) translateY(-5px); }

.motives__quote:hover {
  z-index: 5;
  transform: translateY(-9px) rotate(0deg) scale(1.025);
  border-color: rgba(142, 96, 21, .65);
  box-shadow: 7px 11px 0 rgba(142, 96, 21, .13), 0 20px 38px rgba(57, 48, 32, .16);
}

.motives__quote::before {
  right: 12px;
  top: -22px;
  color: rgba(31, 30, 27, .08);
  font-size: 104px;
}

.motives__name {
  min-height: 0;
  padding: 0 0 4px;
  border: 0;
  border-bottom: 2px solid rgba(173, 113, 31, .36);
  border-radius: 0;
  background: transparent;
  color: #85551d;
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  font-weight: 700;
}

.motives__quote p {
  color: #171a20;
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(13px, 1.02vw, 15px);
  font-weight: 650;
  line-height: 1.42;
  overflow-wrap: anywhere;
  word-break: normal;
}

.motives__quote p::before,
.motives__quote p::after { color: #9a651d; }

.motives__actions { margin-top: 24px; }

.motives__open {
  border-color: rgba(44, 40, 31, .52);
  border-radius: 6px;
  background: #f4ca54;
  color: #181818;
  box-shadow: 5px 6px 0 rgba(53, 45, 28, .18), 0 14px 28px rgba(68, 53, 22, .13);
}

.motives__open:hover {
  border-color: #2e2a21;
  box-shadow: 7px 10px 0 rgba(53, 45, 28, .18), 0 20px 34px rgba(68, 53, 22, .17);
}

.motives__open-icon {
  border-radius: 4px;
  background: #fffdf3;
  color: #171a20;
  box-shadow: none;
}

.motives__open-copy small { color: #4b4436; }
.motives__open-arrow { color: #171a20; }
.motives__source { color: #4c483f; }

.motives-dialog {
  background: #f1ede3;
  color: #171a20;
}

.motives-dialog::backdrop { background: #f1ede3; }

.motives-dialog__shell {
  background:
    radial-gradient(circle at 16% 18%, rgba(239, 197, 88, .18), transparent 28%),
    radial-gradient(circle at 82% 76%, rgba(102, 155, 177, .14), transparent 26%),
    linear-gradient(140deg, #f8f5eb, #eee8da 58%, #f5f0e4);
}

.motives-dialog__shell::before {
  opacity: .25;
  background-image:
    radial-gradient(circle at center, rgba(43, 39, 31, .38) 0 .7px, transparent 1px),
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(76, 69, 55, .035) 29px 30px);
  background-size: 31px 31px, auto;
  mask-image: none;
}

.motives-dialog__glow {
  background: rgba(229, 190, 84, .14);
  filter: blur(90px);
}

.motives-dialog__header {
  color: #171a20;
  border-bottom-color: rgba(51, 46, 36, .18);
  background: rgba(250, 247, 238, .94);
  box-shadow: 0 4px 20px rgba(74, 64, 46, .08);
}

.motives-dialog__eyebrow { color: #805d16; }
.motives-dialog__heading h2 { color: #171a20; }
.motives-dialog__heading p { color: #575147; }

.motives-dialog__motion,
.motives-dialog__close {
  border-color: rgba(41, 38, 31, .35);
  background: #fffdf6;
  color: #171a20;
  box-shadow: 2px 3px 0 rgba(51, 44, 32, .12);
}

.motives-dialog__motion:hover,
.motives-dialog__close:hover {
  border-color: #87621d;
  background: #f8d97e;
}

.motives-dialog__body::before {
  background: linear-gradient(#f7f3e9, transparent);
}

.motives-dialog__body::after {
  background: linear-gradient(transparent, #f1ebdd);
}

.motives-dialog__letter {
  color: rgba(38, 36, 31, .075);
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
}

.motives-dialog__rain {
  mask-image: linear-gradient(to bottom, transparent 0, #000 2%, #000 98%, transparent 100%);
}

.motives-dialog__item {
  --item-width: var(--item-width-desktop, 154px);
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  color: #171a20;
}

.motives-dialog__item-card {
  position: relative;
  height: auto;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  padding: 9px 10px 10px;
  overflow: visible;
  border: 1px solid rgba(38, 35, 29, .28);
  border-top: 4px solid var(--accent-color, #95651e);
  border-radius: 3px;
  background: var(--paper-color, #fffef8);
  color: #171a20;
  box-shadow: 5px 7px 0 rgba(54, 49, 39, .12), 0 14px 26px rgba(71, 59, 39, .12);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.motives-dialog__item-card::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -9px;
  width: 42px;
  height: 12px;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(229, 198, 113, .58);
  box-shadow: 0 1px 2px rgba(57, 47, 29, .12);
}

.motives-dialog__item:hover .motives-dialog__item-card,
.motives-dialog__item:focus-visible .motives-dialog__item-card {
  transform: translateY(-8px) rotate(0deg) scale(1.045);
  border-color: rgba(86, 58, 17, .58);
  border-top-color: var(--accent-color, #95651e);
  background: var(--paper-color, #fffef8);
  box-shadow: 8px 12px 0 rgba(124, 87, 29, .14), 0 22px 38px rgba(71, 59, 39, .19);
}

.motives-dialog__item-name {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  display: block;
  margin-bottom: 0;
  overflow: visible;
  color: var(--accent-color, #85551d);
  font-family: "Courier New", Courier, monospace;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.motives-dialog__item-quote {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0 0 2px;
  overflow: visible;
  color: #181818;
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(9.5px, .66vw, 11.5px);
  font-weight: 650;
  line-height: 1.52;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: pretty;
}

.motives-dialog__item .motives-dialog__item-quote::before,
.motives-dialog__item .motives-dialog__item-quote::after {
  color: var(--accent-color, #85551d);
}

.motives-dialog.is-pinned .motives-dialog__rain {
  opacity: .24;
  filter: blur(3px) grayscale(.25);
}

.motives-dialog__pinned {
  color: #171a20;
  border: 1px solid rgba(50, 43, 31, .35);
  border-radius: 5px;
  background:
    linear-gradient(rgba(111, 98, 72, .045) 1px, transparent 1px),
    #fffef8;
  background-size: 100% 30px;
  box-shadow: 12px 16px 0 rgba(68, 58, 40, .15), 0 38px 90px rgba(73, 62, 43, .25);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.motives-dialog__pinned-close,
.motives-dialog__resume {
  border-color: rgba(49, 43, 32, .35);
  background: #f7d572;
  color: #171a20;
}

.motives-dialog__pinned-name { color: #85551d; font-family: "Courier New", Courier, monospace; }

.motives-dialog__pinned blockquote {
  color: #171a20;
  font-family: "Courier New", Courier, monospace;
}

.motives-dialog__footer {
  border-top-color: rgba(51, 46, 36, .18);
  background: rgba(250, 247, 238, .94);
  color: #4e493f;
}

.motives-dialog__footer-sep { color: #8b651c; }

.motives-dialog__rain.is-static {
  background: rgba(255, 253, 247, .32);
  mask-image: linear-gradient(to bottom, transparent, #000 3%, #000 97%, transparent);
}

@media (max-width: 900px) {
  .motives__featured { gap: 12px; }
  .motives__quote:nth-child(n) { transform: rotate(var(--paper-tilt, 0deg)); }
  .motives__quote:nth-child(odd) { --paper-tilt: -1deg; }
  .motives__quote:nth-child(even) { --paper-tilt: .8deg; }
  .motives-dialog__item { --item-width: var(--item-width-tablet, min(24vw, 160px)); }
}

@media (max-width: 640px) {
  .motives { padding-top: var(--s-6); padding-bottom: var(--s-6); }
  .motives__stage { padding: 10px 0 0; }
  .motives__featured { padding-top: 8px; }
  .motives__quote { min-height: 146px; }
  .motives__open { border-radius: 5px; }
  .motives-dialog__header { background: rgba(250, 247, 238, .97); }
  .motives-dialog__item { --item-width: var(--item-width-mobile, min(38vw, 132px)); }
  .motives-dialog__item-card { padding: 8px 8px 9px; }
  .motives-dialog__item-name { font-size: 7.8px; }
  .motives-dialog__item-quote { font-size: 9.3px; line-height: 1.45; }
  .motives-dialog__pinned { border-radius: 4px; }
}

/* Vista local estable de 390 px para revisar el comportamiento celular desde PC. */
html.is-local-mobile-preview {
  overflow-x: hidden;
  scroll-padding-top: 0;
  background: #d9d6ce;
}

html.is-local-mobile-preview body {
  width: 390px;
  min-width: 0;
  margin: 0 auto;
  overflow-x: hidden;
  box-shadow: 0 0 0 9px #171717, 0 24px 70px rgba(0, 0, 0, .28);
}

html.is-local-mobile-preview .topbar,
html.is-local-mobile-preview .sticky-bar,
html.is-local-mobile-preview .wa-float { display: none !important; }

html.is-local-mobile-preview .motives {
  padding-top: var(--s-6);
  padding-bottom: var(--s-6);
}

html.is-local-mobile-preview .motives > .container {
  width: 100%;
  padding-inline: 16px;
}

html.is-local-mobile-preview .motives__intro .section__title {
  font-size: clamp(31px, 9vw, 40px);
  line-height: 1.04;
}

html.is-local-mobile-preview .motives__intro .section__lead {
  margin-bottom: var(--s-5);
  font-size: 15px;
}

html.is-local-mobile-preview .motives__stage {
  min-height: 0;
  padding: 10px 0 0;
}

html.is-local-mobile-preview .motives__featured {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: 272px;
  max-width: none;
  margin: 0 -14px;
  padding: 8px 18px 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

html.is-local-mobile-preview .motives__featured::-webkit-scrollbar { display: none; }

html.is-local-mobile-preview .motives__quote {
  min-height: 146px;
  padding: 15px;
  scroll-snap-align: center;
}

html.is-local-mobile-preview .motives__actions { margin-top: 24px; }
html.is-local-mobile-preview .motives__open { width: 100%; gap: 11px; border-radius: 5px; }
html.is-local-mobile-preview .motives__open-icon { width: 48px; height: 48px; }
html.is-local-mobile-preview .motives__open-copy strong { font-size: 14px; }
html.is-local-mobile-preview .motives__open-copy small { font-size: 11px; }
html.is-local-mobile-preview .motives__open-arrow { font-size: 22px; }

html.is-local-mobile-preview .motives-dialog {
  inset: 50% auto auto 50%;
  width: 390px;
  height: min(844px, calc(100dvh - 18px));
  margin: 0;
  transform: translate(-50%, -50%);
  overflow: hidden;
  border: 8px solid #171717;
  border-radius: 36px;
  animation: none;
}

html.is-local-mobile-preview .motives-dialog__shell { border-radius: 28px; }
html.is-local-mobile-preview .motives-dialog__header {
  align-items: center;
  padding: 15px 12px 10px;
  background: rgba(250, 247, 238, .97);
}
html.is-local-mobile-preview .motives-dialog__eyebrow { font-size: 8px; }
html.is-local-mobile-preview .motives-dialog__heading h2 { font-size: 23px; line-height: 1.05; }
html.is-local-mobile-preview .motives-dialog__heading p { display: none; }
html.is-local-mobile-preview .motives-dialog__controls { gap: 7px; }
html.is-local-mobile-preview .motives-dialog__motion { width: 42px; height: 42px; padding: 0; }
html.is-local-mobile-preview .motives-dialog__close { width: 42px; height: 42px; }
html.is-local-mobile-preview .motives-dialog__motion [data-motives-motion-label] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
html.is-local-mobile-preview .motives-dialog__item {
  left: var(--x-mobile);
  --item-width: var(--item-width-mobile, 124px);
  will-change: auto;
}
html.is-local-mobile-preview .motives-dialog__item-card { padding: 8px 8px 9px; }
html.is-local-mobile-preview .motives-dialog__item-name { font-size: 7.8px; }
html.is-local-mobile-preview .motives-dialog__item-quote { font-size: 9.3px; line-height: 1.45; }
html.is-local-mobile-preview .motives-dialog__rain.is-static {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 10px 54px;
}
html.is-local-mobile-preview .motives-dialog__pinned {
  inset: 12px;
  padding: 56px 22px 28px;
  border-radius: 4px;
}
html.is-local-mobile-preview .motives-dialog__pinned blockquote {
  max-width: 19ch;
  font-size: clamp(22px, 7.2vw, 34px);
}
html.is-local-mobile-preview .motives-dialog__footer {
  justify-content: center;
  min-height: 36px;
  font-size: 8px;
}
html.is-local-mobile-preview .motives-dialog__footer-sep,
html.is-local-mobile-preview .motives-dialog__footer [data-motives-status] { display: none; }

/* El preview celular comparte el viewport de escritorio. Fijamos el contraste
   del papel para que los estilos temáticos globales no vuelvan blanco el texto. */
html.is-local-mobile-preview #por-que-se-preparan .section__eyebrow {
  border-color: rgba(151, 104, 24, .3) !important;
  background: rgba(232, 200, 106, .18) !important;
  color: #85591b !important;
  text-shadow: none !important;
}

html.is-local-mobile-preview #por-que-se-preparan .section__title {
  color: #171a20 !important;
  text-shadow: none !important;
}

html.is-local-mobile-preview #por-que-se-preparan .section__lead {
  color: #44413a !important;
  text-shadow: none !important;
}

html.is-local-mobile-preview #por-que-se-preparan .motives__quote p {
  color: #171a20 !important;
  text-shadow: none !important;
}

html.is-local-mobile-preview #por-que-se-preparan .motives__open-copy strong {
  color: #181818 !important;
  text-shadow: none !important;
}

html.is-local-mobile-preview #por-que-se-preparan .motives__source {
  color: #4c483f !important;
  text-shadow: none !important;
}

.motives-dialog .motives-dialog__heading h2 {
  color: #171a20 !important;
  text-shadow: none !important;
}
