/* Habooba portal — mobile-first, RTL/LTR aware (logical properties), no external requests */
:root {
  --bg0: #050b18;
  --bg1: #0b1a36;
  --bg2: #152a52;
  --ink: #f6f2e8;
  --muted: #a9b9d3;
  --gold: #f6c453;
  --gold2: #ff9f43;
  --teal: #2dd4bf;
  --green: #34d399;
  --line: rgba(255, 255, 255, .14);
  --glass: rgba(255, 255, 255, .07);
  --radius: 28px;
  --maxw: 1040px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0; color: var(--ink); background: var(--bg0); min-height: 100svh; overflow-x: hidden;
  font-family: "Noto Sans Arabic", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html[lang="ar"] [lang="en"], html[lang="en"] [lang="ar"] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 12px; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--gold); color: #3a2300; padding: 10px 16px; border-radius: 12px; z-index: 100; font-weight: 800; }
.skip:focus { top: 12px; }

/* ---------- sky ---------- */
.sky { position: fixed; inset: 0; z-index: -2; background:
  radial-gradient(1100px 700px at 78% 6%, rgba(255, 160, 60, .17), transparent 62%),
  radial-gradient(900px 700px at 8% 30%, rgba(45, 212, 191, .13), transparent 60%),
  linear-gradient(180deg, #0b1a36 0%, #070f22 55%, #050b18 100%); }
.stars { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .75;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 27% 8%, #fff 50%, transparent 52%),
    radial-gradient(1.6px 1.6px at 41% 24%, #ffe9b0 50%, transparent 52%), radial-gradient(1px 1px at 58% 12%, #fff 50%, transparent 52%),
    radial-gradient(1.3px 1.3px at 73% 30%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 88% 16%, #ffe9b0 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 6% 46%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 35% 41%, #fff 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 66% 47%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 94% 43%, #fff 50%, transparent 52%);
  animation: twinkle 6s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .45; } to { opacity: .9; } }

/* ---------- header ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: 20px; }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: calc(env(safe-area-inset-top) + 16px) 8px; }
.mini { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: .3px; }
.mini img { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); }
.lang { border: 1px solid var(--line); background: var(--glass); color: var(--ink); padding: 9px 18px; border-radius: 99px; font: inherit; font-weight: 700; cursor: pointer; backdrop-filter: blur(6px); transition: background .2s, transform .1s; }
.lang:hover { background: rgba(255, 255, 255, .14); }
.lang:active { transform: scale(.96); }

/* ---------- hero ---------- */
.hero { position: relative; text-align: center; padding: clamp(32px, 7vw, 72px) 0 0; }
.eyebrow { display: inline-block; margin: 0 0 14px; padding: 8px 18px; border-radius: 99px; background: var(--glass); border: 1px solid var(--line); font-weight: 700; font-size: .95rem; color: #e8eefb; backdrop-filter: blur(6px); }
.wordmark { margin: 0; line-height: 1; }
.wm-ar { display: block; font-size: clamp(5rem, 24vw, 10.5rem); font-weight: 900; line-height: 1.15;
  background: linear-gradient(180deg, #fff6d6 0%, var(--gold) 45%, var(--gold2) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 10px 40px rgba(246, 196, 83, .35)); animation: rise 1s cubic-bezier(.2, .8, .2, 1) both; }
.wm-en { display: block; margin-top: -4px; font-size: clamp(1.1rem, 4.4vw, 2rem); font-weight: 800; letter-spacing: .42em; text-transform: uppercase; color: #e9eefc; padding-inline-start: .42em; animation: rise 1s .12s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.tagline { margin: 22px auto 28px; max-width: 34ch; font-size: clamp(1.15rem, 3.4vw, 1.55rem); color: #dbe4f6; animation: rise 1s .24s cubic-bezier(.2, .8, .2, 1) both; }
.cta { position: relative; display: inline-flex; align-items: center; gap: 12px; padding: 16px 34px; border-radius: 99px; text-decoration: none; font-weight: 900; font-size: 1.15rem; color: #3a2300; overflow: hidden;
  background: linear-gradient(180deg, #ffd978, var(--gold) 55%, var(--gold2)); box-shadow: 0 8px 0 #b8741f, 0 22px 50px rgba(246, 196, 83, .35); transition: transform .12s, box-shadow .12s; animation: rise 1s .36s cubic-bezier(.2, .8, .2, 1) both; }
.cta::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%); transform: translateX(-120%); animation: shine 4.5s 1.5s infinite; }
@keyframes shine { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.cta:hover { transform: translateY(-2px); }
.cta:active { transform: translateY(5px); box-shadow: 0 3px 0 #b8741f, 0 10px 24px rgba(246, 196, 83, .3); }
.go::after { content: "→"; font-weight: 900; }
[dir="rtl"] .go::after { content: "←"; }
.go.down::after, [dir="rtl"] .go.down::after { content: "↓"; }

/* scene (sun, dunes, pyramids) */
.scene { position: relative; margin: clamp(-10px, 2vw, 10px) calc(50% - 50vw) 0; width: 100vw; height: clamp(150px, 26vw, 300px); pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 72%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 72%, transparent 100%); }
.scene svg { position: absolute; bottom: 0; left: 50%; height: 100%; width: auto; min-width: 100%; aspect-ratio: 1440 / 300; transform: translateX(-50%); }
.scene .sun { animation: sunbob 9s ease-in-out infinite alternate; transform-origin: center; transform-box: fill-box; }
@keyframes sunbob { to { transform: translateY(-14px); } }
.scene .drift { animation: drift 22s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translateX(-24px); } }

/* ---------- games ---------- */
.games { position: relative; margin-top: 4px; padding-bottom: 8px; }
.section-title { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; font-size: 1.05rem; font-weight: 800; color: var(--muted); letter-spacing: .6px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
[dir="rtl"] .section-title::after { background: linear-gradient(270deg, var(--line), transparent); }
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.card { position: relative; isolation: isolate; min-height: 430px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: flex-end; padding: 26px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5); transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, border-color .25s; }
.card h3 { margin: 0 0 8px; font-size: clamp(1.6rem, 4.6vw, 2.1rem); line-height: 1.25; font-weight: 900; }
.card p { margin: 0 0 16px; color: #dbe4f6; font-size: 1.05rem; max-width: 42ch; }
.badge { position: absolute; top: 20px; inset-inline-start: 20px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; font-size: .88rem; font-weight: 800; background: rgba(5, 11, 24, .62); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 12px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.chips li { padding: 6px 13px; border-radius: 99px; background: rgba(255, 255, 255, .11); border: 1px solid var(--line); font-size: .9rem; font-weight: 700; backdrop-filter: blur(6px); }
.play { display: inline-flex; align-items: center; gap: 10px; padding: 13px 26px; border-radius: 99px; font-weight: 900; font-size: 1.05rem; color: #3a2300; background: linear-gradient(180deg, #ffd978, var(--gold) 55%, var(--gold2)); box-shadow: 0 5px 0 #b8741f; text-decoration: none; width: fit-content; }
.live { background: #0a1428; }
.live .cover { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.live::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(5, 11, 24, .15) 0%, rgba(5, 11, 24, .35) 38%, rgba(5, 11, 24, .94) 82%); }
.live .stretch::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.live:hover, .live:focus-within { transform: translateY(-6px); border-color: rgba(246, 196, 83, .6); box-shadow: 0 40px 90px rgba(0, 0, 0, .6), 0 0 0 1px rgba(246, 196, 83, .35), 0 0 70px rgba(246, 196, 83, .18); }
.live:hover .cover { transform: scale(1.06); }
.soon { background: radial-gradient(520px 340px at 50% 28%, rgba(255, 159, 67, .22), transparent 70%), linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)); backdrop-filter: blur(10px); }
.soon .badge .dot { background: var(--gold); animation: none; }
.teacard { background: radial-gradient(520px 340px at 50% 26%, rgba(255, 159, 67, .30), transparent 70%), linear-gradient(160deg, #6b3f22, #3a2316 55%, #24150d); }
.teacard .chips li { background: rgba(0, 0, 0, .28); }
.teacard .tea { top: 34px; width: 128px; height: 150px; }
.card.teacard { min-height: 470px; }
@media (max-width: 640px) { .teacard .tea { top: 30px; width: 112px; height: 132px; } .card.teacard { min-height: 510px; } }
.tea { position: absolute; top: 58px; inset-inline: 0; margin-inline: auto; width: 170px; height: 200px; z-index: 0; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .45)); }
.steam path { fill: none; stroke: rgba(255, 245, 225, .85); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 90; stroke-dashoffset: 90; opacity: 0; animation: steam 3.4s ease-in-out infinite; }
.steam path:nth-child(2) { animation-delay: 1.1s; }
.steam path:nth-child(3) { animation-delay: 2.2s; }
@keyframes steam { 0% { stroke-dashoffset: 90; opacity: 0; transform: translateY(14px); } 35% { opacity: .9; } 100% { stroke-dashoffset: 0; opacity: 0; transform: translateY(-16px); } }
.soon .wait { display: inline-flex; padding: 12px 24px; border-radius: 99px; width: fit-content; font-weight: 800; color: var(--muted); border: 1px dashed rgba(255, 255, 255, .35); }
.soon:hover { transform: translateY(-3px); border-color: rgba(255, 159, 67, .45); }

/* ---------- about ---------- */
.about { margin: 54px 0 0; padding: clamp(24px, 5vw, 44px); border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line); text-align: center; backdrop-filter: blur(8px); }
.about .heart { font-size: 2rem; display: block; margin-bottom: 8px; }
.about p { margin: 0 auto 18px; max-width: 54ch; font-size: clamp(1.05rem, 2.8vw, 1.25rem); color: #e6edfb; }
.mail { display: inline-flex; align-items: center; gap: 10px; padding: 12px 24px; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid var(--line); text-decoration: none; font-weight: 800; transition: background .2s; }
.mail:hover { background: rgba(255, 255, 255, .18); }

/* ---------- footer ---------- */
footer { margin-top: 52px; padding: 28px 0 calc(env(safe-area-inset-bottom) + 34px); border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: .92rem; }
footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 12px; }
footer a { text-decoration: none; font-weight: 700; color: #cfdbf2; }
footer a:hover { color: var(--gold); text-decoration: underline; }
footer p { margin: 4px 0; }

/* ---------- article pages (privacy) ---------- */
.doc { max-width: 760px; margin: 28px auto 0; padding: clamp(22px, 5vw, 40px); background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(8px); }
.doc h1 { margin: 0 0 6px; font-size: clamp(1.8rem, 5vw, 2.4rem); }
.doc h2 { margin: 28px 0 6px; font-size: 1.2rem; color: var(--gold); }
.doc p, .doc li { color: #e2eaf9; }
.doc .stamp { color: var(--muted); font-size: .9rem; }
.doc a { color: var(--teal); }

@media (max-width: 560px) {
  .card { min-height: 400px; padding: 22px; }
  .tea { top: 54px; width: 150px; height: 176px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } .stars { animation: none; } html { scroll-behavior: auto; } }

#games { scroll-margin-top: 18px; }
