/* Scroll-compact header — shared by instance vault picker (index.php) and landing pages */

:root {
  --vault-chrome-accent: #f59e0b;
  --vault-chrome-bg: rgba(15, 20, 25, 0.92);
}

.site-chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 1.15rem;
  background: var(--vault-chrome-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(245, 158, 11, 0.14);
  opacity: 0;
  transform: translateY(-110%);
  pointer-events: none;
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1), transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

body.hero-compact {
  padding-top: 3.5rem;
}

@media (max-width: 720px) {
  body.hero-compact {
    padding-top: 4.75rem;
  }
}

body.hero-compact .site-chrome {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.site-chrome-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.site-chrome-logo .atom-logo {
  margin: 0;
}

.site-chrome-logo .atom-logo-ring {
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.35);
}

.site-chrome-brand {
  font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vault-chrome-accent);
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.45s ease 0.25s, max-width 0.45s ease 0.25s;
}

body.hero-compact .site-chrome-brand {
  opacity: 1;
  max-width: 8rem;
}

.site-chrome-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: min(100%, 36rem);
}

.site-chrome .chrome-action {
  opacity: 0;
  transform: translateY(8px) scale(0.94);
  pointer-events: none;
}

body.hero-compact .site-chrome .chrome-action {
  pointer-events: auto;
  animation: chrome-action-in 0.48s cubic-bezier(0.4, 0, 0.2, 1) both;
}

body.hero-compact .site-chrome .chrome-action:nth-child(1) { animation-delay: 0.08s; }
body.hero-compact .site-chrome .chrome-action:nth-child(2) { animation-delay: 0.14s; }
body.hero-compact .site-chrome .chrome-action:nth-child(3) { animation-delay: 0.2s; }
body.hero-compact .site-chrome .chrome-action:nth-child(4) { animation-delay: 0.26s; }

@keyframes chrome-action-in {
  from { opacity: 0; transform: translateY(8px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chrome-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 0.95rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid #475569;
  background: rgba(51, 65, 85, 0.65);
  color: #e2e8f0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.chrome-link-btn:hover {
  transform: translateY(-1px);
  background: rgba(51, 65, 85, 0.9);
}

.chrome-link-btn i {
  font-size: 0.85em;
}

body.vault-landing-light {
  --vault-chrome-bg: rgba(255, 255, 255, 0.92);
}

body.vault-landing-light .site-chrome {
  border-bottom-color: rgba(0, 0, 0, 0.08);
  color: #18181b;
}

body.vault-landing-light .chrome-link-btn {
  border-color: #e4e4e7;
  background: #ffffff;
  color: #3f3f46;
}

body.vault-landing-light .chrome-link-btn:hover {
  background: #f4f4f5;
}

.hero {
  text-align: center;
  transition: padding 0.5s ease;
}

body.hero-compact .hero {
  padding-top: 0.25rem;
}

.hero-emblem {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.55s ease, margin 0.55s ease;
  max-height: 320px;
  overflow: visible;
}

body.hero-compact .hero-emblem {
  opacity: 0;
  transform: translate(-38vw, -4.5rem) scale(0.22);
  max-height: 0;
  margin: 0;
  pointer-events: none;
}

.hero-emblem .brand-name {
  transition: opacity 0.55s ease, transform 0.65s cubic-bezier(0.4, 0, 0.2, 1), filter 0.55s ease, letter-spacing 0.65s ease;
  transform-origin: center top;
}

body.hero-dissolve .hero-emblem .brand-name {
  opacity: 0;
  transform: translateY(-3.2rem) scale(0.25);
  filter: blur(10px);
  letter-spacing: 0.22em;
}

.hero-emblem .atom-logo-ring {
  transition: box-shadow 0.6s ease, transform 0.6s ease;
}

body.hero-compact .hero-emblem .atom-logo-ring,
body.hero-dissolve .hero-emblem .atom-logo-ring {
  animation: ring-absorb 0.85s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes ring-absorb {
  0% { box-shadow: 0 0 30px rgba(245, 158, 11, 0.15); transform: scale(1); }
  45% { box-shadow: 0 0 55px rgba(245, 158, 11, 0.75), 0 0 80px rgba(96, 165, 250, 0.25); transform: scale(1.1); }
  100% { box-shadow: 0 0 28px rgba(245, 158, 11, 0.4); transform: scale(1); }
}

.hero-tagline {
  transition: opacity 0.4s ease, max-height 0.45s ease, margin 0.45s ease;
  max-height: 80px;
  overflow: hidden;
}

body.hero-compact .hero-tagline {
  opacity: 0;
  max-height: 0;
  margin: 0;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: opacity 0.45s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.5s ease, margin 0.5s ease;
  max-height: 80px;
  overflow: hidden;
}

body.hero-compact .hero-links {
  opacity: 0;
  transform: translateY(-0.65rem) scale(0.92);
  max-height: 0;
  margin: 0;
  pointer-events: none;
}

body.hero-compact .hero .brand-sub {
  opacity: 0;
  max-height: 0;
  margin: 0;
  overflow: hidden;
}