/* Shared site chrome: header, footer, rail, CTA */

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--mac-border);
}

.site-header-inner {
  max-width: 80rem;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 0.75rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.site-brand:hover {
  opacity: 0.85;
}

.site-brand .brand-mark {
  width: 1.6rem;
  height: 1.6rem;
}

.site-nav {
  display: none;
  gap: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .site-nav {
    display: flex;
    flex: 1;
    justify-content: center;
  }
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--mac-text-muted);
  text-decoration: none;
  transition: color 0.2s;
  line-height: 1;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: #fff;
}

.site-nav-icon {
  font-size: 1.05rem;
  line-height: 1;
  color: inherit;
  transition: color 0.2s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-nav a:hover .site-nav-icon {
  color: var(--mac-accent);
}

.site-nav a.is-active .site-nav-icon {
  color: var(--mac-accent);
  transform: scale(1.08);
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  background: var(--mac-accent);
  color: #fff;
  padding: 0.375rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.nav-cta:hover {
  background: #35b0db;
  color: #fff;
  transform: translateY(-1px);
}

.lang-toggle {
  background: transparent;
  border: 1px solid var(--mac-border);
  color: var(--mac-text-muted);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.lang-toggle:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Cursor-style site download CTA (all pages, above footer) */
#site-download-cta.site-download-cta {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: #0f0e0d;
  padding: clamp(5.5rem, 14vw, 9rem) 1.5rem;
  text-align: center;
  border: 0;
}

#site-download-cta .site-download-cta-inner {
  max-width: 42rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
}

#site-download-cta .site-download-cta-title {
  margin: 0;
  padding: 0;
  color: #ffffff;
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.12;
  text-align: center;
}

#site-download-cta .site-download-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.8rem 1.5rem;
  border: 0;
  border-radius: 9999px;
  background: var(--mac-accent);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  box-shadow: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

#site-download-cta .site-download-cta-btn i {
  font-size: 1.05rem;
  line-height: 1;
}

#site-download-cta .site-download-cta-btn:hover {
  background: #35b0db;
  color: #fff;
  transform: translateY(-1px);
}

#site-download-cta .site-download-cta-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  #site-download-cta .site-download-cta-btn {
    transition: none;
  }
}

/* Seamless join: CTA into footer */
.site-footer {
  border-top: 1px solid var(--mac-border);
  padding: 3rem 0;
  font-size: 0.875rem;
  color: var(--mac-text-muted);
  background: var(--mac-bg);
}

#site-download-cta + .site-footer {
  border-top-color: rgba(255, 255, 255, 0.06);
  background: #0f0e0d;
}

.site-footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .site-footer-inner {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.site-footer-features {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  width: 100%;
  order: -1;
}

@media (min-width: 768px) {
  .site-footer-features {
    width: auto;
    order: 0;
    flex: 1 1 auto;
    justify-content: flex-start;
  }
}

.site-footer-features-label {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-right: 0.25rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2rem;
}

.site-footer a {
  color: var(--mac-text-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

.scroll-rail {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
}

@media (min-width: 900px) {
  .scroll-rail {
    display: flex;
    right: 18px;
  }
}

@media (min-width: 1280px) {
  .scroll-rail {
    right: 24px;
  }
}

.rail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mac-text-muted);
  opacity: 0.5;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  padding: 0;
}

.rail-dot.is-active {
  background: var(--mac-accent);
  opacity: 1;
  transform: scale(1.5);
  box-shadow: 0 0 10px var(--mac-accent);
}

.mobile-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--mac-border);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
}

@media (min-width: 768px) {
  .mobile-nav-toggle {
    display: none;
  }
}

.mobile-nav-panel {
  display: none;
  position: fixed;
  inset: 64px 0 auto 0;
  z-index: 49;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--mac-border);
  padding: 1rem 1.5rem 1.5rem;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-nav-panel.is-open {
  display: flex;
}

.mobile-nav-panel a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--mac-text-muted);
  text-decoration: none;
  font-size: 1rem;
  padding: 0.5rem 0;
  transition: color 0.2s;
}

.mobile-nav-panel a.is-active,
.mobile-nav-panel a:hover {
  color: #fff;
}

.mobile-nav-panel a .site-nav-icon {
  font-size: 1.15rem;
}

.mobile-nav-panel a.is-active .site-nav-icon,
.mobile-nav-panel a:hover .site-nav-icon {
  color: var(--mac-accent);
}
