/* ==========================================================================
   Nav — top sticky bar, mobile slide-out menu, desktop section rail,
   mobile bottom CTA bar
   ========================================================================== */

/* ---- Top sticky nav ---- */
nav.top {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(214, 210, 200, 0.5);
}

nav.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-text strong {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.brand-text span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber-500);
  margin-top: 4px;
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--amber-500); }

.nav-cta {
  background: var(--amber-500);
  color: var(--paper) !important;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}
.nav-cta:hover {
  background: var(--amber-600);
  color: var(--paper) !important;
  transform: translateY(-1px);
}

/* ---- Mobile hamburger ---- */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s, opacity 0.2s;
}
.mobile-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Mobile slide-out menu ---- */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background: var(--slate-900);
  color: var(--bone);
  padding: 80px 32px 32px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 80;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }

.mobile-menu a {
  display: block;
  padding: 16px 0;
  color: var(--bone);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(240, 238, 232, 0.08);
  transition: color 0.2s;
}
.mobile-menu a:hover,
.mobile-menu a:active { color: var(--amber-400); }

.mobile-menu .mobile-cta {
  margin-top: 24px;
  background: var(--amber-500);
  color: var(--paper);
  padding: 14px 24px;
  border-radius: 4px;
  text-align: center;
  border-bottom: none;
  font-weight: 600;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 20, 0.6);
  backdrop-filter: blur(4px);
  z-index: 70;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.mobile-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 920px) {
  .nav-links { display: none; }
  .mobile-toggle { display: flex; }
}

/* ---- Desktop section rail (sticky right side) ---- */
.section-rail {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(15, 20, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 14px 8px;
  border-radius: 8px;
  border: 1px solid rgba(217, 98, 31, 0.2);
  box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.section-rail.visible {
  opacity: 1;
  pointer-events: auto;
}

.rail-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}
.rail-dot::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--steel-400);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.rail-dot:hover::before {
  background: var(--amber-400);
  transform: scale(1.3);
}
.rail-dot.active::before {
  background: var(--amber-500);
  transform: scale(1.5);
  box-shadow: 0 0 0 4px rgba(217, 98, 31, 0.2);
}

.rail-dot .label {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--slate-900);
  color: var(--bone);
  padding: 6px 12px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  border: 1px solid rgba(217, 98, 31, 0.3);
}
.rail-dot:hover .label { opacity: 1; }

@media (max-width: 1100px) {
  .section-rail { display: none; }
}

/* ---- Mobile bottom CTA bar ---- */
.mobile-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(15, 20, 25, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(217, 98, 31, 0.25);
  padding: 12px 16px;
  display: none;
  gap: 8px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-cta-bar.visible { transform: translateY(0); }

.mobile-cta-bar a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  padding: 12px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: -0.005em;
}

.mobile-cta-bar .mcta-secondary {
  background: rgba(240, 238, 232, 0.08);
  color: var(--bone);
  border: 1px solid rgba(240, 238, 232, 0.15);
}

.mobile-cta-bar .mcta-primary {
  background: var(--amber-500);
  color: var(--paper);
}

@media (max-width: 920px) {
  .mobile-cta-bar { display: flex; }
  body { padding-bottom: 72px; }
}
