@import url('https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Nunito:wght@600;700;800&display=swap');

:root {
  --paper: #F4F0E6;
  --ink: #1C1230;
  --purple: #5B3E96;
}

/* =========================================
   CONTENEDOR
========================================= */

.sheet {
  width: 100%;
  margin: 0 auto;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;

  margin-bottom: 30px;
}

.sheet-header .lot {
  color: var(--ink);
  font-family: 'Alfa Slab One', serif;
  font-size: 28px;
  line-height: 1.2;
}

.sheet-header .tabla {
  color: var(--purple);
  font-family: 'Alfa Slab One', serif;
  font-size: 20px;
  line-height: 1.2;
}

.ribbon {
  padding: 8px 20px;

  color: #fff;
  background: var(--purple);
  border-radius: 999px;

  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 1.5px;
  text-align: center;
}

/* =========================================
   CUADRÍCULA
========================================= */

.deck {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 26px;
}

/* =========================================
   TARJETAS
========================================= */

.deck .card {
  display: flex;
  flex-direction: column;

  min-width: 0;
  height: 100%;
  padding: 14px;
  overflow: hidden;

  background: #fff;
  border-radius: 28px;
  box-shadow:
    rgba(28, 18, 48, 0.5) 0 1px 2px,
    rgba(28, 18, 48, 0.77) 0 18px 81px -12px;

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.deck .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 40px -16px rgba(28, 18, 48, 0.4);
}

/* =========================================
   IMAGEN
========================================= */

.deck .card-frame {
  width: 100%;
  overflow: hidden;

  aspect-ratio: 16 / 18;
  border-radius: 20px;
}

.deck .card-frame img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
}

/* =========================================
   TÍTULOS
========================================= */

.deck .card h3 {
  margin: 20px 15px 10px;

  color: #542c82;
  font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;

  overflow-wrap: anywhere;
  text-wrap: balance;
}

.deck .card h3 strong {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

/* =========================================
   DESCRIPCIÓN
========================================= */

.deck .card-desc {
  flex-grow: 1;

  padding: 16px 6px 4px;

  color: #3a3450;
  font-size: 16px;
  line-height: 1.55;
  text-align: center;

  overflow-wrap: break-word;
}

/* =========================================
   BOTÓN
========================================= */

.deck .card-btn {
  display: flex;
  align-items: center;
  justify-content: center;

  width: auto;
  min-height: 48px;
  margin: 12px 4px 2px;
  padding: 12px 10px;

  color: #fff;
  background: var(--purple);
  border-radius: 999px;
  box-shadow: 0 8px 16px -8px rgba(91, 62, 150, 0.6);

  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.3px;
  text-align: center;
  text-decoration: none;

  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.deck .card-btn:hover,
.deck .card-btn:focus {
  color: #fff;
  background: #42266f;
  transform: translateY(-2px);
}

/* =========================================
   PLACEHOLDER
========================================= */

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;
  padding: 14px;

  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  border: 2px dashed rgba(28, 18, 48, 0.35);

  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  white-space: pre-line;
}

/* =========================================
   TABLET GRANDE
========================================= */

@media (max-width: 1100px) {

  .deck {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .deck .card h3 {
    margin: 18px 12px 9px;
    font-size: 1.3rem;
  }

  .deck .card-desc {
    font-size: 15px;
  }

  .deck .card-btn {
    font-size: 16px;
  }
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 767px) {

  .sheet-header {
    justify-content: center;
    margin-bottom: 24px;
    text-align: center;
  }

  .sheet-header .lot {
    font-size: 23px;
  }

  .sheet-header .tabla {
    font-size: 18px;
  }

  .deck {
    grid-template-columns: 1fr;
    gap: 24px;

    width: 100%;
    max-width: 540px;
    margin: 0 auto;
  }

  .deck .card {
    padding: 12px;
    border-radius: 22px;
  }

   .deck .card-frame {
    width: 35%;
    max-width: 320px;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: 16px;
  }

  .deck .card-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .deck .card h3 {
    margin: 16px 10px 8px;
    font-size: 1.15rem;
    line-height: 1.25;
  }

  .deck .card-desc {
    padding: 10px 8px 4px;
    font-size: 14px;
    line-height: 1.5;
  }

  .deck .card-btn {
    min-height: 44px;
    margin-top: 12px;
    padding: 10px 15px;
    font-size: 15px;
  }

  .placeholder {
    font-size: 15px;
  }
}

/* =========================================
   CELULAR
========================================= */

@media (max-width: 480px) {

  .sheet {
    padding-right: 4px;
    padding-left: 4px;
  }

  .sheet-header {
    gap: 8px;
    margin-bottom: 20px;
  }

  .sheet-header .lot {
    width: 100%;
    font-size: 20px;
  }

  .sheet-header .tabla {
    font-size: 16px;
  }

  .ribbon {
    padding: 7px 15px;
    font-size: 10px;
    letter-spacing: 1px;
  }

  .deck {
    gap: 20px;
  }

  .deck .card {
    padding: 10px;
    border-radius: 18px;
  }

.deck .card-frame {
    width: 68%;
    max-width: 240px;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: 14px;
  }

  .deck .card-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .deck .card h3 {
    margin-top: 12px;
    font-size: 1.05rem;
    line-height: 1.25;
  }

  .deck .card-desc {
    padding: 8px 6px 3px;
    font-size: 13.5px;
    line-height: 1.45;
  }

  .deck .card-btn {
    min-height: 42px;
    margin: 11px 2px 2px;
    padding: 9px 12px;
    font-size: 14px;
  }

  .placeholder {
    padding: 10px;
    font-size: 13px;
  }
}

/* =========================================
   CELULAR MUY PEQUEÑO
========================================= */

@media (max-width: 360px) {

  .deck .card h3 {
    font-size: 0.98rem;
  }

  .deck .card-desc {
    font-size: 13px;
  }

  .deck .card-btn {
    width: 100%;
    font-size: 13px;
  }
}

/* =========================================
   ACCESIBILIDAD
========================================= */

@media (prefers-reduced-motion: reduce) {

  .deck .card,
  .deck .card-btn {
    transition: none;
  }

  .deck .card:hover,
  .deck .card-btn:hover {
    transform: none;
  }
}


@media (max-width: 480px) {

  .deck .card-frame {
    width: 68%;
    max-width: 240px;
    aspect-ratio: 1 / 1;
  }
}