/* حكاية فلسطين — موقع التطبيق. نفس هوية التطبيق: أسود زيتي، ذهبي، أحمر التطريز، كريمي. */
@font-face { font-family: Plex; src: url(IBMPlexSansArabic-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: Plex; src: url(IBMPlexSansArabic-SemiBold.ttf); font-weight: 600; font-display: swap; }
@font-face { font-family: Plex; src: url(IBMPlexSansArabic-Bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: PlexL; src: url(IBMPlexSans-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: PlexL; src: url(IBMPlexSans-SemiBold.ttf); font-weight: 600 700; font-display: swap; }
@font-face { font-family: Playfair; src: url(PlayfairDisplay-Bold.ttf); font-weight: 700; font-display: swap; }

:root {
  --bg: #0B0F0A; --surface: #141A12; --surface2: #1B2318; --line: #2A3424;
  --text: #EDE9DD; --muted: #A6AD98; --gold: #C8A35A; --red: #D23A45; --cream: #EFE7D6; --ink: #1B1A16; --olive: #3E5A2A; --oliveL: #8DAE5E;
  --maxw: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.75 Plex, PlexL, -apple-system, "Segoe UI", Tahoma, sans-serif; -webkit-font-smoothing: antialiased; }
html[lang="en"] body { font-family: PlexL, Plex, -apple-system, "Segoe UI", sans-serif; }
html[lang="ar"] .en, html[lang="en"] .ar { display: none !important; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* شريط التطريز */
.stitch { height: 14px; background:
  linear-gradient(45deg, transparent 43%, var(--red) 43% 57%, transparent 57%) 0 0/14px 14px,
  linear-gradient(-45deg, transparent 43%, var(--red) 43% 57%, transparent 57%) 0 0/14px 14px; opacity: .85; }
.stitch.gold { background:
  linear-gradient(45deg, transparent 43%, var(--gold) 43% 57%, transparent 57%) 0 0/14px 14px,
  linear-gradient(-45deg, transparent 43%, var(--gold) 43% 57%, transparent 57%) 0 0/14px 14px; opacity: .55; }

/* الرأس */
header.top { position: sticky; top: 0; z-index: 10; background: rgba(11,15,10,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 14px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand .en { font-family: Playfair, Georgia, serif; font-size: 19px; }
nav.links { margin-inline-start: auto; display: flex; gap: 22px; font-size: 15px; }
nav.links a { color: var(--muted); }
nav.links a:hover { color: var(--text); text-decoration: none; }
.lang-btn { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 20px; padding: 5px 14px; font: inherit; font-size: 14px; cursor: pointer; }
@media (max-width: 760px) { nav.links { display: none; } .lang-btn { margin-inline-start: auto; } }

/* البطل */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto; height: 120%; background: radial-gradient(closest-side, rgba(210,58,69,.16), rgba(200,163,90,.05) 55%, transparent 75%); pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.kicker { color: var(--gold); font-weight: 600; letter-spacing: .5px; display: flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; width: 26px; height: 3px; background: var(--red); border-radius: 2px; }
h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.15; margin: 14px 0 16px; font-weight: 700; }
html[lang="en"] h1 { font-family: Playfair, Georgia, serif; }
.lead { font-size: clamp(17px, 2vw, 20px); color: rgba(237,233,221,.86); max-width: 34em; margin: 0 0 28px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store { display: inline-flex; align-items: center; gap: 10px; background: var(--text); color: var(--ink); border-radius: 14px; padding: 10px 18px; font-weight: 700; min-height: 54px; }
.store:hover { text-decoration: none; filter: brightness(.95); }
.store small { display: block; font-weight: 400; font-size: 12px; opacity: .75; line-height: 1.2; }
.store svg { width: 24px; height: 24px; flex: none; }
.store.soon { background: var(--surface); color: var(--text); border: 1px solid var(--line); cursor: default; }
.note { color: var(--muted); font-size: 14px; margin-top: 14px; }

/* هاتف */
.phone { width: min(300px, 78vw); margin-inline: auto; border-radius: 42px; padding: 10px; background: linear-gradient(160deg, #2b3326, #10150e); box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px #34402c inset; }
.phone img { border-radius: 33px; width: 100%; height: auto; aspect-ratio: 402/874; object-fit: cover; }
.hero .phones { position: relative; height: 620px; }
.hero .phones .phone { position: absolute; }
.hero .phones .p1 { inset-inline-end: 0; top: 0; z-index: 2; }
.hero .phones .p2 { inset-inline-start: 0; top: 70px; transform: scale(.88); opacity: .9; }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .kicker, .ctas { justify-content: center; } .lead { margin-inline: auto; }
  .hero .phones { height: auto; } .hero .phones .phone { position: static; } .hero .phones .p2 { display: none; }
}

/* أرقام */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin: 36px 0 0; }
.stat { background: var(--surface); padding: 22px 18px; text-align: center; }
.stat b { display: block; font: 600 34px/1.1 "IBM Plex Mono", PlexL, monospace; color: var(--gold); }
.stat span { color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

section.block { padding: 88px 0; }
section.block.alt { background: linear-gradient(180deg, rgba(20,26,18,.6), rgba(20,26,18,0)); }
h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.25; margin: 10px 0 14px; }
html[lang="en"] h2 { font-family: Playfair, Georgia, serif; }
.sub { color: rgba(237,233,221,.8); max-width: 40em; margin: 0 0 40px; font-size: 18px; }

/* ميزة مع صورة */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin: 0 0 96px; }
.feature:last-child { margin-bottom: 0; }
.feature.flip .text { order: 2; }
.feature h3 { font-size: clamp(24px, 2.8vw, 32px); margin: 8px 0 12px; line-height: 1.3; }
.feature p { color: rgba(237,233,221,.84); margin: 0 0 14px; }
.feature ul { margin: 0; padding-inline-start: 1.1em; color: rgba(237,233,221,.84); }
.feature li { margin: 4px 0; }
.feature li::marker { color: var(--red); }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; gap: 28px; } .feature.flip .text { order: 0; } }

/* بطاقات */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.card .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface2); border: 1px solid var(--line); color: var(--gold); margin-bottom: 12px; }
.card .ic svg { width: 22px; height: 22px; }
.card h4 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

/* معرض */
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 220px; gap: 18px; overflow-x: auto; padding: 6px 4px 18px; scroll-snap-type: x mandatory; }
.gallery figure { margin: 0; scroll-snap-align: start; }
.gallery .phone { width: 220px; border-radius: 32px; padding: 7px; }
.gallery .phone img { border-radius: 26px; }
.gallery figcaption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 10px; }

/* مبدأ */
.principle { background: var(--cream); color: var(--ink); border-radius: 26px; padding: 44px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 28px; }
.principle h4 { margin: 0 0 6px; font-size: 19px; }
.principle p { margin: 0; color: rgba(27,26,22,.78); font-size: 15.5px; }
@media (max-width: 860px) { .principle { grid-template-columns: 1fr; padding: 28px; } }

/* لغات */
.langs { display: flex; flex-wrap: wrap; gap: 10px; }
.langs span { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 6px 16px; font-size: 15px; }

/* أسئلة */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px; margin: 0 0 10px; }
summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: inline-end; color: var(--gold); font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { margin: 0 0 16px; color: rgba(237,233,221,.84); }

/* دعوة أخيرة */
.cta-final { text-align: center; padding: 96px 0; }
.cta-final h2 { margin-bottom: 10px; }
.cta-final .ctas { justify-content: center; margin-top: 24px; }
.quote { font-size: clamp(20px, 2.6vw, 26px); max-width: 30em; margin: 0 auto; }

footer { border-top: 1px solid var(--line); padding: 32px 0 44px; color: var(--muted); font-size: 14.5px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: space-between; }
footer .row { display: flex; gap: 20px; flex-wrap: wrap; }

/* ───── تفاعل ───── */
.stitch-hero { display: grid; place-items: center; }
.stitch-hero canvas { width: min(420px, 80vw); height: auto; aspect-ratio: 520/760; filter: drop-shadow(0 20px 60px rgba(210,58,69,.25)); }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

.vmap { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 40px; align-items: center; }
.vmap-canvas { position: relative; border-radius: 22px; background: radial-gradient(closest-side, rgba(210,58,69,.12), transparent 80%); }
.vmap-canvas canvas { width: 100%; height: auto; aspect-ratio: 520/1040; display: block; cursor: crosshair; touch-action: pan-y; }
.vtip { position: absolute; transform: translate(-50%, -130%); background: var(--cream); color: var(--ink); border-radius: 10px; padding: 6px 12px; font-size: 14px; font-weight: 600; white-space: nowrap; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.vtip small { display: block; font-weight: 400; opacity: .7; font-size: 12px; }
.vcount b { display: block; font: 600 clamp(56px, 8vw, 88px)/1 "IBM Plex Mono", PlexL, monospace; color: var(--red); }
.vcount span { color: var(--muted); }
.vdate { color: var(--gold); font-size: 22px; font-weight: 600; margin: 8px 0 22px; min-height: 1.5em; }
.vctl { display: flex; align-items: center; gap: 14px; }
.vbtn { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--oliveL); background: var(--olive); color: var(--text); display: grid; place-items: center; cursor: pointer; flex: none; box-shadow: 0 0 24px rgba(62,90,42,.5); }
.vbtn svg { width: 24px; height: 24px; }
input[type=range] { flex: 1; accent-color: var(--gold); height: 30px; }
.vnote { color: var(--muted); font-size: 14.5px; margin-top: 22px; }
@media (max-width: 760px) { .vmap { grid-template-columns: 1fr; } .vmap-canvas { max-width: 340px; margin: 0 auto; } }

.showcase { display: grid; grid-template-columns: 1fr 340px; gap: 48px; align-items: start; }
.show-list { display: grid; gap: 12px; }
.show-item { text-align: start; background: transparent; border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; cursor: pointer; transition: background .25s, border-color .25s; }
.show-item:hover { border-color: #3d4a35; }
.show-item.on { background: var(--surface); border-color: var(--gold); box-shadow: inset 4px 0 0 var(--red); }
html[dir="rtl"] .show-item.on { box-shadow: inset -4px 0 0 var(--red); }
.show-item h3 { font-size: 21px; margin: 4px 0 6px; }
.show-item p, .show-item ul { margin: 0; color: rgba(237,233,221,.8); font-size: 15.5px; }
.show-item:not(.on) p, .show-item:not(.on) ul { display: none; }
.show-item ul { margin-top: 8px; padding-inline-start: 1.1em; }
.show-phone { position: sticky; top: 90px; }
.show-phone img { transition: opacity .3s; }
.show-phone img.fade { opacity: 0; }
@media (max-width: 860px) { .showcase { grid-template-columns: 1fr; } .show-phone { position: static; order: -1; } }

/* لا تتجاوز الشبكات عرض الشاشة (عناصر canvas وصور لها عرض أصلي) */
.hero .wrap > *, .feature > *, .vmap > *, .showcase > *, .principle > * { min-width: 0; }
canvas { max-width: 100%; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .showcase, .vmap { grid-template-columns: minmax(0, 1fr); } }
