/* Нүүр хуудас (index.html) — spec: docs/superpowers/specs/2026-12-02-todu-homepage-design.md */

.home main {
    padding-top: 72px; /* тогтмол цэсний өндөр */
}

.home section {
    padding: 88px 5%;
}

.home .section-title {
    max-width: 22ch;
}

/* ── Өнгөт icon tile ── */
.tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
}

.tile svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tile-violet { background: #EFEAFF; color: var(--text-violet); }
.tile-pink { background: #FFE8F4; color: var(--text-pink); }
.tile-teal { background: #E2F7FB; color: var(--text-teal); }
.tile-orange { background: #FFF1DE; color: var(--text-orange); }
.tile-gray { background: var(--gray-100); color: var(--gray-500); }

/* ── Онцлох модуль ── */
.home .spotlight {
    padding-top: 64px;
    padding-bottom: 72px;
    border-bottom: 1px solid var(--gray-100);
}

.spotlight-track {
    max-width: 1280px;
    margin: 0 auto;
}

.spotlight-slide {
    display: none;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 56px;
    align-items: center;
}

.spotlight-slide.is-active {
    display: grid;
}

.spotlight-module {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font: 600 1rem var(--font-display);
    color: var(--gray-900);
    text-decoration: none;
    margin-bottom: 20px;
}

.spotlight-module .tile {
    width: 34px;
    height: 34px;
}

.spotlight-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.1rem, 4.6vw, 3.5rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
    max-width: 16ch;
    margin-bottom: 20px;
}

.spotlight-desc {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--gray-500);
    max-width: 46ch;
    margin-bottom: 32px;
}

.spotlight-actions,
.closing-actions,
.price-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.spotlight-price {
    margin-top: 18px;
    font-size: 0.9rem;
    color: var(--gray-500);
}

.spotlight-shot {
    margin: 0;
}

.spotlight-shot > img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 30px 60px -30px rgba(200, 0, 120, 0.25), 0 12px 24px -12px rgba(26, 26, 26, 0.12);
}

/* ── Итгэл ── */
.home .trust {
    padding-top: 72px;
    padding-bottom: 72px;
}

.trust-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    max-width: 26ch;
    margin-bottom: 18px;
}

.trust-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--gray-500);
    max-width: 62ch;
    margin-bottom: 36px;
}

.trust-label {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: 14px;
}

.trust-logos {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 28px 32px;
    align-items: center;
}

.trust-logos li {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
}

/* Эх лого цагаан (apexsoft.mn бараан дэвсгэрт) — цайвар сайт дээр нэг өнгөтэй саарал */
.trust-logos img {
    max-width: 100%;
    max-height: 40px;
    width: auto;
    height: auto;
    filter: brightness(0);
    opacity: 0.55;
}

@media (max-width: 600px) {
    .trust-logos {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px 16px;
    }

    .trust-logos img {
        max-height: 32px;
    }
}

/* ── Яаж ажилладаг ── */
.home .how {
    background: var(--gray-50);
}

.how-steps {
    list-style: none;
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.how-steps li {
    counter-increment: step;
    position: relative;
    padding-top: 56px;
}

.how-steps li::before {
    content: counter(step);
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--grad);
    color: #fff;
    font: 700 1rem var(--font-display);
}

.how-steps li:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 52px;
    right: -12px;
    height: 2px;
    background: var(--gray-100);
}

.how-steps h3 {
    font: 600 1.15rem var(--font-display);
    margin-bottom: 8px;
}

.how-steps p {
    color: var(--gray-500);
    line-height: 1.65;
    max-width: 30ch;
}

/* ── Модулиуд ── */
.module-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 40px;
}

.module-item {
    position: relative;
    padding: 24px;
    border: 1px solid var(--gray-100);
    border-radius: 14px;
    background: var(--white);
}

.module-item.is-spotlight {
    border-color: transparent;
    background:
        linear-gradient(var(--white), var(--white)) padding-box,
        var(--grad) border-box;
    border: 1.5px solid transparent;
}

.module-item h3 {
    font: 600 1.15rem var(--font-display);
    margin: 16px 0 6px;
}

.module-item h3 a {
    color: inherit;
    text-decoration: none;
}

/* Карт бүхэлдээ дарагдана */
.module-item h3 a::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
}

.module-item h3 a:focus-visible::after {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.module-item:hover {
    border-color: var(--gray-300);
}

.module-item p {
    color: var(--gray-500);
    line-height: 1.6;
    font-size: 0.95rem;
}

.module-state {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 0.8rem;
    color: var(--success);
}

.module-item.is-soon .module-state {
    color: var(--gray-500);
}

/* ── Үнэ ── */
.price-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.price-card {
    padding: 32px;
    border: 1px solid var(--gray-100);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
}

.price-card.is-featured {
    background:
        linear-gradient(var(--white), var(--white)) padding-box,
        var(--grad) border-box;
    border: 1.5px solid transparent;
}

.price-card h3 {
    font: 600 1.1rem var(--font-display);
    margin-bottom: 14px;
}

.price {
    color: var(--gray-500);
}

.price strong {
    font: 700 2.4rem var(--font-display);
    color: var(--gray-900);
    letter-spacing: -0.02em;
    margin-right: 6px;
}

.price-note {
    margin: 8px 0 20px;
    color: var(--gray-500);
    font-size: 0.92rem;
}

.price-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin-bottom: 28px;
    flex: 1;
}

.price-list li {
    padding-left: 26px;
    position: relative;
    line-height: 1.5;
}

.price-list li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 5px;
    width: 12px;
    height: 7px;
    border-left: 2px solid var(--success);
    border-bottom: 2px solid var(--success);
    transform: rotate(-45deg);
}

.price-card > .btn-secondary,
.price-card > .btn-primary {
    text-align: center;
}

/* ── Апексын хэрэглэгчид ── */
.home .apex-band {
    padding-top: 0;
}

.apex-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 32px 36px;
    border-radius: 16px;
    background: #FFF4EA;
}

.apex-inner h2 {
    font: 700 1.4rem var(--font-display);
    margin-bottom: 6px;
}

.apex-inner p {
    color: #5c4a3a;
    line-height: 1.6;
    max-width: 60ch;
}

.apex-inner .btn-secondary {
    background: var(--white);
    flex-shrink: 0;
}

/* ── Түгээмэл асуулт ── */
.home .faq {
    background: var(--gray-50);
}

.faq-inner {
    max-width: 820px;
}

.faq details {
    border-bottom: 1px solid var(--gray-100);
}

.faq summary {
    cursor: pointer;
    list-style: none;
    padding: 20px 32px 20px 0;
    position: relative;
    font: 600 1.05rem var(--font-display);
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: '+';
    position: absolute;
    right: 4px;
    top: 16px;
    font-size: 1.4rem;
    color: var(--gray-500);
}

.faq details[open] summary::after {
    content: '−';
}

.faq details p {
    padding-bottom: 20px;
    color: var(--gray-500);
    line-height: 1.7;
    max-width: 68ch;
}

.faq details a {
    color: var(--text-violet);
}

/* ── Төгсгөл ── */
.closing-inner {
    text-align: center;
}

.closing-inner .section-title,
.closing-inner .section-sub {
    margin-left: auto;
    margin-right: auto;
}

.closing-inner .section-sub {
    margin-bottom: 32px;
}

.closing-actions {
    justify-content: center;
}

/* ── Дэлгэцийн хэмжээ ── */
@media (max-width: 900px) {
    .spotlight-slide {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .how-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 36px;
    }

    .how-steps li::after {
        display: none;
    }

    .module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .home section {
        padding: 64px 20px;
    }

    .home .spotlight {
        padding-top: 40px;
    }

    .how-steps,
    .module-grid,
    .price-grid {
        grid-template-columns: 1fr;
    }

    .apex-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
    }

    .spotlight-actions > a,
    .closing-actions > a {
        flex: 1 1 100%;
        text-align: center;
    }
}

/* ── Слайдерын удирдлага (js/spotlight.js, 2+ слайдтай үед л үүснэ) ── */
.spotlight-controls {
    max-width: 1280px;
    margin: 32px auto 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.spotlight-prev,
.spotlight-next,
.spotlight-pause {
    border: 1.5px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-900);
    border-radius: 999px;
    cursor: pointer;
    font: 600 0.9rem var(--font-display);
}

.spotlight-prev,
.spotlight-next {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
    line-height: 1;
}

.spotlight-pause {
    margin-left: auto;
    padding: 8px 16px;
}

.spotlight-dots {
    display: flex;
    gap: 6px;
}

.spotlight-dots {
    gap: 0;
}

/* Дарах талбай 24px (WCAG 2.5.8), харагдах цэг ::before */
.spotlight-dots button {
    position: relative;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.spotlight-dots button::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 7px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--gray-300);
    transition: width .2s;
}

.spotlight-dots button[aria-current="true"] {
    width: 42px;
}

.spotlight-dots button[aria-current="true"]::before {
    width: 28px;
    background: var(--grad);
}

@media (prefers-reduced-motion: reduce) {
    .spotlight-dots button::before {
        transition: none;
    }
}
