/* =========================
   Home
   ========================= */

.page-home .hero {
  padding: var(--s-7) 0 var(--s-6);
}

.page-home .hero__grid {
  display: grid;
  gap: var(--s-6);
  align-items: start;
}

.page-home .hero__title {
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  line-height: 1.15;
  margin-bottom: var(--s-3);
}

.page-home .hero__lead {
  max-width: 60ch;
  font-size: var(--text-lg);
  color: rgba(62, 52, 44, 0.82);
}

.page-home .hero__aside {
  padding: var(--s-5);
  border-radius: var(--r-lg);
  background: rgba(156, 139, 122, 0.12);
  border: 1px solid var(--border);
}

.page-home .intent {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-6) 0;
}

.page-home .intent__label {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: var(--text-xs);
  color: rgba(62, 52, 44, 0.60);
}

.page-home .intent__line {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  line-height: 1.25;
}

.page-home .pause {
  background: rgba(156, 139, 122, 0.15);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--s-7) 0;
}

.page-home .pause__inner {
  max-width: 72ch;
}

.page-home .pause__arabic {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  line-height: 1.55;
  letter-spacing: 0.01em;
  margin-bottom: var(--s-4);
}

.page-home .pause__translation {
  font-size: var(--text-md);
  color: rgba(62, 52, 44, 0.80);
}

.page-home .featured {
  padding: var(--s-7) 0;
}

.page-home .featured__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
}

.page-home .featured__grid {
  display: grid;
  gap: var(--s-4);
}

.page-home .card {
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.55);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.page-home .card:hover {
  transform: translateY(-2px);
  border-color: rgba(166, 138, 114, 0.24);
}

.page-home .card__img {
  aspect-ratio: 4 / 3;
  background: rgba(62, 52, 44, 0.06);
}

.page-home .card__body {
  padding: var(--s-4);
}

.page-home .card__title {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  margin: 0 0 var(--s-2);
}

.page-home .card__sub {
  font-size: var(--text-sm);
  color: rgba(62, 52, 44, 0.70);
}

@media (min-width: 900px) {
  .page-home .hero__grid {
    grid-template-columns: 1.3fr 0.9fr;
    align-items: start;
  }
  .page-home .featured__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* =========================
   Home Carousel (seamless, JS-measured)
   ========================= */

.page-home .carousel-wrapper {
  overflow: hidden;
}

.page-home .carousel-track {
  display: flex;
  gap: 1.5rem; /* matches gap-6 in the markup -- this selector's specificity
                  beats the Tailwind utility class, so both must stay in sync */
  width: max-content;
  will-change: transform;
}

/* This class will be added by JS after it measures widths */
.page-home .carousel-track.is-animating {
  animation: carousel-scroll var(--carousel-duration, 28s) linear infinite;
}

@keyframes carousel-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-1 * var(--carousel-distance, 0px))); }
}

/* Hover deceleration handled in home.js */

@media (prefers-reduced-motion: reduce) {
  .page-home .carousel-track.is-animating {
    animation: none;
  }
}

/* =========================
   Testimonials (2026-08-12)
   ========================= */

#testimonial-track,
#testimonial-dots {
  position: relative;
  z-index: 1;
}

.testimonial-slide {
  transition: opacity 300ms ease-in-out;
}

.testimonial-slide.is-hidden {
  display: none;
}

.testimonial-slide.is-entering {
  opacity: 0;
}

/* Button itself is a 20px tap target (comfortable on mobile); the visible
   dot is a smaller ::after centered inside it, so the hit area is generous
   without the dot itself looking oversized. */
.testimonial-dot {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonial-dot::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(156, 139, 122, 0.35); /* Mushroom, muted */
  transition: background-color 200ms ease-in-out, transform 200ms ease-in-out;
}

.testimonial-dot:hover::after {
  background: rgba(166, 138, 114, 0.6); /* Taupe */
}

.testimonial-dot.is-active::after {
  background: #A68A72; /* Taupe */
  transform: scale(1.3);
}

/* Prev/next arrows: hover-reveal on desktop only (pointer devices with real
   hover) -- swipe covers touch, so a visible-but-inert arrow pair on mobile
   would just be clutter. Positioned outside the quote's own text column so
   they never crowd the copy at any viewport this wide. */
.testimonial-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: rgba(247, 243, 239, 0.55); /* Ivory, muted */
  opacity: 0;
  transition: opacity 200ms ease-in-out, background-color 200ms ease-in-out, color 200ms ease-in-out;
  z-index: 2;
}

.dark .testimonial-arrow {
  color: rgba(62, 52, 44, 0.55); /* Espresso, muted */
}

.testimonial-arrow--prev {
  left: -0.5rem;
}

.testimonial-arrow--next {
  right: -0.5rem;
}

@media (min-width: 1024px) {
  .testimonial-arrow--prev {
    left: -3rem;
  }
  .testimonial-arrow--next {
    right: -3rem;
  }
}

@media (hover: hover) {
  #testimonial-section:hover .testimonial-arrow {
    opacity: 1;
  }
  .testimonial-arrow:hover {
    color: #F7F3EF; /* Ivory, full */
    background: rgba(247, 243, 239, 0.1);
  }
  .dark .testimonial-arrow:hover {
    color: #3E342C; /* Espresso, full */
    background: rgba(62, 52, 44, 0.08);
  }
}

@media (hover: none) {
  .testimonial-arrow {
    display: none;
  }
}