/* AtlasCam Guide & Tutorial Styles.
   Inherits the outdoor editorial identity from landing.css and adapts
   the chapter navigation, feature cards, and showcase media to the light theme. */

.guide-main {
    width: min(calc(100% - 64px), 1180px);
    margin: 0 auto;
    padding: calc(var(--nav-height) + 40px) 0 64px;
}

.navbar nav a[aria-current="page"] {
    font-weight: 700;
    color: var(--accent-bright);
}

/* ---------- Guide Hero & Search ---------- */

.guide-hero {
    max-width: 840px;
    margin: 0 auto 36px;
    text-align: center;
}

.guide-kicker {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(239, 84, 42, 0.08);
    border: 1px solid rgba(239, 84, 42, 0.25);
    color: var(--accent-bright);
    font: 700 12px/1 'Barlow Condensed', sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.guide-hero h1 {
    margin: 18px 0 16px;
    color: #111;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(48px, 6.2vw, 84px);
    font-weight: 800;
    line-height: 0.96;
    letter-spacing: -0.025em;
}

.guide-hero p.lead {
    margin: 0 auto 28px;
    color: #444;
    font-size: clamp(17px, 2vw, 19px);
    line-height: 1.6;
    max-width: 680px;
}

.guide-search-box {
    position: relative;
    max-width: 520px;
    margin: 0 auto;
}

.guide-search-input {
    width: 100%;
    padding: 13px 42px 13px 44px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: #111;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.guide-search-input:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(239, 84, 42, 0.15);
}

.guide-search-input::placeholder {
    color: #777;
}

.guide-search-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #777;
    pointer-events: none;
    font-size: 16px;
}

.guide-search-clear {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #777;
    font-size: 18px;
    cursor: pointer;
    display: none;
    padding: 0;
    line-height: 1;
}

.guide-search-clear:hover {
    color: #111;
}

/* ---------- Sticky Chapter Navigation ---------- */

.guide-sticky-nav {
    position: sticky;
    top: var(--nav-height);
    z-index: 90;
    margin: 0 0 48px;
    padding: 12px 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.guide-nav-scroll {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.guide-nav-scroll::-webkit-scrollbar {
    display: none;
}

.guide-nav-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: #444;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 160ms ease;
    white-space: nowrap;
}

.guide-nav-pill:hover {
    color: #111;
    background: #ebebeb;
    border-color: var(--border-strong);
}

.guide-nav-pill.is-active {
    color: #fff;
    background: #111;
    border-color: #111;
    box-shadow: none;
}

/* ---------- Search Empty State ---------- */

.guide-empty-search {
    display: none;
    text-align: center;
    padding: 48px 24px;
    color: #555;
    background: var(--bg-soft);
    border: 1px dashed var(--border);
    border-radius: 4px;
    margin: 32px 0;
}

.guide-empty-search h3 {
    color: #111;
    font: 700 24px/1.1 'Barlow Condensed', sans-serif;
    margin-bottom: 8px;
}

.guide-empty-search p {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto;
}

/* ---------- Chapters & Headers ---------- */

.guide-chapter {
    margin-bottom: 64px;
    scroll-margin-top: calc(var(--nav-height) + 64px);
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

#quickstart.guide-chapter {
    border-top: 0;
    padding-top: 0;
}

.chapter-header {
    margin-bottom: 28px;
}

.chapter-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 3px;
    border: 1px solid rgba(239, 84, 42, 0.25);
    background: rgba(239, 84, 42, 0.08);
    color: var(--accent-bright);
    font: 700 12px/1 'Barlow Condensed', sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.chapter-header h2 {
    margin-top: 8px;
    color: #111;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(36px, 4.2vw, 54px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.chapter-header p.chapter-desc {
    margin-top: 10px;
    color: #555;
    font-size: 16px;
    max-width: 760px;
    line-height: 1.65;
}

/* ---------- Quickstart Grid ---------- */

.quickstart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.quickstart-step {
    position: relative;
    padding: 24px 20px;
    border-radius: 4px;
    border: 1px solid var(--border);
    border-top: 3px solid #111;
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.step-badge {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font: 700 15px/1 'Barlow Condensed', sans-serif;
    margin-bottom: 12px;
    box-shadow: none;
}

.quickstart-step h3 {
    color: #111;
    font: 700 22px/1.15 'Barlow Condensed', sans-serif;
    letter-spacing: -0.015em;
    margin-bottom: 8px;
}

.quickstart-step p {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

/* ---------- Guide Cards & Grid ---------- */

.guide-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.guide-card {
    display: flex;
    flex-direction: column;
    padding: 26px 24px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.guide-card:hover {
    border-color: #111;
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.guide-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.guide-card-icon {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    font-size: 18px;
    flex-shrink: 0;
}

.guide-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: flex-end;
}

.guide-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 3px;
    font: 700 11px/1.2 'Inter', sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.guide-tag-pro {
    background: rgba(239, 84, 42, 0.1);
    border: 1px solid rgba(239, 84, 42, 0.3);
    color: var(--accent-deep);
}

.guide-tag-free {
    background: #eef7ee;
    border: 1px solid #c2e2c2;
    color: #1e7e34;
}

.guide-tag-device {
    background: #f0f3f8;
    border: 1px solid #d0d7de;
    color: #24292f;
}

.gesture-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border-radius: 3px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: #555;
    font-size: 11px;
    font-weight: 600;
}

.guide-card h3 {
    color: #111;
    font: 700 24px/1.15 'Barlow Condensed', sans-serif;
    letter-spacing: -0.015em;
    margin-bottom: 8px;
}

.guide-card p {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 14px;
}

.guide-card-list {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    list-style: none;
    display: grid;
    gap: 8px;
}

.guide-card-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.guide-card-list li::before {
    content: "•";
    color: var(--accent);
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

/* ---------- Pro Tips / Callouts ---------- */

.pro-tip {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-top: 24px;
    padding: 20px 24px;
    border-radius: 4px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
}

.pro-tip-amber {
    background: #fffdf8;
    border-color: #f0e4cc;
    border-left: 4px solid #d97706;
}

.pro-tip-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.pro-tip-body strong {
    display: block;
    color: #111;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.pro-tip-body p {
    color: #444;
    font-size: 14px;
    line-height: 1.65;
    margin: 0;
}

/* ---------- Showcase Rows & Media ---------- */

.guide-showcase-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: center;
    gap: 48px;
    margin: 32px 0;
}

.guide-showcase-reverse {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.guide-showcase-reverse .guide-showcase-media {
    order: -1;
}

.guide-showcase-copy h3 {
    font: 700 32px/1.1 'Barlow Condensed', sans-serif;
    color: #111;
    margin: 10px 0 12px;
}

.guide-showcase-copy p {
    color: #555;
    line-height: 1.65;
    font-size: 15px;
    margin-bottom: 16px;
}

.guide-showcase-media {
    display: flex;
    justify-content: center;
    width: 100%;
}

.guide-showcase-media .iphone-device {
    width: min(100%, 300px);
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    border-radius: 8px;
    transform: none;
}

.guide-showcase-media .iphone-device::before,
.guide-showcase-media .iphone-device::after,
.guide-showcase-media .iphone-rim::before,
.guide-showcase-media .iphone-rim::after,
.guide-showcase-media .iphone-screen::before,
.guide-showcase-media .iphone-screen::after {
    display: none;
}

.guide-showcase-media .iphone-rim,
.guide-showcase-media .iphone-screen {
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    border-radius: 8px;
}

.guide-showcase-media .iphone-screen img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.15);
}

.guide-showcase-media .desktop-window {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.desktop-window.studio-primary {
    margin-bottom: 28px;
}

/* ---------- Code & Inline Elements ---------- */

code {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.88em;
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: #111;
}

/* ---------- CTA Section Spacing in Guide ---------- */

.guide-main .cta-section {
    padding: 64px 0 0;
    margin-top: 48px;
    border-top: 1px solid var(--border);
    width: 100%;
}

/* ---------- Responsive Adjustments ---------- */

@media (max-width: 1000px) {
    .guide-showcase-row,
    .guide-showcase-reverse {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .guide-showcase-reverse .guide-showcase-media {
        order: 0;
    }

    .guide-showcase-media .iphone-device {
        width: min(100%, 280px);
    }
}

@media (max-width: 640px) {
    .guide-main {
        width: calc(100% - 40px);
        padding-top: calc(var(--nav-height) + 24px);
    }

    .guide-hero h1 {
        font-size: clamp(40px, 11vw, 56px);
    }

    .guide-hero p.lead {
        font-size: 16px;
        margin-bottom: 24px;
    }

    .guide-sticky-nav {
        margin-bottom: 32px;
    }

    .guide-nav-pill {
        font-size: 12px;
        padding: 6px 10px;
    }

    .guide-chapter {
        margin-bottom: 48px;
        padding-top: 36px;
    }

    .chapter-header h2 {
        font-size: 34px;
    }

    .guide-card-grid,
    .quickstart-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .guide-card {
        padding: 22px 18px;
    }

    .pro-tip {
        padding: 16px 18px;
        gap: 12px;
    }
}
