/* Shared top bar, styled after the homepage: logo on the left, links and
   Sign In / Sign Up on the right, white over the photos. Pages without a
   photo behind the bar add .site-top--light for dark text on cream. */
.site-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(1rem, 2.4vh, 1.8rem) clamp(2rem, 5vw, 5rem);
  pointer-events: none;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}
.site-top > * { pointer-events: auto; }
.site-top__logo { display: block; line-height: 0; }
.site-top__logo img {
  display: block;
  height: clamp(40px, 4.4vw, 64px);
  width: auto;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.5));
}
.site-top__logo .site-top__logo-dark { display: none; filter: none; }
.site-top__nav { display: flex; align-items: center; gap: 0.35rem; }
.site-top__nav a {
  padding: 0.72rem 0.6rem;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
  transition: color 0.18s ease, transform 0.18s ease;
}
.site-top__nav a:hover { color: #b8d98a; }
.site-top__nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: #b8d98a;
}
.site-top__nav .site-top__signin { margin-left: 0.4rem; }
.site-top__nav a:focus-visible,
.site-top__menu:focus-visible,
.site-top__logo:focus-visible { outline: 2px solid #b8d98a; outline-offset: 3px; border-radius: 4px; }
.site-top__menu {
  display: none;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: rgba(15, 43, 26, 0.35);
  color: #ffffff;
  font: 700 14px/1 "Plus Jakarta Sans", system-ui, sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.site-top__menu[aria-expanded="true"] { background: #ffffff; color: #1e3a2b; }

.site-top--light {
  position: sticky;
  background: rgba(246, 243, 234, 0.94);
  box-shadow: 0 1px 0 #e2ded0;
  backdrop-filter: blur(8px);
}
.site-top--light .site-top__logo .site-top__logo-light { display: none; }
.site-top--light .site-top__logo .site-top__logo-dark { display: block; }
.site-top--light .site-top__nav a { color: #1e3a2b; text-shadow: none; }
.site-top--light .site-top__nav a:hover { color: #3e6b1f; }
.site-top--light .site-top__nav a[aria-current="page"] { text-decoration-color: #6fa83d; }
.site-top--light .site-top__nav a:focus-visible,
.site-top--light .site-top__menu:focus-visible,
.site-top--light .site-top__logo:focus-visible { outline-color: #6fa83d; }
.site-top--light .site-top__menu { border-color: #1e3a2b; background: transparent; color: #1e3a2b; }
.site-top--light .site-top__menu[aria-expanded="true"] { background: #1e3a2b; color: #f6f3ea; }

@media (max-width: 960px) {
  .site-top--js .site-top__menu { display: inline-flex; align-items: center; }
  .site-top--js .site-top__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: clamp(1.25rem, 4vw, 4rem);
    right: clamp(1.25rem, 4vw, 4rem);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0;
    border-radius: 14px;
    background: #1e3a2b;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  }
  .site-top--js .site-top__nav.is-open { display: flex; }
  .site-top--js .site-top__nav a {
    padding: 14px 20px;
    color: #f6f3ea;
    font-size: 16px;
    text-shadow: none;
    border-top: 1px solid rgba(246, 243, 234, 0.12);
  }
  .site-top--js .site-top__nav a:first-child { border-top: 0; }
  .site-top--js .site-top__nav .site-top__signin { margin-left: 0; color: #b8d98a; }
}
@media (prefers-reduced-motion: reduce) {
  .site-top__nav a { transition: none; }
}

/* Logo: the "sbi software" wordmark, drawn in code so it stays sharp. The
   letters follow currentColor: white over photos, forest on cream pages.
   The two leaves on the "i" keep their greens either way. */
.site-top__logo {
  display: flex;
  align-items: flex-end;
  gap: 1px;
  color: #ffffff;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1;
  text-decoration: none;
  filter: drop-shadow(0 1px 8px rgba(0, 0, 0, 0.45));
}
.site-top__mark { display: block; flex: none; width: auto; height: 1.72em; overflow: visible; }
.site-top__word {
  margin-left: -0.14em;
  padding-bottom: 0.14em;
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: 1em;
  font-weight: 400;
  color: #eef4e6;
  white-space: nowrap;
}
.site-top--light .site-top__logo { color: #1e3a2b; filter: none; }
.site-top--light .site-top__word { color: #1e3a2b; }
@media (max-width: 600px) {
  .site-top__logo { font-size: 20px; }
}

/* The logo keeps its colours on hover, focus and after a visit: page-level
   link rules must not recolour it. */
.site-top a.site-top__logo,
.site-top a.site-top__logo:link,
.site-top a.site-top__logo:visited,
.site-top a.site-top__logo:hover,
.site-top a.site-top__logo:focus,
.site-top a.site-top__logo:active { color: #ffffff; text-decoration: none; }
.site-top--light a.site-top__logo,
.site-top--light a.site-top__logo:link,
.site-top--light a.site-top__logo:visited,
.site-top--light a.site-top__logo:hover,
.site-top--light a.site-top__logo:focus,
.site-top--light a.site-top__logo:active { color: #1e3a2b; }
.site-top a.site-top__logo:hover .site-top__mark { opacity: 0.88; }

/* Line the logo up with the page text: the photo screens use 1.5rem on
   phones, and the cream pages use the shared page gutter. */
@media (max-width: 768px) {
  .site-top { padding-left: 1.5rem; padding-right: 1.5rem; }
}

/* Once the page has scrolled, the bar gets a solid green background so
   content passing underneath never shows through the logo and menu. */
.site-top.site-top--solid {
  background: #0f2b1a;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  transition: background-color 0.2s ease;
}
.site-top--light.site-top--solid { background: #f6f3ea; box-shadow: 0 1px 0 #e2ded0; }
@media (max-width: 600px) {
  .site-top { padding: 12px 1.25rem; }
  .site-top__menu { min-height: 44px; }
}

/* Phones and tablets: the menu opens as a full-screen green panel under the
   logo and the Close button, instead of a card dropped over the page. */
@media (max-width: 960px) {
  .site-top--js .site-top__nav {
    position: fixed;
    inset: 0;
    z-index: -1;
    left: 0;
    right: 0;
    top: 0;
    justify-content: flex-start;
    padding: 104px 1.5rem 2rem;
    border-radius: 0;
    background: #0f2b1a;
    box-shadow: none;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .site-top--js .site-top__nav.is-open { display: flex; animation: site-top-sheet 0.22s ease both; }
  .site-top--js .site-top__nav a {
    padding: 18px 0;
    color: #ffffff;
    font-size: clamp(1.5rem, 6.4vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    border-top: 1px solid rgba(184, 217, 138, 0.22);
  }
  .site-top--js .site-top__nav a:first-child { border-top: 0; }
  .site-top--js .site-top__nav a[aria-current="page"] { color: #b8d98a; text-decoration: none; }
  .site-top--js .site-top__nav .site-top__signin {
    margin-top: 1.5rem;
    padding: 14px 22px;
    border: 0;
    border-radius: 999px;
    align-self: flex-start;
    background: #a8d86a;
    color: #1e3a2b;
    font-size: 1rem;
    letter-spacing: 0;
  }
  .site-top--js.site-top--menu-open { background: transparent; box-shadow: none; }
  .site-top--menu-open .site-top__menu { background: #ffffff; color: #1e3a2b; border-color: #ffffff; }
  .site-top--light.site-top--menu-open .site-top__logo,
  .site-top--light.site-top--menu-open .site-top__word { color: #ffffff; }
  html.site-menu-open, html.site-menu-open body { overflow: hidden; }
  .site-top--menu-open .site-top__mark, .site-top--menu-open .site-top__mark text { color: #ffffff; fill: currentColor; }
  .site-top--light.site-top--menu-open { position: fixed; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: transparent; }
  .site-top--light.site-top--menu-open .site-top__menu,
  .site-top--light.site-top--menu-open .site-top__menu[aria-expanded="true"] { background: #ffffff; color: #1e3a2b; border-color: #ffffff; }
}
@keyframes site-top-sheet { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .site-top--js .site-top__nav.is-open { animation: none; }
}

/* Taps: no grey highlight box flashing over links and buttons on phones
   (keyboard focus rings are unchanged). Between pages, a short crossfade
   instead of a blank flash, where the browser supports it. */
html { -webkit-tap-highlight-color: transparent; }
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.28s; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
}

/* The top bar and the corner icons hold still while one page crossfades
   into the next, so only the content changes. */
.site-top { view-transition-name: site-top; }
body.has-scenes .site-foot { view-transition-name: site-foot; }

.site-top__group { position: relative; display: flex; align-items: center; }
.site-top__sub {
  position: absolute;
  top: calc(100% + 6px);
  left: 0.6rem;
  z-index: 2;
  width: max-content;
  padding: 6px 0;
  border-radius: 8px;
  background: #0f2b1a;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0s linear 0.15s;
}
.site-top__sub::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 16px; }
.site-top__group:hover .site-top__sub,
.site-top__group:focus-within .site-top__sub {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.site-top__nav .site-top__sub-link {
  display: block;
  padding: 12px 18px;
  color: #ffffff;
  white-space: normal;
  text-shadow: none;
}
.site-top__nav .site-top__sub-link + .site-top__sub-link { border-top: 1px solid rgba(184, 217, 138, 0.14); }
.site-top__nav .site-top__sub-link:hover { background: rgba(168, 216, 106, 0.08); color: #ffffff; }
.site-top__nav .site-top__sub-link[aria-current="page"] { text-decoration: none; }
.site-top__nav .site-top__sub-link:focus-visible { outline: 2px solid #b8d98a; outline-offset: -2px; border-radius: 4px; }
.site-top__sub-name {
  display: block;
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
}
.site-top__sub-for {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.64);
}
.site-top__nav .site-top__sub-link:hover .site-top__sub-name,
.site-top__nav .site-top__sub-link[aria-current="page"] .site-top__sub-name { color: #b8d98a; }
@media (min-width: 961px) {
  .site-top__group.is-dismissed .site-top__sub { opacity: 0; visibility: hidden; pointer-events: none; }
  .site-top--light .site-top__sub { background: #f6f3ea; box-shadow: 0 0 0 1px #e2ded0, 0 10px 24px rgba(30, 58, 43, 0.1); }
  .site-top--light .site-top__nav .site-top__sub-link { color: #1e3a2b; }
  .site-top--light .site-top__nav .site-top__sub-link + .site-top__sub-link { border-top-color: #e2ded0; }
  .site-top--light .site-top__nav .site-top__sub-link:hover { background: #ece7d9; color: #1e3a2b; }
  .site-top--light .site-top__sub-for { color: #5d6b61; }
  .site-top--light .site-top__nav .site-top__sub-link:hover .site-top__sub-name,
  .site-top--light .site-top__nav .site-top__sub-link[aria-current="page"] .site-top__sub-name { color: #3e6b1f; }
  .site-top--light .site-top__nav .site-top__sub-link:focus-visible { outline-color: #6fa83d; }
}
@media (prefers-reduced-motion: reduce) {
  .site-top__sub { transition: none; }
}
@media (max-width: 960px) {
  .site-top--js .site-top__group { flex-direction: column; align-items: stretch; }
  .site-top--js .site-top__sub {
    position: static;
    left: auto;
    width: auto;
    margin: 0 0 18px;
    padding: 0 0 0 16px;
    border-left: 2px solid rgba(184, 217, 138, 0.3);
    border-radius: 0;
    background: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .site-top--js .site-top__sub::before { display: none; }
  .site-top--js .site-top__nav .site-top__sub-link,
  .site-top--js .site-top__nav .site-top__sub-link + .site-top__sub-link {
    padding: 8px 0;
    border-top: 0;
    background: none;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0;
  }
  .site-top--js .site-top__sub-name { font-size: 1.3rem; }
  .site-top--js .site-top__sub-for { white-space: normal; font-size: 0.88rem; color: rgba(255, 255, 255, 0.62); }
}
