/* Mobile slide deck — homepage only, max-width 768px */

body.homepage {
    overflow: hidden;
    height: 100dvh;
    height: 100svh;
}

/* Global photo/video bg — desktop only; hero slide carries its own on mobile */
body.homepage::before,
body.homepage::after {
    display: none;
}

/* Hide all desktop homepage content on mobile */
body.homepage .hm-desktop {
    display: none !important;
}

body.homepage .home-deck {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    height: 100dvh;
    height: 100svh;
    width: 100%;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    position: relative;
    z-index: 1;
}

body.homepage .home-deck::-webkit-scrollbar {
    display: none;
}

body.homepage .home-slide {
    display: flex;
    flex-direction: column;
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    height: 100dvh;
    height: 100svh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
    padding-top: 4.5rem;
    box-sizing: border-box;
}

body.homepage .home-slide--hero,
body.homepage .home-slide--services,
body.homepage .home-slide--projects,
body.homepage .home-slide--desktop {
    display: flex;
    flex-direction: column;
}

/* Desktop-only slides hidden on mobile deck */
body.homepage .home-slide--zsm,
body.homepage .home-slide--comparison,
body.homepage .home-slide--leadmagnet,
body.homepage .home-slide--faq {
    display: none !important;
}

body.homepage .home-slide--hero {
    padding-top: 0;
    position: relative;
    background-color: #09090b;
    background-image: image-set(
        url('/images/1.avif') type('image/avif'),
        url('/images/1.webp') type('image/webp'),
        url('/images/1.jpg') type('image/jpeg')
    );
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

body.homepage .home-slide--hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(9, 9, 11, 0.12) 0%,
        rgba(9, 9, 11, 0.42) 100%
    );
    pointer-events: none;
    z-index: 0;
}

body.homepage .home-slide--hero .container,
body.homepage .home-slide--hero .hm-mobile {
    position: relative;
    z-index: 1;
}

/* Solid greys on all other slides — no background photo */
body.homepage .home-slide--about {
    background: #000;
}

body.homepage .home-slide--services {
    background: #09090b;
}

body.homepage .home-slide--history,
body.homepage .home-slide--projects {
    background: #1a1a1a;
}

body.homepage .home-slide--desktop {
    background: #050506;
}

body.homepage .home-slide--zsm,
body.homepage .home-slide--comparison {
    background: #050506;
}

body.homepage .home-slide--leadmagnet,
body.homepage .home-slide--faq {
    background: #000;
}

/* Fixed nav */
body.homepage .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    padding: 1rem 1.25rem 0;
    background: transparent;
    pointer-events: none;
    animation: none;
}

body.homepage .navbar .nav-left,
body.homepage .navbar .glass-pill,
body.homepage .navbar .nav-link {
    pointer-events: auto;
}

body.homepage .home-slide--hero .container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 3.75rem 1.25rem 1rem;
    box-sizing: border-box;
}

body.homepage .about-section,
body.homepage .history-section,
body.homepage .hm-desktop-section,
body.homepage .zsm-section,
body.homepage .comparison-section,
body.homepage .leadmagnet-section,
body.homepage .faq-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0;
    margin: 0;
    background: transparent;
}

body.homepage #bg-video {
    display: none;
}

/* ---- Mobile panel design system ---- */

body.homepage .hm-mobile {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: 100%;
    padding: 0.5rem 1.25rem 1rem;
    box-sizing: border-box;
    gap: 0.65rem;
    overflow-x: hidden;
    overflow-y: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
}

body.homepage .hm-panel--hero {
    justify-content: flex-end;
    padding-bottom: 1rem;
    gap: 0;
    overflow: hidden;
}

body.homepage .hm-hero-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.1rem 1.15rem 1.15rem;
    border-radius: 16px;
    background: rgba(9, 9, 11, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.hm-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin: 0;
}

.hm-eyebrow svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    flex-shrink: 0;
}

.hm-title,
.hm-head {
    font-size: clamp(2rem, 9vw, 2.75rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin: 0;
    color: var(--text-primary);
}

body.homepage .hm-mobile:not(.hm-panel--hero) > .hm-head,
body.homepage .hm-mobile:not(.hm-panel--hero) > .hm-title {
    margin-top: 0.35rem;
}

.hm-dim {
    color: var(--text-tertiary);
    font-weight: 500;
}

.hm-lead,
.hm-copy {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--text-secondary);
    max-width: none;
}

.hm-panel--hero .hm-lead {
    max-width: none;
}

.hm-actions {
    display: flex;
    gap: 0;
    margin-top: 0.15rem;
}

.hm-actions.hm-glass-pill {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
}

.hm-actions.hm-glass-pill .hm-btn {
    border-radius: 0;
    border: none;
    background: transparent;
}

.hm-actions.hm-glass-pill .hm-btn--ghost {
    border-right: 1px solid var(--surface-border);
}

.hm-actions.hm-glass-pill .hm-btn--solid {
    background: var(--text-primary);
    color: #09090b;
}

.hm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease;
    flex: 1;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
}

.hm-btn--ghost {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.hm-btn--solid {
    background: var(--text-primary);
    color: #09090b;
}

.hm-btn--block {
    flex: none;
    width: 100%;
    margin-top: 0.35rem;
}

/* Desktop-inspired callout */
.hm-edge {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.hm-edge svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-secondary);
    fill: none;
    stroke-width: 1.5;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.hm-edge span {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* About panel */
.hm-profile {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.85rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.hm-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.hm-profile-name {
    margin: 0 0 0.15rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hm-profile-loc {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.hm-profile-status {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.hm-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
}

.hm-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hm-stat-n {
    display: block;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.1;
}

.hm-stat-l {
    display: block;
    font-size: 0.65rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.15rem;
}

.hm-socials {
    display: flex;
    gap: 0.5rem;
}

.hm-socials a {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

/* Services panel */
.hm-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.hm-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.hm-list-n {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    font-weight: 600;
    min-width: 1.25rem;
    padding-top: 0.15rem;
    letter-spacing: 0.04em;
}

.hm-list-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.hm-list-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hm-list-desc {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.hm-tags-label {
    margin: 0;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
}

.hm-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.hm-tags span {
    font-size: 0.7rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

/* History panel */
.hm-history-photo {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    max-height: 32vh;
}

.hm-history-photo img {
    width: 100%;
    height: 100%;
    max-height: 32vh;
    object-fit: cover;
    display: block;
}

.hm-history-cap {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
}

.hm-milestones {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    overflow: hidden;
    align-content: start;
}

.hm-milestones li {
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--text-secondary);
    padding: 0.5rem 0.6rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

.hm-milestones strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.75rem;
    margin-bottom: 0.1rem;
}

/* Projects panel */
.hm-project {
    padding: 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
}

.hm-project-img {
    flex: 1;
    min-height: 6.5rem;
    width: 100%;
    overflow: hidden;
}

.hm-project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hm-project-body {
    margin-top: auto;
    padding: 0.65rem 0.85rem 0.75rem;
    display: flex;
    flex-direction: column;
}

.hm-project-era {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hm-project h3 {
    margin: 0.2rem 0 0.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hm-project p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

body.homepage .hm-panel--projects {
    gap: 0.4rem;
    overflow: hidden;
}

body.homepage .hm-panel--projects .hm-head {
    flex-shrink: 0;
}

body.homepage .hm-panel--projects .hm-project {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Desktop prompt — mobile only */
body.homepage .hm-panel--desktop {
    justify-content: center;
    overflow: hidden;
}

body.homepage .hm-desktop-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.25rem 1.15rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

body.homepage .hm-desktop-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 0.15rem;
}

body.homepage .hm-desktop-icon svg {
    width: 2rem;
    height: 2rem;
    stroke: var(--text-secondary);
    fill: none;
    stroke-width: 1.5;
}

body.homepage .hm-panel--desktop .hm-head {
    margin-top: 0;
}

body.homepage .hm-panel--desktop .hm-copy {
    max-width: none;
}

/* ZSM panel */
.hm-checks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 0.5rem;
}

.hm-checks li {
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding-left: 1.1rem;
    position: relative;
}

.hm-checks li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-tertiary);
}

.hm-panel--zsm .hm-stats {
    margin-top: 0;
}

body.homepage .hm-panel--about .hm-stats {
    margin-top: auto;
}

body.homepage .hm-panel--about .hm-socials {
    flex-shrink: 0;
}

/* Services panel — tech stack pinned to bottom */
body.homepage .hm-panel--services .hm-tags-label {
    margin-top: auto;
}

body.homepage .hm-panel--services .hm-tags {
    flex-shrink: 0;
}

/* History panel — photo fills space, milestones at bottom */
body.homepage .hm-panel--history {
    overflow: hidden;
}

body.homepage .hm-panel--history .hm-head {
    flex-shrink: 0;
}

body.homepage .hm-panel--history .hm-history-photo {
    flex: 1;
    min-height: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
}

body.homepage .hm-panel--history .hm-history-photo picture {
    flex: 1;
    min-height: 0;
    display: block;
}

body.homepage .hm-panel--history .hm-history-photo img {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    object-fit: cover;
}

body.homepage .hm-panel--history .hm-milestones {
    flex-shrink: 0;
    margin-top: 0.5rem;
}

/* Comparison panel */
.hm-compare {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.hm-compare-item {
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.hm-compare-num {
    display: block;
    font-size: 0.65rem;
    color: var(--text-tertiary);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.hm-compare-item h3 {
    margin: 0 0 0.25rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hm-compare-item p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.hm-compare-item--bad {
    border-color: rgba(248, 113, 113, 0.2);
}

.hm-compare-item--good {
    border-color: rgba(74, 222, 128, 0.15);
}

/* Audit panel */
.hm-audit-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.35rem;
}

.hm-audit-list li {
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--text-secondary);
    padding: 0.5rem 0.55rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    text-align: center;
}

.hm-form {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.25rem;
    padding: 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.hm-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    box-sizing: border-box;
}

.hm-input::placeholder {
    color: var(--text-tertiary);
}

.hm-form-msg {
    font-size: 0.75rem;
    min-height: 1rem;
    color: var(--text-secondary);
}

.hm-form-msg.success {
    color: #4ade80;
}

.hm-form-msg.error {
    color: #f87171;
}

/* FAQ panel */
.hm-faq {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.hm-faq summary {
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
}

.hm-faq summary::-webkit-details-marker {
    display: none;
}

.hm-faq p {
    margin: 0;
    padding: 0 0.85rem 0.65rem;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.hm-faq a {
    color: var(--text-primary);
}

.hm-panel--faq {
    gap: 0.3rem;
}

.hm-panel--faq .hm-head {
    margin-bottom: 0.15rem;
}

.hm-panel--faq .hm-faq {
    flex-shrink: 1;
    min-height: 0;
}

.hm-panel--faq .hm-faq:not([open]) summary {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Short screens */
@media (max-height: 700px) {
    body.homepage .hm-mobile {
        gap: 0.45rem;
        padding-bottom: 0.75rem;
    }

    .hm-title,
    .hm-head {
        font-size: clamp(1.75rem, 8vw, 2.25rem);
    }

    .hm-history-photo {
        max-height: 24vh;
    }

    .hm-history-photo img {
        max-height: 24vh;
    }

    .hm-stat-n {
        font-size: 1.15rem;
    }

    .hm-hero-card {
        padding: 0.9rem 1rem;
        gap: 0.55rem;
    }
}

@media (max-height: 600px) {
    .hm-milestones {
        grid-template-columns: 1fr 1fr;
    }

    .hm-checks {
        grid-template-columns: 1fr;
    }

    .hm-audit-list {
        grid-template-columns: 1fr;
    }

    .hm-audit-list li {
        text-align: left;
    }

    .hm-project-body {
        padding: 0.55rem 0.7rem 0.65rem;
    }

    .hm-project-img {
        min-height: 5rem;
    }

    .hm-project p {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}
