/* simple-x.org — simplified layout (not tied to official design3 nav) */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: rgba(7, 28, 70, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dark .site-header {
  background: rgba(5, 9, 32, 0.75);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

body.site-inner-page .site-header {
  background: rgba(243, 250, 255, 0.95);
  border-bottom-color: rgba(0, 23, 150, 0.08);
}

.dark body.site-inner-page .site-header {
  background: rgba(0, 8, 50, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.site-home.site-header-solid .site-header {
  background: rgba(243, 250, 255, 0.95);
  border-bottom-color: rgba(0, 23, 150, 0.1);
}

.dark body.site-home.site-header-solid .site-header {
  background: rgba(0, 8, 50, 0.95);
}

.site-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-right: 8px;
}

.site-logo img {
  height: 36px;
  width: auto;
}

.site-logo .logo-dark {
  display: none;
}

.dark .site-logo .logo-light {
  display: none;
}

.dark .site-logo .logo-dark {
  display: flex;
}

body.site-inner-page .site-logo .logo-light,
body.site-home.site-header-solid .site-logo .logo-light {
  display: flex;
}

body.site-inner-page .site-logo .logo-dark,
body.site-home.site-header-solid .site-logo .logo-dark {
  display: none;
}

.dark body.site-inner-page .site-logo .logo-light,
.dark body.site-home.site-header-solid .site-logo .logo-light {
  display: none;
}

.dark body.site-inner-page .site-logo .logo-dark,
.dark body.site-home.site-header-solid .site-logo .logo-dark {
  display: flex;
}

.site-nav {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: #fff;
  padding: 6px 4px;
  white-space: nowrap;
}

.dark .site-nav a,
body.site-inner-page .site-nav a,
body.site-home.site-header-solid .site-nav a {
  color: #001796;
}

.dark body.site-inner-page .site-nav a,
.dark body.site-home.site-header-solid .site-nav a {
  color: #c8f4f8;
}

.site-nav a:hover {
  opacity: 0.85;
}

.site-nav a.is-active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

.site-theme-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

body.site-inner-page .site-theme-btn,
body.site-home.site-header-solid .site-theme-btn {
  background: rgba(0, 23, 150, 0.08);
}

.site-theme-btn svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

body.site-inner-page .site-theme-btn svg,
body.site-home.site-header-solid .site-theme-btn svg {
  fill: #001796;
}

.dark body.site-inner-page .site-theme-btn svg,
.dark body.site-home.site-header-solid .site-theme-btn svg {
  fill: #c8f4f8;
}

.site-theme-btn .hidden {
  display: none;
}

.site-menu-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

body.site-inner-page .site-menu-btn,
body.site-home.site-header-solid .site-menu-btn {
  background: rgba(0, 23, 150, 0.08);
}

.site-menu-btn svg {
  width: 22px;
  height: auto;
  fill: #fff;
}

body.site-inner-page .site-menu-btn svg,
body.site-home.site-header-solid .site-menu-btn svg {
  fill: #001796;
}

.dark body.site-inner-page .site-menu-btn svg,
.dark body.site-home.site-header-solid .site-menu-btn svg {
  fill: #c8f4f8;
}

@media (min-width: 900px) {
  .site-menu-btn {
    display: none;
  }

}

@media (max-width: 899px) {
  .site-nav {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 12px 16px 16px;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .dark .site-nav {
    background: #050920;
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }

  body.site-nav-open .site-nav {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .site-nav a {
    color: #001796 !important;
    padding: 10px 8px;
    border-radius: 8px;
  }

  .dark .site-nav a {
    color: #e8f4ff !important;
  }

  .site-nav a:hover {
    background: rgba(0, 83, 208, 0.08);
  }

}

body.site-nav-open {
  overflow: hidden;
}

/* Inner pages */
body.site-inner-page {
  padding-top: 56px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.site-main h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.site-main p {
  font-size: 1.0625rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  opacity: 0.92;
}

.site-main .site-cta {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  background: #0053d0;
  color: #fff;
}

.dark .site-main .site-cta {
  background: #70f0f9;
  color: #050920;
}

.site-back {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.875rem;
  opacity: 0.7;
  text-decoration: none;
}

.site-back:hover {
  opacity: 1;
}

/* Footer — normal block, no full-viewport snap */
.site-footer {
  background: #d3e9ff;
  padding: 40px 20px 32px;
  margin-top: auto;
}

.dark .site-footer {
  background: #080d25;
}

.site-footer-inner {
  max-width: 72rem;
  margin: 0 auto;
}

.site-footer-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 768px) {
  .site-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.site-footer a {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 2;
  text-decoration: none;
  color: #3f484b;
}

.dark .site-footer a {
  color: #e8f0ff;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer-note {
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.8;
  margin-top: 8px;
  max-width: 22rem;
}

.site-footer-copy {
  margin-top: 28px;
  font-size: 12px;
  opacity: 0.65;
  text-align: center;
}

@media (min-width: 768px) {
  .site-footer-copy {
    text-align: left;
  }
}

/* Home: offset fixed header for first section */
body.site-home .screen {
  padding-top: 0;
}

/*
 * design3.css uses mandatory scroll-snap on full-viewport sections.
 * The footer (.site-footer) is not a snap section, so the scroll position
 * often sticks on the last .page block and the footer stays off-screen.
 */
html.site-home-page {
  scroll-snap-type: none !important;
  overscroll-behavior: auto;
}

html.site-home-page section.page {
  scroll-snap-align: none;
  scroll-snap-stop: normal;
  height: auto;
  min-height: 100svh;
}

html.site-home-page .site-footer {
  scroll-snap-align: none;
  position: relative;
  z-index: 3;
}

/* Hide legacy hero store / publication rows if old HTML is cached */
html.site-home-page .socials,
html.site-home-page .publications-btns,
html.site-home-page .security-btns {
  display: none !important;
}

/* Hero: in-flow download CTA (replaces overlapping store badges from design3) */
html.site-home-page section.cover div.content .home-hero-downloads {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 1.25rem;
}

html.site-home-page .home-hero-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.75rem;
  border-radius: 8px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(90deg, #019bfe 0%, #2e3fa0 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

html.site-home-page .home-hero-download-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

@media screen and (max-width: 959px) {
  html.site-home-page section.cover div.content .home-hero-downloads {
    margin-top: calc(var(--sec-vhu, 1vh) * 1.5);
  }
}
