/* ==========================================================================
   Royalty Technology — Shell: topbar, header, nav, mobile panel, footer
   ========================================================================== */

/* ---- Topbar -------------------------------------------------------------- */

.topbar {
  color: var(--text-on-inverse-muted);
  background: var(--ink-950);
  font-size: var(--fs-xs);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: 42px;
}
.topbar p { margin: 0; display: flex; align-items: center; gap: 8px; }
.topbar__tagline strong { color: var(--brand-on-dark); font-weight: 600; }
.topbar__contact { display: flex; align-items: center; gap: var(--space-6); }
.topbar__contact > * { display: inline-flex; align-items: center; gap: 7px; }
.topbar__contact a { transition: color var(--dur-base) var(--ease-out); }
.topbar__contact a:hover { color: var(--n-000); }
.topbar .icon { width: 14px; height: 14px; color: var(--brand-on-dark); }

/* ---- Header -------------------------------------------------------------- */

.header {
  position: sticky;
  z-index: var(--z-header);
  top: 0;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}
.header.is-scrolled { background: rgba(255, 255, 255, .96); box-shadow: var(--shadow-sm); }

.header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  min-height: 76px;
}

/* ---- Desktop nav --------------------------------------------------------- */

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.desktop-nav a {
  position: relative;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}
.desktop-nav a:hover { color: var(--text); background: var(--surface-subtle); }
.desktop-nav a.is-active { color: var(--text); font-weight: 600; }
.desktop-nav a.is-active::after {
  position: absolute;
  right: 12px;
  bottom: 1px;
  left: 12px;
  height: 2px;
  background: var(--brand);
  border-radius: var(--radius-pill);
  content: "";
}

/* ---- Header actions ------------------------------------------------------ */

.header__actions { display: flex; align-items: center; gap: var(--space-2); }

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}
.icon-button:hover { color: var(--text); background: var(--surface-subtle); }

.menu-button { display: none; }
.header__quote { min-height: 44px; padding-inline: 18px; }

/* ---- Mobile panel -------------------------------------------------------- */

.mobile-panel { display: none; }
.mobile-panel.is-open { display: block; }

.mobile-panel__backdrop {
  position: fixed;
  z-index: var(--z-overlay);
  inset: 0;
  width: 100%;
  background: rgba(3, 12, 20, .6);
  backdrop-filter: blur(3px);
  animation: fade-in var(--dur-base) var(--ease-out);
}

.mobile-panel__sheet {
  position: fixed;
  z-index: var(--z-modal);
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(360px, 88vw);
  padding: var(--space-5) var(--space-5) var(--space-8);
  overflow-y: auto;
  background: var(--surface);
  box-shadow: var(--shadow-xl);
  animation: slide-in var(--dur-slow) var(--ease-out);
}
.mobile-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}
.mobile-panel__head span {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-subtle);
}
.mobile-panel nav { display: flex; flex-direction: column; }
.mobile-panel nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding-inline: 4px;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 500;
}
.mobile-panel nav a .icon { width: 16px; height: 16px; color: var(--text-subtle); }
.mobile-panel .button { margin-top: var(--space-6); }
.mobile-panel__contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: var(--space-8);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

@keyframes fade-in { from { opacity: 0; } }
@keyframes slide-in { from { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  .mobile-panel__backdrop, .mobile-panel__sheet { animation: none; }
}

/* ---- Search dialog ------------------------------------------------------- */

.search-dialog {
  width: min(620px, calc(100% - 32px));
  padding: var(--space-8);
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  color: var(--text);
}
.search-dialog::backdrop { background: rgba(3, 12, 20, .65); backdrop-filter: blur(3px); }
.search-dialog__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}
.search-dialog__top strong { font-family: var(--font-display); font-size: 1.0625rem; }
.search-dialog label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: var(--fs-sm); }
.search-dialog__field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-inline: 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.search-dialog__field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-050); }
.search-dialog__field .icon { color: var(--text-subtle); }
.search-dialog__field input { width: 100%; height: 52px; border: 0; outline: 0; background: none; }
.search-dialog__hint { margin-top: var(--space-3); color: var(--text-subtle); font-size: var(--fs-xs); }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  color: var(--text-on-inverse-muted);
  background: var(--ink-950);
  font-size: var(--fs-sm);
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(5, minmax(0, 1fr));
  gap: var(--space-12) var(--space-8);
  padding-block: var(--space-20) var(--space-16);
}

.footer__brand .brand__name { color: var(--n-000); }
.footer__brand .brand__accent { color: var(--brand-on-dark); }
.footer__brand > p {
  max-width: 34ch;
  margin-top: var(--space-5);
  color: var(--text-on-inverse-muted);
  line-height: var(--lh-body);
}

.footer__promise {
  display: inline-flex;
  margin-top: var(--space-5);
  color: var(--brand-on-dark);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: .01em;
}

.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer__col h2 {
  margin-bottom: 6px;
  color: var(--n-000);
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.footer__col a, .footer__col p { color: var(--text-on-inverse-muted); }
.footer__col a { transition: color var(--dur-base) var(--ease-out); max-width: 100%; overflow-wrap: anywhere; }
.footer__col a:hover { color: var(--n-000); }
.footer__col p { margin: 0; }

.socials { display: flex; gap: 8px; margin-top: var(--space-3); }
.socials a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-inverse-strong);
  border-radius: var(--radius-sm);
  transition: color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.socials a:hover { color: var(--ink-950); background: var(--brand-on-dark); border-color: var(--brand-on-dark); }
.socials svg { width: 17px; height: 17px; fill: currentColor; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 72px;
  border-top: 1px solid var(--border-inverse);
  color: var(--text-on-inverse-subtle);
  font-size: var(--fs-xs);
}
.footer__bottom p { margin: 0; }
.footer__bottom nav { display: flex; gap: var(--space-6); }
.footer__bottom a { transition: color var(--dur-base) var(--ease-out); }
.footer__bottom a:hover { color: var(--n-000); }
