/* Additions the static build needs on top of the migrated styles.css.
 *
 * styles.css is a byte-for-byte copy of the React prototype's stylesheet, so
 * anything the vanilla build requires lives here instead of being mixed into it.
 *
 * The step panels and the success panel are hidden with the `hidden` attribute,
 * but styles.css sets `display: grid` / `display: flex` on those elements. An
 * attribute selector and a class selector have the same specificity, so the
 * author rule would win over the user-agent `[hidden]` rule without `!important`.
 */
[hidden] {
  display: none !important;
}

/* ============================================================
 * Nav: bolder links + current-section highlight (theme green)
 * ============================================================ */

/* Desktop only — the mobile menu keeps its light Barlow Condensed look. */
@media (min-width: 821px) {
  .primary-nav a {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  .primary-nav a:hover,
  .primary-nav a.is-current {
    color: var(--brand);
  }

  /* Underline: 2px gradient bar that sweeps in from the left. */
  .primary-nav a::after {
    bottom: -7px;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-bright), var(--brand));
    transform-origin: left;
    transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  /* Keep the underline bar shown while the section is on screen. */
  .primary-nav a.is-current::after {
    transform: scaleX(1);
  }
}

@media (max-width: 820px) {
  /* The header's backdrop-filter makes it the containing block for the fixed
     nav panel, collapsing `bottom: 0` to zero height — the panel looked
     transparent. Dropping the filter restores proper full-viewport height. */
  .site-header {
    backdrop-filter: none;
  }

  .primary-nav {
    background: #000;
  }

  .primary-nav a.is-current {
    color: var(--brand-bright);
  }
}

/* ============================================================
 * Hero banner slider — layered on top of styles.css
 * ============================================================ */

.hero-slider {
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease;
}

.hero-slide.is-active {
  z-index: 1;
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Slow settle-in zoom on the incoming slide */
.hero-slide.is-active img {
  animation: hero-settle 7s ease-out forwards;
}

@keyframes hero-settle {
  from {
    transform: scale(1.06);
  }
  to {
    transform: scale(1);
  }
}

/* Line-style indicators, bottom-left of the image area */
.hero-slider__dots {
  position: absolute;
  z-index: 3;
  left: clamp(24px, 4vw, 74px);
  bottom: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-slider__dots button {
  width: 30px;
  height: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  position: relative;
}

.hero-slider__dots button::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  background: rgba(23, 35, 30, 0.28);
  transform: translateY(-50%);
  transition: background 300ms ease;
}

.hero-slider__dots button.is-active::before {
  background: var(--brand);
}

.hero-slider__dots button:hover::before,
.hero-slider__dots button:focus-visible::before {
  background: var(--forest);
}

/* Prev / next arrows flanking the visible image area */
.hero-slider__arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: white;
  background: rgba(3, 40, 30, 0.35);
  backdrop-filter: blur(4px);
  transform: translateY(-50%);
  transition: background 180ms ease, border-color 180ms ease;
}

.hero-slider__arrow svg {
  width: 16px;
  height: 16px;
}

.hero-slider__arrow--prev {
  left: clamp(24px, 3vw, 54px);
}

.hero-slider__arrow--prev svg {
  transform: rotate(90deg);
}

/* Keeps the arrow just outside the dark hero panel (its width is
   max(480px, min(38vw, 610px)) from styles.css). */
.hero-slider__arrow--next {
  right: calc(max(480px, min(38vw, 610px)) + 24px);
}

.hero-slider__arrow--next svg {
  transform: rotate(-90deg);
}

.hero-slider__arrow:hover,
.hero-slider__arrow:focus-visible {
  border-color: var(--brand);
  background: var(--brand);
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition: none;
  }

  .hero-slide.is-active img {
    animation: none;
  }
}

@media (max-width: 820px) {
  .hero-slider__arrow {
    display: none;
  }

  .hero-slider__dots {
    left: 22px;
    bottom: 24px;
  }

  .hero-slider__dots button::before {
    background: rgba(255, 255, 255, 0.45);
  }

  .hero-slider__dots button.is-active::before {
    background: var(--brand-bright);
  }
}


/* ============================================================
 * Nav dropdown (secondary menu) — layered on top of styles.css
 * Design language: square corners, 1px hairlines, forest green
 * ============================================================ */

.nav-dropdown > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-dropdown > a svg {
  width: 11px;
  height: 11px;
  margin-top: 1px;
  transition: transform 220ms ease;
}

.nav-dropdown:hover > a svg,
.nav-dropdown:focus-within > a svg {
  transform: rotate(180deg);
}

/* Floating panel */
.nav-dropdown-menu {
  top: calc(100% + 14px);
  min-width: 250px;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 24px 55px rgba(6, 53, 40, 0.18);
  transform: translateX(-50%) translateY(8px);
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms;
}

/* Pointer caret connecting panel to trigger */
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -5.5px;
  left: 50%;
  width: 10px;
  height: 10px;
  background: var(--white);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  transform: translateX(-50%) rotate(45deg);
}

/* Small uppercase label above the links */
.nav-dropdown-label {
  margin: 10px 12px 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-dropdown-menu a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 2px;
  padding: 0 12px 0 16px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 160ms ease, padding-left 200ms ease;
}

.nav-dropdown-menu a:last-child {
  margin-bottom: 0;
}

/* Green indicator bar on the left of each item */
.nav-dropdown-menu a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  background: var(--brand);
  transform: translateY(-50%);
  transition: height 220ms ease;
}

/* Arrow chevron — overrides the inherited .primary-nav underline pseudo */
.nav-dropdown-menu a::after {
  position: static;
  right: auto;
  bottom: auto;
  left: auto;
  display: block;
  width: 7px;
  height: 7px;
  margin-left: auto;
  content: "";
  background: transparent;
  border-top: 2px solid var(--brand);
  border-right: 2px solid var(--brand);
  opacity: 0;
  transform: rotate(45deg) scale(0.6);
  transition: opacity 200ms ease, transform 200ms ease;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible {
  padding-left: 22px;
  background: #edf4ef;
}

.nav-dropdown-menu a:hover::before,
.nav-dropdown-menu a:focus-visible::before {
  height: 22px;
}

.nav-dropdown-menu a:hover::after,
.nav-dropdown-menu a:focus-visible::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

/* Mobile: the panel becomes a flat section of the full-screen menu */
@media (max-width: 820px) {
  .nav-dropdown {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-dropdown > a svg {
    display: none;
  }

  .nav-dropdown-menu {
    position: static;
    min-width: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }

  .nav-dropdown-menu::before,
  .nav-dropdown-label,
  .nav-dropdown-menu a::after {
    display: none;
  }

  .nav-dropdown-menu a {
    min-height: 56px;
    margin: 0;
    padding: 0 0 0 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-family: "Barlow Condensed", Arial Narrow, sans-serif;
    font-size: 21px;
    font-weight: 300;
  }

  .nav-dropdown-menu a::before {
    width: 2px;
    height: 20px;
    background: var(--brand-bright);
  }

  .nav-dropdown-menu a:hover,
  .nav-dropdown-menu a:focus-visible {
    padding-left: 28px;
    background: rgba(255, 255, 255, 0.05);
  }

  .nav-dropdown-menu a:hover::before,
  .nav-dropdown-menu a:focus-visible::before {
    height: 20px;
  }
}

/* Mobile: show the full banner image (no crop). The image keeps its natural
 * aspect ratio at full width and the text panel stacks below it instead of
 * overlaying it with a translucent veil. */
@media (max-width: 820px) {
  .hero {
    min-height: 0;
  }

  .hero-slider {
    position: relative;
    inset: auto;
  }

  .hero-slide {
    position: static;
    display: none;
  }

  .hero-slide.is-active {
    display: block;
  }

  .hero-slide img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .hero-slide.is-active img {
    animation: none;
  }

  .hero__panel {
    position: static;
    min-height: 0;
    width: auto;
    background: var(--forest-deep);
  }
}
