/* ════════════════════════════════════════════════════════════════════
   SEVILLA WEB & IT SERVICES — Sección "Webs demo"
   Estilos autocontenidos (prefijo .swd-) para no depender del build
   de Tailwind de la landing.
   ════════════════════════════════════════════════════════════════════ */

#demos {
  padding: 6rem 1.25rem;
  scroll-margin-top: 6rem;
  position: relative;
}

@media (min-width: 640px) {
  #demos { padding: 7rem 2rem; }
}

@media (min-width: 1024px) {
  #demos { padding: 7rem 3rem; }
}

.swd-wrap {
  max-width: 64rem;
  margin: 0 auto;
}

/* ── Cabecera (misma pauta visual que el resto de secciones) ── */

.swd-head { max-width: 48rem; }

.swd-eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: system-ui, sans-serif;
}

.swd-eyebrow-num {
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.swd-eyebrow-text {
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
  white-space: nowrap;
}

.swd-eyebrow-line {
  height: 1px;
  flex: 1;
  background-image: linear-gradient(to right, rgba(59, 130, 246, .5), transparent);
}

.swd-title {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  line-height: 1.05;
  color: #fff;
  margin: 1.5rem 0 0;
}

.swd-title em { font-style: italic; }

.swd-lead {
  font-family: system-ui, sans-serif;
  font-size: .95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, .6);
  margin: 1.25rem 0 0;
}

/* ── Rejilla de tarjetas ── */

.swd-grid {
  display: grid;
  gap: 1rem;
  margin-top: 4rem;
}

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

.swd-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color .3s, background-color .3s, box-shadow .3s, transform .3s;
}

.swd-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, .45);
  box-shadow: 0 24px 60px -30px rgba(59, 130, 246, .55);
}

/* ── Captura de la web ── */

.swd-shot {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #05070e;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.swd-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform .6s cubic-bezier(.16, 1, .3, 1);
}

.swd-card:hover .swd-shot img { transform: scale(1.04); }

.swd-shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to top, rgba(5, 7, 14, .85), rgba(5, 7, 14, .05) 45%, transparent);
  pointer-events: none;
}

/* Etiqueta de estado sobre la captura */
.swd-badge {
  position: absolute;
  top: .875rem;
  left: .875rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: system-ui, sans-serif;
  font-size: .6875rem;
  letter-spacing: .04em;
  padding: .35rem .7rem;
  border-radius: 9999px;
  color: rgba(191, 219, 254, .95);
  background: rgba(5, 7, 14, .6);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .3);
}

.swd-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
}

/* ── Cuerpo de la tarjeta ── */

.swd-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.75rem;
}

.swd-card-title {
  font-size: 1.25rem;
  color: #fff;
  margin: 0;
}

.swd-card-kicker {
  font-family: system-ui, sans-serif;
  font-size: .6875rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .38);
  margin: 0 0 .5rem;
}

.swd-card-text {
  font-family: system-ui, sans-serif;
  font-size: .875rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, .6);
  margin: .75rem 0 0;
  flex: 1;
}

.swd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.25rem;
}

.swd-tag {
  font-family: system-ui, sans-serif;
  font-size: .75rem;
  padding: .375rem .75rem;
  border-radius: 9999px;
  color: rgba(191, 219, 254, .9);
  background: rgba(59, 130, 246, .12);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .2);
}

.swd-cta {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-family: system-ui, sans-serif;
  font-size: .875rem;
  color: var(--accent-light);
  margin-top: 1.25rem;
  transition: filter .2s;
}

.swd-card:hover .swd-cta { filter: brightness(1.25); }

.swd-cta svg {
  width: 1rem;
  height: 1rem;
  transition: transform .2s;
}

.swd-card:hover .swd-cta svg { transform: translate(2px, -2px); }

.swd-note {
  font-family: system-ui, sans-serif;
  font-size: .75rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .42);
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.swd-note b {
  color: rgba(255, 255, 255, .7);
  font-weight: 400;
}

/* ── Animación de entrada (propia, no depende del observer de React) ── */

.swd-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1);
  will-change: opacity, transform;
}

.swd-reveal.swd-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .swd-reveal { opacity: 1; transform: none; transition: none; }
  .swd-card, .swd-shot img { transition: none; }
  .swd-card:hover { transform: none; }
  .swd-card:hover .swd-shot img { transform: none; }
}
