/* Vertical short-form “video” reel — page scroll + snap */
/* mandatory: each gesture settles on a snap point; non-reel sections use scroll-snap-align: none */
html.reel-snap {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    scroll-padding-top: env(safe-area-inset-top, 0px);
    scroll-padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
}

/* Snap the block that includes the header — snapping only the hero hid the top bar above the viewport */
html.reel-snap .landing-top-snap {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

html.reel-snap .landing-hero {
    scroll-snap-align: none;
}

/* Copy sections: no snap */
html.reel-snap .landing-how-it-works,
html.reel-snap .landing-product-clear {
    scroll-snap-align: none;
}

html.reel-snap .landing-problem {
    scroll-snap-align: none;
}

html.reel-snap .landing-problem-intro {
    scroll-snap-align: none;
}

html.reel-snap .landing-competition {
    scroll-snap-align: none;
}

html.reel-snap .landing-competition-intro {
    scroll-snap-align: none;
}

html.reel-snap .landing-toolkit {
    scroll-snap-align: none;
}

html.reel-snap .landing-toolkit-intro {
    scroll-snap-align: none;
}

html.reel-snap .landing-environmental {
    scroll-snap-align: none;
}

html.reel-snap .landing-environmental-intro {
    scroll-snap-align: none;
}

html.reel-snap .landing-walkthrough {
    scroll-snap-align: none;
}

html.reel-snap .landing-walkthrough-intro {
    scroll-snap-align: none;
}

html.reel-snap .marketing-reel-more-head {
    scroll-snap-align: none;
}

html.reel-snap .marketing-footer {
    scroll-snap-align: none;
}

.marketing-reel {
    position: relative;
}

.marketing-reel-more {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 4rem;
}

.marketing-reel-hint {
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    animation: reelHintPulse 2s ease-in-out infinite;
}

@keyframes reelHintPulse {
    0%,
    100% {
        opacity: 0.45;
    }
    50% {
        opacity: 1;
    }
}

.reel-vid {
    position: relative;
    min-height: 100svh;
    min-height: 100dvh;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    scroll-margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3rem 1.25rem 6.5rem;
    box-sizing: border-box;
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    html.reel-snap {
        scroll-snap-type: y proximity;
    }

    html.reel-snap .reel-vid {
        scroll-snap-align: start;
        scroll-snap-stop: normal;
    }
}

/* Full-slide focus: the active snap clip pops slightly vs neighbors */
.reel-vid--story .st-clip,
.reel-vid--story .st-clip1,
.reel-vid--story [class$="-stack"] {
    transition:
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.45s ease,
        opacity 0.45s ease;
    transform: scale(0.97);
    opacity: 0.94;
    filter: saturate(0.92);
}

.reel-vid--story.reel-vid--active .st-clip,
.reel-vid--story.reel-vid--active .st-clip1,
.reel-vid--story.reel-vid--active [class$="-stack"] {
    transform: scale(1);
    opacity: 1;
    filter: saturate(1.06);
}

/* Fake short-form UI chrome */
.reel-chrome {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

.reel-chrome-top {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    right: 3rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.reel-chrome-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    animation: reelRecBlink 1s step-end infinite;
}

@keyframes reelRecBlink {
    50% {
        opacity: 0.35;
    }
}

.reel-chrome-side {
    position: absolute;
    right: 0.65rem;
    bottom: 6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-size: 0.65rem;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.reel-chrome-ico {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.reel-chrome-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.reel-chrome-count {
    font-size: 0.65rem;
    font-weight: 700;
}

.reel-chrome-comments {
    pointer-events: auto;
    cursor: pointer;
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    transition: transform 0.12s ease;
}

.reel-chrome-comments:hover {
    transform: scale(1.06);
}

.reel-chrome-comments:active {
    transform: scale(0.98);
}

.reel-chrome-comments:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
    border-radius: 10px;
}

/* Comments sheet */
.reel-comments-root {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.reel-comments-root[hidden] {
    display: none !important;
}

.reel-comments-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}

.reel-comments-panel {
    position: relative;
    width: 100%;
    max-width: 28rem;
    max-height: min(72vh, 520px);
    background: #000000;
    color: #f0f4f8;
    border-radius: 16px 16px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.45);
    padding: 0 0 env(safe-area-inset-bottom, 1rem);
    display: flex;
    flex-direction: column;
    animation: reelSheetUp 0.28s ease-out;
}

@keyframes reelSheetUp {
    from {
        transform: translateY(100%);
        opacity: 0.85;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.reel-comments-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.reel-comments-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.reel-comments-close {
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.reel-comments-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.reel-comments-sub {
    margin: 0;
    padding: 0.5rem 1rem 0;
    font-size: 0.8rem;
    color: #8b9aab;
}

.reel-comments-list {
    list-style: none;
    margin: 0;
    padding: 0.75rem 1rem 1rem;
    overflow-y: auto;
    flex: 1;
}

.reel-comments-list .reel-c-item {
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
    line-height: 1.45;
    list-style: none;
}

.reel-comments-list .reel-c-item:last-child {
    border-bottom: none;
}

.reel-comments-list .reel-c-user {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    color: #5eead4;
    margin-bottom: 0.2rem;
}

.reel-comments-list .reel-c-body {
    margin: 0 0 0.45rem;
}

.reel-comments-list .reel-c-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.reel-comments-list .reel-c-like,
.reel-comments-list .reel-c-reply-btn {
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    font-size: 0.78rem;
    cursor: pointer;
    line-height: 1.3;
}

.reel-comments-list .reel-c-like:hover,
.reel-comments-list .reel-c-reply-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.reel-comments-list .reel-c-like--on {
    color: #fda4af;
}

.reel-comments-list .reel-c-replies {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0 0 0 0.75rem;
    border-left: 2px solid rgba(94, 234, 212, 0.25);
}

.reel-comments-list .reel-c-reply-li {
    padding: 0.35rem 0;
    font-size: 0.85rem;
    border-bottom: none;
}

.reel-comments-list .reel-c-user-reply {
    display: inline;
    margin-right: 0.35rem;
    font-size: 0.72rem;
}

.reel-comments-list .reel-c-reply-text {
    color: #e2e8f0;
}

.reel-comments-list .reel-c-reply-box {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.35rem;
}

.reel-comments-list .reel-c-reply-label {
    flex: 1;
    min-width: 8rem;
}

.reel-comments-list .reel-c-reply-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: #f1f5f9;
    font-size: 0.85rem;
}

.reel-comments-list .reel-c-reply-input:focus {
    outline: 2px solid rgba(94, 234, 212, 0.45);
    outline-offset: 1px;
}

.reel-comments-list .reel-c-reply-send {
    padding: 0.45rem 0.85rem;
    border: none;
    border-radius: 8px;
    background: #5eead4;
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.reel-comments-list .reel-c-reply-send:hover {
    filter: brightness(1.05);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.reel-comments-foot {
    margin: 0;
    padding: 0.5rem 1rem 1rem;
    font-size: 0.72rem;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.reel-cta-block {
    position: relative;
    z-index: 12;
    max-width: 20rem;
}

/* Clip backgrounds */
.reel-vid--1 {
    background: linear-gradient(145deg, #0c1220 0%, #1e3a5f 45%, #312e81 100%);
}
.reel-vid--2 {
    background: linear-gradient(180deg, #0f172a 0%, #0ea5e9 55%, #22d3ee 100%);
}
.reel-vid--3 {
    background: linear-gradient(145deg, #052e16 0%, #16a34a 50%, #4ade80 100%);
}
.reel-vid--4 {
    background: linear-gradient(180deg, #431407 0%, #ea580c 45%, #fbbf24 100%);
}
.reel-vid--5 {
    background: linear-gradient(200deg, #312e81 0%, #6366f1 40%, #a78bfa 100%);
}
.reel-vid--6 {
    background: linear-gradient(160deg, #0c0a09 0%, #78716c 35%, #f5f5f4 100%);
}
.reel-vid--7 {
    background: linear-gradient(185deg, #042f2e 0%, #14b8a6 50%, #5eead4 100%);
}

.reel-vid--6 .reel-chrome-top {
    color: #1c1917;
    text-shadow: none;
}

.reel-vid--6 .reel-chrome-side {
    color: #1c1917;
    text-shadow: none;
}

/* Floating props (decorative) */
.reel-float {
    position: absolute;
    font-size: clamp(3rem, 15vw, 5rem);
    opacity: 0.35;
    animation: reelFloatDrift 4s ease-in-out infinite;
}

.reel-vid--1 .reel-float {
    top: 18%;
    right: 8%;
}

.reel-vid--2 .reel-float {
    top: 22%;
    left: 6%;
}

@keyframes reelFloatDrift {
    0%,
    100% {
        transform: translateY(0) rotate(-6deg);
    }
    50% {
        transform: translateY(-12px) rotate(6deg);
    }
}

/* Clip 7: CTA inside reel */
.reel-cta-block .reel-cta-btn:first-child {
    margin-top: 0;
}

.reel-cta-btn {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.85rem 1.25rem;
    background: #000000;
    color: #5eead4;
    font-size: 0.95rem;
    font-weight: 900;
    text-decoration: none;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    pointer-events: auto;
    animation: reelCtaBounce 1.8s ease-in-out infinite;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

@keyframes reelCtaBounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

.reel-cta-btn:hover {
    filter: brightness(1.1);
}

.reel-cta-btn--secondary {
    margin-top: 0.5rem;
    background: rgba(0, 0, 0, 0.65) !important;
    color: #e2e8f0 !important;
    animation: none !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Clip nav — prev/next + dots (fixed) */
.reel-nav {
    position: fixed;
    bottom: max(0.75rem, env(safe-area-inset-bottom, 0.5rem));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    z-index: 50;
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    max-width: calc(100vw - 1.5rem);
}

.reel-nav-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 0.25rem;
    pointer-events: auto;
}

.reel-nav-dot {
    pointer-events: auto;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.15s ease;
}

.reel-nav-dot::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.32);
    transition: transform 0.15s ease, background 0.15s ease;
}

.reel-nav-dot[aria-current="true"]::after {
    background: #fff;
    transform: scale(1.35);
}

.reel-nav-arrow {
    pointer-events: auto;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.reel-nav-arrow:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

.reel-nav-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
    .marketing-reel-hint,
    .reel-chrome-dot,
    .reel-cta-btn,
    .reel-float {
        animation: none !important;
    }

    .reel-vid--story .st-clip,
    .reel-vid--story .st-clip1,
    .reel-vid--story [class$="-stack"] {
        transition: none;
        transform: none;
        opacity: 1;
        filter: none;
    }
}
