/* ============================================================
   frontend/modules/landing/landing.css
   ShiftManager — Landing Page Styles
   ============================================================
   • Mobile-First
   • Fluid Typography (clamp)
   • RTL
   • Design Tokens از common.css
   ============================================================ */

/* ───────────────────────────────────────────────────────────
   Design Tokens اضافی (اختصاصی Landing)
   ─────────────────────────────────────────────────────────── */
:root {
    --landing-bg: #fef9f3;
    --landing-bg-alt: #fdf6e3;
    --landing-surface: #ffffff;
    --landing-text: #1a252f;
    --landing-text-muted: #64748b;
    --landing-border: #e2e8f0;

    --gradient-primary: linear-gradient(135deg, #e67e22 0%, #f39c12 50%, #f1c40f 100%);
    --gradient-hero: linear-gradient(135deg, #2c3e50 0%, #e67e22 100%);
    --gradient-text: linear-gradient(135deg, #e67e22 0%, #d35400 100%);

    --shadow-sm: 0 2px 8px rgba(44, 62, 80, 0.06);
    --shadow-md: 0 10px 30px rgba(44, 62, 80, 0.10);
    --shadow-lg: 0 20px 50px rgba(230, 126, 34, 0.18);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --container-max: 1280px;
    --container-pad: 1.25rem;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ───────────────────────────────────────────────────────────
   Base
   ─────────────────────────────────────────────────────────── */
.landing-body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background: var(--landing-bg);
    color: var(--landing-text);
    font-size: clamp(1rem, 0.9rem + 0.4vw, 1.125rem);
    line-height: 1.65;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

/* ───────────────────────────────────────────────────────────
   Buttons (تکمیل کلاس‌های common.css)
   ─────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    min-height: 44px;             /* WCAG Tap Target */
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-sm { padding: 0.5rem 1rem; min-height: 40px; font-size: 0.9rem; }
.btn-lg { padding: 1rem 2rem; min-height: 52px; font-size: 1.05rem; }

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-light {
    background: transparent;
    color: var(--landing-text);
    border: 2px solid var(--landing-border);
}
.btn-outline-light:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(230, 126, 34, 0.05);
}

.btn-ghost {
    background: transparent;
    color: var(--landing-text-muted);
    padding: 0.75rem 1rem;
}
.btn-ghost:hover {
    color: var(--primary);
}

/* Focus state (WCAG) */
.btn:focus-visible,
.nav-link:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(230, 126, 34, 0.5);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* ───────────────────────────────────────────────────────────
   Header
   ─────────────────────────────────────────────────────────── */
.landing-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(254, 249, 243, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--landing-border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.85rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--landing-text);
    text-decoration: none;
    flex-shrink: 0;
}
.logo-icon {
    font-size: 1.6rem;
    display: inline-block;
    animation: rotate 8s linear infinite;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
    display: block;
}
.logo-accent {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.header-nav {
    display: none;                 /* موبایل: مخفی */
    gap: 1.75rem;
}
.nav-link {
    color: var(--landing-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
}
.nav-link:hover {
    color: var(--primary);
}
.nav-link::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    bottom: -6px;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition);
}
.nav-link:hover::after {
    transform: scaleX(1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}
.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--landing-text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ───────────────────────────────────────────────────────────
   Hero
   ─────────────────────────────────────────────────────────── */
.hero {
    padding-block: clamp(3rem, 8vw, 6rem) clamp(2.5rem, 6vw, 5rem);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    inset-inline-end: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(230, 126, 34, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    background: rgba(230, 126, 34, 0.10);
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 999px;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-size: clamp(2rem, 1.2rem + 4vw, 3.75rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
    color: var(--landing-text-muted);
    line-height: 1.75;
    max-width: 55ch;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.9rem;
    color: var(--landing-text-muted);
}
.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* ── Hero Visual ── */
.hero-visual {
    position: relative;
    min-height: 320px;
    display: none;                 /* موبایل: مخفی */
}

.hero-card {
    position: absolute;
    background: var(--landing-surface);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-md);
    min-width: 200px;
    border: 1px solid var(--landing-border);
}
/* کارت اول — چرخش نرم */
.hero-card.floating:not(.delay-1):not(.delay-2) {
    top: 0;
    inset-inline-end: 10%;
    animation: floaty 8s ease-in-out infinite;
}

/* کارت دوم — چرخش با تاخیر */
.hero-card.floating.delay-1 {
    top: 60px;
    inset-inline-end: 40%;
    animation: floaty 9s ease-in-out infinite;
    animation-delay: -3s;
}

/* کارت سوم — چرخش سریع‌تر */
.hero-card.floating.delay-2 {
    top: 200px;
    inset-inline-end: 0;
    animation: floaty 7s ease-in-out infinite;
    animation-delay: -5s;
}

@keyframes floaty {
    0%   { transform: translateY(0)     rotate(0deg); }
    25%  { transform: translateY(-8px)  rotate(-1.5deg); }
    50%  { transform: translateY(-12px) rotate(0deg); }
    75%  { transform: translateY(-8px)  rotate(1.5deg); }
    100% { transform: translateY(0)     rotate(0deg); }
}

.card-icon { font-size: 1.75rem; margin-bottom: 0.5rem; }
.card-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.75rem; }
.card-bar {
    height: 8px;
    background: var(--gradient-primary);
    border-radius: 999px;
    margin-bottom: 0.4rem;
}
.card-bar.short { width: 60%; }

.avatar-group { display: flex; gap: -8px; }
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    margin-inline-start: -8px;
    border: 2px solid var(--landing-surface);
}
.avatar:first-child { margin-inline-start: 0; }

.shift-dots { display: flex; gap: 6px; }
.dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: var(--landing-border);
}
.dot.active { background: var(--primary); }

/* ───────────────────────────────────────────────────────────
   Section Header (مشترک)
   ─────────────────────────────────────────────────────────── */
.section-header {
    text-align: center;
    max-width: 640px;
    margin-inline: auto;
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-title {
    font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.5rem);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}
.section-subtitle {
    color: var(--landing-text-muted);
    font-size: 1.05rem;
}

/* ───────────────────────────────────────────────────────────
   Features
   ─────────────────────────────────────────────────────────── */
.features {
    padding-block: clamp(3rem, 6vw, 5rem);
    background: var(--landing-bg-alt);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.feature-card {
    background: var(--landing-surface);
    border: 1px solid var(--landing-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 0;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}
.feature-card > * { position: relative; z-index: 1; }

.feature-icon {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    display: inline-block;
}
.feature-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.feature-desc {
    color: var(--landing-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ───────────────────────────────────────────────────────────
   How It Works
   ─────────────────────────────────────────────────────────── */
.how-it-works {
    padding-block: clamp(3rem, 6vw, 5rem);
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    list-style: none;
    counter-reset: steps;
}

.step-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--landing-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--landing-border);
    transition: var(--transition);
}
.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}
.step-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.step-desc {
    color: var(--landing-text-muted);
    font-size: 0.95rem;
}

/* ───────────────────────────────────────────────────────────
   CTA Section
   ─────────────────────────────────────────────────────────── */
.cta-section {
    padding-block: clamp(2rem, 4vw, 3rem);
}

.cta-card {
    background: var(--gradient-hero);
    color: #fff;
    text-align: center;
    padding: clamp(2.5rem, 5vw, 4rem) 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    inset-inline-start: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
}
.cta-title {
    font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.25rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
    position: relative;
}
.cta-subtitle {
    font-size: 1.05rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    position: relative;
}
.cta-card .btn-primary {
    background: #fff;
    color: var(--primary);
    position: relative;
}
.cta-card .btn-primary:hover {
    background: var(--landing-bg);
}

/* ───────────────────────────────────────────────────────────
   Footer
   ─────────────────────────────────────────────────────────── */
.landing-footer {
    background: #2c3e50;
    color: #e2e8f0;
    padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.5rem;
    margin-top: clamp(3rem, 6vw, 5rem);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-heading {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.footer-brand .logo { color: #fff; margin-bottom: 0.75rem; }
.footer-tagline {
    color: #cbd5e1;
    font-size: 0.9rem;
    max-width: 40ch;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.footer-links a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition);
}
.footer-links a:hover { color: var(--primary-light); }

.footer-contact p {
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.footer-bottom {
    border-top: 1px solid #475569;
    padding-top: 1.25rem;
    text-align: center;
    font-size: 0.85rem;
    color: #cbd5e1;
}

/* ───────────────────────────────────────────────────────────
   Responsive — Tablet (≥ 640px)
   ─────────────────────────────────────────────────────────── */
@media (min-width: 640px) {
    :root { --container-pad: 1.75rem; }

    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid    { grid-template-columns: repeat(3, 1fr); }
    .footer-grid   { grid-template-columns: repeat(2, 1fr); }
}

/* ───────────────────────────────────────────────────────────
   Responsive — Desktop (≥ 992px)
   ─────────────────────────────────────────────────────────── */
@media (min-width: 992px) {
    :root { --container-pad: 2rem; }

    .header-nav { display: flex; }
    .mobile-menu-toggle { display: none; }

    .hero-grid {
        grid-template-columns: 1.15fr 1fr;
        gap: 3.5rem;
    }
    .hero-visual { display: block; }

    .features-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid   { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* ───────────────────────────────────────────────────────────
   Reduced Motion (WCAG)
   ─────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .logo-icon { animation: none; }
    .hero-card.floating { animation: none; }
}

/* ───────────────────────────────────────────────────────────
   Mobile Menu Open State
   ─────────────────────────────────────────────────────────── */
.landing-header.menu-open .header-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    background: var(--landing-surface);
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--landing-border);
    box-shadow: var(--shadow-md);
}

.landing-header.menu-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.landing-header.menu-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
}
.landing-header.menu-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}
