/* One-time brand intro (partials/site-intro + js/intro.js). Hidden unless
   <html> has .intro-play, which a tiny head script sets right after login. */
.site-intro { display: none; }
.intro-play .site-intro { display: block; position: fixed; inset: 0; z-index: 200; cursor: pointer; }
.intro-play body { overflow: hidden; }
.intro-play .site-header .wordmark { opacity: 0; }
.intro-play .cookie-banner { visibility: hidden; }

.intro-bg { position: absolute; inset: 0; background: #112337; will-change: clip-path, opacity; }

.intro-brand { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #f3efe6; padding: 1.5rem; pointer-events: none; }
.intro-brand > * { transform-origin: center center; will-change: transform; }
.intro-mark { width: clamp(96px, 13vw, 150px); height: auto; color: #b89960; overflow: visible; opacity: 0; transform: translateY(8px) scale(.96); animation: intro-mark-in .9s cubic-bezier(.2, .7, .2, 1) forwards; }
@keyframes intro-mark-in { to { opacity: 1; transform: none; } }
.intro-mark path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: intro-draw 1.1s cubic-bezier(.6, 0, .3, 1) forwards; }
.intro-mark g path:nth-child(2) { animation-delay: .25s; }
.intro-mark g path:nth-child(3) { animation-delay: .4s; }
.intro-mark g path:nth-child(4) { animation-delay: .15s; }
.intro-mark g path:nth-child(5) { animation-delay: .1s; }
.intro-mark .intro-leaf { stroke-dasharray: none; stroke-dashoffset: 0; opacity: 0; animation: intro-fade .5s .95s ease forwards; }

.intro-latin, .intro-arabic, .intro-tagline { margin: 0; line-height: 1; opacity: 0; animation: intro-fade .8s cubic-bezier(.2, .7, .2, 1) forwards; }
.intro-latin { font-family: "Libre Baskerville", Baskerville, serif; font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: .12em; margin-top: 1.7rem; animation-delay: .85s; }
.intro-arabic { font-family: "Noto Naskh Arabic", "Geeza Pro", serif; font-size: clamp(1.45rem, 3vw, 2.1rem); color: #b89960; margin-top: .55rem; animation-delay: 1s; }
.intro-tagline { font-family: "Inter", "Helvetica Neue", Arial, sans-serif; font-size: clamp(.7rem, 1.6vw, .85rem); letter-spacing: .3em; text-transform: uppercase; margin-top: 1.8rem; animation-delay: 1.15s; }
[dir="rtl"] .intro-tagline { letter-spacing: 0; font-family: "IBM Plex Sans Arabic", "Geeza Pro", sans-serif; font-size: clamp(.9rem, 2vw, 1.05rem); }
.intro-tagline span { color: #b89960; margin-inline: .5em; }
.intro-line { display: block; width: clamp(120px, 16vw, 210px); height: 1px; margin-top: 1.6rem; background: #b89960; transform: scaleX(0); animation: intro-grow 1s 1.2s cubic-bezier(.6, 0, .3, 1) forwards; }

@keyframes intro-draw { to { stroke-dashoffset: 0; } }
@keyframes intro-fade { to { opacity: 1; } }
@keyframes intro-grow { to { transform: scaleX(1); } }

/* The page's own entrance animations wait for the morph. */
.intro-play .hero-title span, .intro-play .hero-pitch { animation-play-state: paused; }
.intro-open .hero-title span, .intro-open .hero-pitch { animation-play-state: running; }

@media (prefers-reduced-motion: reduce) {
    .intro-play .site-intro { display: none; }
    .intro-play body { overflow: auto; }
    .intro-play .site-header .wordmark { opacity: 1; }
}
