/* Habbah website. Dark and calm, the same palette as the app. */
@font-face { font-family: "Montserrat"; src: url(fonts/Montserrat-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url(fonts/Montserrat-Medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url(fonts/Montserrat-SemiBold.woff2) format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Amiri"; src: url(fonts/Amiri-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Amiri"; src: url(fonts/Amiri-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #0A0F15;
  --bg-2: #0F1620;
  --ink: #F4F1EA;
  --muted: rgba(244, 241, 234, .68);
  --faint: rgba(244, 241, 234, .45);
  --line: rgba(255, 255, 255, .1);
  --card: rgba(255, 255, 255, .045);
  --ember: #F0643A;
  --teal: #9CC3C6;
  --gold: #FFE3A8;
  --radius: 22px;
  --max: 1120px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold); }
img, canvas { display: block; max-width: 100%; }
.ar { font-family: "Amiri", serif; direction: rtl; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* Header */
.nav { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  background: rgba(10, 15, 21, .62); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: .3px; }
.brand svg { width: 28px; height: 28px; }
.brand .ar { font-size: 22px; color: var(--gold); line-height: 1; }
.nav nav { margin-left: auto; display: flex; gap: 22px; font-size: 14px; }
.nav nav a { color: var(--muted); text-decoration: none; }
.nav nav a:hover, .nav nav a[aria-current] { color: var(--ink); }
@media (max-width: 640px) { .nav nav .opt { display: none; } .nav nav { gap: 16px; } }

/* Hero */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: -10%; z-index: -2; width: 120%; height: 120%; filter: blur(48px) saturate(1.25) brightness(.62); transform: scale(1.05); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 80% at 30% 40%, rgba(10,15,21,.15), rgba(10,15,21,.85) 70%), linear-gradient(transparent 70%, var(--bg)); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; min-height: min(92vh, 900px); padding-top: 40px; padding-bottom: 56px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 13px/1 "Montserrat"; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 14px var(--ember); }
h1 { font: 600 clamp(42px, 6.4vw, 76px)/1.02 "Montserrat"; letter-spacing: -1.5px; margin: 18px 0 10px; }
h1 .ar { display: block; font-size: .6em; font-weight: 700; color: var(--gold); letter-spacing: 0; margin-top: 10px; text-align: left; line-height: 1.4; }
.verse { margin: 0; font-size: 13.5px; color: var(--faint); }
@media (max-width: 880px) { h1 .ar { text-align: center; } }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 34em; margin: 18px 0 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 12px; padding: 12px 20px 12px 16px; border-radius: 14px; background: #000; color: #fff; border: 1px solid rgba(255,255,255,.35); text-decoration: none; }
.badge small { display: block; font-size: 11px; opacity: .8; line-height: 1.1; }
.badge b { display: block; font-size: 19px; font-weight: 600; line-height: 1.1; }
.badge svg { width: 26px; height: 26px; }
.badge.soon { cursor: default; }
.ghost { color: var(--ink); text-decoration: none; padding: 12px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.ghost:hover { color: var(--ink); border-color: rgba(255,255,255,.25); }
.promise { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 26px; font-size: 13.5px; color: var(--muted); padding: 0; list-style: none; }
.promise li::before { content: "✓"; color: var(--teal); margin-right: 7px; }

/* Phone */
.phone-col { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.phone { position: relative; width: min(360px, 82vw); aspect-ratio: 390 / 844; border-radius: 52px; padding: 11px; background: linear-gradient(145deg, #2A3038, #0C0F13 40%, #1C2128);
  box-shadow: 0 40px 90px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08) inset, 0 0 0 2px #05070A; }
.screen { position: relative; width: 100%; height: 100%; border-radius: 42px; overflow: hidden; background: #000; touch-action: pan-y; cursor: grab; }
.screen:active { cursor: grabbing; }
.screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.island { position: absolute; top: 2.2%; left: 50%; width: 30%; height: 3.6%; transform: translateX(-50%); background: #000; border-radius: 20px; z-index: 3; }
.app-head { position: absolute; left: 6%; right: 6%; top: 12.5%; text-align: center; z-index: 2; pointer-events: none; transition: opacity .6s; }
.app-head .ar { font-size: clamp(22px, 7.4cqw, 34px); font-weight: 700; line-height: 1.5; text-shadow: 0 0 16px rgba(255,255,255,.45); }
.app-head .div { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px 0 6px; }
.app-head .div i { width: 22%; height: 1px; background: rgba(255,255,255,.35); }
.app-head .div b { width: 7px; height: 7px; background: var(--ember); transform: rotate(45deg); }
.app-head .tr { font-weight: 600; font-size: clamp(13px, 4.4cqw, 19px); line-height: 1.25; text-shadow: 0 1px 4px rgba(0,0,0,.3); }
.app-head .en { font-size: clamp(10px, 3.2cqw, 13px); color: rgba(255,255,255,.8); margin-top: 3px; text-shadow: 0 1px 4px rgba(0,0,0,.35); }
.screen { container-type: inline-size; }
.app-count { position: absolute; left: 50%; top: 77%; width: 34%; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 2; pointer-events: none;
  border-radius: 50%; background: rgba(22, 26, 33, .94); box-shadow: 0 10px 24px rgba(0,0,0,.35); display: grid; place-items: center; text-align: center; }
.app-count svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.app-count .n { font: 700 clamp(26px, 11cqw, 46px)/1 ui-rounded, "SF Pro Rounded", system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.app-count .t { font-size: clamp(10px, 3.4cqw, 14px); color: rgba(255,255,255,.6); }
.hint { font-size: 13px; color: var(--faint); display: flex; align-items: center; gap: 8px; }
.hint kbd { font: inherit; padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; }
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 34px; text-align: center; min-height: auto; padding-top: 32px; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .cta, .promise { justify-content: center; }
}

/* Sections */
section { padding: 88px 0; }
.kicker { font: 500 13px/1 "Montserrat"; letter-spacing: 2px; text-transform: uppercase; color: var(--teal); }
h2 { font: 600 clamp(30px, 4vw, 46px)/1.12 "Montserrat"; letter-spacing: -.8px; margin: 14px 0 14px; }
.sub { color: var(--muted); max-width: 40em; margin: 0 0 40px; }
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); padding: 26px 0; }
.strip ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.strip li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--muted); }
.strip li b { display: block; color: var(--ink); font-weight: 600; font-size: 15.5px; }
.strip .dot { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(156,195,198,.12); color: var(--teal); font-size: 16px; }
@media (max-width: 880px) { .strip ul { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .strip ul { grid-template-columns: 1fr; } }

/* Worlds gallery */
.worlds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.world { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 390 / 600; background: #111; outline: 1px solid var(--line); }
.world canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.world .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 14px 14px; background: linear-gradient(transparent, rgba(8,12,17,.88)); }
.world .cap .ar { font-size: 20px; line-height: 1.4; font-weight: 700; text-align: left; }
.world .cap b { display: block; font-size: 14px; font-weight: 600; }
.world .cap span { display: block; font-size: 12px; color: var(--muted); }
@media (max-width: 980px) { .worlds { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px) { .worlds { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* Beads */
.beads-panel { border-radius: 28px; background: radial-gradient(120% 120% at 50% 0%, #1A2431, #0C1118); outline: 1px solid var(--line); padding: 28px 18px 18px; }
.beads-panel canvas { width: 100%; height: auto; }

/* Features */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin: 12px 0 8px; font-size: 18px; font-weight: 600; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(240,100,58,.14); color: var(--ember); font-size: 19px; }
@media (max-width: 880px) { .grid3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid3 { grid-template-columns: 1fr; } }

/* Knowledge */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.ref { background: linear-gradient(160deg, #18212C, #0E141B); border: 1px solid var(--line); border-radius: 26px; padding: 26px; }
.ref .ar { font-size: 30px; font-weight: 700; color: var(--gold); text-align: center; }
.ref .q { margin: 14px 0; padding-left: 14px; border-left: 2px solid var(--ember); color: var(--ink); }
.ref .src { font-size: 13px; color: var(--teal); }
.ref hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }

/* Closing */
.closing { text-align: center; }
.closing .ar { font-size: clamp(34px, 5vw, 54px); color: var(--gold); font-weight: 700; }
.closing p { color: var(--muted); max-width: 36em; margin: 10px auto 28px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--faint); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; margin-left: auto; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* Document pages (privacy, support, terms, sources) */
.doc { padding: 56px 0 80px; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(34px, 5vw, 52px); }
.doc .meta { color: var(--faint); font-size: 14px; margin-bottom: 30px; }
.doc h2 { font-size: 24px; margin: 40px 0 10px; letter-spacing: -.3px; }
.doc h3 { font-size: 18px; margin: 26px 0 6px; }
.doc p, .doc li { color: var(--muted); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .box { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; margin: 20px 0; }
.doc .box p { margin: 0; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 18px; margin: 10px 0; }
summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--ink); list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--teal); }
details[open] summary::after { content: "–"; }
details p, details ol, details ul { margin-top: 0; }
.mail { display: inline-flex; gap: 10px; align-items: center; font-weight: 600; color: var(--ink); text-decoration: none; background: var(--card); border: 1px solid var(--line); padding: 12px 18px; border-radius: 14px; }
.mail:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
