/* ==========================================================================
   لایه‌ی لوکس مشترک صفحات (درباره، محصولات، ورود و …)
   هم‌خانواده‌ی جلوه‌های صفحه اصلی؛ صفحه اصلی نسخه‌ی کامل‌تر خودش را دارد.
   همراه با static/js/lux.js استفاده می‌شود.
   ========================================================================== */
:root {
    --gold: var(--brand-copper, #B9875B);
    --gold-soft: #D9B88F;
    --ink: #F2F6F5;
    --ink-soft: #BFCFCA;
    --line: rgba(217, 184, 143, .22);
    --panel: #1b4742;
    --ease-lux: cubic-bezier(.22, .8, .24, 1);
    --ease-expo: cubic-bezier(.76, 0, .18, 1);
    --ease-back: cubic-bezier(.34, 1.45, .64, 1);
}
html { scroll-behavior: smooth; }
.home-main { background: var(--site-dark); }

/* ---------- نوار پیشرفت، دانه‌ی فیلم، گرد کاکائو ---------- */
.lux-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 1100; pointer-events: none;
    background: linear-gradient(90deg, var(--gold), var(--gold-soft));
    transform-origin: left center; transform: scaleX(0);
}
.lux-grain {
    position: fixed; inset: -50%; width: 200%; height: 200%; z-index: 4; pointer-events: none; opacity: .06;
    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'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 .9  0 0 0 0 .8  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    animation: luxGrain 1.2s steps(6) infinite;
}
@keyframes luxGrain {
    0% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); } 40% { transform: translate(2%,-3%); }
    60% { transform: translate(-2%,-1%); } 80% { transform: translate(3%,3%); } 100% { transform: translate(0,0); }
}
.lux-dust { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }

/* ---------- ظاهر شدن با اسکرول ---------- */
html.js [data-reveal] {
    opacity: 0; transform: translate3d(0, 34px, 0);
    transition: opacity 1s var(--ease-lux) var(--d, 0s), transform 1.1s var(--ease-lux) var(--d, 0s), filter 1.1s var(--ease-lux) var(--d, 0s);
}
html.js [data-reveal="left"]  { transform: translate3d(-48px, 0, 0); }
html.js [data-reveal="right"] { transform: translate3d(48px, 0, 0); }
html.js [data-reveal="scale"] { transform: scale(.8); }
html.js [data-reveal="fade"]  { transform: none; }
html.js [data-reveal="blur"]  { transform: translate3d(0, 18px, 0); filter: blur(10px); }
html.js [data-reveal].is-in   { opacity: 1; transform: none; filter: none; }

/* عکس با پرده‌ی مسی باز می‌شود */
.lux-wipe { position: relative; overflow: hidden; }
.lux-wipe::before {
    content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
    background: linear-gradient(135deg, #E3C29C, var(--gold) 60%, #7A5640); transform: scaleX(0);
}
.lux-wipe.is-in::before { animation: luxWipe 1.4s var(--ease-expo) both; }
@keyframes luxWipe {
    0% { transform: scaleX(0); transform-origin: right; } 45% { transform: scaleX(1); transform-origin: right; }
    55% { transform: scaleX(1); transform-origin: left; } 100% { transform: scaleX(0); transform-origin: left; }
}
html.js .lux-wipe > img { clip-path: inset(0 0 0 100%); transform: scale(1.25); transition: clip-path 1s var(--ease-expo) .62s, transform 2.4s var(--ease-lux) .5s; }
html.js .lux-wipe.is-in > img { clip-path: inset(0 0 0 0); transform: scale(1); }

/* عنوان‌ها کلمه‌به‌کلمه از زیر ماسک بالا می‌آیند */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.wi { display: inline-block; transform: translateY(115%) rotate(4deg); transform-origin: left bottom;
      transition: transform 1.1s var(--ease-lux) calc(var(--wd, 0s) + var(--base, 0s)); }
.is-in .wi, .wi.is-in { transform: none; }

/* زیور فرفره‌ای */
.lux-orn { display: inline-block; will-change: transform; }
.lux-orn > img { display: block; animation: luxFloat 4.5s ease-in-out infinite; }
@keyframes luxFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

/* ---------- دکمه‌ها ---------- */
.btn-lux {
    position: relative; overflow: hidden; isolation: isolate;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-width: clamp(140px, 16vw, 190px); min-height: 46px; padding: 12px clamp(26px, 4vw, 42px);
    border: 1px solid rgba(234, 240, 238, .55); border-radius: 999px; background: transparent;
    color: #EAF0EE; text-decoration: none; font: inherit; font-size: clamp(.8125rem, 1vw + .25rem, .9375rem);
    letter-spacing: .12em; cursor: pointer;
    transition: color .45s var(--ease-lux), border-color .45s var(--ease-lux), transform .3s var(--ease-lux), box-shadow .45s var(--ease-lux);
}
.btn-lux::before {
    content: ''; position: absolute; inset: 0; z-index: -1; background: #EAF0EE;
    transform: translateY(101%); border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    transition: transform .55s var(--ease-lux), border-radius .55s var(--ease-lux);
}
.btn-lux:hover { color: var(--site-dark); border-color: #EAF0EE; box-shadow: 0 10px 30px -10px rgba(217,184,143,.55); }
.btn-lux:hover::before { transform: translateY(0); border-radius: 0; }
.btn-lux:active { transform: scale(.96); }
.btn-lux:disabled { opacity: .6; cursor: progress; }
.btn-lux--solid { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--site-dark); }
.btn-lux--solid::before { background: #F2F6F5; }
.btn__roll { position: relative; display: inline-block; overflow: hidden; vertical-align: top; line-height: 1.5; }
.btn__roll > span, .btn__roll::after { display: block; transition: transform .6s var(--ease-lux); }
.btn__roll::after { content: attr(data-t); position: absolute; left: 0; right: 0; top: 100%; }
.btn-lux:hover .btn__roll > span, .btn-lux:hover .btn__roll::after { transform: translateY(-100%); }

/* ---------- سرتیتر مشترک بخش‌ها ---------- */
.lux-eyebrow {
    display: inline-flex; align-items: center; gap: 14px; direction: ltr;
    font-size: .6875rem; letter-spacing: .42em; color: var(--gold-soft); text-transform: uppercase;
}
.lux-eyebrow::before, .lux-eyebrow::after { content: ''; width: 28px; height: 1px; background: currentColor; opacity: .6; }
.lux-title {
    font-weight: 400; letter-spacing: .12em; color: var(--ink); line-height: 1.35;
    font-size: clamp(1.5rem, 3.2vw + .4rem, 2.75rem);
}
.lux-rule { display: block; height: 1px; width: 0; margin: 18px auto 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); transition: width 1.4s var(--ease-lux) .4s; }
.is-in > .lux-rule, .lux-rule.is-in { width: min(220px, 60%); }

/* ---------- هدر و فوتر ---------- */
.home-header { transition: background .5s var(--ease-lux), box-shadow .5s var(--ease-lux); }
.home-header.is-scrolled {
    background: rgba(22,62,57,.82);
    -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 1px 0 rgba(217,184,143,.28), 0 14px 40px -20px rgba(0,0,0,.6);
}
.home-nav a.is-current { color: var(--gold-soft); }
@media (min-width: 769px) {
    .home-nav a { position: relative; }
    .home-nav a:hover { background: transparent; color: #fff; }
    .home-nav a::after {
        content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1px;
        background: var(--gold-soft); transform: scaleX(0); transition: transform .5s var(--ease-lux);
    }
    .home-nav a:hover::after, .home-nav a.is-current::after { transform: scaleX(1); }
}
.home-logo img { transition: transform 1s var(--ease-lux); }
.home-logo a:hover img { transform: rotate(-12deg) scale(1.1); }
html.js .site-footer [data-reveal-f] { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease-lux) var(--d,0s), transform 1s var(--ease-lux) var(--d,0s); }
html.js .site-footer [data-reveal-f].is-in { opacity: 1; transform: none; }

/* ---------- نشانگر سفارشی ---------- */
.lux-cursor {
    position: fixed; top: 0; left: 0; z-index: 3000; pointer-events: none;
    width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
    border: 1px solid rgba(217,184,143,.8); display: none; align-items: center; justify-content: center;
    font-size: .625rem; letter-spacing: .25em; color: #163e39;
    transition: width .45s var(--ease-lux), height .45s var(--ease-lux), margin .45s var(--ease-lux), background .4s, border-color .4s, opacity .3s;
}
.lux-cursor.on { display: flex; }
.lux-cursor__dot {
    position: fixed; top: 0; left: 0; z-index: 3001; pointer-events: none; display: none;
    width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--gold-soft);
}
.lux-cursor__dot.on { display: block; }
.lux-cursor.is-link { width: 66px; height: 66px; margin: -33px 0 0 -33px; background: rgba(217,184,143,.14); }
.lux-cursor.is-view { width: 110px; height: 110px; margin: -55px 0 0 -55px; background: transparent; border-color: rgba(217,184,143,.5); color: var(--gold-soft); align-items: flex-end; padding-bottom: 14px; }
.lux-cursor.is-text { width: 4px; height: 26px; margin: -13px 0 0 -2px; border-radius: 2px; background: var(--gold-soft); }
.lux-cursor.is-hidden { opacity: 0; }

/* ---------- پرده‌ی ورود و خروج صفحه ---------- */
.lux-curtain {
    position: fixed; inset: 0; z-index: 4000; background: var(--site-dark); pointer-events: none;
    clip-path: inset(0 0 0 0); transition: clip-path .9s var(--ease-expo) .05s;
    display: flex; align-items: center; justify-content: center;
}
.lux-curtain::after { content: ''; width: 90px; height: 1px; background: var(--gold-soft); transform: scaleX(1); transition: transform .6s var(--ease-lux); }
html.ready .lux-curtain { clip-path: inset(0 0 100% 0); }
html.ready .lux-curtain::after { transform: scaleX(0); }
html.leaving .lux-curtain { clip-path: inset(0 0 0 0); pointer-events: all; transition-duration: .7s; transition-delay: 0s; }
html.leaving .lux-curtain::after { transform: scaleX(1); transition-delay: .1s; }
html:not(.js) .lux-curtain { display: none; }

/* ---------- کارت محصول (منو، صفحه‌ی محصول، دسته‌ها) ---------- */
.p-card {
    --rx: 0deg; --ry: 0deg;
    position: relative; isolation: isolate; display: flex; flex-direction: column;
    text-decoration: none; color: inherit; border-radius: 4px; overflow: hidden;
    background: linear-gradient(170deg, rgba(255,255,255,.055), rgba(255,255,255,.015) 60%);
    border: 1px solid rgba(217,184,143,.14);
    transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform .6s var(--ease-lux), border-color .5s, box-shadow .6s var(--ease-lux);
}
.p-card:hover { border-color: rgba(217,184,143,.45); box-shadow: 0 30px 60px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(217,184,143,.08); }
.p-card::after {                       /* درخشش شیشه‌ای دنبال ماوس */
    content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
    background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 0%), rgba(255,236,210,.10), transparent 45%);
    opacity: 0; transition: opacity .5s;
}
.p-card:hover::after { opacity: 1; }
.p-card__stage { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden; }
.p-card__stage::before {               /* نور پشت محصول */
    content: ''; position: absolute; inset: 14%; border-radius: 50%;
    background: radial-gradient(circle, rgba(217,184,143,.26), transparent 68%);
    transform: scale(.85); transition: transform .8s var(--ease-lux), opacity .8s; opacity: .7;
}
.p-card:hover .p-card__stage::before { transform: scale(1.25); opacity: 1; }
.p-card__cut {
    position: relative; width: 62%; height: 62%; object-fit: contain;
    filter: drop-shadow(0 18px 18px rgba(0,0,0,.4));
    -webkit-box-reflect: below -30% linear-gradient(transparent 58%, rgba(255,255,255,.16));
    transition: transform .8s var(--ease-lux);
    animation: pFloat 6s ease-in-out infinite; animation-delay: var(--fd, 0s);
}
.p-card:hover .p-card__cut { transform: translateY(-10px) scale(1.12) rotate(-6deg); }
@keyframes pFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.p-card__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 1.2s var(--ease-lux); }
.p-card:hover .p-card__photo { transform: scale(1.1); }
.p-card__empty { position: relative; color: rgba(217,184,143,.45); font-size: 1.6rem; }
.p-card__badges { position: absolute; top: 12px; left: 12px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.p-badge {
    padding: 4px 10px; border-radius: 999px; font-size: .625rem; letter-spacing: .2em; text-transform: uppercase;
    background: rgba(22,62,57,.7); border: 1px solid rgba(217,184,143,.4); color: var(--gold-soft);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.p-badge--off { background: var(--gold-soft); color: var(--site-dark); border-color: var(--gold-soft); }
.p-card__body { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; border-top: 1px solid rgba(217,184,143,.1); flex: 1; }
.p-card__name { font-size: 1rem; font-weight: 400; letter-spacing: .06em; color: var(--ink); line-height: 1.5; transition: color .4s; }
.p-card:hover .p-card__name { color: var(--gold-soft); }
.p-card__desc { font-size: .8125rem; line-height: 1.8; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-card__foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.p-card__price { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.p-card__price s { font-size: .75rem; color: rgba(191,207,202,.55); }
.p-card__price b { font-weight: 400; font-size: .9375rem; letter-spacing: .04em; color: var(--gold-soft); }
.p-card__price b small { font-size: .6875rem; letter-spacing: .14em; color: var(--ink-soft); margin-left: 4px; }
.p-card__go {
    width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%;
    border: 1px solid var(--line); color: var(--gold-soft); font-size: .75rem;
    transition: transform .6s var(--ease-lux), background .4s, color .4s, border-color .4s;
}
.p-card:hover .p-card__go { background: var(--gold-soft); color: var(--site-dark); border-color: var(--gold-soft); transform: rotate(-45deg); }
.p-card[hidden] { display: none; }
html.js .p-card[data-reveal] { transform: translate3d(0, 50px, 0) scale(.96); transition: opacity .9s var(--ease-lux) var(--d, 0s), transform 1.1s var(--ease-lux) var(--d, 0s), border-color .5s, box-shadow .6s; }
html.js .p-card[data-reveal].is-in { transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); }
html.js .p-card[data-reveal].is-in:hover { transition-delay: 0s; transition-duration: .9s, .6s, .5s, .6s; }
@media (max-width: 480px) {
    .p-card__body { padding: 12px 12px 14px; gap: 6px; }
    .p-card__name { font-size: .875rem; }
    .p-card__desc { display: none; }
    .p-card__go { width: 30px; height: 30px; }
    .p-card__price b { font-size: .8125rem; }
}
@media (hover: none) { .p-card__cut { animation-duration: 7s; } }

/* ---------- کاهش حرکت ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    html.js [data-reveal], html.js .lux-wipe > img { opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; transition: none !important; }
    .lux-wipe::before, .lux-grain, .lux-dust, .lux-cursor, .lux-cursor__dot, .lux-curtain { display: none !important; }
    .wi { transform: none !important; transition: none !important; }
    .lux-orn > img, .p-card__cut { animation: none !important; }
    html.js .site-footer [data-reveal-f] { opacity: 1; transform: none; }
}
