/* ── Header ─────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--ink);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  /* Blur on a pseudo-element so it does NOT become a containing block
     for position:fixed mobile nav (backdrop-filter on the header itself
     would trap the drawer inside the 72px header). */
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(58, 58, 58, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}

.site-header__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 100%;
  gap: 1.5rem;
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.site-header__logo img {
  height: 64px;
  width: auto;
}

.site-header__brand-name {
  font-size: clamp(0.78rem, 1.1vw, 0.95rem);
  font-weight: 600;
  color: inherit;
  line-height: 1.25;
  max-width: 18rem;
}

@media (max-width: 900px) {
  .site-header__brand-name {
    display: none;
  }
}

#site-nav {
  margin-left: auto;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #fff;
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  position: relative;
}

.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease;
}

.nav-toggle__bar::before {
  top: -7px;
}

.nav-toggle__bar::after {
  top: 7px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list > li > a,
.nav-list > li > button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-list > li > a:hover,
.nav-list > li > button:hover,
.nav-list > li > a[aria-current="page"] {
  color: var(--brand-orange);
}

.has-dropdown {
  position: relative;
}

.has-dropdown > a::after,
.has-dropdown > button::after {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  margin-left: 0.15rem;
}

.has-dropdown .dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 220px;
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 110;
}

.has-dropdown .dropdown a {
  display: block;
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.has-dropdown .dropdown a:hover {
  color: var(--brand-orange);
  background: rgba(252, 109, 58, 0.06);
}

@media (min-width: 901px) {
  .has-dropdown:hover .dropdown,
  .has-dropdown:focus-within .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

.lang-switch {
  margin-left: 0.5rem;
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  transition: color 0.2s ease;
}

.lang-switch a:hover {
  color: var(--brand-orange);
}

/* ── Mobile nav ─────────────────────────────────────────── */

@media (max-width: 900px) {
  .site-header__logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .nav-toggle {
    display: inline-flex;
    z-index: 120;
  }

  .lang-switch {
    margin-left: auto;
  }

  /* Full-viewport layer so fixed positioning uses the real viewport
     (not the sticky header box). */
  #site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 110;
    margin-left: 0;
    display: block;
    pointer-events: none;
    background: transparent;
    transition: background 0.25s ease;
  }

  #site-nav:has(.nav-list.is-open) {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.45);
  }

  .nav-list {
    position: absolute;
    top: 0;
    left: 0;
    right: auto;
    bottom: 0;
    width: min(100%, 20rem);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0.75rem 1.25rem 2rem;
    list-style: none;
    background: #1e1b18;
    color: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0.25s ease;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.28);
  }

  .nav-list.is-open {
    transform: translateX(0);
    visibility: visible;
  }

  body.nav-open {
    overflow: hidden;
  }

  .nav-list > li > a,
  .nav-list > li > button {
    width: 100%;
    justify-content: space-between;
    padding: 0.95rem 0.5rem;
    min-height: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1rem;
  }

  .has-dropdown .dropdown {
    position: static;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    min-width: 0;
    padding: 0 0 0.35rem 0.75rem;
    background: transparent;
    color: #fff;
  }

  .has-dropdown.is-open .dropdown {
    display: block;
  }

  .has-dropdown .dropdown a {
    white-space: normal;
    padding: 0.75rem 0.5rem;
    min-height: 44px;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
  }

  .has-dropdown .dropdown a:hover,
  .has-dropdown .dropdown a[aria-current="page"] {
    color: var(--brand-orange);
    background: rgba(255, 255, 255, 0.06);
  }

  .has-dropdown.is-open > button::after {
    transform: rotate(225deg) translateY(-2px);
  }
}

/* ── Footer ─────────────────────────────────────────────── */

.site-footer {
  background: var(--ink);
  color: #fff;
  padding: 3.5rem 0 2rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2.5rem 2rem;
}

.site-footer__brand img {
  height: 36px;
  width: auto;
  margin-bottom: 1rem;
}

.site-footer__brand p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
  max-width: 28ch;
}

.site-footer__col h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.site-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__col li + li {
  margin-top: 0.55rem;
}

.site-footer__col a {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s ease;
}

.site-footer__col a:hover {
  color: var(--brand-orange-light);
}

.site-footer__contact p {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.78);
}

.site-footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 900px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.5rem;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 540px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

/* ── Lightbox ───────────────────────────────────────────── */

[data-lightbox] {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(58, 58, 58, 0.72);
}

[data-lightbox][hidden] {
  display: none;
}

body.lightbox-open {
  overflow: hidden;
}

[data-lightbox] .lightbox__dialog {
  position: relative;
  width: min(100%, 720px);
  max-height: calc(100vh - 3rem);
  overflow: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}

[data-lightbox-close] {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink);
}

/* ── Scroll reveal ──────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
