/* Baseerat Academy - Coming Soon
   Palette drawn from the hero film: deep indigo night, soft lilac haze */

:root {
  --bg: #0b0a14;
  --ink: #f4f0ea;
  --ink-soft: rgba(244, 240, 234, 0.78);
  --ink-mute: rgba(244, 240, 234, 0.55);
  --line: rgba(244, 240, 234, 0.14);
  --line-strong: rgba(244, 240, 234, 0.28);
  --lilac: #c4b5e0;
  --lilac-deep: #8f7ab8;
  --gold: #e0c9a0;
  --glass: rgba(12, 10, 22, 0.42);
  --glass-strong: rgba(12, 10, 22, 0.62);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --radius-sm: 999px;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1120px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(0.98rem, 0.92rem + 0.25vw, 1.05rem);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Cinematic stage ---------- */

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg);
}

.stage__poster,
.stage__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.stage__poster {
  background:
    linear-gradient(180deg, rgba(11, 10, 20, 0.25), rgba(11, 10, 20, 0.55)),
    url("/media/hero-poster.jpg") center / cover no-repeat;
  transform: scale(1.04);
  filter: saturate(1.05) contrast(1.05);
}

.stage__video {
  opacity: 0;
  transition: opacity 1.1s var(--ease);
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.04);
}

.stage__video.is-ready {
  opacity: 1;
}

.stage__veil {
  position: absolute;
  inset: 0;
  background:
    /* Keep mid-frame dark enough for body copy over bright video areas */
    linear-gradient(
      180deg,
      rgba(8, 7, 16, 0.62) 0%,
      rgba(8, 7, 16, 0.48) 24%,
      rgba(8, 7, 16, 0.58) 48%,
      rgba(8, 7, 16, 0.72) 68%,
      rgba(8, 7, 16, 0.92) 100%
    ),
    radial-gradient(ellipse 90% 70% at 28% 42%, rgba(8, 7, 16, 0.55), transparent 62%),
    radial-gradient(ellipse 80% 60% at 50% 35%, rgba(90, 70, 140, 0.16), transparent 70%),
    linear-gradient(90deg, rgba(8, 7, 16, 0.65) 0%, rgba(8, 7, 16, 0.28) 36%, rgba(8, 7, 16, 0.22) 70%, rgba(8, 7, 16, 0.6) 100%);
  pointer-events: none;
}

.stage__grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  pointer-events: none;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.stage__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.55) 100%);
}

/* Reduced motion / no video: hold the poster */

body.is-reduced-motion .stage__video,
body.is-video-off .stage__video {
  display: none;
}

/* ---------- Layout frame ---------- */

.frame {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: var(--pad);
  padding-top: calc(var(--pad) + env(safe-area-inset-top));
  padding-bottom: calc(var(--pad) + env(safe-area-inset-bottom));
}

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

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.35rem 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand__mark {
  width: 2.35rem;
  height: 2.35rem;
  color: var(--lilac);
  flex-shrink: 0;
  filter: drop-shadow(0 0 18px rgba(196, 181, 224, 0.25));
}

.brand__mark svg {
  width: 100%;
  height: 100%;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand__sub {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 0.9rem 0.48rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.pill__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(224, 201, 160, 0.55);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(224, 201, 160, 0.55);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(224, 201, 160, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(224, 201, 160, 0);
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.5rem, 8vh, 5.5rem) 0 clamp(1.5rem, 4vh, 2.5rem);
  max-width: 44rem;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8% -8% 4% -10%;
  max-width: 42rem;
  border-radius: 28px;
  background:
    radial-gradient(ellipse 80% 70% at 30% 40%, rgba(8, 7, 16, 0.72), transparent 72%),
    linear-gradient(90deg, rgba(8, 7, 16, 0.55), rgba(8, 7, 16, 0.18) 70%, transparent);
  filter: blur(2px);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 1.1rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ebc992;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.7),
    0 6px 20px rgba(0, 0, 0, 0.45);
}

.title {
  margin: 0 0 1.35rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.65rem, 1.5rem + 5.2vw, 4.85rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: #faf7f2;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.65),
    0 10px 32px rgba(0, 0, 0, 0.5);
}

.title__line {
  display: block;
}

.title__line--accent {
  color: #d7c9f0;
  font-style: italic;
  font-weight: 400;
}

.lede {
  margin: 0 0 1.1rem;
  max-width: 36rem;
  color: #f3efe8;
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.2rem);
  font-weight: 400;
  line-height: 1.65;
  text-wrap: pretty;
  text-shadow:
    0 1px 1px rgba(0, 0, 0, 0.75),
    0 2px 12px rgba(0, 0, 0, 0.65),
    0 0 24px rgba(0, 0, 0, 0.4);
}

.promise {
  margin: 0 0 1.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.05rem + 0.55vw, 1.55rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #faf7f2;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.7),
    0 8px 24px rgba(0, 0, 0, 0.45);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    transform 0.25s var(--ease),
    background 0.25s var(--ease),
    border-color 0.25s var(--ease),
    color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.btn:focus-visible {
  outline: 2px solid var(--lilac);
  outline-offset: 3px;
}

.btn--primary {
  background: linear-gradient(135deg, #f3ece2 0%, #e0c9a0 55%, #d4b68a 100%);
  color: #1a1424;
  box-shadow:
    0 10px 30px rgba(224, 201, 160, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 16px 36px rgba(224, 201, 160, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--ghost {
  background: var(--glass);
  border-color: var(--line-strong);
  color: var(--ink);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn--ghost:hover {
  border-color: rgba(244, 240, 234, 0.45);
  background: rgba(244, 240, 234, 0.08);
  transform: translateY(-1px);
}

.signals {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 36rem;
}

.signals li {
  padding: 0.9rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 9, 18, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.signals strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.1;
  color: var(--ink);
}

.signals span {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ---------- About panel ---------- */

.panel {
  margin: 0.5rem 0 1.25rem;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass-strong);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  box-shadow: var(--shadow);
}

.panel__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
}

.panel h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 1.25rem + 1.2vw, 2.05rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.panel p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 38ch;
}

.panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.panel__list li {
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.panel__kicker {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lilac);
}

/* ---------- Notify ---------- */

.notify {
  margin-bottom: 1.5rem;
}

.notify__card {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border-radius: var(--radius);
  border: 1px solid rgba(224, 201, 160, 0.22);
  background:
    linear-gradient(135deg, rgba(224, 201, 160, 0.08), rgba(143, 122, 184, 0.08)),
    rgba(12, 10, 22, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.notify__copy h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.15rem + 1vw, 1.85rem);
  font-weight: 500;
  line-height: 1.15;
}

.notify__copy p {
  margin: 0;
  color: var(--ink-soft);
}

.notify__fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.notify__fields input {
  flex: 1 1 14rem;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: rgba(8, 7, 16, 0.55);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.notify__fields input::placeholder {
  color: rgba(244, 240, 234, 0.38);
}

.notify__fields input:focus {
  border-color: rgba(196, 181, 224, 0.65);
  box-shadow: 0 0 0 3px rgba(143, 122, 184, 0.22);
}

.notify__fields .btn {
  flex: 0 0 auto;
}

.form-note {
  margin: 0.7rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-mute);
}

.form-note.is-success {
  color: #c8e0b8;
}

.form-note.is-error {
  color: #f0b4b4;
}

/* ---------- Footer ---------- */

.foot {
  margin-top: auto;
  padding-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px solid transparent;
  color: var(--ink-mute);
  font-size: 0.8rem;
}

.foot__left {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.foot__domain {
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  text-transform: lowercase;
  font-weight: 500;
}

.foot__sep {
  opacity: 0.5;
}

.foot__legal {
  margin: 0;
  max-width: 36rem;
}

/* ---------- Media toggle ---------- */

.media-toggle {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 5;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--glass-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.media-toggle:hover {
  border-color: rgba(244, 240, 234, 0.45);
  transform: translateY(-1px);
}

.media-toggle:focus-visible {
  outline: 2px solid var(--lilac);
  outline-offset: 3px;
}

.media-toggle__icon {
  width: 0.85rem;
  height: 0.85rem;
  background: currentColor;
  clip-path: polygon(0 0, 35% 0, 35% 100%, 0 100%, 0 0, 65% 0, 100% 0, 100% 100%, 65% 100%, 65% 0);
}

.media-toggle[aria-pressed="true"] .media-toggle__icon {
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  width: 0.75rem;
  height: 0.85rem;
  margin-left: 0.1rem;
}

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.95s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

body.is-reduced-motion .reveal {
  opacity: 1;
  transform: none;
  animation: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .panel__grid,
  .notify__card {
    grid-template-columns: 1fr;
  }

  .signals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .top__meta .pill {
    font-size: 0.7rem;
    padding-inline: 0.7rem;
  }

  .brand__sub {
    letter-spacing: 0.2em;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .signals {
    gap: 0.55rem;
  }

  .signals li {
    padding: 0.75rem 0.7rem;
  }

  .foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .pill__dot {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .stage__video {
    display: none;
  }
}

/* High contrast focus for keyboard users */
:focus:not(:focus-visible) {
  outline: none;
}
