@font-face {
    font-family: "Whila Sans";
    src: url("assets/fonts/WhilaSans-Regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --bg: #040404;
    --fg: #eeeeee;
    --muted: rgba(238, 238, 238, 0.68);
    --quiet: rgba(238, 238, 238, 0.48);
    --line: rgba(238, 238, 238, 0.18);
    --line-strong: rgba(238, 238, 238, 0.44);
    --panel: rgba(4, 4, 4, 0.72);
    --accent: #eeeeee;
    --accent-strong: #ffffff;
    --text-dark: #050505;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: var(--bg);
    color: var(--fg);
    font-family: "Whila Sans", Inter, "Segoe UI", Arial, sans-serif;
}

button,
a {
    font: inherit;
}

a {
    color: inherit;
}

.showroom-app,
.home-stage,
.intro-stage,
.stream-stage {
    position: fixed;
    inset: 0;
}

.showroom-app {
    min-width: 320px;
    isolation: isolate;
    background: #030303 url("assets/WhilaStartupIntroPoster.jpg") center / cover no-repeat;
}

.intro-preview-video,
.intro-video,
.loading-video,
.stream-frame {
    width: 100%;
    height: 100%;
    display: block;
}

.intro-preview-video,
.intro-video,
.loading-video {
    object-fit: cover;
}

.intro-preview-video {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0.9;
    filter: contrast(1.1) brightness(0.78) saturate(0.9);
    transition: opacity 320ms ease;
}

.showroom-app.is-preview-ready .intro-preview-video {
    opacity: 0.9;
}

.ambient-shade,
.loading-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(3, 3, 3, 0.88), rgba(3, 3, 3, 0.4) 48%, rgba(3, 3, 3, 0.62)),
        linear-gradient(0deg, rgba(3, 3, 3, 0.1), rgba(3, 3, 3, 0.34));
}

.home-stage {
    z-index: 2;
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: center;
    gap: 44px;
    padding: 72px 88px 50px;
    overflow: hidden;
}

.brand {
    align-self: center;
    width: 100%;
    min-width: 0;
    max-width: 760px;
    display: grid;
    gap: 18px;
}

.brand-lockup {
    display: flex;
    align-items: center;
}

.brand-logo {
    width: clamp(112px, 9.5vw, 154px);
    height: auto;
    display: block;
}

.brand-kicker,
.home-copy,
.status-line,
.contact-strip p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.brand-kicker {
    max-width: 420px;
    color: var(--quiet);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.brand h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(48px, 5.8vw, 88px);
    line-height: 0.92;
    font-weight: 400;
    letter-spacing: 0;
    overflow-wrap: normal;
}

.home-copy {
    max-width: 500px;
    font-size: 17px;
}

.actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
}

.primary-button {
    min-width: 232px;
    min-height: 56px;
    border: 1px solid rgba(238, 238, 238, 0.84);
    border-radius: 8px;
    padding: 0 28px;
    color: var(--text-dark);
    background: var(--accent);
    cursor: pointer;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0;
    box-shadow: none;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.primary-button:hover:not(:disabled) {
    transform: translateY(-1px);
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}

.primary-button:active:not(:disabled) {
    transform: translateY(0);
}

.primary-button:disabled {
    cursor: default;
    opacity: 0.62;
}

.status-line {
    color: var(--quiet);
    font-size: 14px;
}

.status-line::before {
    width: 6px;
    height: 6px;
    display: inline-block;
    margin-right: 10px;
    border-radius: 999px;
    background: currentColor;
    content: "";
    transform: translateY(-1px);
}

.contact-strip {
    justify-self: center;
    width: min(710px, 100%);
    display: grid;
    grid-template-columns: 44px minmax(190px, 1fr) minmax(240px, 1fr);
    gap: 28px;
    align-items: start;
    padding: 22px 0 0;
    border-top: 1px solid rgba(238, 238, 238, 0.3);
}

.contact-mark {
    width: 36px;
    height: 30px;
    display: block;
    object-fit: contain;
    opacity: 0.94;
}

.contact-strip h2 {
    margin: 0 0 6px;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 400;
}

.contact-links {
    display: grid;
    gap: 8px;
    align-content: start;
}

.contact-links a {
    color: var(--fg);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    overflow-wrap: anywhere;
}

.primary-button:focus-visible,
.settings-button:focus-visible,
.settings-menu button:focus-visible,
.contact-links a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.settings-button {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 6;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--fg);
    background: rgba(3, 3, 3, 0.46);
    backdrop-filter: blur(14px);
    cursor: pointer;
    font-size: 19px;
    line-height: 1;
}

.settings-button:hover {
    border-color: var(--line-strong);
    background: rgba(5, 5, 5, 0.62);
}

.settings-menu {
    position: fixed;
    top: 72px;
    right: 24px;
    z-index: 7;
    width: 190px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
}

.settings-menu button {
    width: 100%;
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    padding: 0 12px;
    color: var(--fg);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.settings-menu button:hover:not(:disabled) {
    background: rgba(247, 244, 237, 0.1);
}

.settings-menu button:disabled {
    cursor: default;
    color: rgba(247, 244, 237, 0.42);
}

.intro-stage {
    z-index: 4;
    background: #000;
}

.intro-video {
    background: #000;
}

.stream-stage {
    z-index: 3;
    background: #000;
}

.stream-stage.is-priming {
    opacity: 0;
    pointer-events: none;
}

.stream-frame {
    border: 0;
    background: #000;
}

.stream-loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #000;
    opacity: 1;
    transition: opacity 280ms ease;
}

.stream-loading.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-video {
    position: absolute;
    inset: 0;
    opacity: 0.74;
    filter: saturate(0.8) contrast(1.08) brightness(0.58);
}

.loading-shade {
    background: rgba(5, 5, 5, 0.62);
}

.loading-copy {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 10px;
    padding: 32px;
    text-align: center;
}

.loading-copy h2 {
    margin: 0;
    font-size: 34px;
    line-height: 1.12;
    font-weight: 400;
    letter-spacing: 0;
}

.loading-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.45;
}

[hidden] {
    display: none !important;
}

.showroom-app[data-view="intro"] .settings-button,
.showroom-app[data-view="intro"] .settings-menu,
.showroom-app[data-view="intro"] .intro-preview-video,
.showroom-app[data-view="intro"] .ambient-shade,
.showroom-app[data-view="stream"] .settings-button,
.showroom-app[data-view="stream"] .settings-menu,
.showroom-app[data-view="stream"] .intro-preview-video,
.showroom-app[data-view="stream"] .ambient-shade {
    display: none !important;
}

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

@media (max-width: 720px) {
    .home-stage {
        align-items: end;
        gap: 28px;
        padding: 74px 24px 34px;
    }

    .brand {
        gap: 14px;
    }

    .brand h1 {
        max-width: 8.8ch;
        font-size: 40px;
        line-height: 0.98;
    }

    .home-copy {
        max-width: 300px;
        font-size: 15px;
    }

    .actions,
    .primary-button {
        width: 100%;
    }

    .primary-button {
        min-width: 0;
    }

    .contact-strip {
        grid-template-columns: 1fr;
        gap: 14px;
        padding-top: 18px;
    }

    .contact-mark {
        width: 30px;
        height: 26px;
    }

    .settings-button {
        top: 16px;
        right: 16px;
    }

    .settings-menu {
        top: 64px;
        right: 16px;
        width: min(190px, calc(100vw - 32px));
    }

    .loading-copy h2 {
        font-size: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .primary-button,
    .stream-loading {
        transition: none;
    }
}
