/* ===================================================================
   Evoque — الرئيسية المتحركة (Phase 2: Motion)
   ألوان هوية ريحان فقط (brand / paper / sage / tint / clay / ink). الحركة: transform + opacity فقط.
   =================================================================== */
@view-transition { navigation: auto; }
::view-transition-old(root){ animation: .28s ease both vt-out; }
::view-transition-new(root){ animation: .4s ease both vt-in; }
@keyframes vt-out{ to{ opacity:0; transform:translateY(-6px); } }
@keyframes vt-in{ from{ opacity:0; transform:translateY(10px); } }

:root{ --ease:cubic-bezier(.2,.7,.2,1); --brand-ink:#12261F; }
html{ scroll-padding-top:84px; }

/* شريط تقدّم التمرير */
.scroll-progress{ position:fixed; top:0; inset-inline:0; height:3px; z-index:200; pointer-events:none; }
.scroll-progress i{ display:block; height:100%; width:100%; background:var(--sage); transform-origin:right center; transform:scaleX(0); }
html[dir="ltr"] .scroll-progress i{ transform-origin:left center; }

/* ===== الهيدر: شريط ثابت مدمج ===== */
header.hdr{
  position:sticky; top:0; z-index:100; padding:0; text-align:initial;
  background:rgba(245,243,238,.92); -webkit-backdrop-filter:saturate(1.4) blur(12px); backdrop-filter:saturate(1.4) blur(12px);
  border-bottom:1px solid transparent; transition:border-color .3s, box-shadow .3s;
}
header.hdr.scrolled{ border-bottom-color:var(--sage); box-shadow:0 6px 24px rgba(24,35,31,.08); }
.hdr-bar{
  max-width:1200px; margin:0 auto; padding:8px 16px; display:flex; align-items:center; gap:14px;
  flex-wrap:wrap; transition:padding .3s var(--ease);
}
header.hdr.scrolled .hdr-bar{ padding-top:5px; padding-bottom:5px; }
.hdr .logo-img{ margin:0; width:auto; max-width:none; height:38px; transition:height .3s var(--ease); }
header.hdr.scrolled .logo-img{ height:32px; }
.hdr .site-nav{ margin:0; max-width:none; flex:1; justify-content:flex-start; order:3; width:100%; }
.hdr-actions{ display:flex; align-items:center; gap:8px; margin-inline-start:auto; }
.hdr-actions .lang-switch{ order:0; }
@media (min-width:820px){
  .hdr .site-nav{ order:0; width:auto; margin-inline-start:14px; }
  .hdr-actions{ margin-inline-start:0; }
  .hdr-bar{ flex-wrap:nowrap; }
  .hdr .site-nav{ flex:1; }
}

/* ===== البطل ===== */
.hero.hero-x{
  position:relative; min-height:calc(100svh - var(--hh,56px)); padding:0; border:0; color:var(--paper); overflow:hidden; isolation:isolate;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(169,187,164,.32), transparent 60%),
    radial-gradient(ellipse 70% 70% at 15% 90%, rgba(169,187,164,.18), transparent 60%),
    linear-gradient(165deg,#2B5244 0%, var(--brand) 38%, var(--brand-ink) 100%);
  display:flex; align-items:center;
}
.hero-x .hx-mark{ position:absolute; z-index:-1; width:min(110vw,980px); inset-inline-end:-18%; top:50%; margin-top:calc(min(110vw,980px) / -2);
  opacity:.07; pointer-events:none; will-change:transform; }
.hero-x .hx-mark img{ width:100%; display:block; }
.hx-grain{ position:absolute; inset:0; z-index:-1; opacity:.18; mix-blend-mode:soft-light; pointer-events:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"); }
.hx-wrap{ width:100%; max-width:1200px; margin:0 auto; padding:34px 20px 70px; display:grid; gap:10px; align-items:center; grid-template-columns:1fr; text-align:center; }
.hx-copy{ position:relative; z-index:2; order:2; }
.hx-stage{ position:relative; order:1; height:min(46svh,380px); display:flex; justify-content:center; align-items:flex-end; }
.hero-x .hero-eyebrow{ color:var(--tint); justify-content:center; letter-spacing:3px; }
.hero-x .hero-eyebrow .hr{ background:var(--sage); opacity:.9; }
.hero-x h2{
  font-family:'El Messiri','IBM Plex Sans Arabic',sans-serif !important; font-weight:700 !important; color:var(--paper);
  font-size:clamp(34px,8.6vw,76px); line-height:1.25; margin:6px 0 12px; text-wrap:balance;
}
html[lang="en"] .hero-x h2{ font-family:'Cormorant Garamond',serif !important; font-weight:600 !important; font-size:clamp(34px,8vw,68px); line-height:1.05; }
.hero-x p{ color:rgba(245,243,238,.82); font-size:clamp(14px,3.6vw,17px); max-width:520px; margin:0 auto 22px; line-height:1.85; }
.hx-ctas{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
.hx-btn{ display:inline-flex; align-items:center; gap:8px; padding:13px 26px; border-radius:999px; font-size:14px; font-weight:700; text-decoration:none; transition:transform .25s var(--ease), background .25s, color .25s, border-color .25s; font-family:inherit; }
.hx-btn.primary{ background:var(--paper); color:var(--brand); }
.hx-btn.primary:hover{ background:#fff; transform:translateY(-2px); }
.hx-btn.ghost{ border:1px solid var(--sage); color:var(--paper); }
.hx-btn.ghost:hover{ background:rgba(245,243,238,.1); transform:translateY(-2px); }
.hx-btn .icon{ width:16px; height:16px; }
.hx-scroll{ position:absolute; bottom:18px; inset-inline:0; display:flex; justify-content:center; color:var(--tint); font-size:10.5px; letter-spacing:3px; text-transform:uppercase; pointer-events:none; }
.hx-scroll span{ display:flex; flex-direction:column; align-items:center; gap:8px; }
.hx-scroll i{ width:1px; height:34px; background:linear-gradient(var(--sage),transparent); transform-origin:top; animation:hx-line 2.2s ease-in-out infinite; }
@keyframes hx-line{ 0%{ transform:scaleY(0); } 50%{ transform:scaleY(1); } 100%{ transform:scaleY(1); opacity:0; } }

/* القارورة (رسم أصلي من إيفوك) */
.bottle{ width:min(52vw,230px); filter:drop-shadow(0 28px 36px rgba(0,0,0,.38)); will-change:transform; position:relative; z-index:2; }
.bottle svg{ width:100%; height:auto; display:block; overflow:visible; }
.bottle .liq{ animation:liq 5s ease-in-out infinite; }
@keyframes liq{ 0%,100%{ transform:translateX(0); } 50%{ transform:translateX(-36px); } }
.mist circle{ fill:var(--paper); opacity:0; transform-box:fill-box; transform-origin:center; animation:mist 4.8s ease-out infinite; }
@keyframes mist{ 0%{ opacity:0; transform:translate(0,0) scale(.3); } 18%{ opacity:.5; } 100%{ opacity:0; transform:translate(var(--mx),var(--my)) scale(1.9); } }
.hx-card{ position:absolute; width:min(28vw,150px); border-radius:12px; overflow:hidden; box-shadow:0 22px 44px rgba(0,0,0,.35); will-change:transform; bottom:6%; background:var(--paper); }
.hx-card img{ display:block; width:100%; height:auto; }
.hx-card.a{ inset-inline-start:2%; transform:rotate(-8deg); }
.hx-card.b{ inset-inline-end:2%; transform:rotate(7deg); bottom:14%; }
.hx-glow{ position:absolute; width:70%; aspect-ratio:1; border-radius:50%; background:radial-gradient(circle, rgba(169,187,164,.55), transparent 65%); filter:blur(30px); bottom:-6%; z-index:1; animation:glow 6s ease-in-out infinite; }
@keyframes glow{ 0%,100%{ opacity:.6; transform:scale(1); } 50%{ opacity:1; transform:scale(1.12); } }

@media (min-width:900px){
  .hx-wrap{ grid-template-columns:1.05fr .95fr; gap:40px; padding:40px 24px 80px; text-align:start; }
  .hx-copy{ order:1; } .hx-stage{ order:2; height:min(68svh,560px); }
  .hero-x .hero-eyebrow, .hx-ctas{ justify-content:flex-start; }
  .hero-x p{ margin-inline:0; }
  .bottle{ width:min(26vw,320px); }
  .hx-card{ width:min(13vw,190px); }
  .hx-card.a{ inset-inline-start:4%; bottom:10%; } .hx-card.b{ inset-inline-end:2%; bottom:20%; }
}

/* ظهور تدريجي */
[data-reveal]{ opacity:0; transform:translateY(34px); transition:opacity .9s var(--ease), transform .9s var(--ease); transition-delay:var(--d,0s); }
[data-reveal="left"]{ transform:translateX(-46px); } [data-reveal="right"]{ transform:translateX(46px); }
[data-reveal="zoom"]{ transform:scale(.92); }
[data-reveal].in{ opacity:1; transform:none; }
.hx-line{ display:block; overflow:hidden; }
.hx-line > span{ display:block; transform:translateY(110%); animation:hx-up 1.1s var(--ease) forwards; animation-delay:var(--d,0s); }
@keyframes hx-up{ to{ transform:none; } }

/* ===== القصة المثبّتة ===== */
.story{ position:relative; height:330vh; }
.story-stage{
  position:sticky; top:var(--hh,56px); height:calc(100svh - var(--hh,56px)); overflow:hidden; display:flex; align-items:center;
  background:var(--s-bg); color:var(--s-fg); transition:background-color .9s var(--ease), color .9s var(--ease);
  --s-bg:var(--brand); --s-fg:var(--paper); --s-acc:var(--sage); --s-card:var(--paper);
}
.story[data-ch="2"] .story-stage{ --s-bg:var(--tint); --s-fg:var(--ink); --s-acc:var(--brand); }
.story[data-ch="3"] .story-stage{ --s-bg:var(--ink); --s-fg:var(--paper); --s-acc:var(--sage); }
.story-in{ width:100%; max-width:1100px; margin:0 auto; padding:0 22px; display:grid; gap:22px; grid-template-columns:1fr; align-items:center; }
.story-txt{ position:relative; min-height:240px; }
.ch{ position:absolute; inset:0 0 auto 0; opacity:0; transform:translateY(30px); transition:opacity .7s var(--ease), transform .7s var(--ease); pointer-events:none; }
.ch.on{ opacity:1; transform:none; pointer-events:auto; }
.ch .num{ font-family:'Cormorant Garamond',serif; font-weight:600; font-size:clamp(70px,16vw,150px); line-height:.9; color:var(--s-acc); opacity:.9; display:block; transition:color .9s; direction:ltr; text-align:start; }
.ch h3{ font-family:'El Messiri','IBM Plex Sans Arabic',sans-serif !important; font-weight:700 !important; font-size:clamp(28px,6.5vw,46px); margin:4px 0 10px; color:var(--s-fg); }
html[lang="en"] .ch h3{ font-family:'Cormorant Garamond',serif !important; font-weight:600 !important; }
.ch p{ font-size:clamp(14px,3.5vw,17px); line-height:1.9; max-width:470px; margin:0; opacity:.92; }
.ch a{ color:var(--s-acc); }
.story-vis{ position:relative; height:min(46svh,420px); display:flex; justify-content:center; align-items:center; }
.sv-card{ position:absolute; height:100%; aspect-ratio:4/5; border-radius:14px; overflow:hidden; box-shadow:0 30px 60px rgba(0,0,0,.34); background:var(--paper);
  opacity:0; transform:translateY(60px) rotate(var(--r,0deg)) scale(.92); transition:opacity .8s var(--ease), transform .9s var(--ease); }
.sv-card.on{ opacity:1; transform:translateY(0) rotate(var(--r,0deg)) scale(1); }
.sv-card img{ width:100%; height:100%; object-fit:cover; display:block; }
.story-dots{ position:absolute; bottom:18px; inset-inline:0; display:flex; justify-content:center; gap:8px; }
.story-dots i{ width:22px; height:3px; border-radius:3px; background:currentColor; opacity:.25; transition:opacity .4s, width .4s var(--ease); }
.story-dots i.on{ opacity:1; width:40px; }
@media (min-width:900px){
  .story-in{ grid-template-columns:1fr 1fr; gap:60px; }
  .story-vis{ height:min(66svh,560px); }
  .story-txt{ min-height:340px; }
}

/* ===== شريط العطور المتحرك ===== */
.rail-sec{ padding:70px 0 54px; overflow:hidden; background:var(--paper); }
.rail-head{ max-width:700px; margin:0 auto 30px; padding:0 20px; text-align:center; }
.rail-head .eyebrow{ font-size:11px; letter-spacing:3px; text-transform:uppercase; color:var(--brand); font-weight:700; margin-bottom:8px; }
.rail-head h2{ font-family:'El Messiri','IBM Plex Sans Arabic',sans-serif !important; font-weight:700 !important; font-size:clamp(28px,6vw,42px); color:var(--brand); margin:0 0 8px; }
html[lang="en"] .rail-head h2{ font-family:'Cormorant Garamond',serif !important; font-weight:600 !important; }
.rail-head p{ color:var(--muted); font-size:14px; line-height:1.8; margin:0; }
.rail{ display:flex; gap:14px; width:max-content; will-change:transform; padding:8px 0; direction:ltr; }
.rail + .rail{ margin-top:10px; }
.rail a{ flex:none; width:clamp(150px,40vw,230px); border-radius:14px; overflow:hidden; background:#fff; box-shadow:var(--shadow); transition:transform .45s var(--ease), box-shadow .45s; display:block; }
.rail a:hover{ transform:translateY(-8px) scale(1.02); box-shadow:var(--shadow-lg); }
.rail img{ display:block; width:100%; height:auto; aspect-ratio:4/5; object-fit:cover; }

/* ===== الأرقام ===== */
.stats{ background:var(--brand); color:var(--paper); padding:64px 20px; position:relative; overflow:hidden; }
.stats::before{ content:""; position:absolute; inset:0; background:radial-gradient(ellipse 60% 100% at 50% 0%, rgba(169,187,164,.25), transparent 70%); pointer-events:none; }
.stats-in{ position:relative; max-width:1000px; margin:0 auto; display:grid; grid-template-columns:repeat(2,1fr); gap:34px 16px; text-align:center; }
.stat .n{ font-family:'Cormorant Garamond',serif; font-weight:600; font-size:clamp(46px,11vw,84px); line-height:1; color:var(--paper); direction:ltr; display:block; }
.stat .n small{ font-size:.38em; margin-inline-start:6px; color:var(--tint); font-family:inherit; }
.stat .l{ display:block; margin-top:10px; color:var(--tint); font-size:13.5px; line-height:1.6; }
.stat + .stat{ }
@media (min-width:820px){ .stats-in{ grid-template-columns:repeat(4,1fr); } }

/* ===== الضمان ===== */
.warr{ background:var(--tint); padding:72px 20px; }
.warr-in{ max-width:900px; margin:0 auto; display:grid; gap:26px; text-align:center; }
.warr h2{ font-family:'El Messiri','IBM Plex Sans Arabic',sans-serif !important; font-weight:700 !important; color:var(--brand); font-size:clamp(30px,7vw,48px); margin:0; }
html[lang="en"] .warr h2{ font-family:'Cormorant Garamond',serif !important; font-weight:600 !important; }
.warr-steps{ display:grid; gap:12px; grid-template-columns:1fr; }
.wstep{ background:var(--paper); border-radius:16px; padding:22px 18px; border:1px solid rgba(169,187,164,.5); }
.wstep b{ display:block; font-family:'Cormorant Garamond',serif; font-size:34px; color:var(--sage); line-height:1; margin-bottom:6px; }
.wstep span{ color:var(--ink); font-size:14.5px; line-height:1.7; }
.warr-full{ color:var(--muted); font-size:12.5px; line-height:1.9; max-width:720px; margin:0 auto; }
.warr-full a{ color:var(--brand); }
@media (min-width:760px){ .warr-steps{ grid-template-columns:repeat(3,1fr); } }

/* ===== التيزر: قلعة الحمراء ===== */
.teaser{ position:relative; overflow:hidden; isolation:isolate; margin:0; max-width:none; border:0; border-radius:0; padding:96px 20px; background:#1D4E7A; color:#F5EEE2; text-align:center; }
.teaser .teaser-bg{ position:absolute; inset:-30%; z-index:-1; opacity:.2; will-change:transform; pointer-events:none;
  background:
    conic-gradient(from 45deg at 50% 50%, #F5EEE2 0 25%, transparent 0 50%, #F5EEE2 0 75%, transparent 0) 0 0/64px 64px,
    radial-gradient(circle at 50% 50%, transparent 0 14px, #A3472F 15px 17px, transparent 18px) 32px 32px/64px 64px; }
.teaser::after{ content:""; position:absolute; inset:0; z-index:-1; background:radial-gradient(ellipse 70% 80% at 50% 50%, rgba(29,78,122,.2), rgba(29,78,122,.94) 78%); }
.teaser-inner{ max-width:620px; margin:0 auto; background:none; border:0; padding:0; border-radius:0; }
.teaser h2{ font-family:'El Messiri','IBM Plex Sans Arabic',sans-serif !important; font-weight:700 !important; color:#F5EEE2 !important; font-size:clamp(32px,8vw,60px); margin:12px 0 10px; }
html[lang="en"] .teaser h2{ font-family:'Cormorant Garamond',serif !important; font-weight:600 !important; }
.teaser p{ color:#F5EEE2; opacity:.9; font-size:clamp(15px,3.8vw,18px); margin:0; }
.teaser-tag{ background:#A3472F; color:#F5EEE2; padding:6px 18px; border-radius:999px; font-size:12px; font-weight:700; letter-spacing:2px; display:inline-block; }
.teaser-tiles{ display:flex; justify-content:center; gap:10px; margin-top:26px; }
.teaser-tiles i{ width:34px; height:34px; border-radius:6px; display:block; background:#A3472F; }
.teaser-tiles i:nth-child(2){ background:#F5EEE2; } .teaser-tiles i:nth-child(3){ background:#3E5A47; } .teaser-tiles i:nth-child(4){ background:#A3472F; }

/* ===== المتجر: عناوين وبطاقات ===== */
.shop-intro{ max-width:700px; margin:0 auto; padding:70px 20px 4px; text-align:center; }
.shop-intro .eyebrow{ font-size:11px; letter-spacing:3px; text-transform:uppercase; color:var(--brand); font-weight:700; margin-bottom:8px; }
.shop-intro h2{ font-family:'El Messiri','IBM Plex Sans Arabic',sans-serif !important; font-weight:700 !important; font-size:clamp(28px,6vw,42px); color:var(--brand); margin:0 0 8px; }
html[lang="en"] .shop-intro h2{ font-family:'Cormorant Garamond',serif !important; font-weight:600 !important; }
.shop-intro p{ color:var(--muted); font-size:14px; line-height:1.8; margin:0; }
.grid .card{ opacity:0; transform:translateY(40px) scale(.98); transition:opacity .7s var(--ease), transform .7s var(--ease), box-shadow .3s; transition-delay:var(--d,0s); }
.grid .card.in{ opacity:1; transform:none; }
.grid .card.in:hover{ transform:translateY(-6px); transition-delay:0s; }
.grid .card .imgwrap img{ transition:transform .9s var(--ease); }

/* اخفاء عناصر البطل القديمة */
.trust-bar{ display:none; }
.hdr .tagline, .hdr .header-divider{ display:none; }

@media (prefers-reduced-motion: reduce){
  [data-reveal], .grid .card{ opacity:1 !important; transform:none !important; transition:none !important; }
  .hx-line > span{ animation:none; transform:none; }
  .bottle .liq, .mist circle, .hx-glow, .hx-scroll i{ animation:none; }
  .story{ height:auto; }
  .story-stage{ position:static; height:auto; padding:50px 0; }
  .ch{ position:static; opacity:1; transform:none; margin-bottom:34px; }
  .story-txt{ min-height:0; } .story-dots{ display:none; }
  .sv-card{ opacity:1; transform:none; position:static; height:240px; margin:0 6px; }
  .story-vis{ height:auto; flex-wrap:wrap; }
  .rail{ width:auto; overflow-x:auto; transform:none !important; }
  ::view-transition-old(root), ::view-transition-new(root){ animation:none; }
}

/* دخول نص البطل */
.hx-copy > *{ animation:hx-fade 1.1s var(--ease) both; animation-delay:calc(var(--i,0) * .13s + .1s); }
@keyframes hx-fade{ from{ opacity:0; transform:translateY(28px); } }
.hx-stage{ animation:hx-fade 1.4s var(--ease) both; animation-delay:.25s; }
@media (prefers-reduced-motion: reduce){ .hx-copy > *, .hx-stage{ animation:none; } }

/* جوال: هيدر مدمج */
@media (max-width:819px){
  .hdr-bar{ gap:8px; padding:8px 12px; }
  .hdr .logo-img{ height:30px; }
  .hdr-actions{ gap:6px; }
  .hdr-actions #igHeaderBtn{ display:none; }
  .hdr-actions .lang-switch{ padding:2px; } .hdr-actions .lang-switch button{ padding:5px 9px; font-size:11px; }
  .hdr-actions .lang-switch button .icon{ display:none; }
  .header-country-select{ max-width:96px; font-size:11px; }
  .icon-btn{ width:30px; height:30px; }
  header.hdr.scrolled .site-nav{ display:none; }
  .hdr .site-nav{ padding-bottom:2px; }
}
