/* ==========================================================================
   Continental PF 2027 – fullscreen video landing page
   ========================================================================== */

:root {
    --bg: #000;
    --fg: #fff;
    --accent: #ffa500; /* Continental yellow */
    --control-bg: rgba(0, 0, 0, .45);
    --control-bg-hover: rgba(0, 0, 0, .7);
    --gap: clamp(12px, 2.5vmin, 28px);
}

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

html,
body {
    height: 100%;
    margin: 0;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Stage: whole viewport, video always fully visible (letterbox) */
.stage {
    position: fixed;
    inset: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: var(--bg);
}

/* Absolutely sized to the stage – never grows with the video's intrinsic size */
.stage__video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--bg);
}

/* Controls ------------------------------------------------------------- */
.controls {
    position: absolute;
    right: calc(var(--gap) + env(safe-area-inset-right));
    bottom: calc(var(--gap) + env(safe-area-inset-bottom));
    display: flex;
    gap: 10px;
    z-index: 2;
}

.control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 48px;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    background: var(--control-bg);
    color: var(--fg);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .02em;
    cursor: pointer;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease, opacity .3s ease;
}

.control[hidden] {
    display: none;
}

.control svg {
    width: 22px;
    height: 22px;
    flex: none;
    fill: currentColor;
}

.control:hover {
    background: var(--control-bg-hover);
    border-color: var(--accent);
}

.control:active {
    transform: scale(.96);
}

.control:focus-visible,
.play-overlay:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* Sound toggle states */
.control .icon-unmuted,
.control[aria-pressed="true"] .icon-muted {
    display: none;
}

.control[aria-pressed="true"] .icon-unmuted {
    display: block;
}

/* Gentle attention pulse until the user interacts */
.control--hint {
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .35); }
    50%      { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
}

/* Once sound is on, collapse the label to an icon-only button */
.control[aria-pressed="true"] .control__label {
    display: none;
}

.control[aria-pressed="true"] {
    padding: 0;
    justify-content: center;
}

/* Fallback play button (autoplay blocked / reduced motion) ------------- */
/* Centered via inset + margin:auto (no translate), so the hover scale
   transforms around the true center without sub-pixel shifts */
.play-overlay {
    --size: clamp(72px, 14vmin, 120px);
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    width: var(--size);
    height: var(--size);
    margin: auto;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, .8);
    border-radius: 50%;
    background: rgba(0, 0, 0, .45);
    color: var(--fg);
    cursor: pointer;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.play-overlay[hidden] {
    display: none;
}

.play-overlay:hover {
    background: rgba(0, 0, 0, .7);
    border-color: var(--accent);
    transform: scale(1.05);
}

.play-overlay svg {
    display: block;
    width: 45%;
    height: 45%;
    fill: currentColor;
}

/* Replay icon has a tight, centered viewBox (18 units instead of 24) */
.play-overlay .icon-replay {
    width: 36%;
    height: 36%;
}

/* Optical centering of the triangle */
.play-overlay .icon-play {
    margin-left: 6%;
}

/* Play vs. replay icon */
.play-overlay .icon-replay,
.play-overlay--replay .icon-play {
    display: none;
}

.play-overlay--replay .icon-replay {
    display: block;
}

/* Small screens: icon-only controls, keep the frame clean */
@media (max-width: 480px), (max-height: 420px) {
    .control__label {
        display: none;
    }

    .control {
        padding: 0;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .control--hint {
        animation: none;
    }

    .control,
    .play-overlay {
        transition: none;
    }
}
