/* ───────── PRODUCT WALKTHROUGH ───────── */

.walkthrough {
    background: var(--bg-warm);
    padding: clamp(1rem, 2vw, 2rem) clamp(1rem, 4vw, 4rem);
    display: flex;
    justify-content: center;
}

/* ───────── STAGE ───────── */

.wt-stage {
    position: relative;
    width: 100%;
    max-width: 900px;
    overflow-x: clip;
    overflow-y: visible;
    perspective: 1200px;
}

/* Ambient glow behind browser */
.wt-glow {
    position: absolute;
    inset: -10%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(13,148,136,0.05) 0%, transparent 70%);
    pointer-events: none;
    overflow: hidden;
    max-width: 100%;
}

/* ───────── BROWSER FRAME ───────── */

.wt-browser {
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 2px 4px rgba(0,0,0,0.04),
        0 12px 24px rgba(0,0,0,0.08),
        0 24px 48px rgba(0,0,0,0.12);
    background: #fff;
    position: relative;
    transform: rotateX(1.5deg);
    animation: wt-breathe 4s ease-in-out infinite;
}

@keyframes wt-breathe {
    0%, 100% {
        box-shadow:
            inset 0 1px 0 rgba(255,255,255,0.06),
            0 2px 4px rgba(0,0,0,0.04),
            0 12px 24px rgba(0,0,0,0.08),
            0 24px 48px rgba(0,0,0,0.12);
    }
    50% {
        box-shadow:
            inset 0 1px 0 rgba(255,255,255,0.06),
            0 2px 4px rgba(0,0,0,0.04),
            0 14px 28px rgba(0,0,0,0.1),
            0 28px 56px rgba(0,0,0,0.14);
    }
}

.wt-chrome {
    height: 32px;
    background: #f5f5f5;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 6px;
}

.wt-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.wt-dot.red { background: #ff5f57; }
.wt-dot.yellow { background: #febc2e; }
.wt-dot.green { background: #28c840; }

.wt-url-bar {
    margin-left: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 2px 10px;
    font-size: 0.68rem;
    color: #78716c;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    flex: 1;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s;
}

/* ───────── VIEWPORT ───────── */

.wt-viewport {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #f8fafc;
}

/* ───────── SCENE FRAMES ───────── */

.wt-frame {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(0) scale(1);
    filter: blur(0);
    transition:
        opacity 0.5s ease,
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.4s ease;
    will-change: opacity, transform, filter;
    pointer-events: none;
}

.wt-frame.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
}

/* Transition: outgoing blurs and shrinks */
.wt-frame.exit-blur {
    opacity: 0;
    transform: scale(0.97);
    filter: blur(6px);
}

/* Transition: incoming slides from right */
.wt-frame.enter-right {
    transform: translateX(100%);
    opacity: 1;
}
.wt-frame.enter-right.active {
    transform: translateX(0);
}

/* Transition: outgoing slides left */
.wt-frame.exit-left {
    transform: translateX(-30%);
    opacity: 0;
}

.wt-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    display: block;
}

/* ───────── REPORT SCROLL CONTAINER ───────── */

.wt-report-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, black 82%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 82%, transparent 100%);
}

.wt-report-content {
    transform-origin: top left;
    transition: transform 3s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}

.wt-report-content img {
    width: 100%;
    display: block;
}

/* ───────── CALLOUT CARDS ───────── */

.wt-callout {
    position: absolute;
    background: rgba(28, 25, 23, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fffbeb;
    padding: 0.7rem 1.1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.5;
    max-width: 240px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    z-index: 12;
    opacity: 0;
    transform: translateY(8px) scale(0.95);
    transform-origin: left center;
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.wt-callout.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Staggered text entrance */
.wt-callout strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s 0.15s, transform 0.3s 0.15s;
}

.wt-callout span {
    font-size: 0.78rem;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s 0.3s, transform 0.3s 0.3s;
}

.wt-callout.visible strong,
.wt-callout.visible span {
    opacity: 0.85;
    transform: translateY(0);
}

.wt-callout.visible strong {
    opacity: 1;
}

/* Callout arrows */
.wt-callout-arrow {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(28, 25, 23, 0.88);
    transform: rotate(45deg);
}
.wt-callout-arrow.left {
    left: -5px;
    top: 50%;
    margin-top: -5px;
}
.wt-callout-arrow.right {
    right: -5px;
    top: 50%;
    margin-top: -5px;
}

/* ───────── CLICK RIPPLE ───────── */

.wt-ripple {
    position: absolute;
    z-index: 9;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(13, 148, 136, 0.2);
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

.wt-ripple.active {
    animation: wt-ripple-expand 0.4s ease-out forwards;
}

@keyframes wt-ripple-expand {
    0% { transform: scale(0); opacity: 0.6; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* ───────── FOCUS HIGHLIGHTS ───────── */

/* Report highlights: inside scroll container, move with content */
.wt-hl-report {
    position: absolute;
    border: 2px solid rgba(13, 148, 136, 0);
    border-radius: 6px;
    background: transparent;
    pointer-events: none;
    transition: border-color 0.5s ease;
    z-index: 2;
}

.wt-hl-report.visible {
    border-color: rgba(13, 148, 136, 0.6);
    animation: wt-pulse 2s ease-in-out;
}

/* Static highlights: inside viewport, for non-scrolling scenes */
.wt-hl-static {
    position: absolute;
    border: 2px solid rgba(13, 148, 136, 0);
    border-radius: 6px;
    background: transparent;
    pointer-events: none;
    transition: border-color 0.5s ease;
    z-index: 7;
}

.wt-hl-static.visible {
    border-color: rgba(13, 148, 136, 0.6);
    animation: wt-pulse 2s ease-in-out;
}

@keyframes wt-pulse {
    0%, 100% { border-color: rgba(13,148,136,0.5); }
    50% { border-color: rgba(13,148,136,0.9); }
}

/* ───────── CURSOR ───────── */

.wt-cursor {
    position: absolute;
    width: 16px;
    height: 20px;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition:
        left 0.5s cubic-bezier(0.2, 0, 0, 1),
        top 0.5s cubic-bezier(0.2, 0, 0, 1),
        opacity 0.2s;
    will-change: left, top, opacity;
}

.wt-cursor::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    clip-path: polygon(0 0, 0 100%, 70% 70%);
    background: #1c1917;
}

.wt-cursor.visible {
    opacity: 1;
}

.wt-cursor.clicking::after {
    transform: scale(0.85);
    transition: transform 0.1s;
}

/* ───────── CLIP-PATH REVEAL TRANSITION ───────── */

.wt-frame.enter-clip {
    clip-path: circle(0% at 50% 80%);
    opacity: 1;
    filter: none;
    transition: clip-path 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.wt-frame.enter-clip.active {
    clip-path: circle(100% at 50% 80%);
}

/* ───────── PROGRESS DOTS ───────── */

.wt-progress-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.wt-dot-step {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(120,53,15,0.15);
    transition: background 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wt-dot-step.active {
    background: #d97706;
    transform: scale(1.6);
}

.wt-dot-step.done {
    background: rgba(120,53,15,0.3);
}

/* ───────── SCORE COUNTER OVERLAY ───────── */

.wt-counter {
    position: absolute;
    z-index: 8;
    font-size: 2.2rem;
    font-weight: 800;
    color: #d97706;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
    text-align: center;
}

.wt-counter.visible {
    opacity: 1;
}

/* ───────── LOGO END FRAME ───────── */

.wt-logo-frame {
    background: #fffbeb;
}

.wt-logo-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.wt-logo-icon {
    width: 48px !important;
    height: 48px !important;
    object-fit: contain !important;
}

.wt-logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1c1917;
    letter-spacing: -0.3px;
}

.wt-logo-light {
    font-weight: 400;
    opacity: 0.55;
}

.wt-logo-bold {
    font-weight: 700;
}

.wt-logo-tagline {
    font-size: 0.95rem;
    color: #78716c;
    font-weight: 500;
}

/* ───────── RESPONSIVE ───────── */

@media (max-width: 1100px) {
    .wt-callout {
        max-width: 180px;
        font-size: 0.75rem;
    }
    .wt-callout strong {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .walkthrough {
        padding: clamp(1.5rem, 3vw, 2.5rem) 0.75rem;
    }
    .wt-callout {
        max-width: 55%;
        font-size: 0.7rem;
        padding: 0.5rem 0.8rem;
    }
    .wt-callout strong {
        font-size: 0.75rem;
    }
    .wt-callout-arrow {
        display: none;
    }
}

/* ───────── REDUCED MOTION ───────── */

@media (prefers-reduced-motion: reduce) {
    .wt-frame,
    .wt-cursor,
    .wt-callout,
    .wt-hl-report,
    .wt-hl-static {
        transition: none !important;
        animation: none !important;
    }
    .wt-browser {
        animation: none !important;
    }
}
