/* ============================================
   "BUILT FOR EVERY LEVEL" SECTION
============================================ */
.levels-section {
    background: #0d0f12;
    padding: 96px 24px 80px;
}

.levels-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.levels-headline {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.5px;
    margin: 0 0 16px;
}

.levels-sub {
    font-size: 1.05rem;
    color: #7f8a98;
    max-width: 620px;
    margin: 0 auto 56px;
    line-height: 1.7;
}

.levels-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.level-card {
    background: #13161b;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 32px 28px;
    text-align: left;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.level-card:hover {
    transform: translateY(-6px);
    border-color: rgba(246, 174, 45, 0.3);
}

.level-card--featured {
    border-color: rgba(246, 174, 45, 0.25);
    background: #161810;
}

.level-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.level-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px;
}

.level-card p {
    font-size: 0.92rem;
    color: #7f8a98;
    line-height: 1.65;
    margin: 0;
}

/* ============================================
   FEATURES WRAPPER
============================================ */
.features-wrapper {
    background: #0d0f12;
}

/* ---- Individual feature section ---- */
.feat-section {
    padding: 80px 24px;
    background: #03111c;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Alt sections: a visible but subtle contrast — warm dark tint */
.feat-section--alt {
    background: #0f1115;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(246, 174, 45, 0.04),
        inset 0 -1px 0 rgba(246, 174, 45, 0.04);
}

.feat-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

/* Alt sections: swap — image on left (order 1), text on right (order 2) */
.feat-section--alt .feat-media {
    order: 1;
}

.feat-section--alt .feat-text {
    order: 2;
}

/* ---- Text side ---- */
.feat-text {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
    /* always left-align badge, text, list */
    text-align: left;
}

.feat-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1a1d23;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #F6AE2D;
    letter-spacing: 1px;
    text-transform: uppercase;
    width: fit-content;
}

.feat-headline {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.6rem, 2.8vw, 2.4rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: -0.3px;
    margin: 0;
}

.feat-accent {
    color: #F6AE2D;
}

.feat-sub {
    font-size: 1rem;
    color: #8a939e;
    line-height: 1.7;
    margin: 0;
    max-width: 480px;
}

.feat-list {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feat-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.93rem;
    color: #c4cdd6;
    font-weight: 500;
}

.feat-list li::before {
    content: '';
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23F6AE2D'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414L8.414 15l-5.121-5.121a1 1 0 111.414-1.414L8.414 12.172l6.879-6.879a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E") center / contain no-repeat;
    flex-shrink: 0;
}

/* ---- Media (screenshot stack) ---- */
.feat-media {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Single-image layout */
.feat-img-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
}

.feat-img {
    border-radius: 24px;
    display: block;
    width: 100%;
    max-width: 280px;
    height: auto;
    /* never clip — show full image */
}

/* Two-image stack for exercise section */
.feat-img--over {
    max-width: 200px;
    margin-left: 24px;
    /* indent second screenshot slightly */
    align-self: flex-start;
}

/* ---- Pills row ---- */
.feat-pills-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 48px 24px 72px;
    background: #0d0f12;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.feat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #13161b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 40px;
    padding: 10px 22px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #c4cdd6;
    transition: border-color 0.2s ease;
}

.feat-pill:hover {
    border-color: rgba(246, 174, 45, 0.35);
}

.feat-pill i {
    color: #F6AE2D;
    font-size: 0.85rem;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 860px) {
    .feat-inner {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    /* On mobile: always show text first, image below */
    .feat-section--alt .feat-media,
    .feat-section--alt .feat-text {
        order: unset;
    }

    .feat-text {
        align-items: center;
        text-align: center;
    }

    .feat-badge {
        align-self: center;
    }

    .feat-headline {
        text-align: center;
    }

    .feat-sub {
        max-width: 100%;
        text-align: center;
    }

    .feat-list {
        align-self: center;
        text-align: left;
        /* keep list items themselves left-aligned for readability */
    }

    .feat-media {
        justify-content: center;
    }

    .feat-img-stack {
        align-items: center;
    }

    .feat-img--over {
        margin-left: 0;
        margin-top: 0;
    }

    .feat-img {
        max-width: 240px;
    }

    .feat-img--over {
        max-width: 170px;
    }

    /* Level cards: center content on mobile */
    .level-card {
        text-align: center;
    }

    .level-icon {
        margin: 0 auto 20px;
    }

    .levels-section {
        padding: 64px 20px 56px;
    }

    .feat-section {
        padding: 56px 20px;
    }
}

@media (max-width: 480px) {
    .feat-img {
        max-width: 200px;
    }

    .feat-img--over {
        max-width: 140px;
    }
}

/* ============================================
   COMPARISON TABLE SECTION
============================================ */
.compare-section {
    background: #0a0c0f;
    padding: 96px 24px 88px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.compare-inner {
    max-width: 1140px;
    margin: 0 auto;
}

.compare-header-text {
    text-align: center;
    margin-bottom: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.compare-headline {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.5px;
    margin: 0;
    line-height: 1.2;
}

.compare-sub {
    font-size: 1.05rem;
    color: #7f8a98;
    max-width: 600px;
    line-height: 1.7;
    margin: 0;
}

/* ---- Table wrapper: horizontal scroll on small screens ---- */
.compare-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 48px;
}

.compare-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    background: #13161b;
    font-family: 'Poppins', sans-serif;
}

/* Header row */
.compare-table thead tr {
    background: #0d0f12;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.compare-th-feature,
.compare-th-app {
    padding: 20px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #7f8a98;
    text-align: center;
}

.compare-th-feature {
    text-align: left;
    width: 36%;
    padding-left: 24px;
}

/* Calitracker column highlight */
.compare-th-us {
    background: rgba(246, 174, 45, 0.07);
    border-left: 2px solid rgba(246, 174, 45, 0.3);
    border-right: 2px solid rgba(246, 174, 45, 0.3);
    position: relative;
}

.compare-app-name {
    display: block;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.compare-app-tag {
    display: inline-block;
    background: #F6AE2D;
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 2px 8px;
    border-radius: 20px;
}

/* Body rows */
.compare-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s ease;
}

.compare-table tbody tr:last-child {
    border-bottom: none;
}

.compare-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.compare-row-alt {
    background: rgba(255, 255, 255, 0.015);
}

.compare-feat-label {
    padding: 16px 16px 16px 24px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #c4cdd6;
    text-align: left;
}

.compare-table tbody td {
    padding: 16px;
    text-align: center;
    font-size: 1.05rem;
}

/* Calitracker body cells */
.compare-us {
    background: rgba(246, 174, 45, 0.05);
    border-left: 2px solid rgba(246, 174, 45, 0.2);
    border-right: 2px solid rgba(246, 174, 45, 0.2);
}

.compare-yes {
    color: #4ade80;
    font-size: 1rem;
}

.compare-no {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.95rem;
}

/* ---- Insight cards ---- */
.compare-insights {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.insight-card {
    background: #13161b;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.25s ease;
}

.insight-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.insight-card--us {
    border-color: rgba(246, 174, 45, 0.3);
    background: #161810;
}

.insight-card--us:hover {
    border-color: rgba(246, 174, 45, 0.5);
}

.insight-icon {
    width: 44px;
    height: 44px;
    background: #1a1d23;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.insight-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.insight-card p {
    font-size: 0.88rem;
    color: #7f8a98;
    line-height: 1.65;
    margin: 0;
}

.insight-card p strong {
    color: #c4cdd6;
    font-weight: 600;
}

.insight-cta {
    margin-top: auto;
    padding: 10px 20px;
    font-size: 0.88rem;
    border-radius: 8px;
    text-align: center;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .compare-insights {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .compare-section {
        padding: 64px 16px 64px;
    }

    .compare-header-text {
        align-items: center;
        text-align: center;
    }

    .compare-insights {
        grid-template-columns: 1fr;
    }

    .compare-table-wrap {
        border-radius: 12px;
    }

    .compare-feat-label {
        font-size: 0.82rem;
        padding-left: 14px;
    }

    .compare-table tbody td,
    .compare-th-app {
        padding: 14px 10px;
    }
}

/* ============================================
   BOTTOM CTA SECTION
============================================ */
.bottom-cta-section {
    background: #080a0d;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 100px 24px 96px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* Ambient gold glow behind the content */
.bottom-cta-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 400px;
    background: radial-gradient(ellipse at center, rgba(246, 174, 45, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.bottom-cta-inner {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.bottom-cta-badge {
    align-self: center;
}

.bottom-cta-headline {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin: 0;
}

.bottom-cta-sub {
    font-size: 1.05rem;
    color: #7f8a98;
    line-height: 1.7;
    max-width: 520px;
    margin: 0;
}

.bottom-cta-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}

.bottom-cta-trust {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 4px;
}

.bottom-cta-trust span {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.83rem;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 0.4px;
}

@media (max-width: 640px) {
    .bottom-cta-section {
        padding: 72px 20px 72px;
    }

    .hero-trust {
        margin-top: 54px;
        padding: 12px 16px;
        border-radius: 8px;
    }

    .bottom-cta-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .bottom-cta-buttons .store-button {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .bottom-cta-trust {
        gap: 16px;
    }
}

/* ============================================
   ORIGIN / OUR STORY SECTION
============================================ */
.origin-section {
    background: #0b0d10;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 100px 24px;
    overflow: hidden;
}

.origin-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}

/* ── Media side ── */
.origin-img-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
}

.origin-img {
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    display: block;
}

.origin-img-badge {
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(14, 16, 20, 0.92);
    border: 1px solid rgba(246, 174, 45, 0.25);
    backdrop-filter: blur(12px);
    border-radius: 40px;
    padding: 8px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #F6AE2D;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Text side ── */
.origin-text {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.origin-headline {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin: 12px 0 24px;
}

.origin-body {
    font-size: 0.98rem;
    color: #8a939e;
    line-height: 1.75;
    margin: 0 0 14px;
}

.origin-body strong {
    color: #d0d8e4;
    font-weight: 600;
}

.origin-cta-row {
    margin-top: 12px;
}

.origin-collab-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: rgba(246, 174, 45, 0.1);
    border: 1px solid rgba(246, 174, 45, 0.35);
    color: #F6AE2D;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.origin-collab-btn:hover {
    background: rgba(246, 174, 45, 0.18);
    border-color: rgba(246, 174, 45, 0.6);
}

.origin-link {
    color: #F6AE2D;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.origin-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .origin-section {
        padding: 72px 20px 80px;
    }

    .origin-inner {
        grid-template-columns: 1fr;
        gap: 56px;
        text-align: center;
    }

    .origin-media {
        display: flex;
        justify-content: center;
    }

    .origin-img-wrap {
        width: 100%;
    }

    .origin-img {
        max-width: 100%;
        width: 100%;
        height: auto;
    }

    .origin-img-badge {
        font-size: 0.75rem;
        padding: 6px 16px;
    }

    .origin-text {
        align-items: center;
    }

    .origin-body {
        text-align: left;
    }
}

/* ============================================
   SCROLL-REVEAL ANIMATIONS
============================================ */

/* Hidden state — applied by JS before observing */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

/* Triggered state — added by IntersectionObserver */
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}