/* ==========================================================================
   Info bar, header, dropdown, mega menu, mobile menu
   ========================================================================== */

.site-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  color: var(--ivory);
  background: var(--navy-900);
  transition: transform 0.6s var(--ease);
}

.topbar {
  height: var(--topbar-h);
  overflow: hidden;
  background: transparent;
  border-bottom: 1px solid var(--line-light);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  transition: height 0.5s var(--ease), opacity 0.4s var(--ease), border-color 0.4s;
}

.topbar-inner {
  width: min(104rem, calc(100% - 2 * var(--gutter)));
  height: var(--topbar-h);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.topbar-list {
  display: flex;
  align-items: center;
  gap: 0.4rem 2rem;
  list-style: none;
  min-width: 0;
}

.topbar-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
  color: rgb(var(--on-rgb) / 0.82);
}

.topbar-list .icon {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--gold-400);
}

.topbar-list a {
  transition: color 0.3s;
}

.topbar-list a:hover {
  color: var(--gold-300);
}

@media (max-width: 1320px) {
  .topbar-addr {
    display: none !important;
  }
}

@media (max-width: 1100px) {
  .topbar {
    display: none;
  }
}

.site-top.is-scrolled .topbar {
  height: 0;
  opacity: 0;
  border-color: transparent;
}

.lang-switch {
  display: flex;
  gap: 0.15rem;
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem 0.25rem 0.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgb(var(--on-rgb) / 0.72);
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.flag {
  width: 1.05rem;
  height: 0.7rem;
  flex: none;
  border-radius: 1px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.28);
}

.lang-switch a:hover {
  color: var(--ivory);
  border-color: var(--line-light);
}

.lang-switch a[aria-current="true"] {
  background: var(--gold-400);
  border-color: var(--gold-400);
  color: var(--navy-900);
}

/* ------------------------------------------------------------ Header */

.site-header {
  --h: var(--header-h);
  position: relative;
  isolation: isolate;
  transition: background 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 -1px;
  background: transparent;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}

.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(7, 21, 38, 0.94);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(201, 164, 92, 0.35);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.6s var(--ease);
  z-index: -1;
}

.site-top.is-scrolled .site-header {
  --h: 4rem;
  box-shadow: 0 12px 40px -18px rgba(0, 0, 0, 0.5);
}

.site-top.is-scrolled .site-header::before {
  opacity: 0;
}

.site-top.is-scrolled .site-header::after {
  clip-path: inset(0);
}

@media (max-width: 1100px) {
  .site-header {
    --h: 4.5rem;
  }
}

body.menu-open .site-header::after {
  clip-path: inset(0);
  background: transparent;
  border-color: transparent;
  backdrop-filter: none;
}

.header-inner {
  position: relative;
  width: min(104rem, calc(100% - 2 * var(--gutter)));
  height: var(--h);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  transition: height 0.5s var(--ease);
}

.header-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-300));
  transform: scaleX(var(--p, 0));
  transform-origin: left;
  opacity: 0;
  transition: opacity 0.4s;
}

.site-top.is-scrolled .header-progress {
  opacity: 1;
}

.logo {
  display: flex;
  align-items: center;
  flex: none;
  line-height: 0;
}

.logo-horizontal {
  height: 4.35rem;
  width: auto;
  transition: height 0.5s var(--ease), opacity 0.4s;
}

.site-top.is-scrolled .logo-horizontal {
  height: 3.4rem;
}

@media (max-width: 480px) {
  .logo-horizontal {
    height: 3.45rem;
  }
}

/* ------------------------------------------------------- Desktop navigation */

.nav {
  margin-inline: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.75rem);
  list-style: none;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--h);
  transition: height 0.5s var(--ease);
}

.nav-item.has-mega {
  position: static;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgb(var(--on-rgb) / 0.88);
  transition: color 0.3s;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold-400);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}

.nav-item:hover > .nav-link,
.nav-item.is-open > .nav-link,
.nav-link:focus-visible {
  color: var(--gold-300);
}

.nav-item:hover > .nav-link::after,
.nav-item.is-open > .nav-link::after,
.nav-item.is-current > .nav-link::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-item.is-current > .nav-link {
  color: var(--ivory);
}

.nav-item.is-current > .nav-link::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.45rem;
  width: 0.3rem;
  height: 0.3rem;
  margin-left: -0.15rem;
  background: var(--gold-400);
  transform: rotate(45deg);
}

.nav-caret {
  display: inline-grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  margin-left: 0.15rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgb(var(--on-rgb) / 0.7);
}

.nav-caret .icon {
  width: 0.9rem;
  height: 0.9rem;
  transition: transform 0.4s var(--ease);
}

.nav-item.is-open .nav-caret .icon {
  transform: rotate(180deg);
  color: var(--gold-300);
}

/* Dropdown */

.sub {
  position: absolute;
  top: 100%;
  left: -1.5rem;
  min-width: 17rem;
  padding: 0.75rem 0;
  list-style: none;
  background: var(--navy-900);
  border-top: 2px solid var(--gold-500);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  clip-path: inset(0 0 100% 0);
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease), clip-path 0.55s var(--ease), visibility 0s 0.5s;
  z-index: 5;
}

.nav-item.is-open > .sub {
  opacity: 1;
  visibility: visible;
  transform: none;
  clip-path: inset(0);
  transition-delay: 0s;
}

.sub-item {
  position: relative;
}

.sub-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.8rem 1.5rem;
  font-size: 0.92rem;
  color: rgb(var(--on-rgb) / 0.82);
  transition: color 0.3s, padding 0.45s var(--ease), background 0.3s;
}

.sub-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 2px;
  background: var(--gold-400);
  transform: scaleY(0);
  transition: transform 0.45s var(--ease);
}

.sub-link .icon {
  width: 0.9rem;
  height: 0.9rem;
  opacity: 0.6;
}

.sub-item:hover > .sub-link,
.sub-link:focus-visible {
  color: var(--gold-300);
  padding-left: 2rem;
  background: rgb(var(--on-rgb) / 0.04);
}

.sub-item:hover > .sub-link::before,
.sub-link:focus-visible::before {
  transform: scaleY(1);
}

.sub--l2 {
  top: -0.75rem;
  left: 100%;
  transform: translateX(14px);
  clip-path: inset(0 100% 0 0);
}

.sub-item:hover > .sub--l2,
.sub-item:focus-within > .sub--l2 {
  opacity: 1;
  visibility: visible;
  transform: none;
  clip-path: inset(0);
  transition-delay: 0s;
}

/* Mega menu */

.mega {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--navy-900);
  border-top: 2px solid var(--gold-500);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  clip-path: inset(0 0 100% 0);
  transition: opacity 0.4s var(--ease), clip-path 0.7s var(--ease), visibility 0s 0.7s;
}

.nav-item.is-open > .mega {
  opacity: 1;
  visibility: visible;
  clip-path: inset(0);
  transition-delay: 0s;
}

.mega-inner {
  width: min(96rem, calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 18rem 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  padding: 2.75rem 0 3rem;
}

.mega-photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.mega-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  transition: transform 1.4s var(--ease);
}

.nav-item.is-open .mega-photo img {
  transform: scale(1);
}

.mega-lead {
  margin-bottom: 0.75rem;
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1.1;
}

.mega-all {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-300);
}

.mega-all .icon {
  width: 1rem;
  height: 1rem;
}

.mega-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  gap: 2rem clamp(1.25rem, 2.4vw, 2.5rem);
  align-content: start;
}

.mega-col,
.mega-intro {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.7s var(--ease);
}

.nav-item.is-open .mega-col,
.nav-item.is-open .mega-intro {
  opacity: 1;
  transform: none;
}

.nav-item.is-open .mega-col:nth-child(1) { transition-delay: 0.1s; }
.nav-item.is-open .mega-col:nth-child(2) { transition-delay: 0.16s; }
.nav-item.is-open .mega-col:nth-child(3) { transition-delay: 0.22s; }
.nav-item.is-open .mega-col:nth-child(4) { transition-delay: 0.28s; }
.nav-item.is-open .mega-col:nth-child(5) { transition-delay: 0.34s; }

.mega-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line-light);
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.1;
  transition: color 0.3s;
}

.mega-title .icon {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--gold-400);
}

.mega-title:hover {
  color: var(--gold-300);
}

.mega-col ul {
  display: grid;
  gap: 0.55rem;
  list-style: none;
}

.mega-col li a {
  display: inline-block;
  font-size: 0.86rem;
  line-height: 1.4;
  color: rgb(var(--on-rgb) / 0.68);
  transition: color 0.3s, transform 0.4s var(--ease);
}

.mega-col li a:hover {
  color: var(--gold-300);
  transform: translateX(0.35rem);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.nav + .header-actions {
  margin-left: 0;
}

/* Hamburger */

.nav-toggle {
  display: none;
  position: relative;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid var(--line-light);
  border-radius: 50%;
  background: transparent;
  color: var(--ivory);
  transition: border-color 0.3s, background 0.3s;
}

.nav-toggle:hover {
  border-color: var(--gold-400);
}

.nav-toggle-box {
  position: relative;
  display: block;
  width: 1.2rem;
  height: 0.7rem;
}

.nav-toggle-box span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.55s var(--ease), top 0.55s var(--ease), width 0.4s var(--ease);
}

.nav-toggle-box span:nth-child(1) {
  top: 0;
}

.nav-toggle-box span:nth-child(2) {
  top: calc(100% - 1.5px);
  width: 70%;
  left: 30%;
}

.nav-toggle:hover .nav-toggle-box span:nth-child(2) {
  width: 100%;
  left: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(1) {
  top: 50%;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(2) {
  top: 50%;
  width: 100%;
  left: 0;
  transform: rotate(-45deg);
}

@media (max-width: 1100px) {
  .nav,
  .header-cta {
    display: none;
  }

  .header-inner {
    width: 100%;
    padding-left: 0.85rem;
    padding-right: 0.4rem;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .nav-toggle {
    display: grid;
  }

  .header-actions,
  .nav + .header-actions {
    margin-left: auto;
  }

  .site-top.is-scrolled .site-header {
    --h: 4rem;
  }
}

/* -------------------------------------------------------- Mobile menu */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s 0.9s;
  color: var(--ivory);
}

.mobile-menu.is-open {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.mobile-menu-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60rem 40rem at 90% 0, rgba(224, 184, 90, 0.14), transparent 60%),
    var(--navy-950);
  clip-path: circle(0 at calc(100% - 3.5rem) 2.5rem);
  transition: clip-path 0.9s var(--ease-io);
}

.mobile-menu.is-open .mobile-menu-bg {
  clip-path: circle(150% at calc(100% - 3.5rem) 2.5rem);
}

.mobile-menu-body {
  position: relative;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(var(--header-h) + 1.5rem) var(--gutter) 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.m-list {
  list-style: none;
  border-top: 1px solid var(--line-light);
}

.m-item {
  border-bottom: 1px solid var(--line-light);
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 0.5s var(--ease), transform 0.7s var(--ease);
}

.mobile-menu.is-open .m-item {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.28s + var(--i) * 0.07s);
}

.m-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.m-link {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  padding: 0.95rem 0;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 9vw, 3.6rem);
  line-height: 1.05;
  font-weight: 300;
}

.m-num {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--gold-400);
}

.m-item.is-current .m-text {
  font-style: italic;
  color: var(--gold-300);
}

.m-toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line-light);
  border-radius: 50%;
  background: transparent;
  color: var(--ivory);
  transition: transform 0.5s var(--ease), background 0.3s, color 0.3s;
}

.m-toggle .icon {
  width: 1.1rem;
  height: 1.1rem;
}

.m-toggle[aria-expanded="true"] {
  transform: rotate(135deg);
  background: var(--gold-400);
  border-color: var(--gold-400);
  color: var(--navy-900);
}

.m-sub {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.6s var(--ease);
}

.m-sub.is-open {
  grid-template-rows: 1fr;
}

.m-sub-in {
  overflow: hidden;
  min-height: 0;
}

.m-sublist {
  list-style: none;
  padding: 0.25rem 0 1.25rem 1rem;
  border-left: 1px solid var(--gold-600);
  margin-left: 0.25rem;
}

.m-row--sub a {
  display: block;
  flex: 1;
  padding: 0.6rem 0;
  font-size: 1.05rem;
  color: rgb(var(--on-rgb) / 0.8);
}

.m-row--sub .m-toggle {
  width: 2.25rem;
  height: 2.25rem;
}

.m-foot {
  display: grid;
  gap: 1.75rem;
  margin-top: auto;
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.6s var(--ease), transform 0.7s var(--ease);
}

.mobile-menu.is-open .m-foot {
  opacity: 1;
  transform: none;
  transition-delay: 0.7s;
}

.m-contact {
  display: grid;
  gap: 0.7rem;
  list-style: none;
  font-size: 0.95rem;
  color: rgb(var(--on-rgb) / 0.8);
}

.m-contact a,
.m-contact span {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.m-contact .icon {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.25rem;
  color: var(--gold-400);
}

.lang-switch--mobile a {
  padding: 0.45rem 0.9rem;
  font-size: 0.74rem;
  border-color: var(--line-light);
}

@media (min-width: 1101px) {
  .mobile-menu {
    display: none;
  }
}

@media (min-height: 760px) and (max-width: 1100px) {
  .m-link {
    padding-block: 1.1rem;
  }
}

/* Without JS: dropdowns work on :hover and :focus-within. */
html:not(.js) .nav-item:hover > .sub,
html:not(.js) .nav-item:focus-within > .sub,
html:not(.js) .nav-item:hover > .mega,
html:not(.js) .nav-item:focus-within > .mega {
  opacity: 1;
  visibility: visible;
  transform: none;
  clip-path: inset(0);
}

/* Header preview in the showcase (static, not fixed). */
.site-header--demo {
  position: relative;
  background: var(--navy-900);
  color: var(--ivory);
}

.site-header--demo::before,
.site-header--demo::after {
  display: none;
}

.site-header--light {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}

.site-header--light .logo-horizontal,
.site-header--light .logo-mark {
  filter: brightness(0.42) saturate(1.5);
}

.site-header--light .nav-link {
  color: var(--ink);
}

.site-header--light .nav-item:hover > .nav-link,
.site-header--light .nav-item.is-open > .nav-link {
  color: var(--gold-700);
}

.site-header--light .nav-caret {
  color: var(--muted);
}

.site-header--light .nav-link::after {
  background: var(--gold-600);
}

.site-header--light .nav-toggle,
.site-header--light .theme-toggle {
  color: var(--ink);
  border-color: var(--line);
}
