/* ==========================================================================
   guide-index.css
   Editorial, photography-led listing for the Guides hub (/guides/)
   Uses existing design tokens from variables.css
   ========================================================================== */

.guide-index {
  padding: clamp(2.25rem, 5vw, 4rem) 0 clamp(3.5rem, 8vw, 6.5rem);
}

/* ---- hub hero: match the ivory-deep background used on guide pages ------ */
.guide-hub-hero {
  background: var(--color-ivory-deep);
}

/* ---- section header ---------------------------------------------------- */
.guide-index__head {
  max-width: 46rem;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.guide-index__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.85rem, 4vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.012em;
  color: var(--color-charcoal);
  margin: var(--space-sm) 0 0;
}

.guide-index__intro {
  margin: 0.9rem 0 0;
  color: var(--color-charcoal-soft);
  font-size: 1.02rem;
  line-height: 1.62;
  max-width: 38rem;
}

/* ---- grid -------------------------------------------------------------- */
.guide-index__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: clamp(1.1rem, 2.2vw, 1.8rem);
}

/* ---- card -------------------------------------------------------------- */
.guide-index__card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .45s cubic-bezier(.2,.7,.2,1),
              border-color .45s ease,
              box-shadow .45s ease;
}

.guide-index__card:hover {
  transform: translateY(-5px);
  border-color: var(--color-champagne-soft);
  box-shadow: 0 22px 45px -28px rgba(42, 30, 22, .45);
}

.guide-index__card:focus-visible {
  outline: 2px solid var(--color-champagne-deep);
  outline-offset: 3px;
}

.guide-index__media {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--color-ivory-deep);
}

.guide-index__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .7s cubic-bezier(.2,.7,.2,1);
}

.guide-index__card:hover .guide-index__media img {
  transform: scale(1.05);
}

.guide-index__num {
  position: absolute;
  top: .8rem;
  left: .9rem;
  z-index: 2;
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--color-white);
  background: rgba(42, 30, 22, .42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.guide-index__body {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1.25rem 1.3rem 1.4rem;
  flex: 1 1 auto;
}

.guide-index__cat {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 600;
  color: var(--color-champagne-deep);
}

.guide-index__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-charcoal);
  transition: color .3s ease;
}

.guide-index__card:hover .guide-index__name {
  color: var(--color-champagne-deep);
}

.guide-index__text {
  font-size: .92rem;
  line-height: 1.55;
  color: var(--color-charcoal-soft);
  margin: 0;
}

.guide-index__cta {
  margin-top: auto;
  padding-top: .45rem;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--color-charcoal);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.guide-index__cta span {
  transition: transform .3s ease;
}

.guide-index__card:hover .guide-index__cta span {
  transform: translateX(4px);
}

/* ---- featured card ----------------------------------------------------- */
.guide-index__card--featured {
  grid-column: 1 / -1;
}

.guide-index__tag {
  align-self: flex-start;
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-champagne-deep);
  padding: .38rem .72rem;
  border-radius: 999px;
}

@media (min-width: 60rem) {
  .guide-index__card--featured {
    flex-direction: row;
    align-items: stretch;
  }
  .guide-index__card--featured .guide-index__media {
    aspect-ratio: auto;
    flex: 0 0 52%;
    min-height: 22rem;
  }
  .guide-index__card--featured .guide-index__body {
    justify-content: center;
    padding: clamp(1.75rem, 3vw, 3rem);
    gap: .7rem;
  }
  .guide-index__card--featured .guide-index__name {
    font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  }
  .guide-index__card--featured .guide-index__text {
    font-size: 1rem;
    max-width: 30rem;
  }
}

/* ---- reduced motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .guide-index__card,
  .guide-index__media img,
  .guide-index__cta span {
    transition: none;
  }
  .guide-index__card:hover {
    transform: none;
  }
  .guide-index__card:hover .guide-index__media img {
    transform: none;
  }
}