.home-stage-one {
  min-height: 100svh;
  overflow-x: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
  align-items: center;
  min-height: var(--header-height);
  padding: 0 var(--page-gutter);
  color: var(--ink);
  background: transparent;
  transition:
    background-color 280ms ease,
    box-shadow 280ms ease;
}

.site-header.is-scrolled,
.site-header.is-menu-open {
  background: rgba(244, 239, 227, 0.93);
  box-shadow: 0 1px 0 var(--line-dark);
  backdrop-filter: blur(14px);
}

.brand-wordmark {
  position: relative;
  z-index: 2;
  justify-self: start;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1;
  color: var(--white);
  text-shadow: 0 1px 14px rgba(23, 25, 22, 0.28);
}

.site-header.is-scrolled .brand-wordmark,
.site-header.is-menu-open .brand-wordmark {
  color: var(--ink);
  text-shadow: none;
}

.main-nav {
  display: flex;
  gap: clamp(22px, 2.5vw, 40px);
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
}

.main-nav a {
  position: relative;
  white-space: nowrap;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms var(--ease-editorial);
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.lang-switch {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 5px;
  align-items: center;
  justify-self: end;
  font-size: 0.72rem;
}

.lang-switch span {
  opacity: 0.42;
}

.lang-button {
  padding: 5px 2px;
  background: transparent;
  cursor: pointer;
  opacity: 0.48;
  transition: opacity 160ms ease;
}

.lang-button:hover,
.lang-button.is-active {
  opacity: 1;
}

.menu-button {
  position: relative;
  z-index: 2;
  display: none;
  width: 34px;
  height: 34px;
  padding: 8px 4px;
  background: transparent;
  cursor: pointer;
}

.menu-button span {
  position: absolute;
  left: 4px;
  width: 24px;
  height: 1px;
  background: currentColor;
  transition:
    top 220ms var(--ease-editorial),
    transform 220ms var(--ease-editorial);
}

.menu-button span:first-child {
  top: 12px;
}

.menu-button span:last-child {
  top: 21px;
}

.site-header.is-menu-open .menu-button span:first-child {
  top: 17px;
  transform: rotate(45deg);
}

.site-header.is-menu-open .menu-button span:last-child {
  top: 17px;
  transform: rotate(-45deg);
}

.home-hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: var(--sky-faded);
  isolation: isolate;
}

.home-hero__media,
.home-hero__media picture,
.home-hero__media img,
.home-hero__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.home-hero__media img,
.home-hero__media video {
  object-fit: cover;
  object-position: center center;
}

.home-hero__poster {
  z-index: 0;
}

.home-hero__video {
  z-index: 1;
}

.home-hero__media.is-poster-only .home-hero__video {
  display: none;
}

.home-hero__copy {
  position: absolute;
  top: 54%;
  right: 5.5vw;
  z-index: 2;
  width: min(39vw, 610px);
  color: var(--ink);
  transform: translateY(-50%);
  animation: hero-copy-in 1100ms var(--ease-editorial) 180ms both;
}

.home-hero__copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 8.8vw, 9.4rem);
  font-weight: 400;
  line-height: 0.83;
}

.home-hero__copy p {
  margin: clamp(18px, 2.2vw, 30px) 0 0 0.25em;
  font-family: var(--font-display);
  font-size: clamp(1.18rem, 1.6vw, 1.55rem);
  font-style: italic;
  line-height: 1.15;
}

@keyframes hero-copy-in {
  from {
    opacity: 0;
    transform: translateY(calc(-50% + 24px));
  }

  to {
    opacity: 1;
    transform: translateY(-50%);
  }
}

@media (max-width: 860px) {
  :root {
    --header-height: 68px;
  }

  .site-header {
    grid-template-columns: 1fr auto 1fr;
    padding-right: 18px;
    padding-left: 18px;
  }

  .site-header.is-menu-open {
    z-index: 1000;
    min-height: calc(var(--header-height) + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    padding-right: max(18px, env(safe-area-inset-right));
    padding-left: max(18px, env(safe-area-inset-left));
    background: var(--ivory);
    box-shadow: none;
    backdrop-filter: none;
  }

  .menu-button {
    display: block;
    justify-self: start;
    color: var(--white);
    filter: drop-shadow(0 1px 5px rgba(23, 25, 22, 0.35));
  }

  .brand-wordmark {
    grid-column: 2;
    justify-self: center;
    color: var(--ink);
    text-shadow: none;
  }

  .lang-switch {
    grid-column: 3;
  }

  .main-nav {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 3dvh, 24px);
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    height: 100dvh;
    min-height: 100svh;
    padding:
      calc(var(--header-height) + env(safe-area-inset-top) + clamp(24px, 5dvh, 48px))
      max(20px, env(safe-area-inset-right))
      calc(28px + env(safe-area-inset-bottom))
      max(20px, env(safe-area-inset-left));
    overflow-y: auto;
    background: var(--ivory);
    font-family: var(--font-display);
    font-size: clamp(2rem, 10.5vw, 3.2rem);
    line-height: 0.96;
    opacity: 0;
    overscroll-behavior: contain;
    pointer-events: none;
    transform: translateY(-18px);
    visibility: hidden;
    transition:
      opacity 220ms ease,
      transform 320ms var(--ease-editorial),
      visibility 0s linear 320ms;
  }

  .site-header.is-menu-open .main-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
    transition-delay: 0s;
  }

  .site-header.is-menu-open .menu-button {
    z-index: 1001;
    color: var(--ink);
    filter: none;
  }

  .site-header.is-menu-open .brand-wordmark,
  .site-header.is-menu-open .lang-switch {
    z-index: 1001;
  }

  .main-nav a {
    width: 100%;
    white-space: normal;
  }

  .main-nav a::after {
    display: none;
  }
}

@media (max-width: 700px) {
  .home-hero__media img {
    object-position: 35% center;
  }

  .home-hero__video {
    display: none;
  }

  .home-hero__copy {
    top: 18vh;
    right: 20px;
    left: 20px;
    width: auto;
    text-align: center;
    transform: none;
    animation-name: hero-copy-in-mobile;
  }

  .home-hero__copy h1 {
    font-size: clamp(3.7rem, 19vw, 5.4rem);
    line-height: 0.86;
  }

  .home-hero__copy p {
    margin: 14px 0 0;
    font-size: clamp(1.05rem, 5vw, 1.3rem);
  }

  @keyframes hero-copy-in-mobile {
    from {
      opacity: 0;
      transform: translateY(20px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__video {
    display: none;
  }

  .home-hero__copy {
    animation: none;
  }
}

/* Arabic interface: keep the approved image composition while typesetting UI in RTL. */
html[dir="rtl"] .site-header {
  direction: ltr;
}

html[dir="rtl"] .main-nav {
  direction: rtl;
}

html[dir="rtl"] .lang-switch {
  direction: ltr;
}

html[lang="ar"] .main-nav {
  font-family: var(--font-arabic);
  letter-spacing: 0;
}

html[lang="ar"] .home-hero__copy p {
  font-family: var(--font-arabic);
  font-style: normal;
  line-height: 1.45;
  letter-spacing: 0;
}

@media (max-height: 620px) and (orientation: landscape) {
  .home-hero__copy {
    top: 57%;
  }

  .home-hero__copy h1 {
    font-size: clamp(3.7rem, 8vw, 6rem);
  }
}
