:root {
  --coral: #ff4d6d;
  --coral-deep: #e11d48;
  --burgundy: #7a1f3d;
  --mint: #2dd4bf;
  --teal: #14b8a6;
  --ink: #f5f0f4;
  --muted: rgba(245, 240, 244, 0.72);
  --faint: rgba(245, 240, 244, 0.42);
  --bg: #100e16;
  --elevated: rgba(42, 36, 58, 0.72);
  --line: rgba(245, 240, 244, 0.12);
  --radius: 999px;
  --radius-phone: 1.75rem;
  --grad-brand: linear-gradient(135deg, var(--burgundy) 0%, #c23a5c 42%, var(--mint) 100%);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Syne", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "DM Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --max: 74rem;
  --pad: clamp(1.25rem, 4vw, 2.75rem);
  --header-h: 3.75rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  font-optical-sizing: auto;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

html[lang="ar"] body,
html[lang="ar"] .brand,
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] .bubble,
html[lang="ar"] .phone-title,
html[lang="ar"] .phone-online,
html[lang="ar"] .mark,
html[lang="ar"] .foot-brand {
  font-family: "IBM Plex Sans Arabic", "DM Sans", system-ui, sans-serif;
}

html[lang="ar"] .brand,
html[lang="ar"] h1,
html[lang="ar"] h2 {
  letter-spacing: 0;
}

a {
  color: inherit;
}

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

:focus-visible {
  outline: 2px solid rgba(45, 212, 191, 0.9);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: linear-gradient(165deg, #17131f 0%, #100e16 50%, #0c0a12 100%);
}

.wash {
  position: absolute;
  inset: -10% -5% auto;
  height: 70%;
  background: var(--grad-brand);
  opacity: 0.18;
  filter: blur(40px);
  transform: rotate(-8deg);
}

.mesh {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 40% 0%, black 15%, transparent 70%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
  will-change: transform;
}

.orb-a {
  width: min(50vw, 28rem);
  height: min(50vw, 28rem);
  top: -12%;
  inset-inline-end: -8%;
  background: rgba(194, 58, 92, 0.55);
  animation: drift-a 26s ease-in-out infinite alternate;
}

.orb-b {
  width: min(40vw, 22rem);
  height: min(40vw, 22rem);
  bottom: 5%;
  inset-inline-start: -10%;
  background: rgba(45, 212, 191, 0.28);
  animation: drift-b 30s ease-in-out infinite alternate;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
  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");
}

@keyframes drift-a {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-8%, 10%) scale(1.08);
  }
}

@keyframes drift-b {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(10%, -8%) scale(1.1);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bubble-in {
  from {
    opacity: 0;
    transform: translateY(0.8rem) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes wave {
  0%,
  100% {
    transform: scaleY(0.45);
  }
  50% {
    transform: scaleY(1);
  }
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@keyframes typing {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes float-phone {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-8px);
  }
}

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding: 0.65rem var(--pad);
  backdrop-filter: blur(18px) saturate(1.2);
  background: rgba(16, 14, 22, 0.55);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.top.is-scrolled {
  border-bottom-color: rgba(255, 255, 255, 0.07);
  background: rgba(16, 14, 22, 0.82);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.mark-logo {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.55rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}

.lang {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.7rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.lang:hover {
  border-color: rgba(255, 77, 109, 0.5);
  background: rgba(255, 77, 109, 0.12);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(1.75rem, 5vh, 3.5rem) 0 clamp(2.75rem, 7vh, 4.5rem);
}

.hero-grid {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  gap: clamp(2rem, 5vw, 3.25rem);
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 36rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
  animation: rise 0.85s var(--ease-out) both;
}

.brand-logo {
  width: clamp(3.5rem, 8vw, 4.5rem);
  height: clamp(3.5rem, 8vw, 4.5rem);
  border-radius: 1.05rem;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.hero .brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 6.5vw, 3.6rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: brightness(1.25) saturate(1.05);
}

.hero h1 {
  margin: 0;
  max-width: 14ch;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2.05rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  animation: rise 0.85s var(--ease-out) 0.08s both;
}

html[lang="ar"] .hero h1 {
  max-width: 16ch;
}

.lede {
  margin: 1rem 0 0;
  max-width: 32rem;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.7vw, 1.12rem);
  animation: rise 0.85s var(--ease-out) 0.16s both;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.55rem;
  animation: rise 0.85s var(--ease-out) 0.24s both;
}

.meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.35rem 0 0;
  padding: 0;
  animation: rise 0.85s var(--ease-out) 0.32s both;
}

.meta li {
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--faint);
  font-size: 0.82rem;
  font-weight: 600;
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.85rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--coral) 0%, var(--coral-deep) 100%);
  color: #fff;
  box-shadow: 0 14px 34px rgba(225, 29, 72, 0.3);
}

.btn-primary[aria-disabled="true"] {
  cursor: default;
  opacity: 0.92;
}

.btn-primary[aria-disabled="true"]:hover {
  transform: none;
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(16, 14, 22, 0.4);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: rgba(45, 212, 191, 0.5);
  background: rgba(45, 212, 191, 0.1);
}

.hero-stage {
  justify-self: center;
  width: min(100%, 22rem);
  animation: rise 1s var(--ease-out) 0.15s both;
}

.phone {
  position: relative;
  border-radius: var(--radius-phone);
  padding: 0.85rem 0.85rem 1.05rem;
  background: linear-gradient(160deg, rgba(58, 48, 74, 0.95), rgba(28, 24, 40, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: float-phone 5.5s ease-in-out infinite alternate;
}

.phone::before {
  content: "";
  position: absolute;
  inset: -20% -14% auto;
  height: 55%;
  background: radial-gradient(circle at 50% 40%, rgba(194, 58, 92, 0.35), transparent 65%);
  z-index: -1;
  filter: blur(10px);
}

.phone-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 1rem;
  padding: 0.2rem 0.15rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.phone-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.phone-online {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius);
  background: rgba(45, 212, 191, 0.14);
  border: 1px solid rgba(45, 212, 191, 0.4);
  color: #b8fff4;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.phone-online .dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.2);
  animation: pulse-dot 1.6s ease-in-out infinite;
}

.thread {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 16.5rem;
}

.bubble {
  max-width: 86%;
  padding: 0.75rem 0.95rem;
  border-radius: 1.1rem;
  font-size: 0.94rem;
  line-height: 1.35;
  opacity: 0;
  animation: bubble-in 0.75s var(--ease-out) forwards;
}

.bubble.theirs {
  align-self: flex-start;
  background: rgba(72, 62, 92, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-end-start-radius: 0.28rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.bubble.mine {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--coral), var(--coral-deep));
  color: #fff;
  border-end-end-radius: 0.28rem;
}

.bubble.voice {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 7.5rem;
}

.bubble.typing {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 3.3rem;
  padding-block: 0.9rem;
}

.bubble.typing span {
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: rgba(245, 240, 244, 0.65);
  animation: typing 1.2s ease-in-out infinite;
}

.bubble.typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.bubble.typing span:nth-child(3) {
  animation-delay: 0.3s;
}

.wave {
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.9);
  animation: wave 1s ease-in-out infinite;
}

.wave:nth-child(2) {
  animation-delay: 0.15s;
  height: 18px;
}

.wave:nth-child(3) {
  animation-delay: 0.3s;
  height: 11px;
}

.delay-1 {
  animation-delay: 0.2s;
}
.delay-2 {
  animation-delay: 0.55s;
}
.delay-3 {
  animation-delay: 0.9s;
}
.delay-4 {
  animation-delay: 1.25s;
}
.delay-5 {
  animation-delay: 1.6s;
}

.block {
  padding: clamp(3.75rem, 10vh, 6.5rem) var(--pad);
  border-top: 1px solid var(--line);
}

.block-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
}

.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--mint);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

html[lang="ar"] .eyebrow {
  letter-spacing: 0.04em;
}

.block h2 {
  margin: 0;
  max-width: 18ch;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.8vw, 2.55rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

html[lang="ar"] .block h2 {
  max-width: 22ch;
}

.prose {
  margin: 1.15rem 0 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.06rem;
}

.bilingual {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  margin: 1.75rem 0 0;
  color: var(--faint);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.bilingual .slash {
  opacity: 0.45;
}

.about {
  background: linear-gradient(180deg, transparent, rgba(122, 31, 61, 0.08), transparent);
}

.beats {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.35rem;
}

.beats li {
  padding-top: 1.25rem;
  border-top: 2px solid rgba(255, 77, 109, 0.42);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.beats li:hover,
.beats li:focus-within {
  border-top-color: var(--mint);
  transform: translateY(-2px);
}

.beat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.75rem;
  border-radius: 0.85rem;
  color: #ffb3c1;
  background: rgba(255, 77, 109, 0.12);
  border: 1px solid rgba(255, 77, 109, 0.22);
}

.beat-num {
  display: block;
  margin-bottom: 0.4rem;
  color: rgba(255, 77, 109, 0.7);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.beats h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 700;
}

.beats p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.97rem;
}

.safety-panel {
  padding: clamp(1.4rem, 3vw, 2.1rem);
  border-radius: 1.4rem;
  background: linear-gradient(145deg, var(--elevated), rgba(24, 20, 34, 0.4));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.age-pill {
  display: inline-flex;
  margin: 1.35rem 0 0;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  background: rgba(255, 77, 109, 0.14);
  border: 1px solid rgba(255, 77, 109, 0.35);
  color: #ffb3c1;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.4rem;
}

.policy-links a {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(45, 212, 191, 0.55);
  padding-bottom: 0.1rem;
}

.policy-links a:hover {
  color: #9af0e3;
}

.foot {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 2.6rem var(--pad) 3.25rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.95rem;
}

.foot-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.5rem;
}

.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.foot-brand img {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.6rem;
}

.foot-mail {
  color: var(--muted);
  text-decoration: none;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

.foot-mail:hover {
  color: var(--mint);
}

.foot-nav,
.foot-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
}

.foot-nav a,
.foot-legal a {
  color: var(--faint);
  text-decoration: none;
  font-size: 0.9rem;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
}

.foot-nav a:hover,
.foot-legal a:hover {
  color: var(--ink);
}

.copy {
  margin: 0.15rem 0 0;
  color: var(--faint);
  font-size: 0.85rem;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 3.25rem;
  }

  .hero-stage {
    justify-self: end;
    width: min(100%, 23.5rem);
  }

  .beats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.85rem;
  }
}

@media (max-width: 899px) {
  .hero {
    align-items: stretch;
    min-height: auto;
    overflow: visible;
  }

  .hero-grid {
    gap: 1.75rem;
  }

  .hero-stage {
    position: relative;
    inset: auto;
    justify-self: center;
    width: min(100%, 20rem);
    margin-top: 0.35rem;
    opacity: 1;
    z-index: 1;
    pointer-events: none;
    mask-image: none;
  }

  .phone {
    animation: none;
    transform: none;
  }

  html[dir="rtl"] .phone {
    transform: none;
  }

  .hero-copy {
    padding-top: 0.25rem;
  }

  .thread {
    min-height: 14rem;
  }

  .phone-online {
    font-size: 0.68rem;
    padding: 0.32rem 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .bubble,
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
