/* ----------------------------------------
   Header + Navigation
---------------------------------------- */

#header {
  position: relative;
  width: 100%;
  background: #333;
  color: #fff;
  margin: 0;
  padding: 0;
}

/* Desktop nav */
#nav {
  position: fixed;
  top: var(--nav-top-offset);
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 1000;
}

#nav > ul {
  display: inline-block;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 0.35em;
  box-shadow: inset 0px 0px 1px 1px rgba(255, 255, 255, 0.25);
  padding: 0 1.5em;
}

#nav > ul > li {
  display: inline-block;
  padding: 0 1.5em;
}

#nav > ul > li > a {
  display: block;
  color: #cd533b;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 0.9em;
  letter-spacing: 0.25em;
  height: var(--nav-height);
  line-height: var(--nav-height);
  transition: all 0.25s ease-in-out;
}

#nav > ul > li:hover > a,
#nav > ul > li.active > a {
  color: #fff;
}

/* ----------------------------------------
   Hamburger (TitleBar + Panel)
---------------------------------------- */

#titleBar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  height: 44px;
  width: 100%;
  z-index: 10001;
  text-align: left;
  padding: 0.5em;
}

#titleBar .toggle {
  display: block;
  width: 44px;
  height: 34px;
  line-height: 34px;
  text-align: center;
  color: #cd533b;
  background: rgba(92, 95, 103, 0.5);
  border-radius: 0.25em;
  transition: background 0.15s ease-in-out;
  cursor: pointer;
}

#titleBar .toggle:hover {
  background: rgba(92, 95, 103, 0.75);
}

#navPanel {
  display: none;
  position: fixed;
  left: 0;
  top: var(--nav-top-offset);
  width: auto;
  margin: 0 1em;
  background: rgba(44, 50, 63, 0.95);
  padding: 1.25em 1em;
  box-shadow: inset -3px 0 4px rgba(0, 0, 0, 0.1);
  z-index: 10002;
  overflow-y: auto;
}

body.navPanel-visible #navPanel {
  display: block;
}

#navPanel ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#navPanel li {
  margin: 0;
  padding: 0;
}

#navPanel a {
  display: block;
  padding: 0.5em 0;
  text-transform: uppercase;
  font-size: 1em;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

#navPanel a:hover {
  color: #fff;
}

#navPanel li.current > a {
  color: #cd533b;
}

#nav > ul > li.current > a {
  color: #fff;
}
/* ----------------------------------------
   HERO (Header Image + Overlay)
---------------------------------------- */

#logo {
  position: relative;
  text-align: center;
  overflow: hidden;
}

/* Single, consistent hero height rule */
#logo .header-image {
  width: 100%;
  height: clamp(320px, 70vh, 820px);
  object-fit: cover;
  display: block;
  z-index: 0;
}

/* Overlay centered between nav and bottom */
#logo .hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  /* reserve space for fixed nav so overlay content never sits under it */
  padding-top: calc(var(--nav-top-offset) + var(--nav-height) + 1.25rem);
  padding-left: var(--hero-gutter);
  padding-right: var(--hero-gutter);
  padding-bottom: 1.25rem;

  gap: 0.6rem;
  z-index: 2;
}

#logo .overlay-text {
  position: static;
  transform: none;
  max-width: min(1100px, 95vw);
  padding-bottom: 1.25rem;
  text-align: center;
  color: #fff;
  margin: 0 0 0.5rem 0;
}

#logo .overlay-text h1 {
  margin: 0;
  padding-bottom: 2rem;
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1.05;
  text-shadow:
    1px 1px 2px black,
    0 0 25px #cd533b,
    0 0 15px #cd533b;
}

/* Quote + paragraph box */
#logo .hero-message {
  position: static;
  transform: none;
  width: min(var(--hero-max-width), 92vw);
  text-align: center;

  background: rgba(0, 0, 0, 0.69);
  padding: clamp(0.75rem, 1.4vw, 1.05rem) clamp(0.9rem, 2vw, 1.4rem);
  border-radius: var(--card-radius);
}

#logo .hero-quote {
  margin: 0 0 0.35em 0;
  font-style: italic;
  font-size: clamp(1.1rem, 1.7vw, 1.45rem);
  line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95);
}

#logo .hero-attrib {
  margin: 0 0 0.8em 0;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  opacity: 0.9;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95);
}

#logo .hero-leadin {
  margin: 0;
  font-size: clamp(1rem, 1.55vw, 1.25rem);
  line-height: 1.65;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95);
}

#logo::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  z-index: 1;
  pointer-events: none;

  /* fade into the page background */
  background: linear-gradient(
    to bottom,
    rgba(245, 245, 245, 0) 0%,
    rgba(245, 245, 245, 0.9) 100%
  );
}

#logo .hero-title {
  margin: 0 0 0.45rem 0;
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.05;
  color: #fff;
  text-shadow:
    1px 1px 2px #000,
    0 0 18px #cd533b,
    0 0 10px #cd533b;
}

#logo .hero-message .actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

#logo .hero-message .actions .button {
  flex: 1;
  text-align: center;
  max-width: 280px;
}

/* ----------------------------------------
   Responsive: hamburger mode
---------------------------------------- */

@media screen and (max-width: 768px) {
  #nav {
    display: none;
  }

  #titleBar {
    display: block;
  }

  #logo .header-image {
    height: clamp(280px, 55vh, 560px);
  }

  #logo .hero-overlay {
    padding-top: calc(44px + 1rem); /* titleBar height */
    padding-left: 1rem;
    padding-right: 1rem;
    gap: 0.9rem;
  }

  #navPanel a {
    font-size: 0.95em;
    padding: 0.45em 0;
  }
}
