/* How-to-use guide — animated dashboard / product snapshots */

.how-guide {
    position: relative;
    overflow: hidden;
}

.how-guide::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 85% 20%, color-mix(in srgb, var(--primary, #0d9488) 12%, transparent), transparent 60%),
        radial-gradient(ellipse 50% 40% at 10% 80%, color-mix(in srgb, #0284c7 10%, transparent), transparent 55%);
    pointer-events: none;
    z-index: 0;
}

.how-guide > .container {
    position: relative;
    z-index: 1;
}

.how-guide-shell {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 992px) {
    .how-guide-shell {
        grid-template-columns: minmax(200px, 240px) 1fr;
        gap: 1.75rem;
        align-items: start;
    }
}

.how-guide-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scrollbar-width: thin;
}

@media (min-width: 992px) {
    .how-guide-steps {
        flex-direction: column;
        overflow: visible;
        padding-bottom: 0;
        position: sticky;
        top: 5.5rem;
    }
}

.how-guide-step {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    min-width: 9.5rem;
    text-align: left;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--card-bg, #fff);
    color: inherit;
    border-radius: 12px;
    padding: 0.65rem 0.75rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.how-guide-step:hover {
    border-color: color-mix(in srgb, var(--primary, #0d9488) 45%, var(--border-color, #e2e8f0));
}

.how-guide-step.is-active {
    border-color: var(--primary, #0d9488);
    background: color-mix(in srgb, var(--primary, #0d9488) 8%, var(--card-bg, #fff));
    box-shadow: 0 8px 24px color-mix(in srgb, var(--primary, #0d9488) 18%, transparent);
}

.how-guide-num {
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    background: color-mix(in srgb, var(--primary, #0d9488) 14%, transparent);
    color: var(--primary, #0d9488);
}

.how-guide-step.is-active .how-guide-num {
    background: var(--primary, #0d9488);
    color: #fff;
}

.how-guide-step-label {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.how-guide-step-label strong {
    font-size: 0.9rem;
    font-weight: 700;
}

.how-guide-step-label small {
    font-size: 0.72rem;
    color: var(--text-muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.how-guide-stage {
    position: relative;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 18px;
    background: var(--card-bg, #fff);
    overflow: hidden;
    min-height: 320px;
}

.how-guide-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: color-mix(in srgb, var(--primary, #0d9488) 12%, transparent);
    z-index: 3;
}

.how-guide-progress i {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary, #0d9488), #0284c7);
    transform-origin: left center;
}

.how-guide.is-playing .how-guide-progress i {
    animation: how-guide-bar linear forwards;
    animation-duration: var(--how-guide-ms, 5500ms);
}

@keyframes how-guide-bar {
    from { width: 0%; }
    to { width: 100%; }
}

.how-guide-panel {
    display: none;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.35rem 1.25rem 3.5rem;
}

.how-guide-panel.is-active {
    display: grid;
    animation: how-guide-in 0.45s ease both;
}

@media (min-width: 768px) {
    .how-guide-panel.is-active {
        grid-template-columns: minmax(220px, 0.95fr) 1.15fr;
        align-items: center;
        padding: 1.75rem 1.75rem 3.75rem;
        gap: 1.75rem;
    }
}

@keyframes how-guide-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.how-guide-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary, #0d9488);
    margin: 0 0 0.4rem;
}

.how-guide-copy h3 {
    font-family: Outfit, system-ui, sans-serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
    margin: 0 0 0.85rem;
    line-height: 1.25;
}

.how-guide-howto {
    margin: 0 0 1.15rem;
    padding-left: 1.15rem;
    color: var(--text-secondary, #475569);
    font-size: 0.95rem;
    line-height: 1.55;
}

.how-guide-howto li + li {
    margin-top: 0.4rem;
}

.how-guide-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.how-guide-cta i {
    margin-left: 0.35rem;
    font-size: 0.8em;
}

/* Snapshot chrome */
.how-guide-snap {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #0f172a;
    box-shadow:
        0 20px 40px rgba(15, 23, 42, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    transform: perspective(900px) rotateY(-2deg) rotateX(2deg);
    transition: transform 0.4s ease;
}

.how-guide-panel.is-active .how-guide-snap {
    animation: how-snap-float 5.5s ease-in-out infinite;
}

@keyframes how-snap-float {
    0%, 100% { transform: perspective(900px) rotateY(-2deg) rotateX(2deg) translateY(0); }
    50% { transform: perspective(900px) rotateY(0deg) rotateX(0deg) translateY(-4px); }
}

.how-snap-chrome {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.75rem;
    background: #1e293b;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.how-snap-chrome span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #64748b;
}

.how-snap-chrome span:nth-child(1) { background: #f87171; }
.how-snap-chrome span:nth-child(2) { background: #fbbf24; }
.how-snap-chrome span:nth-child(3) { background: #34d399; }

.how-snap-chrome em {
    margin-left: 0.5rem;
    font-style: normal;
    font-size: 0.68rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.how-snap {
    padding: 0.85rem;
    min-height: 200px;
    color: #e2e8f0;
    font-size: 0.78rem;
}

/* Motion helpers — replay when panel becomes active */
.how-guide-panel.is-active .how-snap-rise {
    animation: how-rise 0.55s ease both;
    animation-delay: calc(var(--d, 0) * 0.1s);
}

.how-guide-panel.is-active .how-snap-slide {
    animation: how-slide 0.5s ease both;
    animation-delay: calc(var(--d, 0) * 0.12s);
}

.how-guide-panel.is-active .how-snap-pop {
    animation: how-pop 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) both;
    animation-delay: 0.45s;
}

.how-guide-panel.is-active .how-snap-pulse {
    animation: how-pulse 1.6s ease-in-out infinite;
}

.how-guide-panel.is-active .how-snap-cursor {
    animation: how-cursor 1.2s ease-in-out infinite;
}

.how-guide-panel.is-active .how-snap-bar span {
    animation: how-bar-fill 1.1s ease both;
}

.how-guide-panel.is-active .how-snap-type {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid #7dd3fc;
    animation: how-type 1.2s steps(22) both, how-caret 0.8s step-end infinite;
    max-width: 100%;
}

.how-guide-panel.is-active .how-snap-code-lines span {
    display: block;
    opacity: 0;
    animation: how-rise 0.4s ease both;
}

.how-guide-panel.is-active .how-snap-code-lines span:nth-child(1) { animation-delay: 0.15s; }
.how-guide-panel.is-active .how-snap-code-lines span:nth-child(2) { animation-delay: 0.35s; }
.how-guide-panel.is-active .how-snap-code-lines span:nth-child(3) { animation-delay: 0.55s; }

@keyframes how-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

@keyframes how-slide {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: none; }
}

@keyframes how-pop {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: none; }
}

@keyframes how-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
    50% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
}

@keyframes how-cursor {
    0%, 100% { background: rgba(125, 211, 252, 0.18); }
    50% { background: rgba(125, 211, 252, 0.35); }
}

@keyframes how-bar-fill {
    from { width: 0; }
    to { width: 62%; }
}

@keyframes how-type {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes how-caret {
    50% { border-color: transparent; }
}

/* Dashboard snap */
.how-snap-dash .how-snap-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.how-snap-pill {
    font-size: 0.68rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(52, 211, 153, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, 0.35);
}

.how-snap-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.how-snap-stat {
    background: #1e293b;
    border-radius: 10px;
    padding: 0.55rem 0.4rem;
    text-align: center;
}

.how-snap-stat b {
    display: block;
    font-size: 1.05rem;
    color: #fff;
}

.how-snap-stat small {
    color: #94a3b8;
    font-size: 0.62rem;
}

.how-snap-continue {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.25), rgba(2, 132, 199, 0.2));
    border: 1px solid rgba(125, 211, 252, 0.25);
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    display: grid;
    gap: 0.15rem;
    position: relative;
}

.how-snap-continue i {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid #7dd3fc;
    border-bottom: 2px solid #7dd3fc;
    transform: translateY(-50%) rotate(-45deg);
}

.how-snap-continue span {
    color: #94a3b8;
    font-size: 0.7rem;
}

/* Learn */
.how-snap-learn {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 0.65rem;
    min-height: 210px;
}

.how-snap-learn aside {
    background: #1e293b;
    border-radius: 10px;
    padding: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.how-snap-learn aside b { color: #94a3b8; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.04em; }
.how-snap-learn aside i { font-style: normal; padding: 0.3rem 0.4rem; border-radius: 6px; color: #cbd5e1; }
.how-snap-learn aside i.done { color: #6ee7b7; }
.how-snap-learn aside i.on { background: rgba(125, 211, 252, 0.15); color: #7dd3fc; }
.how-snap-learn main {
    background: #1e293b;
    border-radius: 10px;
    padding: 0.75rem;
}
.how-snap-learn main strong { display: inline-block; color: #fff; margin-bottom: 0.35rem; }
.how-snap-learn main p { color: #94a3b8; margin: 0 0 0.65rem; }
.how-snap-bar {
    height: 6px;
    border-radius: 999px;
    background: #334155;
    overflow: hidden;
    margin-bottom: 0.35rem;
}
.how-snap-bar span {
    display: block;
    height: 100%;
    width: 62%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0d9488, #38bdf8);
}
.how-snap-learn small { color: #94a3b8; }

/* Code */
.how-snap-code {
    display: grid;
    grid-template-columns: 0.75fr 1.25fr;
    gap: 0.55rem;
    min-height: 210px;
}
.how-snap-code aside {
    background: #1e293b;
    border-radius: 10px;
    padding: 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.how-snap-code aside b { color: #94a3b8; font-size: 0.65rem; text-transform: uppercase; }
.how-snap-code aside i { font-style: normal; padding: 0.3rem 0.4rem; border-radius: 6px; color: #cbd5e1; }
.how-snap-code aside i.on { background: rgba(99, 102, 241, 0.2); color: #c7d2fe; }
.how-snap-code main {
    background: #020617;
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.how-snap-code header {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
    color: #94a3b8;
}
.how-snap-code header strong { color: #e2e8f0; }
.how-snap-code pre {
    flex: 1;
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.68rem;
    color: #a5b4fc;
    line-height: 1.45;
    white-space: pre-wrap;
}
.how-snap-code footer {
    display: flex;
    justify-content: space-between;
    margin-top: 0.45rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}
.how-snap-code footer .pass { color: #6ee7b7; font-style: normal; font-weight: 600; }

/* Interview */
.how-snap-interview { display: flex; flex-direction: column; gap: 0.65rem; min-height: 200px; }
.how-snap-chat { display: flex; flex-direction: column; gap: 0.45rem; }
.how-snap-chat p {
    margin: 0;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    line-height: 1.4;
}
.how-snap-chat .q { background: #1e293b; }
.how-snap-chat .a { background: rgba(13, 148, 136, 0.2); border: 1px solid rgba(45, 212, 191, 0.25); align-self: flex-end; max-width: 92%; }
.how-snap-scores { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.how-snap-scores span {
    background: #1e293b;
    border-radius: 8px;
    padding: 0.35rem 0.55rem;
    color: #94a3b8;
}
.how-snap-scores b { color: #6ee7b7; }

/* Resume */
.how-snap-resume {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 0.55rem;
    min-height: 200px;
}
.how-snap-resume-doc {
    background: #f8fafc;
    color: #0f172a;
    border-radius: 8px;
    padding: 0.75rem;
}
.how-snap-resume-doc b { display: block; font-size: 0.95rem; }
.how-snap-resume-doc small { color: #64748b; display: block; margin-bottom: 0.5rem; }
.how-snap-resume-doc > i {
    display: block;
    height: 6px;
    border-radius: 4px;
    background: #cbd5e1;
    margin-bottom: 0.35rem;
}
.how-snap-resume-doc > i:nth-of-type(1) { width: 92%; }
.how-snap-resume-doc > i:nth-of-type(2) { width: 78%; }
.how-snap-resume-doc > i:nth-of-type(3) { width: 85%; }
.how-snap-ats {
    margin-top: 0.55rem;
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    background: #ecfdf5;
    color: #047857;
    border-radius: 8px;
    padding: 0.3rem 0.5rem;
    font-size: 0.72rem;
}
.how-snap-resume-side {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    justify-content: center;
}
.how-snap-resume-side span {
    background: #1e293b;
    border-radius: 8px;
    padding: 0.45rem 0.55rem;
    color: #94a3b8;
}
.how-snap-resume-side span.ok { color: #6ee7b7; }

/* Board */
.how-snap-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
    min-height: 200px;
}
.how-snap-board .col {
    background: #1e293b;
    border-radius: 10px;
    padding: 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.how-snap-board .col b {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
}
.how-snap-board .col i {
    font-style: normal;
    background: #0f172a;
    border-radius: 6px;
    padding: 0.35rem 0.4rem;
    color: #e2e8f0;
    font-size: 0.68rem;
}
.how-snap-board .col i.hot {
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #7dd3fc;
}
.how-snap-board .col i.win {
    border: 1px solid rgba(52, 211, 153, 0.45);
    color: #6ee7b7;
}

/* Cert */
.how-snap-cert {
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(13, 148, 136, 0.25), transparent 55%),
        #1e293b;
    border-radius: 10px;
    padding: 1.25rem 1rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}
.how-snap-cert strong { color: #fff; font-size: 0.95rem; }
.how-snap-cert em { color: #7dd3fc; font-style: normal; }
.how-snap-cert span { color: #cbd5e1; }
.how-snap-cert small { color: #94a3b8; margin-top: 0.35rem; }

.how-guide-nav {
    position: absolute;
    right: 0.85rem;
    bottom: 0.85rem;
    display: flex;
    gap: 0.4rem;
    z-index: 2;
}

.how-guide-nav-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--card-bg, #fff);
    color: var(--text-primary, #0f172a);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.how-guide-nav-btn:hover {
    border-color: var(--primary, #0d9488);
    color: var(--primary, #0d9488);
}

.how-guide-nav-btn:active {
    transform: scale(0.96);
}

.how-guide-foot {
    text-align: center;
    margin: 1.25rem 0 0;
    color: var(--text-muted, #64748b);
    font-size: 0.9rem;
}

.how-guide-foot a {
    color: var(--primary, #0d9488);
    font-weight: 600;
    text-decoration: none;
}

.how-guide-foot a:hover {
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    .how-snap-stats,
    .how-snap-board {
        grid-template-columns: repeat(2, 1fr);
    }
    .how-snap-learn,
    .how-snap-code,
    .how-snap-resume {
        grid-template-columns: 1fr;
    }
    .how-guide-snap {
        transform: none;
    }
    .how-guide-panel.is-active .how-guide-snap {
        animation: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .how-guide-panel.is-active,
    .how-guide-panel.is-active .how-snap-rise,
    .how-guide-panel.is-active .how-snap-slide,
    .how-guide-panel.is-active .how-snap-pop,
    .how-guide-panel.is-active .how-snap-pulse,
    .how-guide-panel.is-active .how-snap-cursor,
    .how-guide-panel.is-active .how-snap-bar span,
    .how-guide-panel.is-active .how-snap-type,
    .how-guide-panel.is-active .how-snap-code-lines span,
    .how-guide.is-playing .how-guide-progress i,
    .how-guide-panel.is-active .how-guide-snap {
        animation: none !important;
    }
}
