/* ============================================================================
   sections/featured.css — Featured products rotating deck
   ----------------------------------------------------------------------------
   Compact portrait cards. 5 across on desktop, 3 across on mobile. The deck
   crossfades to the next set of featured items on a timer (assets/js/featured.js)
   via the .is-swapping class for a quiet, luxurious transition.
   ========================================================================== */

/* Blue lota-pata framing the ivory section (the "blue vine on ivory"). Larger
   than the card corners; indigo so it reads on the warm paper. It draws itself
   in when the section reveals (reuses the .lota-frame contract, keyed off the
   section-head's data-reveal via the .section wrapper). */
.featured { position: relative; }
.featured .lota-frame--section {
  color: var(--royal-700);
  z-index: 0;
}
.featured .lota-frame--section .lc {
  width: clamp(70px, 12vw, 150px);
  height: clamp(70px, 12vw, 150px);
  opacity: .6;
}
.featured .lota-frame--section .lc-tl { top: 10px; left: 10px; }
.featured .lota-frame--section .lc-tr { top: 10px; right: 10px; }
.featured .lota-frame--section .lc-bl { bottom: 10px; left: 10px; }
.featured .lota-frame--section .lc-br { bottom: 10px; right: 10px; }
/* (the section frame draws itself in — it carries data-reveal, so reveal.js
   toggles .is-visible on it and the shared .lota-frame.is-visible rule fires.) */
/* it's inside the section but the container content must sit above it */
.featured > .container { position: relative; z-index: 1; }

.featured-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-4);
}

/* Compact featured card — portrait media with a gold-veiled name plate.
   Cross-fade/lift uses a hard-decelerating, overshoot-free curve (weighty
   landing, no bounce) and is staggered per card via --i. Hover feedback
   (border/shadow) is kept on its own zero delay so a late-index card doesn't
   feel laggy to the pointer — only the entrance/exit motion is staggered. */
.featured-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  padding: .55rem .55rem 0;
  border: 1.5px solid rgba(201,162,75,.42);   /* refined gold hairline (the 4.7px was chunky here) */
  background: linear-gradient(180deg, var(--indigo-700), var(--indigo-950) 70%);
  box-shadow: var(--shadow-card);
  --ease-land: cubic-bezier(.16,1,.3,1);
  transition: opacity 640ms var(--ease-land), transform 640ms var(--ease-land),
              border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms), calc(var(--i, 0) * 70ms), 0s, 0s;
}
.featured-card:hover { border-color: var(--gold-300); box-shadow: var(--shadow-lift); transform: translateY(-5px); }

/* The photo now sits in an ARCHED niche — the same cusped shape as the product
   cards and hero portal, so the featured deck speaks the house language. A gold
   arch outline traces it; the name plate rides the flat bottom of the arch. */
/* .ph is now an unmasked positioning frame: the photo is masked in .ph-mask,
   so the lota-pata vine (.arch-orn) can trace the arch WITHOUT being clipped. */
.featured-card .ph { position: relative; aspect-ratio: 3 / 4; }
.featured-card .ph-mask {
  position: absolute; inset: 0; overflow: hidden; background: var(--indigo-800);
  -webkit-mask: url("../../img/ornaments/arch-mask.svg") center / 100% 100% no-repeat;
          mask: url("../../img/ornaments/arch-mask.svg") center / 100% 100% no-repeat;
}
.featured-card .ph-mask img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.featured-card:hover .ph-mask img { transform: scale(1.06); }
/* Gold arch outline over the niche (masked-gradient, matches the arch exactly). */
.featured-card .ph::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(180deg, var(--gold-300), var(--gold-500) 60%, var(--gold-700));
  -webkit-mask: url("../../img/ornaments/arch-outline.svg") center / 100% 100% no-repeat;
          mask: url("../../img/ornaments/arch-outline.svg") center / 100% 100% no-repeat;
  opacity: .45; transition: opacity var(--dur) var(--ease);
}
.featured-card:hover .ph::after { opacity: .8; }
/* The climbing লতা পাতা vine over the arch — bright gold on the dark card (the
   ivory-section rule would otherwise engrave it too dark to read here). */
.featured-card .ph .arch-orn { color: var(--gold-300); z-index: 3; opacity: .9; }
.featured-card:hover .ph .arch-orn { color: var(--gold-100); opacity: 1; }

/* Category as a fine gold micro-cap ABOVE the arched photo. */
.featured-card .cat {
  display: block; text-align: center;
  margin: .1rem 0 .45rem;
  font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 700;
  color: var(--gold-500);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Name sits BELOW the arched photo, on the indigo card body — a framed portrait
   with its title beneath, not text dumped over the image. */
.featured-card .plate {
  padding: .6rem .5rem .7rem;
  text-align: center;
}
.featured-card .plate .name {
  font-family: var(--font-serif); font-size: 1rem; line-height: 1.15; color: var(--frost-100);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.featured-card .plate .ori { font-size: .68rem; color: var(--gold-300); letter-spacing: .04em; margin-top: .25rem; }

/* Swap state: deck fades/lifts out, then content changes, then fades back in.
   A light cross-fade + micro-scale (not a big drop) — the deck should feel
   like it settles, not like it falls. */
.featured-row.is-swapping .featured-card { opacity: 0; transform: translateY(10px) scale(.985); }

/* Tablet: 3 across, tighter. */
@media (max-width: 900px) {
  .featured-row { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
  .featured-card .plate { padding: 1rem .45rem .45rem; }
  .featured-card .plate .name { font-size: .76rem; }
  .featured-card .plate .ori { display: none; }
  .featured-card .cat { font-size: .62rem; letter-spacing: .1em; padding: .15rem .35rem; }
}

/* Phone: a snap-scroll promenade — each signature line at a size worth
   stopping for, instead of five cards crushed into matchboxes. */
@media (max-width: 640px) {
  .featured-row {
    display: flex; overflow-x: auto; gap: .8rem;
    scroll-snap-type: x mandatory;
    padding: 0 var(--gutter) .6rem;
    margin-inline: calc(-1 * var(--gutter));
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .featured-row::-webkit-scrollbar { display: none; }
  .featured-card { flex: 0 0 62vw; scroll-snap-align: center; }
  .featured-card .plate .name { font-size: 1rem; }
  .featured-card .plate .ori { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .featured-card, .featured-row.is-swapping .featured-card { transition: none; opacity: 1; transform: none; }
}


/* ===== Two noukas on the ivory Featured chapter (client-placed) =========
   Upper corners, flanking the heading. On paper the engraving is a soft gold
   figure (no screen blend); z-index 0 keeps it behind the content.
   (.featured is already position:relative — declared once at the top.) */
.feat-nouka {
  position: absolute; z-index: 0; pointer-events: none; top: 4%;
  width: clamp(180px, 20vw, 300px); height: clamp(120px, 13vw, 200px);
  background: url("../../img/scene/sampan-cut.webp") center / contain no-repeat;
  -webkit-mask: radial-gradient(80% 82% at 50% 50%, #000 52%, transparent 86%);
          mask: radial-gradient(80% 82% at 50% 50%, #000 52%, transparent 86%);
  filter: sepia(.5) saturate(1.5) hue-rotate(-12deg) brightness(.68) contrast(1.05);
  opacity: 1;
}
.feat-nouka--l { left: 1%; }
.feat-nouka--r { right: 1%; transform: scaleX(-1); }
@media (max-width: 760px) { .feat-nouka { display: none; } }
