:root {
  --bg: #070a0f;
  --bg-alt: #0c1118;
  --surface: #121a26;
  --surface-hover: #1a2433;
  --text: #edf1f7;
  --muted: #b7c1cf;
  --accent: #c89f5a;
  --accent-strong: #f4deb3;
  --line: #4f5a68;
  --shadow: rgba(0, 0, 0, 0.45);
  --header-top-bg: rgba(7, 11, 17, 0.18);
  --header-scrolled-bg: rgba(7, 11, 17, 0.93);
  --header-border: rgba(112, 127, 145, 0.58);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, #05070b 62%, #040507 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(
      circle at 12% -8%,
      rgba(200, 159, 90, 0.2),
      transparent 42%
    ),
    radial-gradient(
      circle at 86% 4%,
      rgba(96, 114, 138, 0.18),
      transparent 40%
    ),
    linear-gradient(transparent 96%, rgba(200, 159, 90, 0.08) 100%);
  background-size:
    auto,
    auto,
    100% 34px;
}

.site-header {
  position: fixed;
  top: 0.9rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(1240px, calc(100% - 1.6rem));
  margin: 0;
  padding: 0.64rem 0.76rem;
  z-index: 90;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--header-top-bg);
  box-shadow: none;
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.74rem;
  isolation: isolate;
  transition:
    top 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    backdrop-filter 180ms ease;
}

.site-header::before {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  top: 0;
  height: 2px;
  border-radius: 999px;
  pointer-events: none;
  background: var(--accent);
  opacity: 0;
  transition: opacity 180ms ease;
  z-index: -1;
}

body.is-scrolled .site-header {
  top: 0.45rem;
  border-color: var(--header-border);
  background: var(--header-scrolled-bg);
  box-shadow: 0 16px 34px -24px rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
}

body.is-scrolled .site-header::before {
  opacity: 0.72;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.56rem;
  color: inherit;
  text-decoration: none;
  margin-top: 0;
  padding: 0.28rem 0.4rem;
  border-radius: 7px;
  border: 1px solid rgba(150, 165, 183, 0.4);
  background: rgba(8, 14, 22, 0.66);
}

.brand-mark {
  width: 2.9rem;
  aspect-ratio: 1.72;
  border-radius: 0;
  display: inline-block;
  background: url("/Pictures/ODY%20Leo.webp") center / contain no-repeat;
  border: none;
  box-shadow: none;
  font-size: 0;
  color: transparent;
  line-height: 0;
}

.brand-text {
  font-size: 0.88rem;
  letter-spacing: 0.015em;
  line-height: 1.2;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.42rem;
}

.header-auth {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.auth-btn {
  border: 1px solid rgba(116, 133, 153, 0.72);
  background: rgba(11, 18, 28, 0.9);
  color: #dde7f6;
  border-radius: 9px;
  padding: 0.56rem 0.8rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  max-width: 210px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: none;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

.auth-btn:hover {
  border-color: rgba(193, 157, 94, 0.86);
  background: rgba(14, 22, 34, 0.96);
}

.auth-btn-alt {
  border-color: rgba(152, 120, 71, 0.66);
  background: rgba(29, 21, 11, 0.78);
  color: #f6e4c2;
  font-size: 0.77rem;
}

.nav-group {
  position: relative;
  min-width: 146px;
}

.nav-group summary {
  list-style: none;
  color: #e5ecf6;
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.52rem 0.76rem;
  border-radius: 8px;
  border: 1px solid rgba(133, 147, 163, 0.62);
  background: rgba(9, 16, 25, 0.86);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.62rem;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

body:not(.is-scrolled) .nav-group summary {
  background: rgba(9, 16, 25, 0.42);
  border-color: rgba(193, 205, 219, 0.28);
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary::after {
  content: "▾";
  color: var(--accent);
  font-size: 0.65rem;
  transform: translateY(-1px);
}

.nav-group summary:hover {
  border-color: rgba(197, 160, 98, 0.88);
  background: rgba(12, 20, 31, 0.96);
  box-shadow: inset 0 -2px 0 rgba(200, 159, 90, 0.55);
}

.nav-group[open] summary {
  border-color: rgba(197, 160, 98, 0.92);
  background: rgba(13, 21, 33, 0.98);
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 0.34rem);
  left: 0;
  min-width: max(100%, 220px);
  border-radius: 8px;
  border: 1px solid rgba(118, 133, 154, 0.72);
  background: rgba(7, 12, 20, 0.98);
  box-shadow: 0 18px 30px -24px rgba(0, 0, 0, 0.95);
  overflow: hidden;
  z-index: 20;
}

.dropdown-panel a {
  display: block;
  color: #c8d4e3;
  text-decoration: none;
  font-size: 0.84rem;
  padding: 0.56rem 0.74rem;
  border-bottom: 1px solid rgba(44, 56, 74, 0.88);
  transition:
    color 160ms ease,
    background-color 160ms ease;
}

.dropdown-panel a:last-child {
  border-bottom: none;
}

.dropdown-panel a:hover {
  color: var(--text);
  background: rgba(200, 159, 90, 0.16);
}

main {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4.8rem 0 0.8rem;
  display: grid;
  gap: 1.25rem;
}

.hero {
  position: relative;
  overflow: hidden;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: min(72vh, 640px);
  padding: clamp(5.1rem, 10vh, 7.2rem) clamp(1.2rem, 5vw, 3.2rem) 2rem;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(4, 7, 11, 0.42) 0%,
      rgba(4, 7, 11, 0.64) 52%,
      rgba(4, 7, 11, 0.88) 100%
    ),
    url("./Pictures/SAHP%20Pics/SAHP5.png") center 48% / cover no-repeat;
  transform: scale(1.01);
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    transparent 40%,
    rgba(0, 0, 0, 0.36) 100%
  );
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
  max-width: 980px;
}

.eyebrow {
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.8rem;
  margin: 0 0 0.9rem;
}

.eyebrow-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.34rem;
}

.eyebrow-logo {
  width: 1.28rem;
  height: 0.84rem;
  flex: 0 0 auto;
  background: url("/Pictures/ODY%20Leo.webp") center / contain no-repeat;
}

h1,
h2,
h3 {
  font-family: "Barlow Condensed", sans-serif;
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

.hero-copy {
  color: #edf2f9;
  margin: 1.1rem 0 1.5rem;
  max-width: 70ch;
  line-height: 1.7;
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.42);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.app-actions {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.app-actions .btn {
  width: 100%;
  min-height: 2.9rem;
  text-align: center;
}

.btn {
  text-decoration: none;
  font-weight: 600;
  padding: 0.78rem 1.2rem;
  border-radius: 10px;
  border: 1px solid transparent;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #17120a;
  border: 1px solid rgba(246, 221, 171, 0.82);
  background: var(--accent);
  box-shadow: 0 10px 18px -14px rgba(200, 159, 90, 0.72);
}

.btn-primary:hover {
  background: #d9af6a;
  box-shadow: 0 14px 24px -18px rgba(200, 159, 90, 0.78);
}

.btn-ghost {
  border-color: rgba(118, 133, 154, 0.78);
  color: #d8e4f2;
  background: rgba(9, 15, 23, 0.9);
}

.btn-ghost:hover {
  border-color: rgba(200, 159, 90, 0.74);
  background: rgba(12, 19, 28, 0.96);
}

.dept-section {
  padding: 0.25rem 0 0.35rem;
}

.section-heading h2 {
  font-size: clamp(1.85rem, 4vw, 3rem);
}

.dept-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.dept-card {
  background: rgba(17, 25, 36, 0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem;
  box-shadow: 0 12px 34px -26px var(--shadow);
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background-color 160ms ease;
}

.dept-card:hover {
  border-color: rgba(200, 159, 90, 0.86);
  transform: translateY(-4px);
  background: rgba(21, 30, 43, 0.95);
}

.dept-tag {
  display: inline-flex;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-strong);
}

.dept-card h3 {
  font-size: 1.5rem;
  margin-top: 0.35rem;
}

.dept-card p {
  margin: 0.65rem 0 0.95rem;
  color: var(--muted);
  line-height: 1.6;
}

.inline-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(200, 159, 90, 0.56);
}

.operations {
  margin-top: 0;
  padding: 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(13, 20, 31, 0.9);
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.op-item {
  display: grid;
  gap: 0.1rem;
}

.op-item strong {
  font-family: "Barlow Condensed", sans-serif;
  color: var(--accent-strong);
  font-size: 2rem;
  line-height: 1;
}

.op-item span {
  color: var(--muted);
  font-size: 0.92rem;
}

.join {
  margin: 0;
  padding: 1.6rem;
  border-radius: 16px;
  background: rgba(11, 18, 28, 0.94);
  border: 1px solid rgba(108, 123, 144, 0.62);
}

.join h2 {
  margin-top: 0.2rem;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.join p {
  color: var(--muted);
  line-height: 1.7;
  max-width: 62ch;
}

.site-footer {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.2rem 0 2rem;
  color: #96a4b6;
  font-size: 0.86rem;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 500ms ease,
    transform 500ms ease;
  transition-delay: var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .dept-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operations {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .site-header {
    top: 0.4rem;
    width: calc(100% - 1rem);
    align-items: flex-start;
    flex-direction: column;
  }

  body.is-scrolled .site-header {
    top: 0.2rem;
  }

  .brand {
    width: 100%;
  }

  .site-nav {
    width: 100%;
    justify-content: stretch;
  }

  .header-auth {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }

  .nav-group {
    width: 100%;
    min-width: 0;
  }

  .dropdown-panel {
    position: static;
    margin-top: 0.35rem;
  }

  main {
    padding-top: 6.2rem;
  }

  .hero {
    min-height: 62vh;
    padding-top: 6rem;
  }

  .app-actions {
    grid-template-columns: 1fr;
  }

  .dept-grid,
  .operations {
    grid-template-columns: 1fr;
  }

  .join {
    padding: 1.4rem;
  }
}
