/* ============================================
   Signature / Featured panel + the cinematic nav flyout
   Loaded globally (index.html), so the nav embellishments are available on
   every SPA page. Uses brand-flipping tokens to adapt Clinic/Wellness.
   ============================================ */

.signature__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

/* Item-card: the offering's "collectible" art floats up top on a rarity
   aura, with the diamond above it. Copy sits below on the solid surface. */
.signature__card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 124px var(--space-xl) var(--space-xl);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background-color: var(--card-base);
  background-image:
    radial-gradient(ellipse 62% 90px at 50% 62px, var(--aura) 0%, transparent 72%),
    var(--item-img, none);
  background-repeat: no-repeat, no-repeat;
  background-position: center top, center 22px;
  background-size: auto, auto 84px;
  color: var(--text-primary);
  text-decoration: none;
  overflow: visible;
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
}
.signature__card:hover { transform: translateY(-4px); }

body[data-brand="clinic"] .signature__card {
  --card-base: #2c3528;
  --aura: rgba(196, 176, 120, 0.18);
  --gem-trace: rgba(196, 176, 120, 0.7);
}
body[data-brand="wellness"] .signature__card {
  --card-base: #ebe4d3;
  --aura: rgba(136, 146, 109, 0.16);
  --gem-trace: rgba(136, 146, 109, 0.75);
}

/* Scene cards (people / media): a fixed-height photo header band at the top,
   then a solid card below. The defined band means no bottom bleed, and the
   --scene-pos / --scene-zoom controls crop the side bystander and lift the
   face. The card itself drops the floating-object background. */
.signature__card--scene {
  padding-top: 0;
  background-image: none;
}
.signature__scene-img {
  display: block;
  height: 156px;
  margin: 0 calc(-1 * var(--space-xl)) var(--space-lg);
  border-top-left-radius: calc(var(--radius-lg) - 1px);
  border-top-right-radius: calc(var(--radius-lg) - 1px);
  background-image: var(--item-img);
  background-size: var(--scene-zoom, 140%);
  background-position: var(--scene-pos, 55% 30%);
  background-repeat: no-repeat;
  /* dissolve the photo's lower edge into the card */
  -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
}

/* Diamond "gem": the premium, rarer sibling of the circular service-card
   notch. Seated on the top edge; olive-to-gold shimmer like the immortal ring. */
.signature__card::before {
  content: '';
  position: absolute;
  top: -19px;
  left: 50%;
  width: 16px;
  height: 16px;
  transform: translateX(-50%) rotate(45deg);
  background: linear-gradient(135deg, var(--olive) 0%, #c4b078 50%, var(--olive) 100%);
  border-radius: 3px;
  box-shadow: 0 3px 12px rgba(136, 146, 109, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  animation: gemGlow 6s ease-in-out infinite;
  z-index: 3;
}
.signature__card:hover::before { animation-duration: 4s; }

/* The card's top line traces the gem's lower facets instead of slicing through. */
.signature__card::after {
  content: '';
  position: absolute;
  top: -21px;
  left: 50%;
  width: 20px;
  height: 20px;
  transform: translateX(-50%) rotate(45deg);
  background: transparent;
  border-right: 1.5px solid var(--gem-trace);
  border-bottom: 1.5px solid var(--gem-trace);
  z-index: 2;
}

@keyframes gemGlow {
  0%, 100% { box-shadow: 0 3px 12px rgba(136, 146, 109, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
  50%      { box-shadow: 0 3px 17px rgba(196, 176, 120, 0.5),  inset 0 0 0 1px rgba(255, 255, 255, 0.3); }
}

.signature__tag {
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}
.signature__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-xl);
  margin: 0 0 var(--space-sm);
  color: var(--text-primary);
}
.signature__desc {
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 var(--space-lg);
  flex: 1;
}
.signature__more {
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  color: var(--accent);
}
.signature__more::after { content: ' \2192'; }

/* Brand-specific hover shadows (wellness = warm taupe, never green). */
body[data-brand="wellness"] .signature__card:hover {
  box-shadow: 0 24px 50px -24px rgba(88, 70, 50, 0.30);
  border-color: rgba(58, 69, 52, 0.28);
}
body[data-brand="clinic"] .signature__card:hover {
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.5);
  border-color: rgba(241, 235, 223, 0.28);
}

@media (max-width: 900px) { .signature__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .signature__grid { grid-template-columns: 1fr; } }

/* ============================================
   Nav "Featured": gold shimmer + drifting embers
   ============================================ */
.nav-featured-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-featured { position: relative; display: inline-flex; }
.nav-featured__label {
  background: linear-gradient(100deg,
    currentColor 0%, currentColor 42%, #efe1b0 50%, currentColor 58%, currentColor 100%);
  background-size: 220% 100%;
  background-position: 130% 0;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: navShimmer 6.5s ease-in-out infinite;
}
@keyframes navShimmer {
  0%        { background-position: 130% 0; }
  20%, 100% { background-position: -30% 0; }
}
.nav-featured__embers { position: absolute; inset: -4px 0 0; pointer-events: none; }
.nav-featured__embers i {
  position: absolute;
  bottom: 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #efe1b0;
  box-shadow: 0 0 5px 1px rgba(196, 176, 120, 0.85);
  opacity: 0;
  animation: navEmber 3.6s ease-in infinite;
}
.nav-featured__embers i:nth-child(1) { left: 16%; animation-delay: 0.2s; }
.nav-featured__embers i:nth-child(2) { left: 52%; animation-delay: 1.5s; }
.nav-featured__embers i:nth-child(3) { left: 80%; animation-delay: 2.7s; }
@keyframes navEmber {
  0%   { transform: translateY(2px) scale(0.5); opacity: 0; }
  15%  { opacity: 0.95; }
  70%  { opacity: 0.5; }
  100% { transform: translateY(-16px) scale(1); opacity: 0; }
}

/* ============================================
   Featured mega-flyout (desktop hover)
   ============================================ */
.featured-flyout {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 16px;            /* invisible hover bridge to the panel */
  width: min(860px, 92vw);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
  z-index: 200;
}
.nav-featured-wrap.is-open .featured-flyout {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.featured-flyout__inner {
  position: relative;
  overflow: hidden;
  background: rgba(20, 24, 18, 0.93);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(196, 176, 120, 0.22);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.65);
  padding: var(--space-lg);
  transform: translateY(12px);
  transition: transform 0.4s var(--ease-out);
}
.nav-featured-wrap.is-open .featured-flyout__inner { transform: translateY(0); }

.featured-flyout__sweep { position: absolute; top: 0; left: 0; right: 0; height: 1px; overflow: hidden; }
.featured-flyout__sweep::before {
  content: '';
  position: absolute;
  top: 0;
  left: -45%;
  width: 45%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e8d39a, transparent);
  animation: ffSweep 3.4s ease-in-out infinite;
}
@keyframes ffSweep { 0% { left: -45%; } 60%, 100% { left: 120%; } }

.featured-flyout__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}
.featured-flyout__eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c4b078;
}
.featured-flyout__all { font-size: var(--text-sm); color: #e9e4d6; text-decoration: none; }
.featured-flyout__all:hover { color: #fff; }

.featured-flyout__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}
.ff-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  opacity: 0;
  transform: translateY(12px);
  transition: background 0.25s, border-color 0.25s, transform 0.25s, opacity 0.25s;
}
.nav-featured-wrap.is-open .ff-tile {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
  transition-delay: calc(var(--i) * 55ms + 120ms);
}
.ff-tile:hover { background: rgba(196, 176, 120, 0.10); border-color: rgba(196, 176, 120, 0.32); }
.ff-tile__art {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 50% 45%, rgba(196, 176, 120, 0.20), transparent 70%),
    var(--item-img);
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  background-size: auto, auto 32px;
}
.ff-tile--scene .ff-tile__art { background-size: cover; background-position: center 28%; }
.ff-tile__body { display: flex; flex-direction: column; min-width: 0; }
.ff-tile__tag { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: #b9a87a; }
.ff-tile__name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  color: #f4efe2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ff-tile__gem {
  width: 8px;
  height: 8px;
  margin-left: auto;
  flex: none;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--olive), #c4b078);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(196, 176, 120, 0.5);
}

@media (max-width: 1023px) {
  .featured-flyout { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .signature__card { transition: none; }
  .signature__card:hover { transform: none; }
  .signature__card::before { animation: none; }
  .nav-featured__label { animation: none; }
  .nav-featured__embers i { animation: none; opacity: 0; }
  .featured-flyout__sweep::before { animation: none; }
  .featured-flyout, .featured-flyout__inner, .ff-tile { transition: none; }
}
