/* Scrumlin Technology Pvt Ltd — Website styles (scrumlin-horizon.css) */

.horizon {
    position: relative;
    height: 340vh;
    background: var(--sc-bg);
    color: var(--sc-text);
    z-index: 2;
    overflow-x: clip;
    max-width: 100%;
    width: 100%;
    margin-bottom: clamp(1.5rem, 4vh, 3rem);
}

.horizon-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 55% 28% at 18% 20%, rgba(var(--sc-cyan-rgb), 0.08), transparent 55%),
        radial-gradient(ellipse 50% 30% at 82% 45%, rgba(var(--sc-blue-rgb), 0.1), transparent 55%),
        var(--sc-bg);
}

.horizon-mesh {
    position: absolute;
    inset: 0;
    opacity: 0.4;
    background-image:
        linear-gradient(rgba(120, 140, 180, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 140, 180, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
}

.horizon-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.horizon-orb--a {
    width: min(48vw, 460px);
    height: min(48vw, 460px);
    top: 8%;
    left: -12%;
    background: radial-gradient(circle, rgba(var(--sc-cyan-rgb), 0.14) 0%, transparent 68%);
}

.horizon-orb--b {
    width: min(42vw, 400px);
    height: min(42vw, 400px);
    bottom: 12%;
    right: -10%;
    background: radial-gradient(circle, rgba(var(--sc-purple-deep-rgb), 0.16) 0%, transparent 68%);
}

.horizon-pin {
    position: sticky;
    top: var(--horizon-sticky-top, 0px);
    height: 100vh;
    height: 100dvh;
    height: calc(100vh - var(--horizon-sticky-top, 0px));
    height: calc(100dvh - var(--horizon-sticky-top, 0px));
    overflow: hidden;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
}

.horizon-track {
    display: flex;
    flex: 1 1 auto;
    width: max-content;
    height: calc(100% - 52px);
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.horizon-panel {
    position: relative;
    flex: 0 0 var(--horizon-panel-w, 100%);
    width: var(--horizon-panel-w, 100%);
    max-width: var(--horizon-panel-w, 100%);
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    transform-origin: center center;
    contain: layout;
}

.horizon.is-wiping .horizon-track {
    transform-style: preserve-3d;
}

/* Mobile: hard-clip so neighboring chapters never peek during dwell */
.horizon.is-mobile-horizon .horizon-pin {
    overflow: hidden;
    touch-action: pan-y;
}

.horizon.is-mobile-horizon.is-settled .horizon-pin {
    touch-action: auto;
}

.horizon.is-mobile-horizon.is-settled .horizon-panel.is-active .horizon-panel__shell.has-overflow {
    touch-action: pan-y;
}

.horizon.is-mobile-horizon.is-wiping .horizon-panel {
    will-change: transform, opacity;
}

.horizon-panel__shell {
    width: min(1120px, calc(100% - 1.5rem));
    margin: 0 auto;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    overflow-x: hidden;
    scrollbar-width: none;
    padding: 4.75rem 0 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.horizon-panel__shell::-webkit-scrollbar {
    display: none;
}

/* Inner scroll only after the chapter has fully landed */
.horizon.is-settled .horizon-panel.is-active .horizon-panel__shell,
.horizon.is-settled .horizon-panel.is-active .horizon-panel__shell.has-overflow {
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
}

.horizon-panel--offerings {
    align-items: stretch;
}

.horizon-panel--domains {
    align-items: stretch;
}

.horizon-panel--offerings .offerings,
.horizon-panel--domains .domains {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.horizon-panel__shell--domains {
    width: 100%;
    max-height: 100%;
    padding-top: 0;
    overflow: auto;
}

.horizon-footer {
    flex: 0 0 auto;
    width: min(1120px, calc(100% - 1.5rem));
    margin: 0 auto 0.85rem;
    display: grid;
    gap: 0.45rem;
}

.horizon-legs {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.horizon-leg {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sc-muted-dim);
    transition: color 0.25s ease;
    cursor: pointer;
    background: none;
    border: 0;
    padding: 0.2rem 0.35rem;
}

.horizon-leg:hover,
.horizon-leg.is-active {
    color: var(--sc-accent);
}

.horizon-progress {
    height: 3px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    overflow: hidden;
}

.horizon-progress__bar {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--sc-cyan), var(--sc-indigo), var(--sc-violet));
    box-shadow: 0 0 12px rgba(var(--sc-cyan-rgb), 0.4);
}

/* Process inside horizon */
.horizon-process {
    margin: 0;
}

.horizon-process .about-process__head {
    margin-bottom: 1rem;
}

/* Allow process enter slides — do not force opacity:1 on [data-about-reveal] */

@media (max-width: 991.98px) {
    .horizon {
        height: 280vh;
    }

    .horizon-panel__shell {
        padding-top: 4.5rem;
    }

    .horizon-track {
        height: calc(100% - 48px);
    }

    .horizon-footer {
        margin-bottom: 0.65rem;
    }
}

/* Mobile: shorter runway so chapters change sooner; wipe is CSS-timed in JS */
@media (max-width: 767.98px) {
    .horizon {
        /* Keep pin below floating header so chapter titles never tuck under nav */
        --horizon-sticky-top: 5rem;
        height: 220vh;
    }

    .horizon-pin {
        position: sticky;
        top: var(--horizon-sticky-top);
        height: calc(100vh - var(--horizon-sticky-top));
        height: calc(100dvh - var(--horizon-sticky-top));
        overflow: hidden;
        width: 100%;
        max-width: 100vw;
    }

    .horizon-track {
        display: flex;
        width: max-content;
        height: calc(100% - 46px);
        will-change: transform;
    }

    .horizon-panel {
        flex: 0 0 var(--horizon-panel-w, 100%);
        width: var(--horizon-panel-w, 100%);
        max-width: var(--horizon-panel-w, 100%);
        height: 100%;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        backface-visibility: hidden;
    }

    .horizon-panel__shell {
        width: calc(100% - 1rem);
        max-width: calc(100% - 1rem);
        margin: 0 auto;
        padding: 0.55rem 0 0.35rem;
        flex: 1 1 auto;
        min-height: 0;
        height: 100%;
        max-height: 100%;
        overflow: hidden;
        overflow-x: hidden;
    }

    .horizon-panel--offerings {
        align-items: stretch;
    }

    .horizon-panel--offerings .offerings {
        display: flex;
        align-items: flex-start;
        height: 100%;
        overflow: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    .horizon-panel--offerings .offerings-shell {
        padding-top: 0.55rem;
    }

    .horizon-panel--domains .domains {
        display: block;
        height: auto;
        align-items: stretch;
        overflow: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        max-height: 100%;
        max-width: 100%;
        padding-bottom: 0.5rem;
    }

    .horizon-panel--domains .domains-shell {
        padding-top: 0.55rem;
    }

    .horizon-footer {
        display: grid;
        width: calc(100% - 1rem);
        margin: 0 auto 0.55rem;
        gap: 0.4rem;
    }

    .horizon-leg {
        font-size: 0.62rem;
        letter-spacing: 0.08em;
    }

    .horizon-leg.is-active {
        color: var(--sc-accent);
        text-shadow: 0 0 12px rgba(var(--sc-cyan-rgb), 0.35);
    }

    .horizon-progress {
        height: 4px;
        background: rgba(148, 163, 184, 0.22);
    }

    .horizon-process .about-process__sub {
        display: none;
    }

    .horizon-process .about-process__title {
        font-size: 1.2rem;
    }

    .horizon-process .about-process__head {
        margin-bottom: 0.65rem;
    }

    .horizon-process .process-board {
        gap: 0.85rem;
    }

    .horizon-process .process-orbit {
        --orbit-size: min(100vw - 1.5rem, 300px);
    }

    .horizon-process .process-board,
    .horizon-process .process-orbit {
        overflow: hidden;
        max-width: 100%;
    }

    .horizon-process .process-detail {
        padding: 1rem;
    }
}

@media (max-height: 740px) and (min-width: 768px) {
    .horizon-panel__shell {
        padding-top: 4.25rem;
    }

    .horizon-process .about-process__sub {
        display: none;
    }
}

/* Accessibility fallback only — keep stacked layout */
@media (prefers-reduced-motion: reduce) {
    .horizon {
        height: auto;
    }

    .horizon-pin {
        position: relative;
        height: auto;
        overflow: visible;
    }

    .horizon-track {
        display: block;
        width: 100%;
        height: auto;
        transform: none !important;
        will-change: auto;
    }

    .horizon-panel {
        width: 100%;
        flex: none;
        height: auto;
        overflow: visible;
        display: block;
        padding: 0 0 1.5rem;
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }

    .horizon-panel__shell {
        padding: 1.5rem 0 0;
        max-height: none;
        overflow: visible;
    }

    .horizon-panel--offerings .offerings,
    .horizon-panel--domains .domains {
        display: block;
        height: auto;
    }
}
