/* ======================================================
   VITAL VIBES — components.css v4.0
   Shared UI components
   ====================================================== */

/* ── Section Label Group ── */
.label-group { margin-bottom: 0.75rem; }
.label-group .label { color: var(--gold); }

/* ── Dark section utilities ── */
.bg-dark   { background: var(--primary); }
.bg-dark .label { color: var(--gold); }
.bg-dark .headline { color: var(--white); }
.bg-dark .body-lg  { color: rgba(255,255,255,0.65); }
.bg-surface { background: var(--surface); }
.bg-surface-alt { background: var(--surface-alt); }

/* ── Pattern A/B card alternation ── */
.card-ab:nth-child(even) .card-ab__img { order: 1; }
.card-ab:nth-child(even) .card-ab__text { order: 0; }

/* ── Accessibility skip link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--primary);
  color: var(--white);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  z-index: 200;
  border-radius: 0 0 4px 4px;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ── Text selection color ── */
::selection { background: var(--gold-light); color: var(--dark); }

/* ── Scrollbar (webkit) ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── Progress bar (top of page) ── */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--gold);
  z-index: 200;
  width: 0%;
  transition: width .1s linear;
}

/* ── Section number decoration ── */
.section-num {
  font-family: var(--font-display);
  font-size: 6rem;
  color: var(--primary);
  opacity: 0.05;
  line-height: 1;
  position: absolute;
  top: -1.5rem;
  right: 0;
  user-select: none;
  pointer-events: none;
  font-style: italic;
}

/* ── Horizontal rule ── */
.hr-gold {
  border: none;
  border-top: 1px solid var(--border-gold);
  margin: 2rem 0;
}

/* ── Tag chips ── */
.chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 2px;
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--border);
}
.chip--gold {
  background: transparent;
  color: var(--gold);
  border-color: var(--border-gold);
}

/* ── Tooltip ── */
.tooltip-wrap { position: relative; }
.tooltip-wrap::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--dark);
  color: var(--white);
  font-size: 0.75rem;
  padding: 0.4rem 0.75rem;
  border-radius: 2px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.tooltip-wrap:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Mobile nav overlay z-stack ── */
.nav__mobile-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  font-size: 1.5rem;
  color: var(--white);
  background: none;
  border: none;
  cursor: pointer;
  opacity: .7;
  transition: opacity .2s;
}
.nav__mobile-close:hover { opacity: 1; }

/* ── Back to top ── */
.back-top {
  position: fixed;
  bottom: 7rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--primary);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 89;
}
.back-top.visible { opacity: 1; pointer-events: all; }
.back-top:hover { transform: translateY(-3px); }

/* ── Micro text for legal / footnote ── */
.micro-text {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Divider with text ── */
.divider-text {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Image placeholder ── */
.img-placeholder {
  width: 100%; height: 100%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.75rem;
}
.img-placeholder span {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── 3D card tilt (desktop only) ── */
@media (min-width: 1024px) {
  .tilt-card {
    transition: transform .1s ease-out;
    will-change: transform;
  }
}
