/* Azberm — Coming Soon */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-var.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --black: #000000;
  --white: #ffffff;
  --violet: #8b5cf6;
  --violet-deep: #5b21b6;
  --lilac: #c4b5fd;
  --text-2: rgba(255, 255, 255, 0.72);
  --text-3: rgba(255, 255, 255, 0.5);
  --line: rgba(196, 181, 253, 0.28);
  --error: #fda4af;

  --pad-x: clamp(1.25rem, 4vw, 3.5rem);
  --pad-y: clamp(1rem, 3vh, 2.25rem);

  --font-fa: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  --font-en: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--black);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-en);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.lang-fa { font-family: var(--font-fa); line-height: 1.85; }
:lang(en) { font-family: var(--font-en); }
:lang(fa) { font-family: var(--font-fa); }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--lilac); outline-offset: 3px; }

/* ---------- Background media ---------- */

.hero-media {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--black) var(--poster-desktop) 72% center / cover no-repeat;
  animation: media-in 1.6s ease-out both;
}
.hero-media picture,
.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-media img {
  object-fit: cover;
  object-position: 72% center;
}

/* Legibility layer: darkens the empty lower-left area behind the text */
.scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.4) 34%, rgba(0, 0, 0, 0) 58%),
    linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 38%);
}

/* ---------- Page grid ---------- */

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  row-gap: clamp(1.5rem, 4vh, 3rem);
  padding-top: max(var(--pad-y), env(safe-area-inset-top));
  padding-bottom: max(var(--pad-y), env(safe-area-inset-bottom));
  padding-left: max(var(--pad-x), env(safe-area-inset-left));
  padding-right: max(var(--pad-x), env(safe-area-inset-right));
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1875rem;
  line-height: 1;
}
.lang-en .brand { letter-spacing: -0.01em; }
/* 3D render on black: "screen" drops the black so only the glass and glow remain */
.brand-mark {
  display: block;
  width: clamp(2.75rem, 2.4rem + 1vw, 3.5rem);
  height: auto;
  mix-blend-mode: screen;
}

.lang-switch {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.lang-switch:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

/* ---------- Intro block ---------- */

/* Always sits over the image's empty lower-left area — in both languages.
   (The artwork isn't mirrored for RTL: a mirrored helix would be left-handed DNA.) */
.intro {
  align-self: end;
  justify-self: start;
  width: 100%;
  max-width: 33rem;
  animation: intro-in 0.9s 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
[dir="rtl"] .intro { justify-self: end; } /* "end" in RTL = physical left */

.headline {
  margin: 0 0 1rem;
  font-weight: 500;
  font-size: clamp(2.125rem, 1.25rem + 2.9vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.028em;
  max-width: 9.5em;
  text-wrap: balance;
}
.lang-fa .headline {
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0;
  max-width: 10em;
}

.lead {
  margin: 0 0 1.75rem;
  color: var(--text-2);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  max-width: 31em;
  text-wrap: pretty;
}

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

.notify-label {
  display: block;
  margin-bottom: 0.625rem;
  font-size: 0.9375rem;
  color: var(--white);
}

.notify-row {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(10, 4, 22, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.notify-row:focus-within {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

.notify input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 3.125rem;
  padding: 0 1rem;
  border: 0;
  background: transparent;
  color: var(--white);
  font: 500 1rem/1 var(--font-en); /* 16px avoids iOS zoom-on-focus */
  text-align: left;
}
.notify input[type="email"]::placeholder { color: var(--text-3); }
.notify input[type="email"]:focus { outline: none; }

.notify button {
  flex: 0 0 auto;
  margin: 0.3125rem;
  padding: 0 1.25rem;
  min-height: 2.5rem;
  border: 0;
  border-radius: 2px;
  background: var(--white);
  color: var(--black);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.notify button:hover { background: var(--violet); color: var(--white); }
.notify button:disabled { opacity: 0.6; cursor: progress; }

.notify-status {
  min-height: 1.6em;
  margin: 0.75rem 0 0;
  font-size: 0.9375rem;
}
.notify-status.is-ok { color: var(--lilac); }
.notify-status.is-error { color: var(--error); }

/* Honeypot */
.hp {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Bottom bar ---------- */

.bottombar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  font-size: 0.8125rem;
  color: var(--text-3);
}
.legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
}
.legal a { text-decoration: none; }
.legal a:hover { color: var(--white); }

.countdown {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
}
.countdown-units {
  display: flex;
  gap: 1rem;
  font-variant-numeric: tabular-nums;
}
.countdown b {
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
}

/* ---------- Portrait: phones & upright tablets ---------- */

@media (max-aspect-ratio: 1/1) {
  .hero-media { background-image: var(--poster-mobile); background-position: center top; }
  .hero-media img { object-position: center top; }
  .scrim {
    background: linear-gradient(to top,
      rgba(0, 0, 0, 0.92) 0%,
      rgba(0, 0, 0, 0.75) 30%,
      rgba(0, 0, 0, 0) 58%);
  }
  .intro,
  [dir="rtl"] .intro {
    justify-self: stretch;
    max-width: 36rem;
  }
}

/* Upright tablets: give the text a bit more room */
@media (max-aspect-ratio: 1/1) and (min-width: 700px) {
  .intro { padding-bottom: 2vh; }
}

/* Small phones */
@media (max-width: 380px) {
  .notify-row { flex-direction: column; }
  .notify button { margin: 0 0.3125rem 0.3125rem; min-height: 2.75rem; }
  .bottombar { flex-direction: column; align-items: flex-start; }
}

/* Short landscape screens (phones turned sideways, small laptops) */
@media (min-aspect-ratio: 10001/10000) and (max-height: 560px) {
  .page { row-gap: 1rem; }
  .headline { font-size: clamp(1.75rem, 1rem + 2.4vw, 2.5rem); margin-bottom: 0.5rem; }
  .lead { margin-bottom: 1rem; font-size: 0.9375rem; }
  .intro { max-width: 30rem; }
}

/* Very wide screens: cap text measure and keep it anchored */
@media (min-width: 1800px) {
  .intro { max-width: 38rem; }
}

/* ---------- Motion ---------- */

@keyframes media-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes intro-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-media,
  .intro { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
