/* ------------------------------------------------------------------------
   Component: spotlight
   ------------------------------------------------------------------------ */

.spotlight {
   position: relative;
   margin-block: var(--space-8);
   padding-inline: var(--space-4);
   overflow-x: hidden;
   background-color: var(--surface-2);
   aspect-ratio: 1;
}


.spotlight__inner {
   display: grid;
   flex: 1;
   gap: var(--space-6, 1.5rem);
   align-items: flex-end;
   padding-block: var(--space-8, 2rem);
   padding-inline: var(--space-8);
   height: 100%;
}

/* Content */

.spotlight__content {
   max-width: 42rem;
   text-align: center;
   color: var(--text);
}

.spotlight__title {
   margin: 0 0 var(--space-3, 0.75rem);
   line-height: 1.1;
   text-shadow: 0 4px 16px var(--surface-2);
   color: var(--text);
   font-weight: 700;
}

.spotlight__summary {
   margin: 0 0 var(--space-3, 0.75rem);
   line-height: var(--leading-normal);
   text-shadow: 0 4px 8px var(--surface-2);
   margin-bottom: var(--space-2);
   font-size: var(--text-lg);
}

.spotlight__meta {
   display: none;
}

.spotlight__actions {
   display: flex;
   flex-wrap: wrap;
   gap: var(--space-3, 0.75rem);
   align-items: center;
   justify-content: center;
}

/* Links */

.spotlight .button--primary {
   position: relative;
   display: inline-flex;
   align-items: center;
   gap: var(--space-2);
   height: 40px;
   padding-inline: var(--space-4);
   border: none;
   border-radius: var(--radius-sm);
   background-color: var(--surface);
   color: var(--link);
   text-decoration: none;
   font-weight: 600;
   line-height: 1;
   white-space: nowrap;
   font-size: var(--text-lg);
   box-shadow: var(--shadow-md);
}

/* Remove empty rule */
.spotlight .button--primary:hover {
   background-color: var(--surface-2);
   color: var(--link-hover);
}

.spotlight .button--primary:focus {
   outline: 2px solid var(--link);
}

/* Media */

.spotlight__media {
   overflow: hidden;
   min-height: 14rem;
}

.spotlight__image {
   width: 100%;
   height: 100%;
   display: block;
   object-fit: cover;
}


/* ------------------------------------------------------------------------
   Overlay variant (mobile)
   ------------------------------------------------------------------------ */

.spotlight--overlay {
   position: relative;
}

.spotlight--overlay .spotlight__inner {
   padding-block: var(--space-10, 2.5rem);
}

.spotlight--overlay .spotlight__media {
   position: absolute;
   inset: 0;
   min-height: 100%;
}

.spotlight--overlay .spotlight__image {
   height: 100%;
}

/* Overlay gradient for readability (bottom blend 4rem up) */
.spotlight--overlay .spotlight__inner::before {
   content: "";
   position: absolute;
   inset: 0;
   z-index: 1;
   height: 100%;
   background: linear-gradient(to bottom,
         color-mix(in srgb, var(--surface-2) 25%, transparent) 0%,
         var(--surface-2) 100%);
}

.spotlight--overlay .spotlight__content {
   position: relative;
   z-index: 2;
   color: var(--text);
   max-width: var(--container-max);
}

/* ------------------------------------------------------------------------
   Breakpoints (mobile first → up)
   ------------------------------------------------------------------------ */

/* ≥ 30rem (480px) */
@media (min-width: 30rem) {
   .spotlight {
      aspect-ratio: 2/1;
   }
}

/* ≥ 40rem (640px) */
@media (min-width: 40rem) {

   .spotlight {
      aspect-ratio: 5/2;
      background-color: unset;
      margin-left: var(--space-4);
      margin-right: var(--space-4);
      padding: 0;
      border-radius: var(--radius-lg);
      /* border: var(--border-1); */
      box-shadow: var(--shadow-md);

   }

   .spotlight__inner {
      grid-template-columns: 1.15fr 0.85fr;
      align-items: center;
      gap: var(--space-8, 2rem);
      padding: 0;
      position: relative;
      max-width: calc(var(--container-max) - var(--space-8) - var(--space-8));
      margin-inline: auto;
      padding-inline: var(--space-8);
      box-shadow: var(--shadow-md);
   }

   .spotlight__media {
      min-height: 24rem;
   }

   .spotlight__content {
      max-width: 48rem;
      text-align: left;
   }

   .spotlight__meta {
      display: block;
      margin-bottom: var(--space-3);
      font-size: var(--text-sm);
   }

   .spotlight__actions {
      justify-content: flex-start;
   }


   .spotlight--overlay .spotlight__image {
      height: 100%;
      width: 75%;
      float: right;
   }

   .spotlight--overlay .spotlight__media {}

   .spotlight--overlay .spotlight__inner::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 1;
      height: 100%;
      background: linear-gradient(to left,
            transparent 30%,
            transparent 50%,
            var(--surface-2) 75%);
   }

}



/* ≥ 48rem (768px) */
@media (min-width: 48rem) {
   .spotlight {
      margin-left: var(--space-8);
      margin-right: var(--space-8);
   }
}

/* ≥ 64rem (1024px) */
@media (min-width: 64rem) {}

/* ≥ 80rem (1280px) */
@media (min-width: 80rem) {

   .spotlight {
      aspect-ratio: 4 / 1;

   }

   .spotlight__inner {
      gap: var(--space-10, 2.5rem);
   }

   .spotlight__title {
      font-size: 3rem;
   }

   .spotlight__lead {
      font-size: var(--text-2xl);
   }

   .spotlight__summary {
      font-size: var(--text-lg);
   }


   .spotlight .button--primary {
      height: 56px;
      font-size: var(--text-xl);
      font-weight: 700;
   }

   /* .spotlight__image {
      transform: scale(1);
      transition: all 1s cubic-bezier(.22, .61, .36, 1);
   } */

   /* .spotlight:hover .spotlight__image {
      transform: scale(1.05);
   } */

   .spotlight__media {
      min-height: 28rem;
      position: unset;
   }


}

/* ≥ 96rem (1536x) */
@media (min-width: 96rem) {

   .spotlight {
      max-width: calc(var(--container-max) - var(--space-8) - var(--space-8));
      margin-inline: auto;
   }

   .spotlight__title {
      font-size: 3.25rem;
   }

   .spotlight__lead {
      font-size: var(--text-2xl);
   }

   .spotlight__summary {
      font-size: var(--text-xl);
   }
}