/* =============================================================
   Inspire Hospitality — Our Work (portfolio.html) page-specific
   Layers on top of styles.css + pages.css tokens/components.
   ============================================================= */

/* ---- Hero: force a clean 2-line title + 2-line lede ---- */
.subhero__content { max-width: 1040px; }
.subhero__title--folio {
  font-size: clamp(40px, 6vw, 68px);
  max-width: 42ch;
  margin-inline: auto;
  /* the ceiling photo behind this banner is busy and warm-toned, so the
     white type needs its own dark lift to stay legible over it */
  text-shadow: 0 2px 20px rgba(10, 4, 14, 0.55), 0 1px 4px rgba(10, 4, 14, 0.5);
}
.subhero__lede--folio {
  max-width: 62ch;
  font-size: clamp(18px, 1.4vw, 21px);
  text-shadow: 0 1px 10px rgba(10, 4, 14, 0.4);
}
/* text-shadow is inherited — undo it on "shaped" so the gradient word
   keeps its original look (just the glow filter from pages.css) instead
   of the dark lift stacking on top and muting it */
.subhero__title--folio .subhero__title-accent {
  text-shadow: none;
}

/* ---- Gallery section: tighter rhythm (brand spacing scale tops out
   around 96px/desktop; the shared .section--dark default overshoots it) ---- */
.gallery-section { padding: clamp(64px, 8vw, 110px) 0; }

/* ---- Gallery head: single centred heading (project count removed) ---- */
.folio-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.folio-head .section-head { margin: 0; }

/* ---- Filters: centred pills; a <select> takes over on small screens ---- */
.folio-filter { justify-content: center; }
.folio-filter-select { display: none; }
@media (max-width: 640px) {
  .folio-filter { display: none; }
  .folio-filter-select {
    display: block;
    width: 100%;
    max-width: 360px;
    margin: 0 auto clamp(40px, 5vw, 64px);
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--hairline);
    border-radius: 999px;
    padding: 14px 40px 14px 20px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image:
      linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
      linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
    background-position: right 24px center, right 18px center;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    text-align-last: center;
  }
  .folio-filter-select:focus-visible {
    outline: 2px solid var(--lavender);
    outline-offset: 2px;
  }
  /* the closed pill's white text sits on the dark theme fine, but the
     dropdown panel itself is OS-rendered on a white background — without
     this the options inherit --text-primary (near-white) and are almost
     unreadable there */
  .folio-filter-select option { color: var(--ink); }
}

/* ---- Gallery cards: resting state is image + name only. Hover/touch-focus
   darkens the tile, cross-fades to a second photo, and reveals the tags. ---- */
.folio-item .folio-item__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.92) brightness(0.82);
  transition: opacity 0.6s var(--ease-out), transform 1.1s var(--ease-out), filter 0.6s var(--ease-out);
  z-index: 0;
}
.folio-item .folio-item__img--base { opacity: 1; }
.folio-item .folio-item__img--hover { opacity: 0; transform: scale(1.04); }
.folio-item:hover .folio-item__img--base,
.folio-item:focus-visible .folio-item__img--base { opacity: 0; }
.folio-item:hover .folio-item__img--hover,
.folio-item:focus-visible .folio-item__img--hover {
  opacity: 1;
  transform: scale(1.09);
  filter: saturate(0.85) brightness(0.52);
}
.folio-item .folio-item__tags {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.folio-item:hover .folio-item__tags,
.folio-item:focus-visible .folio-item__tags { opacity: 1; transform: none; }
/* No hover on touch devices, so the base rule's opacity:0 (which only
   ever lifts on :hover/:focus-visible) would leave the tags permanently
   invisible there — previously corrected by forcing them permanently
   visible instead, but a name-sized card has no room for a tag list
   without it sitting on top of the photo. Hidden outright on touch. */
@media (hover: none), (pointer: coarse) {
  .folio-item .folio-item__tags { display: none; }
  .folio-item .folio-item__img--hover { display: none; }
}

/* ---- Hotels & Residences: k11artus matches the feature tile's height so
   the pair tiles cleanly with no dead space beside the shorter card. ---- */
.folio-item[data-project="k11artus"] { height: clamp(360px, 35vw, 480px); }

/* K11 MUSEA card photo — center crop was cutting off the entrance canopy's
   lettering; biasing toward the top keeps it in frame. */
.folio-item__img--k11musea { object-position: 50% 15%; }

/* ---- Luxury Retail & Wellness: Boca West is the highlight — a full-width
   hero tile; the other two share the row below (also fixes the old
   3-tiles-of-3-cols overflow gap). ---- */
.folio-item[data-project="bocawest"] {
  grid-column: span 6;
  height: clamp(320px, 28vw, 400px);
}

/* ---- VIP Experiences: the lone feature tile left a 2-col gap — go full width. ---- */
.folio-item[data-project="avantgarde"] { grid-column: span 6; }

@media (max-width: 1000px) {
  .folio-item[data-project="k11artus"] { height: clamp(240px, 36vw, 320px); }
  .folio-item[data-project="bocawest"] { grid-column: span 2; height: clamp(240px, 36vw, 320px); }
  .folio-item[data-project="avantgarde"] { grid-column: span 2; }
}
@media (max-width: 560px) {
  .folio-item[data-project="k11artus"],
  .folio-item[data-project="bocawest"],
  .folio-item[data-project="avantgarde"] { grid-column: span 1; height: auto; }
}
