*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --white: #ffffff;
  --off-white: #f8f9fa;
  --black: #0a0a0a;
  --ink: #0f1117;
  --mid: #6b6b6b;
  --light: #e8e6e1;
  --teal: #087a6b;
  --teal-light: #e3f3f0;
  --teal-mid: #065e52;
  --font: "Plus Jakarta Sans", sans-serif;
  --mono: "IBM Plex Mono", monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--teal);
  color: var(--white);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  z-index: 200;
  text-decoration: none;
  border-radius: 0 0 4px 0;
}

.skip-link:focus {
  top: 0;
}

nav.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 68px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--light);
}

@media (prefers-reduced-motion: no-preference) {
  nav.main-nav {
    backdrop-filter: blur(8px);
  }
}

.nav-logo,
.footer-logo {
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.nav-logo {
  padding: 4px 8px 4px 0;
}

.footer-logo {
  padding: 2px 8px 2px 0;
}

.nav-logo-img {
  height: 26px;
  width: auto;
  display: block;
}

.footer-logo-img {
  height: 18px;
  width: auto;
  display: block;
}

/* Dark-portal logo swap — only present on dark-portal pages (dual-image nav) */
.nav-logo-dark,
.footer-logo-dark {
  display: none;
}

.nav-links,
.footer-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.footer-links {
  gap: 24px;
  flex-wrap: wrap;
}

.nav-links a,
.footer-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.18s;
}

.footer-links a {
  font-size: 13px;
}

.nav-links a:hover,
.footer-links a:hover,
.nav-links a.active {
  color: var(--ink);
}

.nav-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-nav-solid,
.drawer-demo {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  background: var(--teal);
  text-decoration: none;
  padding: 9px 22px;
  border-radius: 100px;
  transition: background 0.18s;
  white-space: nowrap;
}

.btn-nav-solid:hover,
.drawer-demo:hover {
  background: var(--teal-mid);
}

.btn-nav-signin,
.drawer-signin {
  font-size: 14px;
  font-weight: 500;
  color: var(--mid);
  text-decoration: none;
  padding: 9px 12px;
  white-space: nowrap;
  transition: color 0.18s;
}

.drawer-signin {
  display: block;
  text-align: center;
  font-weight: 600;
  padding: 10px 16px;
}

.btn-nav-signin:hover,
.drawer-signin:hover {
  color: var(--ink);
}

.btn-nav-outline,
.drawer-demo-outline {
  font-size: 14px;
  font-weight: 700;
  color: var(--teal);
  background: transparent;
  text-decoration: none;
  padding: 9px 20px;
  border: 1.5px solid var(--teal);
  border-radius: 100px;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}

.drawer-demo-outline {
  display: block;
  text-align: center;
  padding: 11px 24px;
}

.btn-nav-outline:hover,
.drawer-demo-outline:hover {
  background: var(--teal);
  color: var(--white);
}

footer {
  border-top: 1px solid var(--light);
  background: var(--white);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy {
  font-family: var(--mono);
  font-size: 11px;
  color: #bbb;
}

@media (min-width: 1101px) {
  .nav-hamburger, .nav-drawer, .nav-overlay { display: none !important; }
}

@keyframes drawerIn {
  from { opacity: 0; transform: scaleY(0.95); }
  to   { opacity: 1; transform: scaleY(1); }
}

@media (max-width: 1100px) {
  nav.main-nav {
    padding: 0 20px;
  }

  .nav-links,
  .nav-right {
    display: none;
  }

  .nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 6px;
    flex-shrink: 0;
  }

  .nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-hamburger:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

  .nav-drawer {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    z-index: 99;
    background: var(--white);
    border-bottom: 1px solid var(--light);
    padding: 8px 0 20px;
    transform-origin: top;
    animation: drawerIn 0.22s ease forwards;
  }
  .nav-drawer.is-open {
    display: block;
  }

  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 98;
    background: rgba(0, 0, 0, 0.25);
  }
  .nav-overlay.is-open {
    display: block;
  }

  .drawer-link {
    display: block;
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 500;
    color: var(--mid);
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
  }
  .drawer-link:hover {
    color: var(--ink);
    background: var(--off-white);
  }
  .drawer-link:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: -2px;
  }

  .drawer-divider {
    height: 1px;
    background: var(--light);
    margin: 8px 0;
  }

  .drawer-actions {
    padding: 12px 24px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .drawer-signin {
    display: block;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--mid);
    text-decoration: none;
    padding: 10px 16px;
    transition: color 0.18s;
  }
  .drawer-signin:hover { color: var(--ink); }

  .drawer-demo {
    display: block;
    text-align: center;
    background: var(--teal);
    color: var(--white);
    font-size: 15px;
    font-weight: 700;
    border-radius: 100px;
    padding: 13px 24px;
    text-decoration: none;
    transition: background 0.18s;
  }
  .drawer-demo:hover { background: var(--teal-mid); }

  .drawer-demo-outline {
    display: block;
    text-align: center;
    background: transparent;
    color: var(--teal);
    font-size: 15px;
    font-weight: 700;
    border: 1.5px solid var(--teal);
    border-radius: 100px;
    padding: 11px 24px;
    text-decoration: none;
    transition: background 0.18s, color 0.18s;
  }
  .drawer-demo-outline:hover {
    background: var(--teal);
    color: var(--white);
  }

  .footer-inner {
    padding: 28px 24px;
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
    gap: 18px;
  }
}
