/* AZU Pharmaceutical Industries — v5 "In motion."
   Dark cinematic landing. WebGL shader hero with breathing brand mark,
   one-word statement, brand-teal launch band, minimal footer. */

/* ===== Fonts (self-hosted) ===== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(assets/fonts/inter.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Amiri';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/amiri.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200E,
    U+FB50-FDFF, U+FE70-FEFC;
}

/* ===== Tokens ===== */
:root {
  --bg: #000000;            /* pure black per brand guideline */
  --bg-elev: #0A0F0F;       /* hero ambient lift behind shader */
  --ink: #F7F7F4;           /* near-white for body copy */
  --ink-soft: #B8B6AE;      /* muted body text */
  --ink-faint: rgba(255, 255, 255, 0.45);
  --teal: #00B09E;          /* brand teal */
  --teal-bright: #1FD8C2;
  --teal-deep: #00897A;
  --hair: rgba(255, 255, 255, 0.08);
  --maxw: 1100px;
  --pad: clamp(1.25rem, 5vw, 6rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ar: 'Amiri', 'Times New Roman', serif;
}

/* ===== Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

main:focus {
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hp { display: none; }

.skip-link {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 100;
  transform: translateX(-50%) translateY(-130%);
  padding: 0.7rem 1.3rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 6px 6px;
  transition: transform 0.25s var(--ease);
}

.skip-link:focus {
  transform: translateX(-50%) translateY(0);
}

/* ===== 1. Hero (cine) ===== */
.cine {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-elev);
  isolation: isolate;
}

.cine-shader {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

/* Vignette: black radial gradient riding over the shader to deepen edges */
.cine-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center,
      transparent 40%,
      rgba(0, 0, 0, 0.4) 78%,
      rgba(0, 0, 0, 0.75) 100%);
}

.cine-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.6rem, 3.5vh, 2.6rem);
  padding: var(--pad);
  text-align: center;
}

.cine-lockup {
  width: clamp(280px, 56vw, 720px);
  height: auto;
  filter: drop-shadow(0 0 40px rgba(0, 176, 158, 0.28));
  animation:
    heroFade 1.4s var(--ease) 0.3s forwards,
    lockupBreathe 7s ease-in-out 1.5s infinite;
  opacity: 0;
  will-change: transform, opacity;
}

@keyframes lockupBreathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.022); }
}

.cine-kicker {
  font-size: clamp(0.78rem, 1vw, 0.92rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: clamp(0.6rem, 1vh, 1rem);
  opacity: 0;
  animation: heroFade 1.4s var(--ease) 0.8s forwards;
  max-width: 38ch;
  line-height: 1.7;
}

@keyframes heroFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: clamp(1.4rem, 4vh, 2.4rem);
  left: 50%;
  /* Centering transform; the fade-in keyframe below preserves the -50% X */
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
  opacity: 0;
  /* Use scrollCueFade (NOT heroFade) — heroFade ends with `transform: none`
     which clobbers the translateX(-50%) and shifts the cue off-center */
  animation: scrollCueFade 1.4s var(--ease) 1.6s forwards;
  transition: color 0.2s var(--ease);
}

@keyframes scrollCueFade {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0);  }
}

.scroll-cue:hover { color: var(--ink); }

.scroll-cue__line {
  display: block;
  width: 1px;
  height: 38px;
  background: linear-gradient(to bottom, transparent, var(--ink-faint));
  animation: cuePulse 2.4s ease-in-out infinite;
}

@keyframes cuePulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%      { opacity: 1;   transform: scaleY(1.15); }
}

/* ===== 2. Voices: scroll-driven quote cinema ===== */
.voices {
  /* Total scroll height — gives each of 5 quotes ~1vh worth of progress + entry/exit */
  position: relative;
  height: 500vh;
  background: var(--bg);
}

.voices-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--pad);
}

.voice {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(180px, 22vw) minmax(0, 1fr);
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: var(--pad);
  max-width: 1200px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px) scale(0.985);
  transition: opacity 600ms var(--ease), transform 800ms var(--ease);
  will-change: opacity, transform;
}

/* Arabic voices flip: portrait on RIGHT, text on LEFT (RTL natural order) */
.voice[dir="rtl"] {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 22vw);
}

.voice.is-active {
  opacity: 1;
  transform: none;
}

.voice-portrait {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 4px;
  /* Soft outer halo + edge fade so the painted portrait sits naturally
     in the dark cinema. Vignette via inner box-shadow + outer glow. */
  box-shadow:
    0 24px 60px -20px rgba(0, 0, 0, 0.8),
    0 0 80px -20px rgba(0, 176, 158, 0.18);
}

.voice-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: contrast(1.05) saturate(0.92);
}

/* Inner vignette overlay — pulls edges toward black for cohesion */
.voice-portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, transparent 55%, rgba(0,0,0,0.5) 100%),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.45) 100%);
  mix-blend-mode: multiply;
}

.voice-text {
  text-align: start;
}

.voice-quote {
  font-family: var(--font-sans);
  font-size: clamp(1.3rem, 2.6vw, 2.2rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.012em;
  color: var(--ink);
  max-width: 36ch;
}

/* Arabic voices use Amiri and a slightly larger size for the script */
.voice[lang="ar"] .voice-quote {
  font-family: var(--font-ar);
  font-size: clamp(1.4rem, 2.9vw, 2.4rem);
  font-weight: 400;
  line-height: 1.75;
  max-width: 38ch;
}

.voice-attr {
  margin-top: clamp(1.4rem, 3vh, 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.voice-attr__name {
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--teal-bright);
}

.voice[lang="ar"] .voice-attr__name {
  font-family: var(--font-ar);
  font-weight: 700;
  letter-spacing: 0;
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
}

.voice-attr__meta {
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.voice[lang="ar"] .voice-attr__meta {
  font-family: var(--font-sans);
  letter-spacing: 0.16em;
  direction: rtl;
}

/* Progress dots: 5 small bars at the bottom of the stage */
.voice-dots {
  position: absolute;
  bottom: clamp(1.6rem, 4vh, 2.4rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.55rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.voice-dots li {
  width: 26px;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 1px;
  transition: background 0.4s var(--ease), transform 0.4s var(--ease);
}

.voice-dots li.is-active {
  background: var(--teal-bright);
  transform: scaleY(2);
}

/* ===== 3. Statement ===== */
.statement {
  background: var(--bg);
  padding: clamp(8rem, 22vh, 14rem) var(--pad);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
}

.statement-wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
}

.statement-word {
  font-family: var(--font-sans);
  font-size: clamp(3.4rem, 9vw, 7.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.statement-word strong {
  font-weight: 800;
  /* "First Healers." lands harder than "Reviving the" — bold weight, no italic */
}

.statement-bar {
  margin-top: clamp(1.6rem, 3vh, 2.4rem);
  width: 92px;
  height: 4px;
  background: var(--teal);
  border-radius: 2px;
}

/* Bar grows from zero on reveal — references the antigravity layout */
.statement-bar[data-reveal] { transform: scaleX(0); transform-origin: left center; }
.statement-bar[data-reveal].is-visible { transform: scaleX(1); transition: transform 1.1s var(--ease); }

.statement-sub {
  margin-top: clamp(1.4rem, 3vh, 2.2rem);
  font-size: clamp(1.05rem, 1.4vw, 1.32rem);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 32ch;
}

/* ===== 4. Make. — bilingual single-word manifesto, full-bleed dark panel ===== */
.make {
  background: var(--bg);
  min-height: 85vh;
  min-height: 85svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(5rem, 14vh, 9rem) var(--pad);
}

.make-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  width: 100%;
  max-width: 1200px;
}

.make-word {
  font-family: var(--font-sans);
  font-size: clamp(5rem, 14vw, 11rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.make-word--en {
  text-align: right;
}

.make-word--ar {
  font-family: var(--font-ar);
  font-weight: 700;
  letter-spacing: 0;
  /* Amiri at huge size needs different line metrics */
  line-height: 1.1;
  font-size: clamp(5.2rem, 14.5vw, 12rem);
  text-align: left;
}

/* Thin teal vertical divider between the two manifestos */
.make-divider {
  display: block;
  width: 2px;
  height: clamp(4rem, 11vw, 9rem);
  background: linear-gradient(to bottom,
    transparent 0%,
    var(--teal) 35%,
    var(--teal) 65%,
    transparent 100%);
  border-radius: 1px;
}

/* ===== 5. Launch / signup ===== */
.launch {
  background: var(--teal);
  padding: clamp(5rem, 14vh, 9rem) var(--pad);
  color: #00231F; /* deep teal-black for text on teal */
}

.launch-wrap {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
}

.launch-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.55);
}

.launch-title {
  margin-top: 1.4rem;
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: #00231F;
}

.signup {
  margin-top: 2.2rem;
  width: 100%;
}

.signup__row {
  display: flex;
  gap: 0.6rem;
}

.signup input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 0.95rem 1.1rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 4px;
  color: #00231F;
  font: inherit;
  font-size: 0.98rem;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.signup input[type="email"]::placeholder {
  color: rgba(0, 35, 31, 0.45);
}

.signup input[type="email"]:focus-visible {
  outline: none;
  border-color: var(--bg);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.25);
}

.signup button {
  flex-shrink: 0;
  padding: 0.95rem 1.7rem;
  background: var(--bg);
  color: var(--ink);
  border: none;
  border-radius: 4px;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.16s var(--ease), background 0.2s var(--ease),
    box-shadow 0.25s var(--ease);
  box-shadow: 0 6px 20px -10px rgba(0, 0, 0, 0.6);
}

.signup button:hover {
  background: #111;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.7);
}

.signup button:active {
  transform: translateY(2px);
  box-shadow: 0 3px 10px -4px rgba(0, 0, 0, 0.6);
}

.signup button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--teal), 0 0 0 5px var(--bg);
}

.signup button:disabled {
  opacity: 0.65;
  cursor: progress;
  transform: none;
}

.signup__status {
  margin-top: 0.9rem;
  min-height: 1.4em;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(0, 35, 31, 0.7);
}

.signup__status.is-error { color: #6E0000; }
.signup__status.is-success { color: #00231F; font-weight: 600; }

/* ===== Footer ===== */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--hair);
}

.footer-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(1.4rem, 3vw, 2.2rem) var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-mark {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  line-height: 1.2;
}

.footer-mark--en { align-items: flex-start; }
.footer-mark--ar { align-items: flex-end; }

.footer-mark__name {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.footer-mark--ar .footer-mark__name {
  font-family: var(--font-ar);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0;
}

.footer-mark__tag {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.footer-mark--ar .footer-mark__tag {
  font-family: var(--font-ar);
  font-size: 0.9rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.footer-email {
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.footer-email:hover { color: var(--teal-bright); }

/* ===== Scroll reveals ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  /* Voices stack the portrait above the text on narrow screens */
  .voice,
  .voice[dir="rtl"] {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(140px, 28vh) 1fr;
    gap: clamp(1.2rem, 3vh, 1.8rem);
    justify-items: center;
    text-align: center;
  }
  .voice-portrait {
    width: clamp(110px, 18vh, 170px);
    aspect-ratio: 3 / 4;
  }
  .voice-quote { margin-inline: auto; }
  .voice-attr { align-items: center; }
}

@media (max-width: 640px) {
  .signup__row { flex-direction: column; }
  .signup button { width: 100%; }

  /* Footer: stack into a clean vertical rhythm with even spacing,
     centered alignment, and a faint hairline divider between EN and AR */
  .footer-inner {
    flex-direction: column;
    gap: 1.6rem;
    text-align: center;
    padding-block: 2.4rem;
  }
  .footer-mark { align-items: center !important; gap: 0.3rem; }
  .footer-email {
    order: 3;
    padding-top: 1.4rem;
    border-top: 1px solid var(--hair);
    width: 60%;
  }
  .footer-mark--en { order: 1; }
  .footer-mark--ar { order: 2; }

  .statement-sub { max-width: none; }
  /* Make.: stack EN above AR on phones with a horizontal teal divider */
  .make-pair {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    justify-items: center;
    gap: 2rem;
  }
  .make-word--en, .make-word--ar { text-align: center; }
  .make-divider {
    width: clamp(4rem, 30vw, 7rem);
    height: 2px;
    background: linear-gradient(to right,
      transparent 0%, var(--teal) 35%, var(--teal) 65%, transparent 100%);
  }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .cine-lockup { animation: none !important; transform: none !important; opacity: 1 !important; }
  .cine-kicker, .scroll-cue { opacity: 1 !important; }
  /* Voices: drop sticky/scroll choreography, stack the quotes as a list */
  .voices { height: auto !important; }
  .voices-stage {
    position: static !important;
    height: auto !important;
    flex-direction: column;
    gap: clamp(4rem, 10vh, 7rem);
    padding-block: clamp(4rem, 10vh, 7rem);
  }
  .voice {
    position: static !important;
    opacity: 1 !important;
    transform: none !important;
    padding: 0;
  }
  .voice-dots { display: none !important; }
  .cine-shader { display: none; }
  /* Fallback radial gradient backdrop when shader is off */
  .cine {
    background:
      radial-gradient(ellipse 90% 70% at center,
        rgba(0, 176, 158, 0.22) 0%,
        rgba(0, 176, 158, 0.08) 40%,
        var(--bg-elev) 75%,
        var(--bg) 100%);
  }
  .scroll-cue__line { animation: none !important; }
}
