/* ===== ARIA AI — Company Landing ===== */
:root {
    --bg: #0a0b0f;
    --surface: #12141c;
    --surface-2: #1a1d28;
    --text: #e8eaef;
    --text-muted: #8b8f9a;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --cyan: #22d3ee;
    --emerald: #34d399;
    --border: rgba(255, 255, 255, 0.06);
    /* Display: لوگو، عناوین، کارت‌ها — Outfit برای لاتین، Vazirmatn برای فارسی */
    --font-display: 'Outfit', 'Vazirmatn', sans-serif;
    --font-body: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    /* جلوگیری از جابه‌جایی افقی ردیف اول هنگام ظاهر شدن نوار اسکرول */
    scrollbar-gutter: stable;
}

/* Skip link: visible on focus for a11y */
.skip-link {
    position: absolute;
    top: -3rem;
    left: 1rem;
    z-index: 1001;
    padding: 0.6rem 1rem;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 1rem;
    outline: 2px solid var(--accent-light);
    outline-offset: 2px;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    text-align: right;
    /* CLS: reduce layout shift when web fonts load (fallback vs. Vazirmatn aspect) */
    font-size-adjust: 0.5;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1000;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ----- Header ----- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    transition: background 0.3s, box-shadow 0.3s;
}

.header.scrolled {
    /* بدون backdrop-filter: در غیر این صورت نزدیکان position:fixed (مثل منوی موبایل)
       به جای ویوپورت، به جعبهٔ کوتاه هدر محدود می‌شوند و منو دیده نمی‌شود. */
    background: rgba(10, 11, 15, 0.94);
    box-shadow: 0 1px 0 var(--border);
}

.header-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    /* ارتفاع پایدار تا ردیف اول هدر با لود فونت/آیکن جابه‌جا نشود */
    min-height: 3.5rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
}

.logo-mark {
    color: var(--accent);
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
}

.logo-text span {
    color: var(--accent-light);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    line-height: 1;
}

.nav a {
    font-family: var(--font-body);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: color 0.2s;
    line-height: 1;
}

.nav a:hover {
    color: var(--text);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    justify-self: end;
    flex-shrink: 0;
}

.header-social {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.header-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    color: var(--text-muted);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    font-size: 1.05rem;
}

.header-icon-link:hover {
    color: var(--accent-light);
    border-color: rgba(99, 102, 241, 0.45);
    background: rgba(99, 102, 241, 0.1);
}

.header-icon-link:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 2px;
}

/* Hugging Face: mask + currentColor — same hue as GitHub / email icons */
.hf-icon-mask {
    display: block;
    width: 1.08em;
    height: 1em;
    flex-shrink: 0;
    pointer-events: none;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2295%22%20height%3D%2288%22%20fill%3D%22none%22%20viewBox%3D%220%200%2095%2088%22%20aria-hidden%3D%22true%22%3E%20%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M47.21%2076.5a34.75%2034.75%200%201%200%200-69.5%2034.75%2034.75%200%200%200%200%2069.5Z%22%20%2F%3E%20%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M81.96%2041.75a34.75%2034.75%200%201%200-69.5%200%2034.75%2034.75%200%200%200%2069.5%200Zm-73.5%200a38.75%2038.75%200%201%201%2077.5%200%2038.75%2038.75%200%200%201-77.5%200Z%22%20%2F%3E%20%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M58.5%2032.3c1.28.44%201.78%203.06%203.07%202.38a5%205%200%201%200-6.76-2.07c.61%201.15%202.55-.72%203.7-.32ZM34.95%2032.3c-1.28.44-1.79%203.06-3.07%202.38a5%205%200%201%201%206.76-2.07c-.61%201.15-2.56-.72-3.7-.32Z%22%20%2F%3E%20%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M46.96%2056.29c9.83%200%2013-8.76%2013-13.26%200-2.34-1.57-1.6-4.09-.36-2.33%201.15-5.46%202.74-8.9%202.74-7.19%200-13-6.88-13-2.38s3.16%2013.26%2013%2013.26Z%22%20%2F%3E%20%3Cpath%20fill%3D%22%23fff%22%20fill-rule%3D%22evenodd%22%20d%3D%22M39.43%2054a8.7%208.7%200%200%201%205.3-4.49c.4-.12.81.57%201.24%201.28.4.68.82%201.37%201.24%201.37.45%200%20.9-.68%201.33-1.35.45-.7.89-1.38%201.32-1.25a8.61%208.61%200%200%201%205%204.17c3.73-2.94%205.1-7.74%205.1-10.7%200-2.34-1.57-1.6-4.09-.36l-.14.07c-2.31%201.15-5.39%202.67-8.77%202.67s-6.45-1.52-8.77-2.67c-2.6-1.29-4.23-2.1-4.23.29%200%203.05%201.46%208.06%205.47%2010.97Z%22%20clip-rule%3D%22evenodd%22%20%2F%3E%20%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M70.71%2037a3.25%203.25%200%201%200%200-6.5%203.25%203.25%200%200%200%200%206.5ZM24.21%2037a3.25%203.25%200%201%200%200-6.5%203.25%203.25%200%200%200%200%206.5ZM17.52%2048c-1.62%200-3.06.66-4.07%201.87a5.97%205.97%200%200%200-1.33%203.76%207.1%207.1%200%200%200-1.94-.3c-1.55%200-2.95.59-3.94%201.66a5.8%205.8%200%200%200-.8%207%205.3%205.3%200%200%200-1.79%202.82c-.24.9-.48%202.8.8%204.74a5.22%205.22%200%200%200-.37%205.02c1.02%202.32%203.57%204.14%208.52%206.1%203.07%201.22%205.89%202%205.91%202.01a44.33%2044.33%200%200%200%2010.93%201.6c5.86%200%2010.05-1.8%2012.46-5.34%203.88-5.69%203.33-10.9-1.7-15.92-2.77-2.78-4.62-6.87-5-7.77-.78-2.66-2.84-5.62-6.25-5.62a5.7%205.7%200%200%200-4.6%202.46c-1-1.26-1.98-2.25-2.86-2.82A7.4%207.4%200%200%200%2017.52%2048Zm0%204c.51%200%201.14.22%201.82.65%202.14%201.36%206.25%208.43%207.76%2011.18.5.92%201.37%201.31%202.14%201.31%201.55%200%202.75-1.53.15-3.48-3.92-2.93-2.55-7.72-.68-8.01.08-.02.17-.02.24-.02%201.7%200%202.45%202.93%202.45%202.93s2.2%205.52%205.98%209.3c3.77%203.77%203.97%206.8%201.22%2010.83-1.88%202.75-5.47%203.58-9.16%203.58-3.81%200-7.73-.9-9.92-1.46-.11-.03-13.45-3.8-11.76-7%20.28-.54.75-.76%201.34-.76%202.38%200%206.7%203.54%208.57%203.54.41%200%20.7-.17.83-.6.79-2.85-12.06-4.05-10.98-8.17.2-.73.71-1.02%201.44-1.02%203.14%200%2010.2%205.53%2011.68%205.53.11%200%20.2-.03.24-.1.74-1.2.33-2.04-4.9-5.2-5.21-3.16-8.88-5.06-6.8-7.33.24-.26.58-.38%201-.38%203.17%200%2010.66%206.82%2010.66%206.82s2.02%202.1%203.25%202.1c.28%200%20.52-.1.68-.38.86-1.46-8.06-8.22-8.56-11.01-.34-1.9.24-2.85%201.31-2.85Z%22%20%2F%3E%20%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M38.6%2076.69c2.75-4.04%202.55-7.07-1.22-10.84-3.78-3.77-5.98-9.3-5.98-9.3s-.82-3.2-2.69-2.9c-1.87.3-3.24%205.08.68%208.01%203.91%202.93-.78%204.92-2.29%202.17-1.5-2.75-5.62-9.82-7.76-11.18-2.13-1.35-3.63-.6-3.13%202.2.5%202.79%209.43%209.55%208.56%2011-.87%201.47-3.93-1.71-3.93-1.71s-9.57-8.71-11.66-6.44c-2.08%202.27%201.59%204.17%206.8%207.33%205.23%203.16%205.64%204%204.9%205.2-.75%201.2-12.28-8.53-13.36-4.4-1.08%204.11%2011.77%205.3%2010.98%208.15-.8%202.85-9.06-5.38-10.74-2.18-1.7%203.21%2011.65%206.98%2011.76%207.01%204.3%201.12%2015.25%203.49%2019.08-2.12Z%22%20%2F%3E%20%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M77.4%2048c1.62%200%203.07.66%204.07%201.87a5.97%205.97%200%200%201%201.33%203.76%207.1%207.1%200%200%201%201.95-.3c1.55%200%202.95.59%203.94%201.66a5.8%205.8%200%200%201%20.8%207%205.3%205.3%200%200%201%201.78%202.82c.24.9.48%202.8-.8%204.74a5.22%205.22%200%200%201%20.37%205.02c-1.02%202.32-3.57%204.14-8.51%206.1-3.08%201.22-5.9%202-5.92%202.01a44.33%2044.33%200%200%201-10.93%201.6c-5.86%200-10.05-1.8-12.46-5.34-3.88-5.69-3.33-10.9%201.7-15.92%202.78-2.78%204.63-6.87%205.01-7.77.78-2.66%202.83-5.62%206.24-5.62a5.7%205.7%200%200%201%204.6%202.46c1-1.26%201.98-2.25%202.87-2.82A7.4%207.4%200%200%201%2077.4%2048Zm0%204c-.51%200-1.13.22-1.82.65-2.13%201.36-6.25%208.43-7.76%2011.18a2.43%202.43%200%200%201-2.14%201.31c-1.54%200-2.75-1.53-.14-3.48%203.91-2.93%202.54-7.72.67-8.01a1.54%201.54%200%200%200-.24-.02c-1.7%200-2.45%202.93-2.45%202.93s-2.2%205.52-5.97%209.3c-3.78%203.77-3.98%206.8-1.22%2010.83%201.87%202.75%205.47%203.58%209.15%203.58%203.82%200%207.73-.9%209.93-1.46.1-.03%2013.45-3.8%2011.76-7-.29-.54-.75-.76-1.34-.76-2.38%200-6.71%203.54-8.57%203.54-.42%200-.71-.17-.83-.6-.8-2.85%2012.05-4.05%2010.97-8.17-.19-.73-.7-1.02-1.44-1.02-3.14%200-10.2%205.53-11.68%205.53-.1%200-.19-.03-.23-.1-.74-1.2-.34-2.04%204.88-5.2%205.23-3.16%208.9-5.06%206.8-7.33-.23-.26-.57-.38-.98-.38-3.18%200-10.67%206.82-10.67%206.82s-2.02%202.1-3.24%202.1a.74.74%200%200%201-.68-.38c-.87-1.46%208.05-8.22%208.55-11.01.34-1.9-.24-2.85-1.31-2.85Z%22%20%2F%3E%20%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M56.33%2076.69c-2.75-4.04-2.56-7.07%201.22-10.84%203.77-3.77%205.97-9.3%205.97-9.3s.82-3.2%202.7-2.9c1.86.3%203.23%205.08-.68%208.01-3.92%202.93.78%204.92%202.28%202.17%201.51-2.75%205.63-9.82%207.76-11.18%202.13-1.35%203.64-.6%203.13%202.2-.5%202.79-9.42%209.55-8.55%2011%20.86%201.47%203.92-1.71%203.92-1.71s9.58-8.71%2011.66-6.44c2.08%202.27-1.58%204.17-6.8%207.33-5.23%203.16-5.63%204-4.9%205.2.75%201.2%2012.28-8.53%2013.36-4.4%201.08%204.11-11.76%205.3-10.97%208.15.8%202.85%209.05-5.38%2010.74-2.18%201.69%203.21-11.65%206.98-11.76%207.01-4.31%201.12-15.26%203.49-19.08-2.12Z%22%20%2F%3E%20%3C%2Fsvg%3E");
    mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2295%22%20height%3D%2288%22%20fill%3D%22none%22%20viewBox%3D%220%200%2095%2088%22%20aria-hidden%3D%22true%22%3E%20%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M47.21%2076.5a34.75%2034.75%200%201%200%200-69.5%2034.75%2034.75%200%200%200%200%2069.5Z%22%20%2F%3E%20%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M81.96%2041.75a34.75%2034.75%200%201%200-69.5%200%2034.75%2034.75%200%200%200%2069.5%200Zm-73.5%200a38.75%2038.75%200%201%201%2077.5%200%2038.75%2038.75%200%200%201-77.5%200Z%22%20%2F%3E%20%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M58.5%2032.3c1.28.44%201.78%203.06%203.07%202.38a5%205%200%201%200-6.76-2.07c.61%201.15%202.55-.72%203.7-.32ZM34.95%2032.3c-1.28.44-1.79%203.06-3.07%202.38a5%205%200%201%201%206.76-2.07c-.61%201.15-2.56-.72-3.7-.32Z%22%20%2F%3E%20%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M46.96%2056.29c9.83%200%2013-8.76%2013-13.26%200-2.34-1.57-1.6-4.09-.36-2.33%201.15-5.46%202.74-8.9%202.74-7.19%200-13-6.88-13-2.38s3.16%2013.26%2013%2013.26Z%22%20%2F%3E%20%3Cpath%20fill%3D%22%23fff%22%20fill-rule%3D%22evenodd%22%20d%3D%22M39.43%2054a8.7%208.7%200%200%201%205.3-4.49c.4-.12.81.57%201.24%201.28.4.68.82%201.37%201.24%201.37.45%200%20.9-.68%201.33-1.35.45-.7.89-1.38%201.32-1.25a8.61%208.61%200%200%201%205%204.17c3.73-2.94%205.1-7.74%205.1-10.7%200-2.34-1.57-1.6-4.09-.36l-.14.07c-2.31%201.15-5.39%202.67-8.77%202.67s-6.45-1.52-8.77-2.67c-2.6-1.29-4.23-2.1-4.23.29%200%203.05%201.46%208.06%205.47%2010.97Z%22%20clip-rule%3D%22evenodd%22%20%2F%3E%20%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M70.71%2037a3.25%203.25%200%201%200%200-6.5%203.25%203.25%200%200%200%200%206.5ZM24.21%2037a3.25%203.25%200%201%200%200-6.5%203.25%203.25%200%200%200%200%206.5ZM17.52%2048c-1.62%200-3.06.66-4.07%201.87a5.97%205.97%200%200%200-1.33%203.76%207.1%207.1%200%200%200-1.94-.3c-1.55%200-2.95.59-3.94%201.66a5.8%205.8%200%200%200-.8%207%205.3%205.3%200%200%200-1.79%202.82c-.24.9-.48%202.8.8%204.74a5.22%205.22%200%200%200-.37%205.02c1.02%202.32%203.57%204.14%208.52%206.1%203.07%201.22%205.89%202%205.91%202.01a44.33%2044.33%200%200%200%2010.93%201.6c5.86%200%2010.05-1.8%2012.46-5.34%203.88-5.69%203.33-10.9-1.7-15.92-2.77-2.78-4.62-6.87-5-7.77-.78-2.66-2.84-5.62-6.25-5.62a5.7%205.7%200%200%200-4.6%202.46c-1-1.26-1.98-2.25-2.86-2.82A7.4%207.4%200%200%200%2017.52%2048Zm0%204c.51%200%201.14.22%201.82.65%202.14%201.36%206.25%208.43%207.76%2011.18.5.92%201.37%201.31%202.14%201.31%201.55%200%202.75-1.53.15-3.48-3.92-2.93-2.55-7.72-.68-8.01.08-.02.17-.02.24-.02%201.7%200%202.45%202.93%202.45%202.93s2.2%205.52%205.98%209.3c3.77%203.77%203.97%206.8%201.22%2010.83-1.88%202.75-5.47%203.58-9.16%203.58-3.81%200-7.73-.9-9.92-1.46-.11-.03-13.45-3.8-11.76-7%20.28-.54.75-.76%201.34-.76%202.38%200%206.7%203.54%208.57%203.54.41%200%20.7-.17.83-.6.79-2.85-12.06-4.05-10.98-8.17.2-.73.71-1.02%201.44-1.02%203.14%200%2010.2%205.53%2011.68%205.53.11%200%20.2-.03.24-.1.74-1.2.33-2.04-4.9-5.2-5.21-3.16-8.88-5.06-6.8-7.33.24-.26.58-.38%201-.38%203.17%200%2010.66%206.82%2010.66%206.82s2.02%202.1%203.25%202.1c.28%200%20.52-.1.68-.38.86-1.46-8.06-8.22-8.56-11.01-.34-1.9.24-2.85%201.31-2.85Z%22%20%2F%3E%20%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M38.6%2076.69c2.75-4.04%202.55-7.07-1.22-10.84-3.78-3.77-5.98-9.3-5.98-9.3s-.82-3.2-2.69-2.9c-1.87.3-3.24%205.08.68%208.01%203.91%202.93-.78%204.92-2.29%202.17-1.5-2.75-5.62-9.82-7.76-11.18-2.13-1.35-3.63-.6-3.13%202.2.5%202.79%209.43%209.55%208.56%2011-.87%201.47-3.93-1.71-3.93-1.71s-9.57-8.71-11.66-6.44c-2.08%202.27%201.59%204.17%206.8%207.33%205.23%203.16%205.64%204%204.9%205.2-.75%201.2-12.28-8.53-13.36-4.4-1.08%204.11%2011.77%205.3%2010.98%208.15-.8%202.85-9.06-5.38-10.74-2.18-1.7%203.21%2011.65%206.98%2011.76%207.01%204.3%201.12%2015.25%203.49%2019.08-2.12Z%22%20%2F%3E%20%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M77.4%2048c1.62%200%203.07.66%204.07%201.87a5.97%205.97%200%200%201%201.33%203.76%207.1%207.1%200%200%201%201.95-.3c1.55%200%202.95.59%203.94%201.66a5.8%205.8%200%200%201%20.8%207%205.3%205.3%200%200%201%201.78%202.82c.24.9.48%202.8-.8%204.74a5.22%205.22%200%200%201%20.37%205.02c-1.02%202.32-3.57%204.14-8.51%206.1-3.08%201.22-5.9%202-5.92%202.01a44.33%2044.33%200%200%201-10.93%201.6c-5.86%200-10.05-1.8-12.46-5.34-3.88-5.69-3.33-10.9%201.7-15.92%202.78-2.78%204.63-6.87%205.01-7.77.78-2.66%202.83-5.62%206.24-5.62a5.7%205.7%200%200%201%204.6%202.46c1-1.26%201.98-2.25%202.87-2.82A7.4%207.4%200%200%201%2077.4%2048Zm0%204c-.51%200-1.13.22-1.82.65-2.13%201.36-6.25%208.43-7.76%2011.18a2.43%202.43%200%200%201-2.14%201.31c-1.54%200-2.75-1.53-.14-3.48%203.91-2.93%202.54-7.72.67-8.01a1.54%201.54%200%200%200-.24-.02c-1.7%200-2.45%202.93-2.45%202.93s-2.2%205.52-5.97%209.3c-3.78%203.77-3.98%206.8-1.22%2010.83%201.87%202.75%205.47%203.58%209.15%203.58%203.82%200%207.73-.9%209.93-1.46.1-.03%2013.45-3.8%2011.76-7-.29-.54-.75-.76-1.34-.76-2.38%200-6.71%203.54-8.57%203.54-.42%200-.71-.17-.83-.6-.8-2.85%2012.05-4.05%2010.97-8.17-.19-.73-.7-1.02-1.44-1.02-3.14%200-10.2%205.53-11.68%205.53-.1%200-.19-.03-.23-.1-.74-1.2-.34-2.04%204.88-5.2%205.23-3.16%208.9-5.06%206.8-7.33-.23-.26-.57-.38-.98-.38-3.18%200-10.67%206.82-10.67%206.82s-2.02%202.1-3.24%202.1a.74.74%200%200%201-.68-.38c-.87-1.46%208.05-8.22%208.55-11.01.34-1.9-.24-2.85-1.31-2.85Z%22%20%2F%3E%20%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M56.33%2076.69c-2.75-4.04-2.56-7.07%201.22-10.84%203.77-3.77%205.97-9.3%205.97-9.3s.82-3.2%202.7-2.9c1.86.3%203.23%205.08-.68%208.01-3.92%202.93.78%204.92%202.28%202.17%201.51-2.75%205.63-9.82%207.76-11.18%202.13-1.35%203.64-.6%203.13%202.2-.5%202.79-9.42%209.55-8.55%2011%20.86%201.47%203.92-1.71%203.92-1.71s9.58-8.71%2011.66-6.44c2.08%202.27-1.58%204.17-6.8%207.33-5.23%203.16-5.63%204-4.9%205.2.75%201.2%2012.28-8.53%2013.36-4.4%201.08%204.11-11.76%205.3-10.97%208.15.8%202.85%209.05-5.38%2010.74-2.18%201.69%203.21-11.65%206.98-11.76%207.01-4.31%201.12-15.26%203.49-19.08-2.12Z%22%20%2F%3E%20%3C%2Fsvg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.header-icon-hf .hf-icon-mask {
    width: 1.12em;
    height: 1.04em;
}

.product-card-hub .hf-icon-mask,
.footer-links .hf-icon-mask {
    display: inline-block;
    vertical-align: -0.18em;
    margin-inline-end: 0.35em;
    width: 1.05em;
    height: 0.98em;
}

/* هارمونی سه آیکون هدر: یک اندازهٔ دیداری با آیکن‌های FA */
.header-social .header-icon-link i {
    font-size: 1.08rem;
    line-height: 1;
    color: inherit;
}


.header .btn-outline {
    flex-shrink: 0;
    justify-self: end;
}

.header .btn-outline i {
    display: inline-flex;
    align-items: center;
}

.btn-outline {
    color: var(--accent-light);
    border: 1px solid rgba(99, 102, 241, 0.4);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #4f46e5);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.btn-ghost {
    color: var(--text-muted);
    background: transparent;
}

.btn-ghost:hover {
    color: var(--text);
    background: var(--surface-2);
}

.btn-lg {
    padding: 0.9rem 1.75rem;
    font-size: 1rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Mobile-only nav elements — hidden on desktop */
.nav-cta-mobile,
.nav-close {
    display: none;
}

/* ----- Hero ----- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 1.5rem 4rem;
    gap: 2rem;
}

/* Desktop: extra inset on visual right — RTL hero text column sits there */
@media (min-width: 901px) {
    /* نوار لینک‌های دسکتاپ: بیرون از .header، بدون transform روی #main-nav */
    #main-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 101;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        padding: 1rem clamp(1rem, 4vw, 1.5rem);
        min-height: calc(3.5rem + 2rem);
        box-sizing: border-box;
        pointer-events: none;
        background: transparent;
        width: 100%;
        max-width: none;
        margin: 0;
    }

    #main-nav a {
        pointer-events: auto;
    }

    /* ساختار مگا منوی موبایل را روی دسکتاپ باز می‌کنیم تا همان لینک‌ها در ردیف بمانند */
    #main-nav .mobile-nav-backdrop {
        display: none;
    }

    #main-nav .mobile-nav-sheet {
        display: contents;
    }

    #main-nav .mobile-nav-sheet-inner {
        display: contents;
    }

    #main-nav .mobile-nav-sheet-header {
        display: none;
    }

    #main-nav .mobile-nav-mega {
        display: none;
    }

    #main-nav .mobile-nav-links {
        display: contents;
    }

    .header-inner {
        padding-left: 1.5rem;
        padding-right: clamp(2rem, 4vw, 3.25rem);
    }

    .hero {
        padding-top: 6rem;
        padding-bottom: 4rem;
        padding-left: 1.5rem;
        padding-right: clamp(2rem, 4vw, 3.25rem);
        gap: clamp(1.75rem, 3vw, 2.75rem);
    }
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orb-float 18s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    top: -20%;
    right: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--cyan) 0%, transparent 70%);
    bottom: -10%;
    left: -5%;
    animation-delay: -8s;
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

@keyframes orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
    text-align: right;
    /* ثابت به rem — درصد با تغییر ارتفاع بعد از لود فونت باعث CLS می‌شد */
    transform: translateY(-1.5rem);
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    animation: fadeUp 0.8s ease-out;
}

/* min-height reduces CLS when webfont loads (font swap) */
.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    min-height: 4.2em;
    animation: fadeUp 0.8s ease-out 0.1s both;
}

.hero-title .line {
    display: block;
}

.hero-title .accent {
    background: linear-gradient(135deg, var(--accent-light), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-family: var(--font-body);
    color: var(--text-muted);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.7;
    max-width: 100%;
    margin-inline-start: 0;
    margin-inline-end: 0;
    margin-bottom: 2rem;
    animation: fadeUp 0.8s ease-out 0.2s both;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    animation: fadeUp 0.8s ease-out 0.3s both;
}

.hero-visual {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-width: 640px;
    margin-inline: auto;
    margin-top: 2.5rem;
    z-index: 1;
}

/* LTR island: English domain tags — چپ‌چین در ستون هیرو (ردیف اول چیدمان) */
.floating-cards {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    direction: ltr;
    unicode-bidi: isolate;
}

.float-card {
    padding: 0.75rem 1.25rem;
    background: rgba(26, 29, 40, 0.8);
    border: 1px solid var(--border);
    border-radius: 14px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    direction: ltr;
    gap: 0.5rem;
    animation: float 4s ease-in-out infinite;
    animation-delay: calc(var(--delay) * 0.4s);
}

.float-card i {
    color: var(--accent);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes fadeUp {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ----- Sections ----- */
.section {
    padding: 5rem 0;
}

/* Below-the-fold: content-visibility improves LCP by deferring off-screen work */
section.section:not(.hero) {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.section-sub {
    font-family: var(--font-body);
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
}

.section-sub-link {
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 600;
}

.section-sub-link:hover {
    text-decoration: underline;
}

/* ----- Services ----- */
.services {
    background: var(--surface);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.service-card {
    padding: 1.75rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: border-color 0.2s, transform 0.2s;
}

.service-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
}

.service-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    color: var(--accent);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.service-card p {
    font-family: var(--font-body);
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ----- Sections: content-visibility for CWV (paint only when near viewport) ----- */
.section:not(.hero) {
    content-visibility: auto;
    contain-intrinsic-size: auto 400px;
}

/* ----- Products ----- */
.products {
    background: var(--bg);
}

.products-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--accent);
    color: var(--accent-light);
    background: rgba(99, 102, 241, 0.1);
}

/* Screen-reader-only headings (valid outline without visual noise) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reserve space to avoid CLS when JS injects product cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    min-height: 420px;
}

.product-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: inherit;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.product-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.product-card-main {
    display: block;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.product-card-hub {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-light);
    text-decoration: none;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.2s;
}

.product-card-hub:hover {
    background: rgba(99, 102, 241, 0.12);
    color: var(--text);
}

.product-card .product-emoji {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.product-card .product-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.4rem;
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
}

.product-card .product-desc {
    font-family: var(--font-body);
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.55;
}

.product-card .product-link {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--accent-light);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.product-card:hover .product-link {
    text-decoration: underline;
}

.product-card-main:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: -2px;
}

.product-card-hub:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: -2px;
}

/* ----- FAQ ----- */
.faq-section {
    background: var(--surface);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-light);
    margin: 0;
    padding: 1.25rem 1rem 0.5rem;
    cursor: default;
}

.faq-answer {
    font-family: var(--font-body);
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
    padding: 0 1rem 1.25rem;
}

.faq-answer p {
    margin: 0;
}

/* ----- Models ----- */
.models-section {
    background: var(--bg);
}

.models-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
}

.models-tags-wrap {
    margin: 0;
    padding: 0;
}

.models-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

nav.hero-cta,
nav.models-cta {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ----- Technologies ----- */
.tech-section {
    background: var(--surface);
}

.tech-categories {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.tech-category-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--accent-light);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tech-category-title i {
    opacity: 0.9;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    font-family: var(--font-body);
    display: inline-block;
    padding: 0.4rem 0.85rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.tech-tag:hover {
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--text);
    background: rgba(99, 102, 241, 0.08);
}

/* ----- About ----- */
.about {
    background: var(--surface);
}

.about-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: start;
}

.about-content .section-title {
    margin-bottom: 1rem;
}

.about-content p {
    font-family: var(--font-body);
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    max-width: 560px;
}

.about-content .btn {
    margin-top: 0.5rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat {
    text-align: right;
    padding: 1.25rem 1.75rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    min-width: 140px;
}

.stat-num {
    display: block;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    color: var(--accent-light);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* ----- CTA ----- */
.cta {
    padding: 5rem 0;
}

.cta-box {
    text-align: right;
    padding: 3.5rem 2rem;
    background: linear-gradient(135deg, var(--surface-2) 0%, rgba(99, 102, 241, 0.08) 100%);
    border: 1px solid var(--border);
    border-radius: 24px;
}

.cta-box h2 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.cta-box p {
    font-family: var(--font-body);
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
}

.cta-buttons .btn-lg {
    white-space: nowrap;
}

/* ----- Footer ----- */
.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-contact {
    display: contents;
}

.footer-email {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-email:hover {
    color: var(--accent-light);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
}

.footer-brand .logo-mark {
    color: var(--accent);
}

.footer-brand .logo-text span {
    color: var(--accent-light);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    font-family: var(--font-body);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.footer-links a i {
    font-size: 1rem;
}

.footer-links a:hover {
    color: var(--accent-light);
}

.footer-copy {
    font-family: var(--font-display);
    width: 100%;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.footer-copy small {
    display: block;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
}

/* ----- Footer: Mobile Redesign ----- */
@media (max-width: 600px) {
    .footer {
        padding: 1.5rem 0 2rem;
        border-top-color: var(--surface-2);
    }

    .footer-inner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 0;
    }

    .footer-brand {
        justify-content: center;
        padding-bottom: 1.25rem;
        margin-bottom: 1.25rem;
        border-bottom: 1px solid var(--border);
        font-size: 1.25rem;
    }

    .footer-contact {
        display: block;
        margin-bottom: 1.25rem;
    }

    .footer-email {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0.875rem 1rem;
        background: var(--surface-2);
        border: 1px solid var(--border);
        border-radius: 12px;
        color: var(--accent-light);
        font-family: var(--font-body);
        font-size: 0.9rem;
        font-weight: 600;
        text-decoration: none;
        transition: background 0.2s, border-color 0.2s, color 0.2s;
    }

    .footer-email i {
        font-size: 1rem;
        opacity: 0.9;
    }

    .footer-email:hover,
    .footer-email:focus-visible {
        background: var(--surface);
        border-color: var(--accent);
        color: var(--text);
    }

    .footer-links {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.65rem;
        margin-bottom: 1.25rem;
        padding: 1rem 0.75rem;
        background: linear-gradient(
            165deg,
            rgba(99, 102, 241, 0.09) 0%,
            rgba(26, 29, 40, 0.6) 42%,
            var(--surface-2) 100%
        );
        border: 1px solid var(--border);
        border-radius: 18px;
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
    }

    .footer-links a {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 0.55rem;
        padding: 0.85rem 0.45rem 0.75rem;
        min-height: 0;
        border-radius: 14px;
        background: rgba(18, 20, 28, 0.65);
        border: 1px solid rgba(255, 255, 255, 0.06);
        font-size: 0.72rem;
        font-weight: 600;
        line-height: 1.25;
        color: var(--text-muted);
        text-align: center;
        transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
        -webkit-tap-highlight-color: transparent;
    }

    .footer-links a > i,
    .footer-links a > .hf-icon-mask {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.65rem;
        height: 2.65rem;
        margin: 0;
        border-radius: 50%;
        background: rgba(99, 102, 241, 0.14);
        border: 1px solid rgba(129, 140, 248, 0.28);
        flex-shrink: 0;
    }

    .footer-links a > .hf-icon-mask {
        vertical-align: middle;
        -webkit-mask-size: 58% auto;
        mask-size: 58% auto;
    }

    .footer-links a i {
        font-size: 1.2rem;
        color: var(--accent-light);
    }

    .footer-links a:hover,
    .footer-links a:focus-visible {
        background: rgba(18, 20, 28, 0.92);
        border-color: rgba(129, 140, 248, 0.35);
        color: var(--text);
        box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
        transform: translateY(-1px);
    }

    .footer-links a:hover > i,
    .footer-links a:focus-visible > i {
        color: var(--accent);
    }

    .footer-links a:hover > .hf-icon-mask,
    .footer-links a:focus-visible > .hf-icon-mask {
        background-color: var(--accent-light);
    }

    .footer-link-text {
        max-width: 100%;
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        white-space: normal;
        word-break: break-word;
        hyphens: auto;
    }

    .footer-copy {
        text-align: center;
        margin-top: 0;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
        font-size: 0.9rem;
        line-height: 1.6;
        letter-spacing: 0.04em;
    }
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
    /* First row (header): single clean row — flex instead of grid for predictable mobile layout */
    .header-inner {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        min-height: 56px;
        padding: 0 1rem;
    }

    .header-inner .logo {
        flex-shrink: 0;
        order: 1;
    }

    .header-actions {
        order: 2;
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }

    .header-social {
        gap: 0.2rem;
    }

    .header-icon-link {
        width: 2.35rem;
        height: 2.35rem;
        font-size: 1rem;
    }

    .nav-toggle {
        display: flex;
        flex-shrink: 0;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
    }

    /* فقط منوی صفحهٔ اصلی؛ صفحات داخلی internal-nav را مخفی نکن */
    #main-nav {
        display: none;
        position: static;
        left: auto;
        right: auto;
        top: auto;
        width: auto;
        max-width: none;
        min-height: 0;
        padding: 0;
        margin: 0;
        pointer-events: auto;
        background: transparent;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    /* ----- مگا منوی اسلایدی موبایل (RTL: پنل از راست) ----- */
    #main-nav.open,
    #main-nav.is-animating-close {
        display: block;
        position: fixed;
        inset: 0;
        /* بالاتر از لایهٔ نویز و دکمهٔ شناور */
        z-index: 10050;
        padding: 0;
        margin: 0;
        pointer-events: none;
        box-sizing: border-box;
        background: transparent;
        border: none;
        width: 100%;
        max-width: none;
        min-height: 0;
    }

    /* بستن: بعد از اسلاید، کلیک روی بک‌دراپ غیرفعال */
    #main-nav.is-animating-close .mobile-nav-backdrop {
        pointer-events: none;
    }

    #main-nav .mobile-nav-backdrop {
        display: block;
        position: absolute;
        inset: 0;
        background: rgba(6, 7, 12, 0.72);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        opacity: 0;
        pointer-events: auto;
        cursor: pointer;
        transition: opacity 0.6s cubic-bezier(0.45, 0.05, 0.55, 0.95);
    }

    #main-nav.open .mobile-nav-backdrop {
        opacity: 1;
    }

    #main-nav .mobile-nav-sheet {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(100%, 400px);
        max-width: 100%;
        pointer-events: auto;
        background: linear-gradient(165deg, rgba(22, 24, 34, 0.98) 0%, rgba(12, 14, 22, 0.99) 45%, rgba(10, 11, 18, 1) 100%);
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: -24px 0 48px rgba(0, 0, 0, 0.45);
        border-radius: 0 0 0 20px;
        transform: translateX(100%);
        transition: transform 0.6s cubic-bezier(0.45, 0.05, 0.55, 0.95);
        overflow: hidden;
        will-change: transform;
    }

    #main-nav.open .mobile-nav-sheet {
        transform: translateX(0);
    }

    #main-nav .mobile-nav-sheet-glow {
        display: none;
    }

    #main-nav .mobile-nav-sheet-inner {
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    #main-nav .mobile-nav-sheet-header {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: max(0.75rem, env(safe-area-inset-top)) 1rem 0.85rem 1.25rem;
        border-bottom: 1px solid var(--border);
        background: rgba(10, 11, 15, 0.55);
    }

    #main-nav .mobile-nav-sheet-title {
        font-family: var(--font-display);
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--text-muted);
    }

    #main-nav .mobile-nav-links {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 0.35rem 0 0.5rem;
    }

    #main-nav .mobile-nav-links a {
        display: flex;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
        padding: 1rem 1.35rem;
        font-size: 1.02rem;
        font-weight: 600;
        color: var(--text);
        text-decoration: none;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        background: transparent;
        text-align: right;
        transition: background 0.2s, color 0.2s, padding 0.2s;
        opacity: 1;
    }

    #main-nav .mobile-nav-links a:hover,
    #main-nav .mobile-nav-links a:focus-visible {
        background: rgba(99, 102, 241, 0.12);
        color: var(--accent-light);
        padding-inline-end: 1.5rem;
    }

    #main-nav .mobile-nav-mega {
        flex-shrink: 0;
        padding: 1rem 1.1rem max(1.25rem, env(safe-area-inset-bottom));
        background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.25));
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    #main-nav .mobile-nav-mega-label {
        display: flex;
        align-items: center;
        gap: 0.45rem;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--accent-light);
        margin-bottom: 0.75rem;
        padding-inline-start: 0.15rem;
    }

    #main-nav .mobile-nav-mega-label i {
        font-size: 0.7rem;
        opacity: 0.9;
    }

    #main-nav .mobile-nav-mega-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
    }

    #main-nav .mega-card {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.85rem 0.75rem;
        border-radius: 14px;
        text-decoration: none;
        color: var(--text);
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.03);
        transition: transform 0.22s ease, border-color 0.2s, box-shadow 0.25s, background 0.2s;
        position: relative;
        overflow: hidden;
        text-align: right;
        opacity: 1;
    }

    #main-nav .mega-card::after {
        content: '';
        position: absolute;
        inset: 0;
        opacity: 0;
        transition: opacity 0.25s;
        pointer-events: none;
    }

    #main-nav .mega-card:hover,
    #main-nav .mega-card:focus-visible {
        transform: translateY(-2px);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    }

    #main-nav .mega-card-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2.35rem;
        height: 2.35rem;
        border-radius: 11px;
        font-size: 1.15rem;
        flex-shrink: 0;
    }

    #main-nav .mega-card-icon-hf {
        background: rgba(253, 224, 71, 0.12) !important;
    }

    #main-nav .mega-card-icon-hf .hf-icon-mask {
        width: 1.15em;
        height: 1.06em;
    }

    #main-nav .mega-card-body {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
        width: 100%;
        min-width: 0;
    }

    #main-nav .mega-card-title {
        font-size: 0.82rem;
        font-weight: 700;
        line-height: 1.25;
    }

    #main-nav .mega-card-sub {
        font-size: 0.68rem;
        color: var(--text-muted);
        line-height: 1.35;
    }

    #main-nav .mega-card--wa .mega-card-icon {
        direction: ltr;
        background: rgba(37, 211, 102, 0.18);
        color: #4ade80;
    }

    #main-nav .mega-card--wa::after {
        background: radial-gradient(circle at 30% 20%, rgba(37, 211, 102, 0.15), transparent 55%);
    }

    #main-nav .mega-card--wa:hover,
    #main-nav .mega-card--wa:focus-visible {
        border-color: rgba(37, 211, 102, 0.45);
    }

    #main-nav .mega-card--wa:hover::after,
    #main-nav .mega-card--wa:focus-visible::after {
        opacity: 1;
    }

    #main-nav .mega-card--gh .mega-card-icon {
        background: rgba(255, 255, 255, 0.08);
        color: #e8eaef;
    }

    #main-nav .mega-card--gh:hover,
    #main-nav .mega-card--gh:focus-visible {
        border-color: rgba(255, 255, 255, 0.2);
    }

    #main-nav .mega-card--hf .mega-card-icon {
        color: #fde047;
    }

    #main-nav .mega-card--hf:hover,
    #main-nav .mega-card--hf:focus-visible {
        border-color: rgba(253, 224, 71, 0.4);
    }

    #main-nav .mega-card--mail .mega-card-icon {
        background: rgba(99, 102, 241, 0.2);
        color: var(--accent-light);
    }

    #main-nav .mega-card--mail:hover,
    #main-nav .mega-card--mail:focus-visible {
        border-color: rgba(129, 140, 248, 0.5);
    }

    #main-nav .nav-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        min-width: 44px;
        margin: 0;
        padding: 0;
        font-size: 1.2rem;
        color: var(--text-muted);
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid var(--border);
        border-radius: 12px;
        cursor: pointer;
        transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
    }

    #main-nav .nav-close:hover {
        color: var(--text);
        background: rgba(99, 102, 241, 0.15);
        border-color: rgba(99, 102, 241, 0.35);
    }

    #main-nav .nav-close:active {
        transform: scale(0.96);
    }

    #main-nav .nav-close i {
        display: block;
        line-height: 1;
    }

    /* Hamburger → X when menu open (nav دیگر فرزند header-inner نیست) */
    body.menu-open .header .nav-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    body.menu-open .header .nav-toggle span:nth-child(2) {
        opacity: 0;
    }
    body.menu-open .header .nav-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero-visual {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 3rem;
    }

    .about-inner {
        grid-template-columns: 1fr;
    }

    .about-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    /* Tighter first row on small mobile */
    .header {
        padding: 0.75rem 0;
    }

    .header-inner {
        min-height: 48px;
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo-mark {
        font-size: 1rem;
    }

    .hero {
        padding: 5rem 1rem 3rem;
    }

    /* Hero first row: stack badge + title + desc in a clear vertical flow (no min-height overflow) */
    .hero-content {
        width: 100%;
        max-width: 100%;
        transform: none;
    }

    .hero-badge {
        margin-bottom: 1rem;
        font-size: 0.75rem;
        padding: 0.3rem 0.75rem;
    }

    .hero-title {
        min-height: unset;
        font-size: clamp(1.75rem, 8vw, 2.25rem);
        margin-bottom: 1rem;
        line-height: 1.25;
    }

    .hero-title .line {
        display: block;
    }

    .hero-desc {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    /* Floating cards: single column — زیر هم */
    .floating-cards {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .float-card {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        width: 100%;
        justify-content: flex-start;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes mobileMenuBackdrop {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes mobileNavBackdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes mobileNavLinkIn {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes mobileNavMegaIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
    #main-nav .mobile-nav-sheet {
        transition: none;
    }

    #main-nav .mobile-nav-backdrop {
        animation: none;
        opacity: 1;
    }

    #main-nav .mobile-nav-links a,
    #main-nav .mega-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 380px) {
    #main-nav .mobile-nav-mega-grid {
        grid-template-columns: 1fr;
    }
}

body.menu-open {
    overflow: hidden;
}

/* ----- Floating WhatsApp ----- */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
    z-index: 999;
    transition: transform 0.2s, box-shadow 0.2s;
    direction: ltr; /* Prevent RTL from mirroring the WhatsApp icon */
    text-decoration: none;
}

.whatsapp-float i {
    display: block;
    line-height: 1;
}

.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.55);
    color: #fff;
}
