/**
 * About Us Page
 *
 * Clean, edge-to-edge layout that fills every screen.
 * The video is the hero — it gets ALL remaining space.
 * Scrolls gracefully when zoomed or on very small screens.
 *
 * Flex chain:
 *   .about-container (fixed, flex column, full viewport, overflow-y auto)
 *     .video-focus-section (flex: 1 — fills remaining)
 *       .video-focus-inner (flex: 1, flex column)
 *         h1                  (flex-shrink: 0)
 *         .video-intro        (flex-shrink: 0)
 *         .video-wrapper      (flex: 1 — VIDEO FILLS THIS)
 *           .video-container  (aspect-ratio 16/9, max-height 100%)
 *         .video-progress     (flex-shrink: 0)
 *     .post-video-cta         (flex-shrink: 0 — fades in after video)
 *     .about-footer           (flex-shrink: 0)
 */

:root {
    --about-bg: #0a0a0a;
    --about-text: #fff;
    --about-muted: #aaa;
}

/* ==========================================================================
   CONTAINER — fixed, fills viewport, flex column, scrollable when zoomed
   ========================================================================== */

.about-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    padding-top: env(safe-area-inset-top, 0px);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--about-bg);
    color: var(--about-text);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    z-index: 99999;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

.about-container *,
.about-container *::before,
.about-container *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   VIDEO SECTION — gets all remaining vertical space
   ========================================================================== */

.video-focus-section {
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(12px, 2.5vh, 28px) clamp(16px, 4vw, 48px) 0;
    width: 100%;
}

/* Inner column — flex:1 so the video wrapper fills it */
.video-focus-inner {
    width: 100%;
    max-width: 960px;
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Heading — always readable */
.video-focus-inner h1 {
    font-size: clamp(22px, 3.2vw, 38px);
    font-weight: 700;
    color: var(--about-text);
    margin: 0 0 clamp(4px, 0.6vh, 10px) 0;
    letter-spacing: -0.3px;
    line-height: 1.2;
    flex-shrink: 0;
}

/* Subtitle — clearly legible on phones */
.video-intro {
    font-size: clamp(15px, 1.8vw, 18px);
    color: var(--about-muted);
    margin: 0 0 clamp(10px, 1.8vh, 22px) 0;
    line-height: 1.4;
    flex-shrink: 0;
}

.video-intro .next-step {
    display: block;
    margin-top: 4px;
    font-size: clamp(12px, 1.3vw, 14px);
    color: #666;
}

/* ==========================================================================
   VIDEO — fills all remaining space in the inner column
   ========================================================================== */

.video-wrapper {
    width: 100%;
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: clamp(6px, 1vh, 14px);
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 100%;
    background: #000;
    border-radius: clamp(8px, 1.2vw, 16px);
    overflow: hidden;
    box-shadow: 0 clamp(2px, 0.5vh, 8px) clamp(12px, 3vh, 40px) rgba(0,0,0,0.5);
}

.video-container iframe,
.video-container #player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #111;
    color: #555;
    overflow: hidden;
}

.video-placeholder .play-icon {
    font-size: clamp(32px, 5vw, 56px);
    margin-bottom: 8px;
    opacity: 0.5;
}

.video-placeholder p {
    font-size: clamp(14px, 1.6vw, 18px);
    margin: 0;
}

/* ==========================================================================
   PROGRESS — compact, never shrinks, always readable
   ========================================================================== */

.video-progress-container {
    width: 100%;
    max-width: 90%;
    padding: clamp(4px, 0.6vh, 10px) 0 0;
    flex-shrink: 0;
}

.progress-bar {
    width: 100%;
    height: clamp(3px, 0.5vh, 5px);
    background: #1a1a1a;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: clamp(4px, 0.6vh, 8px);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #444, #777);
    border-radius: inherit;
    transition: width 0.3s ease;
}

.video-progress-container.complete .progress-fill {
    background: linear-gradient(90deg, #4ade80, #22c55e);
}

.progress-text {
    font-size: clamp(13px, 1.4vw, 15px);
    color: #555;
    margin: 0;
}

.video-progress-container.complete .progress-text {
    color: #4ade80;
}

.video-skip-link {
    margin-top: clamp(4px, 0.5vh, 8px);
    text-align: center;
}

.video-skip-link a.video-skip-a {
    font-size: clamp(12px, 1.2vw, 14px);
    color: #444;
    text-decoration: none;
    transition: color 0.2s;
}

.video-skip-link a.video-skip-a:hover {
    color: #888;
}

/* ==========================================================================
   POST-VIDEO CTA — hidden until video completes, then fades in
   ========================================================================== */

.post-video-cta {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 2vh, 24px) 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: translateY(6px);
    max-height: 0;
    overflow: hidden;
}

.post-video-cta.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    max-height: 200px;
}

.cta-message {
    font-size: clamp(16px, 2vw, 22px);
    color: #aaa;
    margin: 0 0 clamp(8px, 1.2vh, 16px) 0;
    font-weight: 500;
}

.btn-schedule {
    display: inline-block;
    background: #fff;
    color: #0a0a0a;
    padding: clamp(12px, 1.6vw, 18px) clamp(32px, 4.5vw, 52px);
    font-size: clamp(15px, 1.6vw, 18px);
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 2px clamp(10px, 1.5vw, 20px) rgba(255,255,255,0.1);
    letter-spacing: 0.2px;
}

.btn-schedule:hover,
.btn-schedule:focus {
    background: #f0f0f0;
    color: #0a0a0a;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 3px clamp(14px, 2vw, 24px) rgba(255,255,255,0.15);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.about-footer {
    flex: 0 0 auto;
    background: var(--about-bg);
    color: #444;
    padding: clamp(6px, 0.8vh, 12px) 12px;
    padding-bottom: max(clamp(6px, 0.8vh, 12px), env(safe-area-inset-bottom, 0px));
    text-align: center;
}

.about-footer p {
    font-size: clamp(11px, 1.1vw, 13px);
    margin: 0;
    letter-spacing: 0.3px;
}

/* ==========================================================================
   MOBILE — large, readable sizes on phones and small tablets
   ========================================================================== */

@media (max-width: 768px) {
    .video-focus-section {
        padding: 20px 16px 0;
    }

    .video-focus-inner h1 {
        font-size: 28px;
        margin-bottom: 8px;
    }

    .video-intro {
        font-size: 17px;
        margin-bottom: 16px;
    }

    .video-container {
        border-radius: 10px;
    }

    .progress-bar {
        height: 4px;
        margin-bottom: 8px;
    }

    .progress-text {
        font-size: 15px;
    }

    .video-skip-link {
        margin-top: 8px;
    }

    .video-skip-link a.video-skip-a {
        font-size: 14px;
        color: #555;
    }

    .cta-message {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .btn-schedule {
        padding: 16px 40px;
        font-size: 18px;
        border-radius: 12px;
    }

    .about-footer p {
        font-size: 12px;
    }
}

/* ==========================================================================
   LANDSCAPE PHONES — video is height-limited, compress spacing
   ========================================================================== */

@media (max-height: 420px) and (orientation: landscape) {
    .video-focus-section {
        padding: 6px 20px 0;
    }

    .video-focus-inner h1 {
        font-size: 16px;
        margin-bottom: 2px;
    }

    .video-intro {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .video-container {
        border-radius: 6px;
    }

    .progress-bar {
        height: 2px;
        margin-bottom: 3px;
    }

    .progress-text {
        font-size: 11px;
    }

    .video-skip-link a.video-skip-a {
        font-size: 10px;
    }

    .cta-message {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .btn-schedule {
        padding: 8px 22px;
        font-size: 13px;
    }

    .about-footer {
        padding: 3px;
    }

    .about-footer p {
        font-size: 10px;
    }
}

/* Very short landscape — hide subtitle, just show heading + video */
@media (max-height: 340px) {
    .video-intro {
        display: none;
    }

    .video-skip-link {
        display: none;
    }
}
