/* ===== HOW-TO PAGE ===== */
/* Uses CSS variables from company.css and landing.css */

.howto-hero {
    padding: 9rem 2rem 5rem;
    text-align: center;
    background: var(--bg-dark);
    position: relative;
    min-height: 70vh;
    overflow: hidden;
}

.howto-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 50% 0%, var(--at-08) 0%, transparent 65%);
    pointer-events: none;
}
html.dark-mode .howto-hero::before {
    background: radial-gradient(ellipse at 50% 0%, var(--at-07) 0%, transparent 65%);
}

.howto-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    position: relative;
}

.howto-hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.75;
}

.howto-hero-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 1.25rem;
    opacity: 0.85;
}

/* ===== TOC NAV ===== */
.howto-toc {
    background: var(--bg-section);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 2rem;
    position: sticky;
    top: 70px; /* offset below fixed navbar (~72px collapsed) */
    z-index: 50;
    overflow-x: auto;
    scrollbar-width: none;
}

.howto-toc::-webkit-scrollbar { display: none; }

.howto-toc-inner {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    flex-wrap: nowrap;
    min-width: max-content;
    margin: 0 auto;
}

.howto-toc-link {
    font-family: 'Barlow', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.25s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.howto-toc-link:hover {
    color: var(--primary);
    border-color: var(--at-30);
    background: var(--at-06);
}
html.dark-mode .howto-toc-link:hover {
    border-color: var(--at-20);
    background: var(--at-05);
}

.howto-toc-num {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--at-15);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
html.dark-mode .howto-toc-num {
    background: var(--at-12);
}

/* ===== STEP SECTIONS ===== */
.howto-steps {
    padding: 0 0 5rem;
    background: var(--bg-dark);
}

.howto-step {
    padding: 5rem 2rem;
    border-bottom: 1px solid var(--border);
    max-width: 1100px;
    margin: 0 auto;
}

.howto-step:last-child {
    border-bottom: none;
}

.howto-step-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.howto-step:nth-child(even) .howto-step-inner {
    direction: rtl;
}

.howto-step:nth-child(even) .howto-step-inner > * {
    direction: ltr;
}

.howto-step-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.howto-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--at-18), var(--at-05));
    border: 1px solid var(--at-30);
    color: var(--primary);
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
html.dark-mode .howto-step-number {
    background: linear-gradient(135deg, var(--at-15), var(--at-05));
    border-color: var(--at-25);
}

.howto-step-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
    opacity: 0.75;
}

.howto-step-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.25;
    letter-spacing: -0.5px;
}

.howto-step-text p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.howto-step-tips {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.howto-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.howto-tip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 0.55rem;
    opacity: 0.7;
}

/* ===== SCREENSHOT FRAME ===== */
.howto-screenshot-wrap {
    position: relative;
}

.howto-screenshot-frame {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.04),
        0 25px 60px rgba(0, 0, 0, 0.1),
        0 8px 20px rgba(0, 0, 0, 0.06);
    background: var(--bg-card);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
html.dark-mode .howto-screenshot-frame {
    border-color: var(--glass-border);
    box-shadow:
        0 0 0 1px var(--at-06),
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 8px 20px rgba(0, 0, 0, 0.3);
}

.howto-screenshot-frame:hover {
    transform: translateY(-4px);
    box-shadow:
        0 0 0 1px var(--at-18),
        0 35px 80px rgba(0, 0, 0, 0.12),
        0 0 40px var(--at-10);
}
html.dark-mode .howto-screenshot-frame:hover {
    box-shadow:
        0 0 0 1px var(--at-12),
        0 35px 80px rgba(0, 0, 0, 0.55),
        0 0 40px var(--at-06);
}

.howto-screenshot-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
html.dark-mode .howto-screenshot-bar {
    background: rgba(255, 255, 255, 0.04);
    border-bottom-color: var(--glass-border);
}

.howto-screenshot-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.12);
}
html.dark-mode .howto-screenshot-dot {
    background: rgba(255, 255, 255, 0.12);
}

.howto-screenshot-dot:first-child { background: rgba(255, 100, 90, 0.5); }
.howto-screenshot-dot:nth-child(2) { background: rgba(255, 190, 60, 0.5); }
.howto-screenshot-dot:nth-child(3) { background: rgba(90, 200, 90, 0.5); }

.howto-screenshot-frame img {
    width: 100%;
    display: block;
}

/* Multi-screenshot group */
.howto-screenshot-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.howto-screenshot-group .howto-screenshot-frame {
    flex: 1;
}

.howto-screenshot-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ===== CTA SECTION ===== */
.howto-cta {
    padding: 6rem 2rem;
    text-align: center;
    background: var(--bg-section);
    border-top: 1px solid var(--border);
}

.howto-cta h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.howto-cta p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

/* ===== LIGHTBOX ===== */
.howto-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.howto-lightbox.is-open {
    opacity: 1;
    pointer-events: all;
}

.howto-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(230, 235, 235, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: zoom-out;
}
html.dark-mode .howto-lightbox-backdrop {
    background: rgba(5, 10, 5, 0.92);
}

.howto-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: min(1100px, 92vw);
    max-height: 90vh;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--at-20);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.18), 0 0 0 1px var(--at-12);
    transform: scale(0.92);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
html.dark-mode .howto-lightbox-content {
    border-color: var(--at-15);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--at-08);
}

.howto-lightbox.is-open .howto-lightbox-content {
    transform: scale(1);
}

.howto-lightbox-content img {
    display: block;
    width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.howto-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(253, 252, 251, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: rgba(26, 26, 26, 0.65);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 2;
}
html.dark-mode .howto-lightbox-close {
    background: rgba(10, 18, 10, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.howto-lightbox-close:hover {
    background: var(--at-12);
    border-color: var(--at-30);
    color: var(--gold);
}
html.dark-mode .howto-lightbox-close:hover {
    background: var(--at-15);
    border-color: var(--at-30);
    color: var(--primary);
}

/* Make screenshot frames zoomable */
.howto-screenshot-frame {
    cursor: zoom-in;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .howto-hero h1 { font-size: 2.4rem; }

    .howto-step-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .howto-step:nth-child(even) .howto-step-inner {
        direction: ltr;
    }

    .howto-screenshot-group-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .howto-hero { padding: 7rem 1.5rem 3.5rem; }
    .howto-hero h1 { font-size: 1.9rem; }
    .howto-step { padding: 3rem 1.5rem; }
    .howto-step-text h2 { font-size: 1.6rem; }
    .howto-toc { padding: 1rem 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .howto-screenshot-frame,
    .howto-lightbox,
    .howto-lightbox-content {
        transition: none !important;
    }
    .howto-screenshot-frame:hover {
        transform: none;
    }
}
