/* =====================================================================
   home.css — استایل صفحه‌ی اصلی قهوه‌چیان
   بعد از style.css لود شود. از متغیرهای --ui-* همان فایل استفاده می‌کند.
   ===================================================================== */
:root { --hm-ease: cubic-bezier(.22, 1, .36, 1); }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 80px; }

/* ---------- هدر ---------- */
.pub-top {
    background: color-mix(in srgb, var(--ui-bg) 82%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    backdrop-filter: saturate(1.4) blur(12px);
    transition: box-shadow .3s;
}
.pub-top.hm-scrolled { box-shadow: 0 6px 24px rgba(28, 20, 16, .08); }

/* ---------- Hero ---------- */
.hm-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: #1C1410;
    color: #D9CDBB;
    border-radius: 0 0 44px 44px;
}
.hm-hero::before {
    content: "";
    position: absolute; inset: 0; z-index: -2;
    background:
        radial-gradient(620px 420px at 80% 18%, rgba(176, 136, 86, .30), transparent 60%),
        radial-gradient(520px 380px at 8% 92%, rgba(139, 74, 59, .30), transparent 60%),
        linear-gradient(160deg, #1C1410, #2A1E16);
}
.hm-hero::after {
    content: "";
    position: absolute; inset: 0; z-index: -1; opacity: .07; 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'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.hm-hero-in {
    max-width: 1040px; margin: 0 auto;
    padding: 64px 24px 96px;
    display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center;
}
.hm-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 14px; border-radius: 99px;
    background: rgba(250, 247, 242, .08); border: 1px solid rgba(250, 247, 242, .14);
    font-size: 12.5px; font-weight: 500; color: #E8DFD2; margin-bottom: 18px;
}
.hm-pill::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: var(--ui-brass); box-shadow: 0 0 0 0 rgba(176, 136, 86, .7);
    animation: hm-ping 2s infinite;
}
.hm-hero h1 {
    font-size: clamp(30px, 5vw, 50px); line-height: 1.45; font-weight: 800;
    color: #FAF7F2; margin-bottom: 14px;
}
.hm-hl {
    background: linear-gradient(100deg, #B08856, #F3DDB4, #B08856);
    background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: hm-shine 5s linear infinite;
}
.hm-hero p.hm-lead { font-size: 16px; max-width: 470px; margin-bottom: 24px; color: #D9CDBB; }
.hm-hero .pub-cta { margin-bottom: 14px; }
.hm-hero .ui-btn { background: var(--ui-brass); color: #1C1410; transition: transform .25s var(--hm-ease), box-shadow .25s; }
.hm-hero .ui-btn:hover { opacity: 1; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(176, 136, 86, .35); }
.hm-hero .ui-btn.ui-outline { background: transparent; color: #FAF7F2; border-color: rgba(250, 247, 242, .28); }
.hm-hero .ui-btn.ui-outline:hover { background: rgba(250, 247, 242, .08); box-shadow: none; }
.hm-trust { font-size: 12.5px; color: #9a8a78; }

.hm-up { animation: hm-up .9s var(--hm-ease) both; animation-delay: calc(var(--i, 0) * .12s); }

/* ---------- صحنه‌ی فنجان ---------- */
.hm-stage { position: relative; width: 100%; max-width: 440px; aspect-ratio: 1 / 1; margin-inline: auto; }
.hm-glow {
    position: absolute; inset: 10%; border-radius: 50%;
    background: radial-gradient(circle, rgba(176, 136, 86, .38), transparent 65%);
    animation: hm-pulse 5s ease-in-out infinite;
}
.hm-cup { position: absolute; inset: 0; width: 100%; height: 100%; animation: hm-bob 6s ease-in-out infinite; filter: drop-shadow(0 28px 28px rgba(0, 0, 0, .45)); }
.hm-art { transform-box: fill-box; transform-origin: center; animation: hm-breathe 4s ease-in-out infinite; }
.hm-art.b { animation-delay: -1.3s; }
.hm-art.c { animation-delay: -2.6s; }
.hm-steam path {
    fill: none; stroke: #FAF7F2; stroke-width: 7; stroke-linecap: round;
    opacity: 0; filter: url(#hmBlur);
    animation: hm-steam 4.5s ease-in-out infinite;
}
.hm-steam path:nth-child(2) { animation-delay: 1.5s; }
.hm-steam path:nth-child(3) { animation-delay: 3s; }

.hm-bean { position: absolute; left: var(--x); top: var(--y); width: calc(26px * var(--s, 1)); height: calc(36px * var(--s, 1)); will-change: transform; transition: transform .25s linear; }
.hm-bean i {
    display: block; position: relative; width: 100%; height: 100%;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: radial-gradient(circle at 35% 30%, #7A4E2F, #2E1B10 70%);
    box-shadow: 0 8px 14px rgba(0, 0, 0, .4);
    animation: hm-float 7s ease-in-out infinite; animation-delay: var(--dl, 0s);
}
.hm-bean i::after {
    content: ""; position: absolute; left: 48%; top: 10%; bottom: 10%; width: 3px;
    border-radius: 50%; background: rgba(0, 0, 0, .55); transform: rotate(8deg);
}

.hm-receipt {
    position: absolute; inset-inline-end: -3%; bottom: 8%; width: 196px;
    background: rgba(250, 247, 242, .97); color: #1C1410;
    border-radius: 14px; padding: 12px 14px; font-size: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .4);
    animation: hm-bob 7s ease-in-out infinite reverse;
}
.hm-rc-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed #D5C8B2; }
.hm-rc-h span { font-size: 11px; color: var(--ui-brass-d); font-weight: 700; }
.hm-receipt ul { list-style: none; }
.hm-receipt li { display: flex; justify-content: space-between; padding: 3px 0; opacity: 0; animation: hm-line .6s var(--hm-ease) forwards; animation-delay: calc(.9s + var(--k) * .7s); }
.hm-receipt li b { font-variant-numeric: tabular-nums; }
.hm-rc-t { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 2px solid #1C1410; font-weight: 800; opacity: 0; animation: hm-line .6s var(--hm-ease) 3.2s forwards; }
.hm-paid {
    position: absolute; inset-inline-start: 10px; bottom: -14px;
    background: #2E6B2A; color: #fff; font-size: 11px; font-weight: 800;
    padding: 3px 12px; border-radius: 99px; transform: scale(0) rotate(-8deg);
    animation: hm-stamp .5s var(--hm-ease) 3.9s forwards;
}
.hm-chip {
    position: absolute; inset-inline-start: -2%; top: 10%;
    display: flex; align-items: center; gap: 8px;
    background: rgba(32, 25, 21, .92); border: 1px solid rgba(250, 247, 242, .14);
    color: #E8DFD2; font-size: 12px; font-weight: 500;
    padding: 8px 12px; border-radius: 12px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .35);
    animation: hm-bob 6.5s ease-in-out infinite; animation-delay: -2s;
}
.hm-chip i { width: 8px; height: 8px; border-radius: 50%; background: #E27D6A; animation: hm-ping 2s infinite; }

/* ---------- نوار متحرک ---------- */
.hm-marquee { overflow: hidden; border-block: 1px solid var(--ui-line); margin-top: -22px; padding-top: 22px; background: var(--ui-bg); direction: ltr; }
.hm-track { display: flex; width: max-content; animation: hm-marq 38s linear infinite; }
.hm-marquee:hover .hm-track { animation-play-state: paused; }
.hm-track span { display: inline-flex; align-items: center; gap: 28px; padding: 16px 14px; font-weight: 800; font-size: 18px; color: var(--ui-head); white-space: nowrap; direction: rtl; }
.hm-track span::after { content: "☕"; font-size: 16px; opacity: .55; }

/* ---------- ریویل هنگام اسکرول ---------- */
html.hm-js .hm-rv {
    opacity: 0; transform: translateY(28px);
    transition: opacity .8s var(--hm-ease), transform .8s var(--hm-ease);
    transition-delay: calc(var(--d, 0) * 90ms);
}
html.hm-js .hm-rv.hm-in { opacity: 1; transform: none; }

.hm-sec { padding-top: 64px; }
.pub-h2 { font-size: 26px; }

/* ---------- امکانات (بنتو) ---------- */
.hm-bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 64px; }
.hm-card {
    position: relative; overflow: hidden;
    background: var(--ui-card); border: 1px solid var(--ui-line); border-radius: 18px; padding: 22px;
    transition: transform .35s var(--hm-ease), border-color .3s, box-shadow .35s;
}
.hm-card.hm-wide { grid-column: span 2; }
.hm-card::before {
    content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .3s;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(176, 136, 86, .18), transparent 70%);
}
.hm-card:hover { transform: translateY(-4px); border-color: var(--ui-brass); box-shadow: 0 16px 36px rgba(28, 20, 16, .10); }
.hm-card:hover::before { opacity: 1; }
.hm-ico {
    width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
    background: var(--ui-dim); color: var(--ui-brass-d); margin-bottom: 14px;
    transition: transform .4s var(--hm-ease), background .3s, color .3s;
}
.hm-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hm-card:hover .hm-ico { transform: rotate(-8deg) scale(1.1); background: var(--ui-head); color: var(--ui-bg); }
.hm-card h3 { font-size: 17px; font-weight: 800; color: var(--ui-head); margin-bottom: 6px; position: relative; }
.hm-card p { font-size: 13.5px; color: var(--ui-tx); position: relative; }

/* ---------- مراحل ---------- */
.hm-steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 64px; }
.hm-steps::before, .hm-steps::after { content: ""; position: absolute; top: 38px; inset-inline: 12%; height: 2px; }
.hm-steps::before { background: repeating-linear-gradient(90deg, var(--ui-line) 0 8px, transparent 8px 16px); }
.hm-steps::after { background: var(--ui-brass); transform: scaleX(0); transform-origin: right; transition: transform 1.6s var(--hm-ease) .3s; }
.hm-steps.hm-in::after { transform: scaleX(1); }
.hm-step { position: relative; z-index: 1; background: var(--ui-card); border: 1px solid var(--ui-line); border-radius: 16px; padding: 18px 16px; font-size: 13.5px; transition: transform .3s var(--hm-ease); }
.hm-step:hover { transform: translateY(-4px); }
.hm-step em {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; margin-bottom: 12px;
    background: var(--ui-head); color: var(--ui-bg); font-style: normal; font-weight: 800; font-size: 16px;
    box-shadow: 0 0 0 6px var(--ui-card);
}
.hm-step b { display: block; color: var(--ui-head); font-size: 15px; margin-bottom: 4px; }

/* ---------- پلن‌ها ---------- */
.pub-plans { grid-template-columns: repeat(auto-fit, minmax(240px, 320px)); justify-content: start; }
.pub-plan { transition: transform .35s var(--hm-ease), border-color .3s, box-shadow .35s; animation: hm-up .7s var(--hm-ease) both; }
.pub-plan:nth-child(2) { animation-delay: .1s; }
.pub-plan:nth-child(3) { animation-delay: .2s; }
.pub-plan:nth-child(4) { animation-delay: .3s; }
.pub-plan:hover { transform: translateY(-6px); border-color: var(--ui-brass); box-shadow: 0 18px 40px rgba(28, 20, 16, .12); }

/* ---------- نیکوکاری / ثبت‌نام ---------- */
.pub-box { transition: transform .3s var(--hm-ease), border-color .3s; }
.pub-box:hover { transform: translateY(-3px); border-color: var(--ui-brass); }
.pub-reg { position: relative; overflow: hidden; }
.pub-reg::before { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; inset-inline-start: -120px; top: -140px; background: radial-gradient(circle, rgba(176, 136, 86, .22), transparent 70%); pointer-events: none; }
.pub-reg > * { position: relative; }

/* ---------- سوالات متداول ---------- */
.pub-faq { margin-bottom: 56px; max-width: 760px; }
.pub-faq details { background: var(--ui-card); border: 1px solid var(--ui-line); border-radius: 12px; padding: 0 18px; margin-bottom: 10px; transition: border-color .3s; }
.pub-faq details[open] { border-color: var(--ui-brass); }
.pub-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 14px 0; font-weight: 700; color: var(--ui-head); }
.pub-faq summary::-webkit-details-marker { display: none; }
.pub-faq summary::after { content: "+"; font-size: 22px; color: var(--ui-brass-d); transition: transform .3s var(--hm-ease); }
.pub-faq details[open] summary::after { content: "+"; transform: rotate(45deg); }
.pub-faq p { padding-bottom: 14px; font-size: 14px; }

/* ---------- تماس ---------- */
.pub-about { max-width: 760px; margin-bottom: 20px; }
.pub-contact { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 56px; }
.pub-contact > div { background: var(--ui-card); border: 1px solid var(--ui-line); border-radius: 12px; padding: 18px; transition: border-color .3s, transform .3s var(--hm-ease); }
.pub-contact > div:hover { border-color: var(--ui-brass); transform: translateY(-2px); }
.pub-contact small { display: block; font-size: 12px; font-weight: 700; color: var(--ui-brass-d); margin-bottom: 4px; }
.pub-contact a, .pub-contact span { font-size: 16px; font-weight: 700; color: var(--ui-head); text-decoration: none; }
.pub-contact a:hover { color: var(--ui-brass-d); }
.pub-contact .wide { grid-column: 1 / -1; }

/* ---------- فوتر ---------- */
.pub-footer a { color: var(--ui-brass-d); text-decoration: none; font-weight: 500; }
.pub-footer a:hover { text-decoration: underline; }
.pub-footer .links { margin-top: 8px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- keyframes ---------- */
@keyframes hm-up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes hm-shine { to { background-position: -200% 0; } }
@keyframes hm-ping { 0% { box-shadow: 0 0 0 0 rgba(176, 136, 86, .6); } 70%, 100% { box-shadow: 0 0 0 10px rgba(176, 136, 86, 0); } }
@keyframes hm-pulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes hm-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes hm-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes hm-steam {
    0% { opacity: 0; transform: translateY(22px) scaleY(.9); }
    35% { opacity: .55; }
    100% { opacity: 0; transform: translateY(-26px) scaleY(1.1); }
}
@keyframes hm-float {
    0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
    50% { transform: translateY(-14px) rotate(calc(var(--r, 0deg) + 14deg)); }
}
@keyframes hm-line { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@keyframes hm-stamp { to { transform: scale(1) rotate(-8deg); } }
@keyframes hm-marq { to { transform: translateX(-50%); } }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 900px) {
    .hm-hero-in { grid-template-columns: 1fr; padding-top: 40px; text-align: start; }
    .hm-stage { max-width: 340px; }
    .hm-bento { grid-template-columns: 1fr 1fr; }
    .hm-card.hm-wide { grid-column: span 2; }
    .hm-steps { grid-template-columns: 1fr 1fr; }
    .hm-steps::before, .hm-steps::after { display: none; }
}
@media (max-width: 800px) { .pub-contact { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
    .hm-bento { grid-template-columns: 1fr; }
    .hm-card.hm-wide { grid-column: auto; }
    .hm-receipt { width: 168px; inset-inline-end: 0; }
    .hm-chip { inset-inline-start: 0; }
}

/* ---------- کاهش حرکت (دسترس‌پذیری) ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    html.hm-js .hm-rv { opacity: 1; transform: none; }
    .hm-receipt li, .hm-rc-t { opacity: 1; }
    .hm-paid { transform: scale(1) rotate(-8deg); }
    html { scroll-behavior: auto; }
}


.hm-enamad { display: flex; justify-content: center; margin: 14px 0; }
.hm-enamad img { max-height: 90px; width: auto; }