/* ══════════════════════════════════════════
   COMPONENTS CSS — Shared UI Elements
   ══════════════════════════════════════════ */

/* ─── BACK TO TOP ─── */
.back-to-top {
  position: fixed; bottom: 32px; right: 32px; z-index: 800;
  width: 44px; height: 44px;
  background: var(--bg-card); border: 1.5px solid var(--gold);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: var(--gold); box-shadow: 0 4px 16px rgba(201,168,76,.2);
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s var(--ease-out);
  cursor: pointer;
}
.back-to-top.visible {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.back-to-top:hover {
  background: var(--gold); color: white;
  box-shadow: 0 8px 24px rgba(201,168,76,.4);
  transform: translateY(-3px);
}

/* ─── TOOLTIP ─── */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--slate); color: white;
  font-family: var(--font-ui); font-size: .68rem; font-weight: 500;
  padding: 5px 10px; border-radius: 6px;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .2s, transform .2s;
}
[data-tip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── SECTION DIVIDER ─── */
.divider {
  width: 60px; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px; margin-bottom: 32px;
}

/* ─── PILL TAG ─── */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-ui); font-size: .7rem; font-weight: 600;
  padding: 4px 11px; border-radius: 20px;
  letter-spacing: .03em;
}
.pill--gold    { background: rgba(201,168,76,.12); color: var(--gold-dark); border: 1px solid rgba(201,168,76,.3); }
.pill--sage    { background: rgba(92,138,110,.1);  color: var(--sage);      border: 1px solid rgba(92,138,110,.25); }
.pill--rust    { background: rgba(206,90,58,.08);  color: var(--rust);      border: 1px solid rgba(206,90,58,.2); }
.pill--sky     { background: rgba(74,130,196,.1);  color: var(--sky);       border: 1px solid rgba(74,130,196,.25); }

/* ─── FLOATING NAV (mobile overlay) ─── */
.mobile-nav {
  position: fixed; inset: 0; z-index: 850;
  background: rgba(250,248,243,.97);
  backdrop-filter: blur(20px) saturate(180%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  opacity: 0; visibility: hidden;
  transition: opacity .35s, visibility .35s;
}
.mobile-nav.open { opacity: 1; visibility: visible; }
.mobile-nav .nav__link {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 300;
  color: var(--slate); padding: 8px 20px;
  opacity: 0; transform: translateY(20px);
  transition: color .2s, opacity .4s, transform .4s;
}
.mobile-nav.open .nav__link { opacity: 1; transform: translateY(0); }
.mobile-nav.open .nav__link:nth-child(1) { transition-delay: .05s; }
.mobile-nav.open .nav__link:nth-child(2) { transition-delay: .10s; }
.mobile-nav.open .nav__link:nth-child(3) { transition-delay: .15s; }
.mobile-nav.open .nav__link:nth-child(4) { transition-delay: .20s; }
.mobile-nav.open .nav__link:nth-child(5) { transition-delay: .25s; }
.mobile-nav .nav__link:hover { color: var(--gold); }

/* ─── PROGRESS BAR (page scroll indicator) ─── */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; z-index: 9999;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  width: 0; transition: width .1s linear;
  box-shadow: 0 0 8px rgba(201,168,76,.5);
}

/* ─── NOTIFICATION TOAST ─── */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--slate); color: white;
  font-family: var(--font-ui); font-size: .82rem; font-weight: 500;
  padding: 12px 24px; border-radius: 8px;
  box-shadow: 0 8px 32px rgba(28,35,51,.2);
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 9000; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--success { background: var(--sage); }
.toast--error   { background: var(--rust); }

/* ─── CODE BLOCK ─── */
.code-block {
  background: #1C2333; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-md);
}
.code-block__header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; background: #161E2E;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.code-block__title { font-family: var(--font-mono); font-size: .68rem; color: rgba(255,255,255,.3); }
.code-block__body { padding: 16px 20px; }
.code-block pre { font-family: var(--font-mono); font-size: .78rem; line-height: 1.8; color: rgba(255,255,255,.8); overflow-x: auto; }

/* ─── IMAGE ZOOM OVERLAY ─── */
.zoom-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(28,35,51,.9); backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .3s;
}
.zoom-overlay.active { opacity: 1; visibility: visible; }
.zoom-overlay img { max-width: 90vw; max-height: 90vh; border-radius: var(--radius); box-shadow: var(--shadow-xl); }