.pains button {
  display: flex;
  gap: 8px;
}

.ticker {
  display: flex;
  overflow: hidden;
  padding: 13px 0;
  text-align: left;
}

.ticker-track {
  display: flex;
  width: max-content;
  flex: 0 0 auto;
  animation: ticker-loop 28s linear infinite;
  will-change: transform;
}

.ticker-track span {
  display: block;
  padding-right: 3.5rem;
}

.contact {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

@keyframes ticker-loop {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

.pain-icon {
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1.15;
}

.diagnostic input {
  background: linear-gradient(105deg, #fcfcfa 0%, #fcfcfa 36%, #f1f8f4 50%, #fcfcfa 64%, #fcfcfa 100%);
  background-size: 260% 100%;
  box-shadow: inset 0 1px 3px rgba(24, 24, 27, .08), inset 0 -1px 0 rgba(255, 255, 255, .75);
  animation: input-fill-breathe 5s ease-in-out infinite;
}

.diagnostic-controls,
.diagnostic-message {
  min-width: 0;
}

.diagnostic {
  view-transition-name: diagnostic-card;
}

.conversation-title {
  display: none;
}

.hero {
  position: relative;
  overflow-x: clip;
}

.hero-copy {
  view-transition-name: hero-copy;
  max-height: 1100px;
  overflow: hidden;
  opacity: 1;
}

.hero.is-conversing {
  grid-template-columns: 1fr;
  max-width: 1240px;
}

.hero.is-conversing .hero-copy {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.hero.is-conversing .diagnostic {
  display: grid;
  grid-template-columns: minmax(320px, .86fr) minmax(390px, 1.14fr);
  align-items: start;
  gap: clamp(24px, 4vw, 54px);
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(22px, 3vw, 38px);
}

.hero.is-conversing .conversation-title {
  display: block;
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 50%;
  width: min(680px, calc(100% - 48px));
  max-width: 680px;
  margin: 0;
  color: #161619;
  text-align: center;
  transform: translateX(-50%);
}

.conversation-title-main {
  margin: 0;
  font: 600 clamp(20px, 2.4vw, 31px)/1.08 Georgia, serif;
  letter-spacing: -.035em;
}

.conversation-title-main span {
  display: block;
  color: #55515a;
}

.conversation-title-main em {
  color: #0a4d3c;
}

.conversation-title-lede,
.roadmap-note {
  display: none;
}

.conversation-title-lede {
  margin: 10px 0 0;
  color: #75717a;
  font: 500 10px/1.45 Inter, sans-serif;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.hero.is-conversing .roadmap-note {
  display: block;
  max-width: 460px;
  margin: 8px auto 0;
  color: #8b8790;
  font: 500 9px/1.4 Inter, sans-serif;
  letter-spacing: .015em;
  text-align: center;
}

.hero.is-conversing .diagnostic-message {
  position: sticky;
  top: 108px;
}

.hero.is-conversing .whatsapp-preview {
  margin-top: 0;
  box-shadow: 0 22px 48px -28px rgba(10, 77, 60, .55);
}

.hero.is-conversing .whatsapp-preview > p {
  min-height: 210px;
  padding: 22px;
  font-size: 14px;
}

.hero.is-conversing .send {
  margin-top: 20px;
}

::view-transition-group(diagnostic-card) {
  animation-duration: 1.5s;
  animation-timing-function: cubic-bezier(.33, 0, .2, 1);
}

/* La tarjeta viaja como una sola pieza: nunca se mezcla con su captura anterior. */
::view-transition-old(diagnostic-card) {
  animation: none;
  opacity: 0;
}

::view-transition-new(diagnostic-card) {
  animation: none;
  opacity: 1;
}

/* Evita el fundido del documento completo detrás de la tarjeta animada. */
::view-transition-old(root) {
  animation: none;
  opacity: 0;
}

::view-transition-new(root) {
  animation: none;
  opacity: 1;
}

::view-transition-old(hero-copy) {
  animation: hero-copy-out .14s ease-in both;
}

::view-transition-new(hero-copy) {
  animation: hero-copy-in .28s .9s ease-out both;
}

@keyframes hero-copy-out {
  to { opacity: 0; transform: translateX(-20px); }
}

@keyframes hero-copy-in {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes input-fill-breathe {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0 0; }
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}

.site-header .button-outline {
  justify-self: end;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border: 1px solid #c9a54799;
  border-radius: 999px;
  background: linear-gradient(110deg, #fffdf7, #fff3bd, #fffdf7);
  background-size: 220% 100%;
  color: #6f4c0d;
  font: 700 11px Inter, sans-serif;
  letter-spacing: .07em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 8px 18px -16px #8f6616;
  animation: gold-shimmer 3s linear infinite;
}

.header-cta-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.header-cta:hover {
  box-shadow: 0 8px 24px -12px #8f6616aa;
}

@keyframes gold-shimmer {
  to { background-position: -220% 0; }
}

@keyframes whatsapp-glow {
  0%, 100% { outline-color: rgba(37, 211, 102, 0); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0), 0 0 0 rgba(37, 211, 102, 0); }
  50% { outline-color: rgba(37, 211, 102, .95); box-shadow: 0 0 0 7px rgba(37, 211, 102, .32), 0 0 42px 10px rgba(37, 211, 102, .76); }
}

.whatsapp-preview.magic-highlight {
  outline: 3px solid rgba(37, 211, 102, 0);
  animation: whatsapp-glow 1s ease-in-out 3;
}

@keyframes option-spotlight {
  0%, 100% { border-color: #e5e5e7; box-shadow: 0 0 0 0 rgba(155, 93, 229, 0), 0 0 0 rgba(155, 93, 229, 0); }
  50% { border-color: #9852dc; box-shadow: 0 0 0 3px rgba(174, 111, 238, .24), 0 0 20px 3px rgba(174, 111, 238, .5); }
}

.pains button.option-spotlight {
  animation: option-spotlight 1.2s ease-in-out;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  max-width: 340px;
  min-height: 74px;
  padding: 14px 18px;
  border-radius: 16px;
  background: #0a4d3c;
  color: white;
  font-size: 13px;
  letter-spacing: 0;
  box-shadow: 0 12px 22px -14px #0a4d3ccc;
  transition: background .2s ease, transform .2s ease;
}

.primary-action:hover {
  background: #063a2d;
  transform: translateY(-2px);
}

.cta-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.cta-copy small {
  color: #ffffffa8;
  font: 700 9px Inter, sans-serif;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.cta-copy strong {
  margin-top: 5px;
  font: 600 15px/1.12 Inter, sans-serif;
}

.primary-action > .cta-arrow {
  font-size: 17px;
  line-height: .8;
}

.hero-actions p {
  color: #777;
  font-size: 11px;
  line-height: 1.35;
}

@media (max-width: 450px) {
  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 700px) {
  .site-header {
    display: flex;
  }

  .header-cta {
    display: none;
  }
}

@media (max-width: 850px) {
  .hero.is-conversing .diagnostic {
    grid-template-columns: 1fr;
  }

  .hero.is-conversing .diagnostic-message {
    position: static;
  }

  .hero.is-conversing .whatsapp-preview > p {
    min-height: 165px;
  }
}

/* Tablet y notebooks angostas: evitamos que dos columnas compitan por el ancho. */
@media (max-width: 1150px) {
  .hero.is-conversing .diagnostic {
    grid-template-columns: 1fr;
    max-width: 680px;
    margin: 64px auto 0;
  }

  .hero.is-conversing .diagnostic-message {
    position: static;
  }

  .hero.is-conversing .conversation-title {
    width: min(600px, calc(100% - 36px));
  }
}

@media (max-width: 520px) {
  .hero.is-conversing .conversation-title {
    top: 8px;
    width: calc(100% - 32px);
  }

  .conversation-title-main {
    font-size: 22px;
  }
}

@media (min-width: 851px) {
  .hero {
    grid-template-columns: minmax(0, 1.4fr) minmax(430px, .8fr);
  }

  .hero.is-conversing {
    grid-template-columns: minmax(0, 0fr) minmax(430px, 1fr);
    gap: 0;
  }

  /* En reposo el configurador debe mostrar el simulador sin obligar a bajar. */
  .hero:not(.is-conversing) .diagnostic {
    padding: 20px;
  }

  .hero:not(.is-conversing) .pains {
    gap: 8px;
    margin-top: 10px;
  }

  .hero:not(.is-conversing) .pains button {
    gap: 7px;
    min-height: 0;
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.22;
  }

  .hero:not(.is-conversing) .pain-icon {
    font-size: 14px;
  }

  .hero:not(.is-conversing) .whatsapp-preview {
    margin-top: 12px;
    padding: 7px;
  }

  .hero:not(.is-conversing) .wa-bar {
    padding: 8px 10px;
  }

  .hero:not(.is-conversing) .whatsapp-preview > p {
    min-height: 58px;
    padding: 10px;
    font-size: 11px;
  }

  .hero:not(.is-conversing) .send {
    margin-top: 12px;
    padding: 12px;
  }

  .hero:not(.is-conversing) .reassurance {
    margin-top: 7px;
  }
}

@media (max-width: 1100px) {
  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}
