/* ═══════════════════════════════════════════════════════
   Cafenet — Homepage (Warm · Clear · Service-first)
   ═══════════════════════════════════════════════════════ */

.cn-home {
    --bg:           #FBF7F0;
    --surface:      #FFFFFF;
    --ink:          #1A1310;
    --ink-soft:     #4A3E38;
    --muted:        #8A7E76;
    --line:         #EDE4D6;
    --line-strong:  #D6C8B5;

    --primary:      #E8761D;
    --primary-h:    #D1640F;
    --primary-soft: #FDF0E1;

    --green:        #16A34A;
    --green-soft:   #DCFCE7;
    --amber:        #D97706;
    --amber-soft:   #FEF3C7;

    margin: calc(-1 * var(--s-6)) calc(-1 * var(--s-5)) calc(-1 * var(--s-10));
    background: var(--bg);
    color: var(--ink);
    font-family: 'Vazirmatn', sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.cn-home * { box-sizing: border-box; }

.cn-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ═══ HERO ═══ */
.cn-hero {
    padding: 56px 0 40px;
    text-align: center;
}
.cn-hero h1 {
    font-size: clamp(1.75rem, 4.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0 0 16px;
    text-wrap: balance;
}
.cn-hero h1 span { color: var(--primary); }
.cn-hero p {
    font-size: clamp(0.98rem, 1.6vw, 1.1rem);
    color: var(--ink-soft);
    line-height: 1.9;
    max-width: 540px;
    margin: 0 auto 28px;
    text-wrap: balance;
}

/* Trust bar */
.cn-trust {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 100px;
    font-size: 0.88rem;
    color: var(--ink-soft);
    box-shadow: 0 2px 12px rgba(26, 19, 16, 0.04);
}
.cn-trust strong {
    font-weight: 800;
    color: var(--primary);
    font-feature-settings: 'tnum';
    margin-inline-end: 4px;
}
.cn-trust-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--line-strong);
}

/* ═══ SECTION HEAD ═══ */
.cn-section {
    padding: 32px 0 56px;
}
.cn-sec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.cn-sec-head h2 {
    font-size: clamp(1.25rem, 2.4vw, 1.5rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cn-sec-head h2::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--primary);
    border-radius: 2px;
}
.cn-sec-head span {
    font-size: 0.88rem;
    color: var(--muted);
}

/* ═══ CARD GRID ═══ */
.cn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.cn-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px;
    color: inherit;
    text-decoration: none;
    transition: all 0.22s ease;
    box-shadow: 0 1px 3px rgba(26, 19, 16, 0.03);
    position: relative;
    overflow: hidden;
}
.cn-card::before {
    content: '';
    position: absolute;
    inset-inline-end: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.22s;
}
.cn-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(232, 118, 29, 0.12);
    transform: translateY(-2px);
    color: inherit;
}
.cn-card:hover::before { opacity: 1; }

.cn-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.cn-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cn-card-icon svg {
    width: 24px;
    height: 24px;
}
.cn-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--ink);
    margin: 0 0 8px;
    letter-spacing: -0.005em;
}
.cn-card p {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--muted);
    margin: 0 0 18px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cn-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.cn-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
.cn-badge.amber { background: var(--amber-soft); color: #92400E; }
.cn-badge.green { background: var(--green-soft); color: #166534; }
.cn-badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}
.cn-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    transition: gap 0.2s;
}
.cn-cta span {
    transition: transform 0.2s;
}
.cn-card:hover .cn-cta span {
    transform: translateX(-4px);
}

/* ═══ HOW IT WORKS ═══ */
.cn-how {
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 48px 0;
    margin: 40px 0;
}
.cn-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 8px;
}
.cn-step {
    text-align: center;
    padding: 16px 12px;
    position: relative;
}
.cn-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 32px;
    inset-inline-start: -12px;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--line), transparent);
    z-index: 0;
}
.cn-step-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 0 6px var(--surface);
}
.cn-step-icon svg {
    width: 28px;
    height: 28px;
}
.cn-step h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 8px;
}
.cn-step p {
    font-size: 0.88rem;
    line-height: 1.8;
    color: var(--muted);
    margin: 0;
    max-width: 220px;
    margin-inline: auto;
}

/* ═══ EMPTY ═══ */
.cn-empty {
    padding: 56px 24px;
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--line-strong);
    border-radius: 16px;
}
.cn-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cn-empty-icon svg { width: 28px; height: 28px; }
.cn-empty h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 8px;
}
.cn-empty p {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0 0 20px;
}
.cn-empty a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}
.cn-empty a:hover { background: var(--primary-h); color: #fff; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
    .cn-steps { grid-template-columns: 1fr; gap: 12px; }
    .cn-step:not(:last-child)::after { display: none; }
    .cn-step { padding: 20px 8px; }
}
@media (max-width: 480px) {
    .cn-hero { padding: 40px 0 28px; }
    .cn-grid { grid-template-columns: 1fr; }
    .cn-card { padding: 18px; }
    .cn-card-icon { width: 44px; height: 44px; }
    .cn-card-icon svg { width: 22px; height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .cn-card, .cn-cta, .cn-cta span { transition: none; }
}