:root {
  --bg: #0a0a0a;
  --bg-deep: #000000;
  --ink: #f4f7f5;
  --muted: rgba(244, 247, 245, 0.62);
  --line: rgba(244, 247, 245, 0.12);
  --accent: #f5c518;
  --accent-soft: rgba(245, 197, 24, 0.18);
  --warm: #f5c518;
  --orb-a: #2a2410;
  --orb-b: #3d3214;
  --orb-c: #c9a017;
  --font-display: "Syne", sans-serif;
  --font-body: "Sora", "Heebo", "Cairo", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(1.25rem, 5vw, 2rem);
}

html[lang="he"] {
  --font-body: "Heebo", "Sora", sans-serif;
}

html[lang="ar"] {
  --font-body: "Cairo", "Sora", sans-serif;
}

html[lang="en"] {
  --font-body: "Sora", sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-deep);
  overflow-x: hidden;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Language switcher */
.lang-bar {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 40rem;
  display: flex;
  justify-content: center;
  padding: 1.15rem var(--pad) 0;
}

.lang-switch {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.lang-btn {
  min-width: 2.6rem;
  min-height: 2.1rem;
  padding: 0 0.7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(244, 247, 245, 0.55);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.lang-btn:hover {
  color: var(--ink);
}

.lang-btn.is-active,
.lang-btn[aria-pressed="true"] {
  background: rgba(245, 197, 24, 0.16);
  color: var(--accent);
}

html[dir="rtl"] .btn-arrow {
  transform: scaleX(-1);
}

html[dir="rtl"] .notify button:hover .btn-arrow {
  transform: scaleX(-1) translateX(3px);
}

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

/* Atmosphere */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(110% 70% at 50% -5%, #1a1608 0%, transparent 55%),
    radial-gradient(70% 50% at 90% 90%, rgba(245, 197, 24, 0.1), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
  animation: drift 18s var(--ease) infinite alternate;
}

.orb-a {
  width: min(52vw, 480px);
  height: min(52vw, 480px);
  background: var(--orb-a);
  top: -8%;
  left: -10%;
  animation-duration: 22s;
}

.orb-b {
  width: min(42vw, 380px);
  height: min(42vw, 380px);
  background: var(--orb-b);
  top: 35%;
  right: -8%;
  opacity: 0.4;
  animation-duration: 16s;
  animation-delay: -4s;
}

.orb-c {
  width: min(36vw, 300px);
  height: min(36vw, 300px);
  background: var(--orb-c);
  bottom: -5%;
  left: 30%;
  opacity: 0.28;
  animation-duration: 20s;
  animation-delay: -8s;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 75%);
  opacity: 0.35;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(4%, 6%, 0) scale(1.08);
  }
}

/* Hero — centered */
.hero {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(3rem, 10vh, 5rem) var(--pad) 2.5rem;
  gap: 1rem;
}

.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}

html[lang="he"] .eyebrow,
html[lang="ar"] .eyebrow {
  letter-spacing: 0.08em;
  text-transform: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.brand {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  line-height: 1;
  width: 100%;
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: min(18rem, 78vw);
  height: auto;
  background: #000;
  border-radius: 0.35rem;
  filter: drop-shadow(0 12px 40px rgba(245, 197, 24, 0.12));
}

.brand-tld {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.1rem, 4vw, 1.65rem);
  letter-spacing: -0.03em;
  color: rgba(244, 247, 245, 0.45);
}

.lede {
  margin: 0.25rem 0 0.35rem;
  max-width: 22rem;
  width: 100%;
  font-size: clamp(0.95rem, 2.8vw, 1.1rem);
  font-weight: 300;
  line-height: 1.65;
  color: var(--muted);
}

.notify {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  width: 100%;
  max-width: 20rem;
  margin: 0.5rem auto 0;
}

.notify input {
  width: 100%;
  max-width: 100%;
  min-height: 3rem;
  padding: 0 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* avoids iOS zoom on focus */
  outline: none;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.notify input::placeholder {
  color: rgba(244, 247, 245, 0.38);
}

.notify input:focus {
  border-color: rgba(245, 197, 24, 0.55);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.notify button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 3rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe066, #f5c518 55%, #d4a010);
  color: #111;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s var(--ease), filter 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
  box-shadow: 0 10px 30px rgba(245, 197, 24, 0.28);
}

.notify button .btn-arrow {
  width: 1.05rem;
  height: 1.05rem;
  transition: transform 0.25s var(--ease);
}

.notify button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

html[dir="ltr"] .notify button:hover .btn-arrow {
  transform: translateX(3px);
}

.notify button:active {
  transform: translateY(0);
}

.form-msg {
  margin: 0.1rem 0 0;
  min-height: 1.25rem;
  font-size: 0.85rem;
  color: var(--accent);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.form-msg.show {
  opacity: 1;
  transform: translateY(0);
}

.form-msg.error {
  color: #f0a090;
}

.foot {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 var(--pad) 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(244, 247, 245, 0.35);
}

/* Entrance */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  filter: blur(8px);
  animation: rise 0.95s var(--ease) forwards;
  animation-delay: var(--d, 0ms);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb,
  .reveal {
    animation: none !important;
  }

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

/* Desktop: side-by-side form, larger logo */
@media (min-width: 640px) {
  .brand {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 0.35rem;
  }

  .brand-logo {
    max-width: 22rem;
  }

  .brand-tld {
    padding-bottom: 0.4em;
  }

  .lede {
    max-width: 26rem;
  }

  .notify {
    flex-direction: row;
    flex-wrap: wrap;
    max-width: 26rem;
    align-items: center;
  }

  .notify input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    font-size: 0.95rem;
  }

  .notify button {
    width: auto;
    flex: 0 0 auto;
  }

  .form-msg {
    flex-basis: 100%;
  }
}
