/* ============================================================
   Meslingo year-end sale (/sale) — buy 1 month, get 3 (until 2026-12-31)
   Built on style.css tokens; section-head, steps and FAQ follow
   enterprise.css so the page reads as part of the same site.
   ============================================================ */

.sale { --section-pad: clamp(52px, 6.5vw, 92px); --fb: #1877F2; }
.sale-section { position: relative; padding: var(--section-pad) 0; }
.sale-section-tight { padding-block: clamp(16px, 3vw, 32px); }

.section-head {
    position: relative;
    max-width: 820px;
    margin: 0 auto clamp(2.25rem, 4.5vw, 3.5rem);
    text-align: center;
}
.section-head .section-title { margin: 1.1rem 0 1rem; }
.section-head .section-sub { max-width: 680px; margin: 0 auto; }
.eyebrow svg { flex-shrink: 0; }

[dir="rtl"] .ico-arrow { transform: scaleX(-1); }

/* ---------------- Hero ---------------- */
.sale-hero {
    position: relative;
    padding: 132px 0 clamp(48px, 7vw, 96px);
    overflow: clip;
}
.sale-aurora {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(#000 60%, transparent);
    mask-image: linear-gradient(#000 60%, transparent);
}
.sale-aurora i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5; }
.sale-aurora i:nth-child(1) { width: 560px; height: 560px; top: -16%; left: -10%; background: radial-gradient(circle, rgba(236, 64, 122, 0.55), transparent 65%); }
.sale-aurora i:nth-child(2) { width: 520px; height: 520px; top: 4%; right: -12%; background: radial-gradient(circle, rgba(245, 165, 36, 0.45), transparent 65%); }
.sale-aurora i:nth-child(3) { width: 420px; height: 420px; bottom: -18%; left: 36%; background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent 65%); }
[data-theme="dark"] .sale-aurora i { opacity: 0.3; }
.motion .sale-aurora i:nth-child(1) { animation: saleAuroraA 18s ease-in-out infinite alternate; }
.motion .sale-aurora i:nth-child(2) { animation: saleAuroraB 22s ease-in-out infinite alternate; }
@keyframes saleAuroraA { to { transform: translate3d(8%, 10%, 0) scale(1.1); } }
@keyframes saleAuroraB { to { transform: translate3d(-10%, 8%, 0) scale(0.92); } }

.sale-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}
.sale-hero-copy { position: relative; z-index: 2; min-width: 0; }
.sale-title {
    margin: 1.2rem 0 1.1rem;
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.045em;
    text-wrap: balance;
    hyphens: manual;
}
.sale-title .gradient-text { padding-block: 0.08em; }
.sale-lead {
    max-width: 580px;
    color: var(--text-secondary);
    font-size: clamp(1.02rem, 1.25vw, 1.15rem);
    line-height: 1.7;
    text-wrap: pretty;
}
.sale-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }

/* Countdown */
.countdown { margin-top: 1.6rem; }
.countdown-label {
    margin-bottom: 0.55rem;
    color: var(--text-tertiary);
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.countdown-cells { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.countdown-cells li {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 72px;
    padding: 0.6rem 0.7rem 0.5rem;
    border-radius: 18px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
}
.countdown-cells b {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: var(--accent-ink);
}
.countdown-cells small { color: var(--text-tertiary); font-size: 0.74rem; font-weight: 500; }
.sale-ended .countdown { display: none; }
.sale-ended-note {
    margin-top: 1.6rem;
    max-width: 560px;
    padding: 0.85rem 1.1rem;
    border-radius: 16px;
    background: rgba(var(--accent-rgb), 0.08);
    border: 1px solid rgba(var(--accent-rgb), 0.18);
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Facebook button */
.btn-fb {
    background: var(--fb);
    color: #fff;
    border: 0;
    box-shadow: 0 10px 28px rgba(24, 119, 242, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-fb:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(24, 119, 242, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn-fb:active { transform: scale(0.96); }

/* First-paint entrance (pure CSS) */
.motion .sale-in { animation: saleIn 0.8s var(--ease-out) both; animation-delay: calc(var(--d) * 100ms + 60ms); }
.motion .sale-visual { animation: saleVisual 1.1s var(--ease-out) 0.2s both; }
@keyframes saleIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes saleVisual { from { opacity: 0; transform: translateY(36px) scale(0.95); } to { opacity: 1; transform: none; } }

/* ---------------- Three months illustration ---------------- */
.sale-visual { position: relative; min-width: 0; padding: 48px 12px 56px; }
.months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.month {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    padding: 1.1rem 1rem 1.2rem;
    border-radius: var(--radius-card);
    background: var(--bg-solid);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
}
.motion .month { animation: monthFloat 6s ease-in-out infinite; animation-delay: calc(var(--i) * -1.4s); }
@keyframes monthFloat { 50% { transform: translateY(-8px); } }
.month-num {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 0.7rem;
    border-radius: 14px;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
}
.month small { color: var(--text-tertiary); font-size: 0.8rem; font-weight: 500; }
.month b { font-family: var(--font-display); font-size: 1.12rem; line-height: 1.25; }
.month-paid .month-num { background: rgba(var(--accent-rgb), 0.1); color: var(--accent-ink); }
.month-free { border-color: rgba(245, 165, 36, 0.45); box-shadow: var(--shadow-md), 0 12px 36px rgba(245, 165, 36, 0.2); }
.month-free .month-num { background: var(--gold-gradient); color: #2B1700; box-shadow: 0 6px 16px rgba(245, 165, 36, 0.35); }
.month-free b { color: #C77700; }
[data-theme="dark"] .month-free b { color: #FFC659; }
.sale-x3 {
    position: absolute;
    top: 4px;
    inset-inline-end: 4px;
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    box-shadow: var(--glow-accent);
    transform: rotate(10deg);
}
.motion .sale-x3 { animation: saleX3 3.2s var(--ease-bounce) infinite; }
@keyframes saleX3 { 0%, 100% { transform: rotate(10deg) scale(1); } 50% { transform: rotate(4deg) scale(1.08); } }
.sale-chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 75%;
    padding: 0.5rem 0.85rem 0.5rem 0.5rem;
    border-radius: var(--radius-pill);
    background: var(--bg-solid);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-float);
    font-size: 0.84rem;
    font-weight: 500;
}
[dir="rtl"] .sale-chip { padding: 0.5rem 0.5rem 0.5rem 0.85rem; }
.chip-tutor { bottom: 2px; inset-inline-start: 0; }
.chip-band { bottom: -18px; inset-inline-end: 6px; }
.chip-dot {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
}
.chip-dot-gold { background: var(--gold-gradient); color: #2B1700; }
.motion .sale-chip { animation: monthFloat 7s ease-in-out infinite; }
.motion .chip-band { animation-delay: -3s; }

/* ---------------- What's included ---------------- */
.perk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.perk {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.5rem 1.4rem;
    border-radius: var(--radius-card);
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    overflow: hidden;
    transition: transform 0.45s var(--ease-bounce), box-shadow 0.35s ease, border-color 0.3s ease;
}
.perk:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
    box-shadow: 0 18px 44px color-mix(in srgb, var(--accent) 18%, transparent);
}
.perk-ico {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;
    border-radius: 16px;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent);
    transition: transform 0.45s var(--ease-bounce);
}
.perk:hover .perk-ico { transform: rotate(-8deg) scale(1.06); }
.perk h3 { margin-bottom: 0.45rem; font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.perk p { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.6; }
.perk-note {
    max-width: 760px;
    margin: 1.75rem auto 0;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ---------------- How it works ---------------- */
.sale-steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.sale-step {
    position: relative;
    min-width: 0;
    padding: 1.6rem 1.4rem 1.5rem;
    border-radius: var(--radius-card);
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
}
.sale-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 48px;
    inset-inline-end: -17px;
    width: 18px;
    border-top: 2px dashed rgba(var(--accent-rgb), 0.35);
}
.sale-step-num {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 1rem;
    border-radius: 16px;
    background: var(--accent-gradient);
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: var(--glow-accent);
}
.sale-step-num-gold { background: var(--gold-gradient); color: #2B1700; box-shadow: 0 6px 16px rgba(245, 165, 36, 0.35); }
.sale-step h3 { margin-bottom: 0.45rem; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
.sale-step p { color: var(--text-secondary); font-size: 0.93rem; line-height: 1.6; }
.step-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0.9rem; }
.chip-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-pill);
    background: var(--text-primary);
    color: var(--bg-primary);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.35s var(--ease-bounce);
}
.chip-link svg { flex-shrink: 0; }
.chip-link:hover { transform: translateY(-2px); }
.chip-link:active { transform: scale(0.96); }

/* ---------------- Trial code ---------------- */
.trial {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 2rem;
    padding: clamp(1.4rem, 3vw, 2rem) clamp(1.4rem, 3.5vw, 2.4rem);
    border-radius: var(--radius-card);
    background: linear-gradient(120deg, rgba(var(--accent-rgb), 0.09), rgba(245, 165, 36, 0.1));
    border: 1px solid rgba(var(--accent-rgb), 0.16);
}
.trial-text { flex: 1 1 340px; min-width: 0; }
.trial h2 { font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 700; line-height: 1.25; }
.trial p { margin-top: 0.4rem; color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; }
.trial-code { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.trial-code code {
    padding: 0.7rem 1rem;
    border-radius: 14px;
    background: var(--bg-solid);
    border: 1.5px dashed rgba(var(--accent-rgb), 0.45);
    color: var(--accent-ink);
    font-family: var(--font-display);
    font-size: clamp(0.95rem, 2.4vw, 1.15rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    overflow-wrap: anywhere;
    user-select: all;
}
.trial-code .btn svg { width: 16px; height: 16px; }

/* ---------------- FAQ ---------------- */
.faq-list { display: grid; gap: 12px; max-width: 860px; margin: 0 auto; }
.faq {
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.faq[open] { border-color: rgba(var(--accent-rgb), 0.25); box-shadow: var(--shadow-md); }
.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    border-radius: 20px;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    list-style: none;
    cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary > span { flex: 1; min-width: 0; }
.faq summary svg {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent-primary);
    transition: transform 0.35s var(--ease-bounce);
}
.faq[open] summary svg { transform: rotate(180deg); }
.faq p { padding: 0 1.35rem 1.3rem; color: var(--text-secondary); font-size: 0.96rem; line-height: 1.7; }

/* ---------------- Facebook CTA (end of page) ---------------- */
.fb-cta {
    max-width: 920px;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3.5rem) clamp(1.4rem, 5vw, 3.5rem);
    border-radius: clamp(28px, 4vw, 40px);
    text-align: center;
    background:
        radial-gradient(circle at 15% 0%, rgba(24, 119, 242, 0.16), transparent 55%),
        radial-gradient(circle at 90% 100%, rgba(var(--accent-rgb), 0.14), transparent 55%),
        var(--bg-card);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
}
.fb-cta-logo {
    display: inline-grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: var(--fb);
    color: #fff;
    box-shadow: 0 12px 32px rgba(24, 119, 242, 0.35);
}
.fb-cta .section-title { margin: 1.2rem 0 0.8rem; font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.fb-cta .section-sub { max-width: 620px; margin: 0 auto 1.8rem; }
.fb-cta .btn { white-space: normal; }
.fb-page-name { margin-top: 1rem; color: var(--text-tertiary); font-size: 0.88rem; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) {
    .perk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sale-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sale-step:nth-child(2)::after { display: none; }
}

@media (max-width: 900px) {
    .sale-hero { padding-top: 112px; }
    .sale-hero-inner { grid-template-columns: minmax(0, 1fr); }
    .sale-hero-copy { text-align: center; }
    .sale-lead { margin: 0 auto; }
    .countdown-cells,
    .sale-actions { justify-content: center; }
    .sale-ended-note { margin-inline: auto; }
    .sale-visual { justify-self: center; width: 100%; max-width: 520px; }
}

@media (max-width: 640px) {
    .sale-hero { padding: 100px 0 40px; }
    .sale-actions .btn { flex: 1 1 auto; white-space: normal; text-align: center; }
    .countdown-cells { gap: 8px; }
    .countdown-cells li { min-width: 64px; padding-inline: 0.5rem; }
    .sale-visual { padding: 44px 0 56px; }
    .months { gap: 8px; }
    .month { padding: 0.9rem 0.75rem 1rem; border-radius: 20px; }
    .month-num { width: 38px; height: 38px; font-size: 1.1rem; border-radius: 12px; }
    .month b { font-size: 0.98rem; }
    .sale-x3 { width: 70px; height: 70px; font-size: 1.6rem; }
    .sale-chip { font-size: 0.76rem; }
    .perk-grid,
    .sale-steps { grid-template-columns: minmax(0, 1fr); }
    .sale-step::after { display: none; }
    .perk,
    .sale-step { padding: 1.35rem 1.25rem; }
    .trial-code { width: 100%; }
    .trial-code code { flex: 1 1 auto; text-align: center; }
    .faq summary { padding: 1rem 1.1rem; font-size: 1rem; }
    .faq p { padding: 0 1.1rem 1.15rem; font-size: 0.94rem; }
}
