/* Hormuz homepage opening: the approved brand story, laid over the homepage hero while it plays.
   Colours, type and layout are the approved prototype's; it uses the website's own font variables, so Arabic
   follows the site's Arabic fonts automatically. */
.opening { display: none; }
.opening-on .opening {
  display: block; position: fixed; inset: 0; z-index: 25;          /* above the site, below the language switch (30) */
  background: var(--navy, #0C0E16); overflow: hidden;
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}
.opening-leaving .opening { opacity: 0; }
.opening-leaving-quick .opening { opacity: 0; transition-duration: 0.42s; }
.opening__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.opening__logo { position: absolute; left: 50%; top: 44%; width: 32vw; height: auto; opacity: 0; }

.opening__story { margin: 0; padding: 0; list-style: none; }
.opening__line {
  position: absolute; left: 50%; top: 62%; width: min(100% - 2 * clamp(24px, 6vw, 96px), 20em); margin: 0;
  transform: translateX(-50%); opacity: 0; visibility: hidden;
  font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 3.4vw, 56px); line-height: 1.18;
  letter-spacing: 0.002em; color: var(--beige, #E7DCCE); text-align: center; text-wrap: balance;
  pointer-events: none; will-change: transform, opacity;
}
@media (max-width: 700px) {
  .opening__line { font-size: clamp(28px, 7.8vw, 36px); width: min(100% - 2 * clamp(24px, 6vw, 96px), 12em); }
}

/* Reduced motion: the four moments fade from one to the next. */
.opening__canvas, .opening__story, .opening__logo { transition: opacity 0.5s linear; }
@media (prefers-reduced-motion: no-preference) { .opening__canvas, .opening__story, .opening__logo { transition: none; } }
.is-fading .opening__canvas, .is-fading .opening__story, .is-fading .opening__logo { opacity: 0 !important; }

/* Moving between the homepage and a product experience: a brief fade through the same navy. */
html::after {
  content: ""; position: fixed; inset: 0; z-index: 40; background: var(--navy, #0C0E16);
  opacity: 0; pointer-events: none; transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
html.page-veiled::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) { html::after { transition-duration: 0.01s; } }
