/*
 * Ila Habibi - website styles. Dark romantic theme shared with the games (night, rose, gold).
 * Logical properties (inline-start/end) everywhere so Arabic (RTL) and English (LTR) both lay out correctly.
 */
:root {
  --night: #0b0a10;
  --ink: #13121a;
  --panel: #19171f;
  --panel-2: #221f2a;
  --line: rgba(246, 241, 234, .1);
  --line-2: rgba(246, 241, 234, .18);
  --fg: #f6f1ea;
  --muted: #b2aab6;
  --rose: #e2506b;
  --rose-deep: #c13a57;
  --gold: #e8d3a2;
  --ok: #7fd3a3;
  --radius: 22px;
  --display: 'Instrument Serif', 'Amiri', Georgia, serif;
  --ui: 'Hanken Grotesk', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
:root:lang(ar) {
  --display: 'Amiri', 'Instrument Serif', Georgia, serif;
  --ui: 'IBM Plex Sans Arabic', 'Hanken Grotesk', system-ui, sans-serif;
}
/* Arabic letters are joined: never letter-space or uppercase them. */
:root:lang(ar) * { letter-spacing: 0 !important; text-transform: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--night); color: var(--fg);
  font: 16px/1.65 var(--ui); overflow-x: hidden;
}
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 400; }
p { margin: 0; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.i { width: 1.2em; height: 1.2em; flex: none; }
[dir="rtl"] .flip-rtl, [dir="ltr"] .flip-ltr { transform: scaleX(-1); }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; padding: 8px 14px; background: var(--fg); color: var(--night); border-radius: 8px; z-index: 50; }
.skip:focus { inset-inline-start: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent; font: 700 15px/1.2 var(--ui); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-rose { background: linear-gradient(135deg, var(--rose), var(--rose-deep)); color: #fff; box-shadow: 0 10px 30px -10px rgba(226, 80, 107, .7); }
.btn-rose:hover { box-shadow: 0 14px 36px -10px rgba(226, 80, 107, .85); }
.btn-ghost { background: rgba(246, 241, 234, .05); border-color: var(--line-2); color: var(--fg); }
.btn-ghost:hover { background: rgba(246, 241, 234, .1); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; background: rgba(11, 10, 16, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 400 26px/1 var(--display); color: var(--fg); }
:root:lang(ar) .brand { font-weight: 700; font-size: 24px; line-height: 1.4; }
.logo-mark { width: 38px; height: 30px; }
.nav { display: flex; gap: 26px; margin-inline-start: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--fg); }
.nav-lang { display: none !important; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.lang { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.lang:hover { color: var(--fg); }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--fg); place-items: center; cursor: pointer; }
.admin-strip { background: var(--gold); color: #1b160d; text-align: center; font-size: 13px; font-weight: 700; padding: 6px; }
.admin-strip a { text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }

@media (max-width: 860px) {
  .menu-btn { display: grid; }
  .topbar-actions .lang { display: none; }
  .nav {
    position: absolute; inset-inline: 0; top: 100%; flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: rgba(11, 10, 16, .97); border-bottom: 1px solid var(--line); display: none;
  }
  .nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav-lang { display: flex !important; gap: 8px; align-items: center; border-bottom: 0 !important; }
  .nav-open .nav { display: flex; }
}
@media (max-width: 420px) {
  .topbar-actions .btn { display: none; }
}

/* ---------- glow backgrounds ---------- */
.glow { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; opacity: .55; }
.glow-a { width: 520px; height: 520px; background: radial-gradient(circle, rgba(226, 80, 107, .55), transparent 70%); top: -180px; inset-inline-start: -140px; }
.glow-b { width: 460px; height: 460px; background: radial-gradient(circle, rgba(232, 211, 162, .3), transparent 70%); bottom: -220px; inset-inline-end: -120px; }

/* ---------- hero ---------- */
.hero, .game-hero { position: relative; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; padding-block: clamp(56px, 9vw, 120px); position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--gold); font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow .i { color: var(--rose); }
.hero h1, .game-hero h1 {
  font-family: var(--display); font-size: clamp(44px, 6.4vw, 82px); line-height: 1.04; margin: 16px 0 18px;
  color: var(--gold); text-wrap: balance; text-shadow: 0 0 40px rgba(232, 211, 162, .25);
}
:root:lang(ar) .hero h1, :root:lang(ar) .game-hero h1 { line-height: 1.3; font-size: clamp(40px, 6vw, 72px); }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: #d9d1d6; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-art {
  position: relative; display: block; border-radius: 28px; overflow: hidden; transform: rotate(-2deg);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 0 1px var(--line-2), 0 0 80px -20px rgba(226, 80, 107, .45);
  transition: transform .4s ease;
}
[dir="rtl"] .hero-art { transform: rotate(2deg); }
.hero-art:hover { transform: rotate(0) scale(1.01); }
.hero-art img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.hero-art-label {
  position: absolute; inset-inline-start: 16px; bottom: 16px; display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px;
  border-radius: 999px; background: rgba(11, 10, 16, .7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-weight: 700; font-size: 14px;
}

/* ---------- sections ---------- */
.section { padding-block: clamp(56px, 8vw, 96px); position: relative; }
.section-title { font-family: var(--display); font-size: clamp(32px, 4vw, 48px); text-align: center; color: var(--fg); }
.section-lead { text-align: center; color: var(--muted); max-width: 60ch; margin: 12px auto 40px; }
.empty { text-align: center; color: var(--muted); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step { position: relative; padding: 26px 22px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.step-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: rgba(226, 80, 107, .14); color: var(--rose); margin-bottom: 18px; }
.step-num { position: absolute; top: 18px; inset-inline-end: 20px; font-family: var(--display); font-size: 34px; color: rgba(232, 211, 162, .25); line-height: 1; }
.step h3 { font-weight: 700; font-size: 18px; margin-bottom: 6px; font-family: var(--ui); }
.step p { color: var(--muted); font-size: 15px; }

/* Cards stay centred while there are only one or two games. */
.game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 400px)); justify-content: center; gap: 24px; }
.game-card { border-radius: 26px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; transition: border-color .2s; }
.game-card:hover { border-color: var(--line-2); }
.game-card-media { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 10; background: var(--panel-2); }
.game-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.game-card:hover .game-card-media img { transform: scale(1.04); }
.game-card-media .placeholder { display: grid; place-items: center; height: 100%; color: var(--rose); font-size: 48px; }
.game-card-price { position: absolute; top: 14px; inset-inline-end: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(11, 10, 16, .75); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-weight: 700; color: var(--gold); font-size: 15px; }
.game-card-body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.game-card-body h3 { font-family: var(--display); font-size: 30px; }
.game-card-body h3 a { text-decoration: none; }
.game-card-body p { color: var(--muted); }
.game-card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 12px; }

.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.perk { padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(246, 241, 234, .03), transparent); }
.perk .i { color: var(--gold); width: 28px; height: 28px; margin-bottom: 14px; }
.perk h3 { font: 700 17px/1.3 var(--ui); margin-bottom: 6px; }
.perk p { color: var(--muted); font-size: 15px; }

.faq { display: flex; flex-direction: column; gap: 12px; margin-top: 36px; }
.faq details { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 700; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--rose); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding-bottom: 20px; color: var(--muted); }

.cta-band .cta-inner {
  text-align: center; padding: clamp(40px, 6vw, 72px) 24px; border-radius: 32px; border: 1px solid var(--line-2);
  background: radial-gradient(120% 140% at 50% 0%, rgba(226, 80, 107, .28), transparent 60%), var(--panel);
}
.cta-band h2 { font-family: var(--display); font-size: clamp(32px, 4.4vw, 52px); color: var(--gold); margin-bottom: 12px; }
.cta-band p { color: var(--muted); margin-bottom: 26px; }

/* ---------- game page ---------- */
.game-hero-inner { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 4vw, 56px); align-items: center; padding-block: clamp(40px, 6vw, 80px); position: relative; }
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.back:hover { color: var(--fg); }
.badge { display: inline-block; margin-top: 12px; padding: 4px 12px; border-radius: 999px; background: var(--gold); color: #1b160d; font-weight: 700; font-size: 13px; }
.price-row { display: flex; align-items: baseline; gap: 10px; margin-top: 22px; }
.price { font: 700 clamp(30px, 3.4vw, 40px)/1 var(--ui); color: var(--gold); }
.trailer {
  width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 22px; background: #000; object-fit: cover;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 0 1px var(--line-2), 0 0 70px -24px rgba(226, 80, 107, .5);
}
/* Three per row (two on smaller screens); a short last row stays centred. */
.shots { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 32px; }
.shot { flex: 0 1 calc((100% - 28px) / 3); display: block; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .5s ease; }
.shot:hover img { transform: scale(1.05); }
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.about .section-title { text-align: start; margin-bottom: 18px; }
.about-text p { margin-bottom: 14px; color: #ddd5da; font-size: 17px; }
.about-list { padding: 26px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.about-list h3 { font: 700 18px/1.3 var(--ui); margin-bottom: 14px; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks .i { color: var(--rose); margin-top: 3px; }

.compare { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.compare-row { display: grid; grid-template-columns: 2fr 1fr 1fr; align-items: center; border-top: 1px solid var(--line); }
.compare-row:first-child { border-top: 0; }
.compare-row > span { padding: 14px 18px; }
.compare-row > span:not(:first-child) { text-align: center; display: grid; place-items: center; }
.compare-head { background: var(--panel-2); font-weight: 700; font-size: 14px; color: var(--gold); }
.yes { color: var(--ok); }
.no { color: var(--muted); opacity: .8; }
.center-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }

/* lightbox (site.js) */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(5, 5, 8, .94); display: grid; place-items: center; padding: 16px; }
.lightbox img { max-height: 88vh; border-radius: 12px; }
.lightbox button { position: absolute; top: 16px; inset-inline-end: 16px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .5); color: var(--fg); cursor: pointer; display: grid; place-items: center; }

/* ---------- order ---------- */
.order-inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.order-summary { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 12px; }
.order-summary img { border-radius: 20px; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--line); }
.order-summary h1 { font-family: var(--display); font-size: clamp(32px, 3.6vw, 44px); color: var(--gold); }
.mini-steps { margin: 6px 0 10px; padding-inline-start: 20px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
:root:lang(ar) .mini-steps { list-style-type: arabic-indic; }
.card { padding: clamp(20px, 3vw, 32px); border-radius: 26px; background: var(--panel); border: 1px solid var(--line); }
.order-form { display: flex; flex-direction: column; gap: 22px; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
legend { font: 700 18px/1.3 var(--ui); margin-bottom: 4px; padding: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-weight: 600; font-size: 14px; color: #ddd5da; }
.label b { color: var(--rose); }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2);
  background: var(--ink); color: var(--fg); font: 16px var(--ui); resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(232, 211, 162, .15); }
.field small, .hint { color: var(--muted); font-size: 13px; }
.field .error, .form-error { color: #ff9cb0; font-size: 14px; }
.has-error input, .has-error textarea { border-color: #ff7a93; }
.form-error { padding: 12px 14px; border-radius: 12px; background: rgba(226, 80, 107, .14); }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-card { position: relative; display: flex; align-items: center; justify-content: center; min-height: 64px; padding: 12px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--ink); cursor: pointer; font-weight: 700; font-size: 17px; text-align: center; }
.choice-card input { position: absolute; opacity: 0; }
.choice-card:has(input:checked) { border-color: var(--rose); background: rgba(226, 80, 107, .14); box-shadow: 0 0 0 3px rgba(226, 80, 107, .18); }
.choice-card:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 3px; }
.trap { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- thanks / message pages ---------- */
.thanks { text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.thanks-icon, .big-heart { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: rgba(226, 80, 107, .15); color: var(--rose); }
.thanks-icon .i, .big-heart .i { width: 34px; height: 34px; }
.thanks h1, .message-page h1 { font-family: var(--display); font-size: clamp(32px, 4vw, 46px); color: var(--gold); }
.order-code { font-size: 18px; }
.order-code b { color: var(--gold); letter-spacing: .1em; }
.thanks .mini-steps { text-align: start; }
.note { padding: 14px 18px; border-radius: 14px; background: var(--panel-2); color: #ddd5da; max-width: 52ch; }
.message-page { display: flex; flex-direction: column; gap: 16px; align-items: center; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 40px; background: var(--ink); }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; padding-block: 48px 32px; }
.footer-brand p { color: var(--muted); margin-top: 14px; max-width: 44ch; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h2 { font: 700 14px/1.3 var(--ui); color: var(--gold); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.footer-col a { color: var(--muted); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.footer-col a:hover { color: var(--fg); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding-block: 18px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-bottom a { color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-inner, .game-hero-inner, .about, .order-inner { grid-template-columns: 1fr; }
  .hero-art { transform: none !important; }
  .steps, .perks { grid-template-columns: 1fr 1fr; }
  .shot { flex-basis: calc((100% - 14px) / 2); }
  .order-summary { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .steps, .perks, .two, .choice { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  .compare-row { grid-template-columns: 1.6fr 1fr 1fr; font-size: 14px; }
  .compare-row > span { padding: 12px 10px; }
  .footer-inner { grid-template-columns: 1fr; }
  .game-card-actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
