/*
  tiktuk: estilos propios encima de la base (main.css).
  main.css se deja tal cual; aquí va solo lo que tiktuk añade o ajusta.
*/

:root {
  --tk-purple: #7c3aed;
  --tk-pink: #f80282;
  --tk-ink: #1a1a1a;
  --tk-muted: #666;
  --tk-gradient: linear-gradient(155deg, #7c3aed 40%, #f80282 100%);
}

/* La barra de navegación es fija: que los anclajes no queden tapados */
[id] {
  scroll-margin-top: 5rem;
}

:focus-visible {
  outline: 3px solid var(--tk-purple);
  outline-offset: 3px;
}

.header :focus-visible,
.stats :focus-visible,
.footer :focus-visible,
.navbar:not(.navbar--scrolling) :focus-visible {
  outline-color: #fff;
}

/* Texto solo para lectores de pantalla */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Las etiquetas de sección y las cifras son <p>, no encabezados: así el esquema de la
   página lo forman solo los títulos con contenido. Conservan la tipografía de título. */
.feature-subtitle,
.steps-subtitle,
.integration-subtitle,
.faqs-subtitle,
.stats-card-total,
.stats-card-title {
  font-family: "Poppins", sans-serif;
}

.feature-subtitle,
.steps-subtitle,
.integration-subtitle,
.faqs-subtitle,
.stats-card-total {
  font-weight: 700;
}

/* Iconos de línea (símbolos definidos al principio de index.html) */
.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/*
Marca
====================================
*/
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.brand svg {
  width: 34px;
  height: 34px;
  flex: none;
}

/*
Navegación
====================================
*/
.navbar__wrapper {
  align-items: center;
}

.navbar .brand {
  padding: 0.75rem 0;
  color: var(--navbar-menu-color, #000);
}

/* Sobre el degradado del hero, la marca y el icono del menú van en blanco */
.navbar:not(.navbar--scrolling) .brand,
.navbar:not(.navbar--scrolling) .navbar-icon-open {
  color: #fff;
}

.navbar-icon-open,
.navbar-icon-close button {
  cursor: pointer;
}

.navbar-icon-close button {
  color: inherit;
  font-size: inherit;
}

/* Los dos iconos del menú son SVG y miden lo que el tamaño de letra de su botón */
.navbar-icon-open svg,
.navbar-icon-close svg {
  display: block;
  width: 1em;
  height: 1em;
}

.navbar-icon-open svg {
  stroke-width: 2;
}

@media (max-width: 767px) {
  /* El menú cerrado queda fuera de pantalla: que tampoco reciba el foco */
  .navbar-menu:not(.navbar-menu--actived) {
    visibility: hidden;
  }
}

/*
Hero
====================================
*/
.header {
  /* Corte diagonal de alto fijo: con un % del alto, en móvil se comía la demo */
  --hero-cut: 3.5rem;
  height: auto;
  min-height: 100dvh;
  padding: 6rem 0 calc(var(--hero-cut) + 3.5rem);
  background-color: #6d28d9;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--hero-cut)), 0 100%);
}

/* Fondo: solo color, sin imagen. Violeta saturado donde va el texto (para que se lea)
   y un foco rosa en la esquina donde cae la demo. */
.header-overlay {
  top: 0;
  left: 0;
  height: 100%;
  opacity: 1;
  background-image:
    radial-gradient(120% 45% at 100% 100%, rgba(248, 2, 130, 0.85), transparent 70%),
    linear-gradient(170deg, #6d28d9 0%, #7c3aed 40%, #a21caf 100%);
}

/* Texto y, debajo, la demo. A partir de 1000px, lado a lado. */
.hero {
  display: grid;
  align-items: center;
  gap: 2.5rem;
  width: 100%;
  max-width: 1366px;
  padding: 0 1rem;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.hero .header-title {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2.25rem, 4.2vw, 3.75rem);
  line-height: 1.1;
  text-align: inherit;
  text-wrap: balance;
}

.hero .header-text {
  max-width: 52ch;
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.5;
  text-align: inherit;
}

/* En móvil los dos botones caben en una fila: el segundo es un enlace subrayado.
   Así la demo asoma ya en la primera pantalla. */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.75rem;
  margin-top: 0.25rem;
}

/* Sobre el degradado, el botón principal va en blanco para que destaque */
.hero .header-btn {
  margin: 0;
  padding: 1rem 1.5rem;
  background-color: #fff;
  background-image: none;
  font-size: 0.95rem;
}

.hero .header-btn::before,
.hero .header-btn::after {
  color: #5821b6;
}

.hero__link {
  padding: 0.75rem 0.5rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 5px;
  transition: background-color 0.2s ease;
}

@media (min-width: 520px) {
  .hero__actions {
    gap: 0.75rem;
  }

  .hero .header-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  .hero__link {
    padding: 1rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.55);
    font-size: 1rem;
    text-decoration: none;
  }

  .hero__link:hover {
    background-color: rgba(255, 255, 255, 0.14);
  }
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.85rem;
}

.hero__facts li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero__facts svg {
  flex: none;
  width: 18px;
  height: 18px;
}

@media (min-width: 1000px) {
  .header {
    --hero-cut: 6rem;
    padding-top: 7rem;
  }

  /* Lado a lado: el rosa se queda en la mitad de la demo, lejos del texto */
  .header-overlay {
    background-image:
      radial-gradient(55% 85% at 100% 100%, rgba(248, 2, 130, 0.85), transparent 70%),
      radial-gradient(40% 60% at 88% 0%, rgba(253, 48, 155, 0.45), transparent 70%),
      linear-gradient(120deg, #6d28d9 0%, #7c3aed 45%, #a21caf 100%);
  }

  .hero__facts {
    gap: 0.5rem 1.25rem;
    font-size: 0.9rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3rem;
  }

  .hero__copy {
    align-items: flex-start;
    text-align: left;
  }

  .hero .header-text {
    font-size: 1.2rem;
  }

  .hero__actions,
  .hero__facts {
    justify-content: flex-start;
  }
}

/* Demo del directo: comentarios que se convierten en pedidos (scripts/hero-demo.js) */
.demo {
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  background-color: rgba(27, 11, 58, 0.5);
  box-shadow: 0 24px 60px rgba(27, 11, 58, 0.35);
  color: #fff;
  text-align: left;
}

.demo__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.9rem;
}

.demo__live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background-color: #f80282;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.3;
}

.demo__live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background-color: #fff;
}

.demo__word {
  font-size: 0.78rem;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.85);
}

.demo__word strong {
  margin-left: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 600;
}

.demo__cols {
  display: grid;
  gap: 0.9rem;
}

@media (min-width: 520px) {
  .demo {
    padding: 1.25rem;
  }

  .demo__cols {
    grid-template-columns: 1fr 1fr;
  }
}

.demo__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-family: "Poppins", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
}

.demo__count {
  display: inline-block;
  min-width: 1.5em;
  margin-left: 0.25rem;
  padding: 0 0.4em;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.2);
  text-align: center;
}

/* Las dos listas tienen alto fijo para que la demo no mueva el resto de la página */
.demo__chat,
.demo__orders {
  display: flex;
  flex-direction: column;
  height: 10.5rem;
  overflow: hidden;
}

/* Los comentarios nuevos entran por abajo y los antiguos se desvanecen por arriba */
.demo__chat {
  justify-content: flex-end;
  gap: 0.4rem;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 2.25rem);
  mask-image: linear-gradient(to bottom, transparent, #000 2.25rem);
}

@media (min-width: 520px) {
  /* Con las dos columnas lado a lado, comentarios y pedidos miden lo mismo */
  .demo__chat {
    height: 12rem;
  }
}

.demo__msg {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 12px;
  overflow: hidden;
}

.demo__msg--buy {
  border-color: rgba(255, 255, 255, 0.7);
  background-color: rgba(255, 255, 255, 0.2);
}

.demo__avatar {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background-color: var(--avatar, #c4b5fd);
}

.demo__msg-name,
.demo__msg-text {
  display: block;
}

.demo__msg-name {
  font-size: 0.68rem;
  line-height: 1.2;
  opacity: 0.75;
}

.demo__msg-text {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.25;
}

.demo__msg--buy .demo__msg-text {
  font-weight: 600;
}

/* Los pedidos nuevos entran por arriba y los antiguos se desvanecen por abajo */
.demo__orders {
  /* Caben dos pedidos enteros; el tercero solo asoma, ya desvanecido */
  height: 12rem;
  gap: 0.5rem;
  -webkit-mask-image: linear-gradient(to top, transparent, #000 1.5rem);
  mask-image: linear-gradient(to top, transparent, #000 1.5rem);
}

.demo__order {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  background-color: #fff;
  color: var(--tk-ink);
  overflow: hidden;
}

.demo__order-name {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
}

.demo__order-detail {
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--tk-muted);
}

.demo__order-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.demo__order-price {
  font-size: 0.85rem;
  font-weight: 600;
}

.demo__state {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background-color: #f3effe;
  color: #5821b6;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.4;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.demo__state--done {
  background-color: var(--tk-purple);
  color: #fff;
}

/* En pantallas anchas la demo crece para pesar lo mismo que el titular */
@media (min-width: 1200px) {
  .demo {
    max-width: 38rem;
    padding: 1.5rem;
  }

  .demo__bar {
    margin-bottom: 1.1rem;
  }

  .demo__live {
    font-size: 0.78rem;
  }

  .demo__word {
    font-size: 0.88rem;
  }

  .demo__cols {
    gap: 1.25rem;
  }

  .demo__title {
    font-size: 0.92rem;
  }

  .demo__chat,
  .demo__orders {
    height: 14.5rem;
  }

  .demo__msg {
    padding: 0.55rem 0.75rem;
  }

  .demo__avatar {
    width: 30px;
    height: 30px;
  }

  .demo__msg-name {
    font-size: 0.75rem;
  }

  .demo__msg-text,
  .demo__order-name,
  .demo__order-price {
    font-size: 0.95rem;
  }

  .demo__order {
    padding: 0.8rem 1rem;
  }

  .demo__order-detail {
    font-size: 0.82rem;
  }

  .demo__state {
    font-size: 0.75rem;
  }
}

/* Entrada de cada pieza: crece desde cero para empujar a las demás sin saltos */
@keyframes demoMsgIn {
  from {
    max-height: 0;
    margin-bottom: -0.4rem;
    padding-block: 0;
    opacity: 0;
  }
  to {
    max-height: 4rem;
    opacity: 1;
  }
}

@keyframes demoOrderIn {
  from {
    max-height: 0;
    margin-bottom: -0.5rem;
    padding-block: 0;
    opacity: 0;
  }
  to {
    max-height: 7rem;
    opacity: 1;
  }
}

.demo__msg--in {
  animation: demoMsgIn 0.4s ease-out both;
}

.demo__order--in {
  animation: demoOrderIn 0.45s ease-out both;
}

/*
Características
====================================
*/
.feature-img {
  padding: 0 1rem;
  background-color: transparent;
}

.feature-img-picture {
  display: block;
  width: 100%;
  height: auto;
}

/* En móvil el directo también se enseña, entre los dos bloques de tarjetas */
@media (max-width: 767px) {
  .feature-img {
    display: block;
    width: 100%;
    max-width: 320px;
    justify-self: center;
    padding: 1rem 0;
  }
}

.feature-card-text {
  color: var(--tk-muted);
}

/*
Cómo funciona
====================================
*/
.steps {
  max-width: 1366px;
  margin: 4rem auto;
  padding: 1rem;
}

.steps-subtitle {
  color: var(--tk-purple);
  font-size: 0.85rem;
  text-transform: uppercase;
  text-align: center;
}

.steps-title {
  font-size: 3em;
  line-height: 1.2;
  text-align: center;
  color: var(--tk-ink);
}

@media (min-width: 768px) {
  .steps-title {
    max-width: 18ch;
    margin: auto;
  }
}

/* Una tarjeta por paso: arriba el ordenador con la pantalla de ese paso y debajo el número
   con su título y su texto. En una columna en móvil y en rejilla de 2x2 desde 800px. */
.steps__list {
  display: grid;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 2.5rem auto 0;
}

.step {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  border: 1px solid #1a1a1a14;
  border-radius: 16px;
  box-shadow: 0px 0px 5px #0000000e;
  background-color: #fff;
  overflow: hidden;
}

/* En el HTML el texto va antes que la pantalla; en la tarjeta la pantalla se enseña arriba */
.step__media {
  order: -1;
  padding: 1.5rem 1.25rem 1.25rem;
  background-image: linear-gradient(155deg, rgba(124, 58, 237, 0.1) 20%, rgba(253, 48, 155, 0.14) 100%);
}

.step__screen {
  display: block;
  width: 100%;
  max-width: 26rem;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 12px 16px rgba(26, 26, 26, 0.18));
}

/* El número a la izquierda, ocupando el alto del título y del texto */
.step__body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.35rem 1rem;
  padding: 1.25rem 1.25rem 1.5rem;
}

.step__number {
  grid-row: span 2;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--tk-purple);
  background-image: var(--tk-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.step__title {
  align-self: end;
  font-size: 1.4rem;
  line-height: 1.2;
  color: var(--tk-ink);
}

.step__text {
  line-height: 1.5;
  color: var(--tk-muted);
}

@media (min-width: 800px) {
  .steps__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step {
    max-width: none;
  }

  .step__media {
    padding: 2rem 1.5rem 1.5rem;
  }

  .step__body {
    padding: 1.5rem 1.5rem 1.75rem;
  }
}

/*
Cifras
====================================
*/
.stats__container {
  background-color: #1b0b3a;
}

.stats-card-title {
  max-width: 22ch;
  margin: auto;
  font-size: 1.25rem;
  font-weight: 500;
}

/* Son tres cifras: en cuanto caben en fila, van las tres juntas */
@media (min-width: 768px) {
  .stats__wrapper {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 767px) {
  .stats__container {
    padding: 5rem 1rem;
  }

  .stats-title {
    font-size: 2.25em;
  }
}

/*
Integración
====================================
*/
/* Línea de tiempo: antes, durante y después del directo, con las herramientas de la tienda
   que entran en cada momento. En vertical por defecto; en tres columnas desde 1000px. */
.timeline {
  --rail: #d9cdf7;
  --dot: 16px;
  display: grid;
  margin-top: 2.5rem;
}

.timeline__step {
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 0 0 2.5rem 2.25rem;
}

.timeline__step:last-child {
  padding-bottom: 0;
}

/* El raíl: un punto por momento y la línea que lo une con el siguiente */
.timeline__step::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  left: 0;
  width: var(--dot);
  height: var(--dot);
  border-radius: 999px;
  background-color: var(--tk-purple);
}

.timeline__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(0.4rem + var(--dot));
  bottom: -0.4rem;
  left: calc(var(--dot) / 2 - 1px);
  width: 2px;
  background-color: var(--rail);
}

.timeline__when {
  width: fit-content;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background-color: #f3effe;
  color: #5821b6;
  font-family: "Poppins", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
}

.timeline__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1.5rem 1.25rem 0.5rem;
  border: 1px solid #1a1a1a14;
  border-radius: 16px;
  box-shadow: 0px 0px 5px #0000000e;
  background-color: #fff;
}

.timeline__title {
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--tk-ink);
  text-wrap: balance;
}

.timeline__text {
  line-height: 1.5;
  color: var(--tk-muted);
}

.timeline__tools {
  display: grid;
  margin-top: 0.25rem;
}

.tool {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 0;
  border-top: 1px solid #1a1a1a14;
}

.tool__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background-color: #f3effe;
  color: var(--tk-purple);
}

.tool__icon svg {
  width: 20px;
  height: 20px;
}

.tool__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--tk-ink);
}

.tool__badge {
  padding: 0.05rem 0.5rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.5;
}

.tool__text {
  margin-top: 0.2rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--tk-muted);
}

.tool__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.tool__tags li {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background-color: #f3effe;
  color: #5821b6;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
}

/* El directo: el momento central, el único con color de marca */
.timeline__step--live::before {
  background-color: var(--tk-pink);
  box-shadow: 0 0 0 5px rgba(248, 2, 130, 0.18);
}

.timeline__step--live .timeline__when {
  background-color: var(--tk-pink);
  color: #fff;
}

.timeline__step--live .timeline__body {
  border-color: transparent;
  background-image: linear-gradient(155deg, #5821b6 0%, #7c3aed 100%);
}

.timeline__step--live .timeline__title,
.timeline__step--live .tool__name {
  color: #fff;
}

.timeline__step--live .timeline__text,
.timeline__step--live .tool__text {
  color: rgba(255, 255, 255, 0.9);
}

.timeline__step--live .tool {
  border-top-color: rgba(255, 255, 255, 0.25);
}

.timeline__step--live .tool__icon,
.timeline__step--live .tool__tags li {
  background-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

@media (min-width: 600px) and (max-width: 999px) {
  .timeline {
    width: 100%;
    max-width: 36rem;
    margin-right: auto;
    margin-left: auto;
  }
}

@media (min-width: 1000px) {
  .timeline {
    --gap: 2rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap);
  }

  /* El raíl pasa arriba, con cada etiqueta centrada sobre su tarjeta y la línea de centro
     a centro. El punto ya no va suelto a la izquierda: pasa dentro de la etiqueta. */
  .timeline__step {
    padding: 0;
  }

  .timeline__step::before {
    content: none;
  }

  .timeline__step:not(:last-child)::after {
    top: calc(0.9rem - 1px);
    bottom: auto;
    left: 50%;
    width: calc(100% + var(--gap));
    height: 2px;
  }

  /* La etiqueta va encima de la línea: su halo blanco la tapa a su paso */
  .timeline__when {
    display: inline-flex;
    align-items: center;
    align-self: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 0 0.4rem #fff;
  }

  .timeline__when::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background-color: var(--tk-purple);
  }

  .timeline__step--live .timeline__when::before {
    background-color: #fff;
  }

  .timeline__body {
    margin-top: 1.25rem;
    padding: 1.75rem 1.5rem 0.5rem;
  }
}

/*
Preguntas frecuentes
====================================
*/
/* La base las ponía en una sola columna de 600px; ahora ocupan el ancho de la página,
   con un buscador arriba y una columna por categoría. */
.faqs {
  max-width: 1366px;
  gap: 2rem;
}

.faqs-search {
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
}

.faqs-search__field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.1rem;
  /* Mismo radio que las tarjetas de las preguntas; el borde es más oscuro que el de ellas
     porque un campo tiene que verse como campo. */
  border: 1px solid #8b7fb0;
  border-radius: 12px;
  background-color: #fff;
  color: var(--tk-ink);
}

/* El foco se pinta en la caja entera, no solo en el texto */
.faqs-search__field:focus-within {
  outline: 3px solid var(--tk-purple);
  outline-offset: 3px;
}

.faqs-search__field svg {
  flex: none;
  width: 20px;
  height: 20px;
}

.faqs-search__input {
  flex: 1;
  min-width: 0;
  padding: 1rem 0;
  border: 0;
  outline: none;
  background: transparent;
  color: inherit;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
}

.faqs-search__input::placeholder {
  color: var(--tk-muted);
}

.faqs-search__status {
  min-height: 1.5em;
  margin-top: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
  color: var(--tk-muted);
}

.faqs__groups {
  display: grid;
  align-items: start;
  gap: 2rem;
}

@media (min-width: 700px) {
  .faqs__groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .faqs__groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.faqs-group {
  display: grid;
  gap: 1rem;
}

.faqs-group__title {
  width: fit-content;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--tk-purple);
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--tk-ink);
}

/* Cada pregunta: una tarjeta como las del resto de la página, con la respuesta dentro.
   Abierta, el borde y el círculo del icono pasan a morado. */
.faq {
  border: 1px solid #1a1a1a14;
  border-radius: 12px;
  box-shadow: 0px 0px 5px #0000000e;
  background-color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq:hover {
  border-color: #c4b5fd;
}

.faq--open,
.faq--open:hover {
  border-color: var(--tk-purple);
  box-shadow: 0 0 0 1px var(--tk-purple), 0 8px 20px rgba(124, 58, 237, 0.12);
}

.faq__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  color: var(--tk-ink);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.faq__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background-color: #f3effe;
  color: var(--tk-purple);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.3s ease;
}

.faq__icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

/* El "+" gira hasta ser una "×" */
.faq--open .faq__icon {
  background-color: var(--tk-purple);
  color: #fff;
  transform: rotate(45deg);
}

/* La respuesta se despliega animando la fila de una rejilla, que sí admite transición
   hasta la altura real del contenido. */
.faq__panel {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.3s ease;
}

.faq__answer {
  min-height: 0;
  overflow: hidden;
}

.faq__answer p {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--tk-muted);
}

/* Sin JavaScript las respuestas se ven todas; scripts/faqs.js añade .faqs--js y a partir
   de ahí cada pregunta se pliega y se abre. */
.faqs:not(.faqs--js) .faq__icon {
  display: none;
}

.faqs--js .faq:not(.faq--open) .faq__panel {
  grid-template-rows: 0fr;
}

.faqs--js .faq__answer {
  visibility: hidden;
  transition: visibility 0s linear 0.3s;
}

.faqs--js .faq--open .faq__answer {
  visibility: visible;
  transition-delay: 0s;
}

.faqs-empty {
  line-height: 1.5;
  text-align: center;
  color: var(--tk-muted);
}

.faqs-empty a {
  color: #5821b6;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Lo que el buscador oculta: estas piezas tienen display propio y sin esto no se irían */
.faqs-search[hidden],
.faqs-group[hidden],
.faq[hidden],
.faqs-empty[hidden] {
  display: none;
}

/*
Cierre
====================================
*/
.cta-final {
  display: grid;
  gap: 1rem;
  justify-items: center;
  max-width: 1366px;
  margin: 4rem auto 6rem;
  padding: 1rem;
  text-align: center;
}

.cta-final-title {
  max-width: 20ch;
  font-size: 2.5em;
  line-height: 1.2;
  color: var(--tk-ink);
}

.cta-final-text {
  max-width: 55ch;
  line-height: 1.5;
  color: var(--tk-muted);
}

.cta-final .btn {
  margin-top: 0.5rem;
  padding: 1rem 2rem;
}

/*
Pie
====================================
*/
.footer .brand {
  display: inline-flex;
  color: #fff;
}

.footer-legal {
  max-width: 1200px;
  width: 100%;
  margin: auto;
  color: whitesmoke;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.75;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-legal {
    text-align: left;
  }
}

/*
Movimiento reducido
====================================
*/
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn:hover {
    animation: none;
  }
}
