/* ===== SECTIONS & GLIDER ===== */

html { scroll-behavior: smooth; }

/* ── Video background ── */
.bg-video {
    position: fixed;
    top: 0; left: 0;
    z-index: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    object-fit: cover;
    object-position: center center;
    opacity: 0.15;
    pointer-events: none;
    will-change: transform;
}

/* ── Video fallback ── */
.bg-video-fallback {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: 0;
    background: radial-gradient(ellipse at 55% 40%, rgba(10,20,55,0.95) 0%, rgba(0,0,0,1) 70%);
    pointer-events: none;
    transition: opacity 1s ease;
}
body.light-theme .bg-video-fallback {
    background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,1) 0%, rgba(180,185,195,1) 100%);
}

/* ── Navbar glassmorphism ── */
.navbar {
    background: rgba(255, 255, 255, 0.01) !important;
    backdrop-filter: blur(5px) saturate(20%) !important;
    -webkit-backdrop-filter: blur(5px) saturate(20%) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.4) !important;
    width: 80% !important;
    max-width: 900px !important;
}
.toggle-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 52px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}

/* ── Active nav link ── */
.nav-links a.active { color: var(--primary-text) !important; }

/* ── Page layout ── */
.page-main {
    position: relative;
    z-index: 1;
    padding-top: 80px;
}
.custom-modal { position: relative; z-index: 1; }

/* ── Sections ── */
.page-section {
    min-height: calc(100vh - 70px - 36px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 40px 0 60px;
    scroll-margin-top: 72px;
    gap: 32px;
}
.section-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--secondary-text);
    text-align: center;
    margin-bottom: 18px;
    opacity: 0.6;
}
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.07), transparent);
    margin: 0 40px;
}

/* ── Section hero ── */
.section-hero {
    text-align: center;
    padding: 0 clamp(16px, 5vw, 80px);
    max-width: min(900px, 90vw);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.section-hero h2 {
    font-size: clamp(18px, 3vw, 30px);
    font-weight: var(--font-weight-bold);
    color: var(--primary-text);
    line-height: 1.2;
    text-wrap: balance;
}
.section-hero > p {
    font-size: clamp(13px, 1.1vw, 14px);
    color: var(--secondary-text);
    line-height: 1.65;
    max-width: 680px;
}

/* ── Glide wrapper ── */
.section-glide-wrap {
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
    overflow: visible;
    overflow-x: clip;
    padding: 0;
}
.section-glide {
    width: 100%;
    position: relative;
}
.section-glide .glide__track { overflow: visible; }
.section-glide .glide__slides { align-items: stretch; }

.section-glide .glide__slide {
    min-height: 400px;
    display: flex;
    align-items: stretch;
    opacity: 0.30;
    transform: scale(0.86);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: auto;
}
.section-glide .glide__slide--active {
    opacity: 1;
    transform: scale(1);
}
.section-glide .glide__slide:not(.glide__slide--active) { cursor: pointer; }

body.light-theme .section-glide .glide__slide { opacity: 0.55; }

/* ── Cards ── */
.slide-card {
    width: 100%;
    min-width: 286px;
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 0;
    overflow: hidden;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    height: clamp(260px, 42vh, 380px);
}
.card-img {
    flex: 1 1 0;
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    min-height: 0;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 10px;
}
.card-img-placeholder svg { width: 48px; height: 48px; color: var(--primary-text); opacity: 0.6; }
.card-img-placeholder span {
    font-size: 28px; font-weight: 800; letter-spacing: 2px;
    opacity: 0.5; color: var(--primary-text);
}
.card-body {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 32px 16px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.80) 0%, rgba(0,0,0,0.0) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    z-index: 4;
}
.card-body h3 {
    font-size: 15px; font-weight: 700; color: #ffffff;
    line-height: 1.25; margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-body p {
    font-size: 12px; color: rgba(255,255,255,0.65);
    line-height: 1.5; margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Badge ── */
.card-badge {
    position: absolute;
    top: 0; left: 0;
    font-size: 8px; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    border-right: 1px solid rgba(255,255,255,0.10);
    border-bottom: 1px solid rgba(255,255,255,0.10);
    border-radius: 19px 0 8px 0;
    padding: 6px 12px;
    z-index: 5;
    line-height: 1;
}
body.light-theme .card-badge { background: rgba(0, 0, 0, 0.15); color: rgba(255,255,255,0.9); }

/* ── Hero card ── */
.slide-card.is-hero .card-visual {
    width: 100%; height: 180px;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--border-radius-lg);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; position: relative; overflow: hidden;
}
.slide-card.is-hero .card-visual::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.4;
}
.slide-card.is-hero .card-visual svg {
    width: 64px; height: 64px;
    color: var(--primary-text);
    position: relative; z-index: 1;
}
.slide-card.is-hero h3 { font-size: 22px; font-weight: var(--font-weight-bold); line-height: 1.25; color: var(--primary-text); text-wrap: balance; }
.slide-card.is-hero > p { font-size: 13px; color: var(--secondary-text); line-height: 1.75; }

/* ── Feature card ── */
.slide-card.is-feature { gap: var(--spacing-lg); }
.feature-icon-wrap {
    width: 80px; height: 80px;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.feature-icon-wrap svg { width: 36px; height: 36px; color: var(--primary-text); }
.slide-card.is-feature h3 { font-size: 20px; font-weight: var(--font-weight-bold); color: var(--primary-text); line-height: 1.2; }
.slide-card.is-feature > p { font-size: 13px; color: var(--secondary-text); line-height: 1.75; max-width: 300px; }
.card-eyebrow { font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--secondary-text); font-weight: var(--font-weight-semibold); }

/* ── Glide arrows ── */
.section-glide-wrap .glide__arrows {
    position: absolute;
    top: 50%; left: 0; right: 0;
    transform: translateY(-50%);
    display: flex; justify-content: space-between;
    padding: 0;
    pointer-events: none;
    z-index: 20;
}
.section-glide-wrap .glide__arrow {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--primary-text);
    width: 28px; height: 64px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    opacity: 0.3;
    transition: opacity 0.2s, transform 0.2s;
}
.section-glide-wrap .glide__arrow:hover { opacity: 1; transform: scaleY(1.05); }
.section-glide-wrap .glide__arrow svg { width: 14px; height: 14px; }
body.light-theme .section-glide-wrap .glide__arrow {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.18);
}

/* ── Glide bullets ── */
.section-glide-wrap .glide__bullets {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    z-index: 20;
}
.section-glide-wrap .glide__bullet {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--border-color);
    border: none; cursor: pointer; padding: 0;
    transition: background 0.2s, transform 0.2s;
}
.section-glide-wrap .glide__bullet--active { background: var(--primary-text); transform: scale(1.5); }
body.light-theme .section-glide-wrap .glide__bullet { background: rgba(0, 0, 0, 0.20); }
body.light-theme .section-glide-wrap .glide__bullet--active { background: rgba(0, 0, 0, 0.65); }

/* ── Light theme cards ── */
body.light-theme .slide-card { background: rgba(255, 255, 255, 0.55); border-color: rgba(0, 0, 0, 0.08); }
body.light-theme .slide-card h3,
body.light-theme .slide-card p,
body.light-theme .card-eyebrow { color: #1a1a1a; }
body.light-theme .slide-card > p,
body.light-theme .slide-card.is-feature > p { color: #444444; }
body.light-theme .feature-icon-wrap { background: rgba(0, 0, 0, 0.06); border-color: rgba(0, 0, 0, 0.10); }
body.light-theme .feature-icon-wrap svg { color: #1a1a1a; }
body.light-theme .slide-card.is-hero .card-visual { background: rgba(0, 0, 0, 0.04); border-color: rgba(0, 0, 0, 0.08); }
body.light-theme .slide-card.is-hero .card-visual svg { color: #1a1a1a; }
body.light-theme .card-img { background: rgba(0,0,0,0.06); }
body.light-theme .card-img-placeholder svg,
body.light-theme .card-img-placeholder span { color: #1a1a1a; }
body.light-theme .card-body { background: linear-gradient(to top, rgba(80,80,80,0.55) 0%, rgba(80,80,80,0.0) 100%); }
body.light-theme .card-body h3 { color: #ffffff; }
body.light-theme .card-body p  { color: rgba(255,255,255,0.85); }

/* ── Contact section ── */
.contact-section {
    min-height: 100vh;
    padding: 60px 0 40px;
    justify-content: center;
}
.contact-section .section-content {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}
.contact-section .contact-form {
    width: 100%;
    min-width: min(420px, 100%);
}

/* ── Input clear button ── */
.input-wrap { position: relative; display: flex; align-items: center; flex-wrap: wrap; }
.input-wrap input { width: 100%; padding-right: 28px; }
.input-wrap .validation-message { width: 100%; }
.input-clear {
    position: absolute; right: 8px;
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,0.35); font-size: 16px;
    line-height: 1; padding: 0; display: none;
    transition: color 0.15s ease;
}
.input-clear:hover { color: rgba(255,255,255,0.8); }
.input-wrap input:not(:placeholder-shown) + .input-clear { display: block; }
body.light-theme .input-clear { color: rgba(0,0,0,0.3); }
body.light-theme .input-clear:hover { color: rgba(0,0,0,0.7); }

/* ── Textarea clear button ── */
.textarea-clear {
    display: none;
    margin-top: 4px;
    margin-left: auto;
    width: fit-content;
    background: none; border: none; cursor: pointer;
    color: rgba(255, 235, 150, 0.6);
    font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 0;
    transition: color 0.15s ease;
}
.textarea-clear:hover { color: rgba(255, 235, 150, 1); }
textarea:not(:placeholder-shown) ~ .textarea-clear { display: block; margin-left: auto; }
body.light-theme .textarea-clear { color: rgba(160, 120, 0, 0.6); }
body.light-theme .textarea-clear:hover { color: rgba(160, 120, 0, 1); }

/* ── Desktop glider margin (accounts for larger arrows above 720px) ── */
@media (min-width: 721px) {
    .section-glide {
        margin: 0 8px;
        width: calc(100% - 16px);
        overflow: hidden;
    }
}

/* ── Clip peek cards away from arrows only where carousel has perView≥4 ── */
@media (min-width: 1261px) {
    .section-glide .glide__track {
        clip-path: inset(0 36px);
    }
}

/* ── Mobile overrides ── */
@media (max-width: 720px) {
    .page-section {
        padding: 24px 0 16px;
        gap: 16px;
    }
    .section-glide .glide__slides { align-items: flex-start; }
    .section-glide .glide__slide { min-height: 0; }
    .section-glide-wrap { padding: 0 16px; }
    .section-glide-wrap .glide__arrows { left: -16px; right: -16px; padding: 0; }
    .section-glide-wrap .glide__arrow {
        opacity: 0.7;
        background: rgba(0, 0, 0, 0.45);
        border-color: rgba(255, 255, 255, 0.25);
        width: 24px; height: 56px;
        border-radius: 0 10px 10px 0;
    }
    .section-glide-wrap .glide__arrow--right { border-radius: 10px 0 0 10px; }
}
