:root {
    color-scheme: dark;
    --darker: #050505;
    --dark: #0d0d0d;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-strong: rgba(19, 13, 24, 0.94);
    --purple: #2d1b3d;
    --purple-deep: #1a0f24;
    --orange: #ff6600;
    --orange-bright: #ff7a22;
    --orange-soft: rgba(255, 102, 0, 0.13);
    --orange-glow: rgba(255, 102, 0, 0.32);
    --green: #00e08a;
    --violet: #c264ff;
    --red: #ff4d4d;
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.7);
    --dim: rgba(255, 255, 255, 0.43);
    --line: rgba(255, 255, 255, 0.12);
    --device-accent: var(--orange);
    --device-soft: var(--orange-soft);
    --device-glow: var(--orange-glow);
    font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
}

body[data-device="ghost"] {
    --device-accent: var(--green);
    --device-soft: rgba(0, 224, 138, 0.1);
    --device-glow: rgba(0, 224, 138, 0.24);
}

body[data-device="poltergeist"] {
    --device-accent: var(--violet);
    --device-soft: rgba(194, 100, 255, 0.11);
    --device-glow: rgba(194, 100, 255, 0.24);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--darker);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 280px;
    min-height: 100vh;
    background: var(--darker);
    color: var(--text);
    line-height: 1.65;
    letter-spacing: 0;
    overflow-x: hidden;
}

.setup-backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
        linear-gradient(125deg, rgba(45, 27, 61, 0.68) 0%, rgba(5, 5, 5, 0.92) 48%, rgba(65, 26, 4, 0.56) 100%);
    background-size: 46px 46px, 46px 46px, auto;
}

a {
    color: inherit;
}

a:focus-visible {
    outline: 2px solid var(--device-accent);
    outline-offset: 4px;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    max-width: 760px;
    margin-bottom: 18px;
    color: var(--device-accent);
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: 0;
    text-shadow: 0 0 38px var(--device-glow);
}

h2 {
    margin-bottom: 14px;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0;
}

.setup-header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 72px;
    padding: 13px max(5%, env(safe-area-inset-left)) 13px max(5%, env(safe-area-inset-right));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    border-bottom: 1px solid rgba(255, 102, 0, 0.14);
    background: rgba(5, 5, 5, 0.82);
    backdrop-filter: blur(18px);
}

.setup-brand {
    display: inline-flex;
    align-items: baseline;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}

.brand-word,
.setup-footer span {
    font-family: "Nosifer", cursive;
    color: var(--orange);
    text-shadow: 0 0 18px var(--orange-glow);
}

.brand-word {
    font-size: 1.25rem;
}

.brand-section {
    color: var(--dim);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-actions a {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 180ms ease;
}

.header-actions a:hover {
    color: var(--orange);
}

.setup-hero,
.video-band,
.guide-band,
.coming-soon-band,
.device-directory {
    position: relative;
    border-bottom: 1px solid var(--line);
}

.setup-hero {
    background: rgba(5, 5, 5, 0.44);
    overflow: hidden;
}

.setup-hero::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--device-accent);
    box-shadow: 0 0 28px var(--device-glow);
}

.setup-hero__inner,
.content-grid,
.coming-soon-inner,
.directory-inner,
.setup-footer {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.setup-hero__inner {
    min-height: 510px;
    padding: 74px 32px 66px;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(270px, 0.65fr);
    align-items: center;
    gap: 72px;
}

.eyebrow,
.section-label,
.steps-kicker {
    margin: 0 0 12px;
    color: var(--device-accent);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.setup-intro,
.section-heading > p:last-of-type,
.coming-soon-copy > p:last-child {
    max-width: 720px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.08rem;
}

.status-badge {
    margin-bottom: 18px;
    padding: 7px 11px;
    border: 1px solid var(--device-accent);
    border-radius: 999px;
    background: var(--device-soft);
    color: var(--device-accent);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.setup-progress {
    max-width: 620px;
    margin: 32px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.34);
    list-style: none;
    overflow: hidden;
}

.setup-progress li {
    min-height: 62px;
    padding: 11px 13px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.setup-progress li + li {
    border-left: 1px solid var(--line);
}

.setup-progress span {
    color: var(--device-accent);
    font-size: 0.68rem;
    font-weight: 900;
}

.device-console {
    min-height: 330px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--device-accent) 52%, transparent);
    border-radius: 8px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        rgba(6, 6, 6, 0.78);
    background-size: 24px 24px, 24px 24px, auto;
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.42), inset 0 0 42px var(--device-soft);
}

.console-topline {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--dim);
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
}

.console-signal {
    height: 13px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
}

.console-signal i {
    width: 3px;
    background: var(--device-accent);
    box-shadow: 0 0 9px var(--device-glow);
    animation: signal 1.8s ease-in-out infinite alternate;
}

.console-signal i:nth-child(1) {
    height: 5px;
}

.console-signal i:nth-child(2) {
    height: 9px;
    animation-delay: 200ms;
}

.console-signal i:nth-child(3) {
    height: 13px;
    animation-delay: 400ms;
}

@keyframes signal {
    from { opacity: 0.35; }
    to { opacity: 1; }
}

.device-console img {
    width: 104px;
    height: 104px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 24px var(--device-glow));
}

.device-console p {
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.device-console strong {
    color: var(--text);
    font-size: 1.85rem;
    font-weight: 900;
    line-height: 1.15;
}

.console-status {
    margin-top: 24px;
    padding-top: 15px;
    display: flex;
    align-items: center;
    gap: 9px;
    border-top: 1px solid var(--line);
    color: var(--device-accent);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.console-status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--device-accent);
    box-shadow: 0 0 13px var(--device-accent);
}

.video-band {
    background: rgba(5, 5, 5, 0.56);
}

.guide-band {
    background: rgba(26, 15, 36, 0.68);
}

.content-grid {
    padding: 76px 32px;
    display: grid;
    grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.28fr);
    gap: 70px;
    align-items: start;
}

.section-heading {
    padding-top: 6px;
}

.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 2px solid color-mix(in srgb, var(--device-accent) 66%, transparent);
    border-radius: 8px;
    background: #000;
    box-shadow: 0 22px 64px rgba(0, 0, 0, 0.45), 0 0 38px var(--device-soft);
}

.video-frame::after {
    content: "FRIGHTMAPS VIDEO";
    position: absolute;
    right: 12px;
    bottom: 10px;
    z-index: 2;
    padding: 4px 7px;
    border-radius: 4px;
    background: rgba(5, 5, 5, 0.86);
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.58rem;
    font-weight: 900;
    pointer-events: none;
}

.video-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.prep-panel {
    margin-top: 28px;
    padding: 5px 20px;
    border: 1px solid color-mix(in srgb, var(--device-accent) 44%, transparent);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
}

.prep-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.prep-list li {
    position: relative;
    padding: 13px 0 13px 25px;
    color: var(--muted);
    font-size: 0.88rem;
}

.prep-list li + li {
    border-top: 1px solid var(--line);
}

.prep-list li::before {
    content: "";
    position: absolute;
    left: 1px;
    top: 21px;
    width: 9px;
    height: 9px;
    border: 2px solid var(--device-accent);
    border-radius: 2px;
    box-shadow: 0 0 9px var(--device-soft);
}

.steps-kicker {
    margin-bottom: 15px;
    color: var(--dim);
}

.steps-list {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
    list-style: none;
    counter-reset: setup-step;
}

.steps-list li {
    counter-increment: setup-step;
    position: relative;
    min-height: 104px;
    padding: 22px 22px 22px 84px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(5, 5, 5, 0.44);
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.steps-list li:hover {
    border-color: color-mix(in srgb, var(--device-accent) 58%, transparent);
    background: var(--device-soft);
    transform: translateX(3px);
}

.steps-list li::before {
    content: counter(setup-step, decimal-leading-zero);
    position: absolute;
    left: 21px;
    top: 22px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--device-accent) 62%, transparent);
    border-radius: 6px;
    background: var(--device-soft);
    color: var(--device-accent);
    font-size: 0.8rem;
    font-weight: 900;
}

.steps-list strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-size: 1.02rem;
}

.steps-list span {
    color: var(--muted);
    font-size: 0.92rem;
}

.coming-soon-band {
    background: rgba(26, 15, 36, 0.72);
}

.coming-soon-inner {
    padding: 76px 32px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
    align-items: center;
    gap: 70px;
}

.coming-soon-mark {
    min-height: 210px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px dashed color-mix(in srgb, var(--device-accent) 66%, transparent);
    border-radius: 8px;
    background: var(--device-soft);
}

.coming-soon-mark span,
.coming-soon-mark small {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.coming-soon-mark strong {
    margin: 6px 0 14px;
    color: var(--device-accent);
    font-size: 1.75rem;
    font-weight: 900;
}

.device-directory {
    background: rgba(5, 5, 5, 0.6);
}

.directory-inner {
    padding: 76px 32px;
}

.device-links {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.device-links a {
    min-height: 106px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text);
    font-size: 1rem;
    font-weight: 900;
    text-decoration: none;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.device-links a::before {
    content: "DEVICE GUIDE";
    margin-bottom: auto;
    color: var(--dim);
    font-size: 0.6rem;
    font-weight: 800;
}

.device-links a:nth-child(1) {
    --link-accent: var(--orange);
}

.device-links a:nth-child(2) {
    --link-accent: var(--green);
}

.device-links a:nth-child(3) {
    --link-accent: var(--red);
}

.device-links a:nth-child(4) {
    --link-accent: var(--violet);
}

.device-links a:hover,
.device-links a[aria-current="page"] {
    border-color: var(--link-accent);
    background: color-mix(in srgb, var(--link-accent) 11%, transparent);
    color: var(--link-accent);
    transform: translateY(-3px);
}

.device-links span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
}

.setup-footer {
    padding: 32px 32px max(32px, env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--dim);
    font-size: 0.8rem;
}

.setup-footer p {
    margin: 0;
}

.setup-footer a {
    color: var(--muted);
}

.setup-footer span {
    margin-right: 4px;
    font-size: 0.74rem;
}

[hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.1rem;
    }

    .setup-hero__inner {
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .device-console {
        min-height: 0;
        display: grid;
        grid-template-columns: 86px minmax(0, 1fr);
        grid-template-rows: auto auto auto auto;
        column-gap: 22px;
    }

    .console-topline,
    .console-status {
        grid-column: 1 / -1;
    }

    .device-console img {
        width: 86px;
        height: 86px;
        margin: 0;
        grid-row: 2 / 4;
    }

    .device-console p,
    .device-console strong {
        grid-column: 2;
    }

    .content-grid,
    .coming-soon-inner {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .device-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 2.3rem;
        line-height: 1.08;
    }

    h2 {
        font-size: 1.85rem;
    }

    .setup-header {
        min-height: 64px;
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }

    .brand-word {
        font-size: 1rem;
    }

    .brand-section,
    .header-actions > a:first-child {
        display: none;
    }

    .channel-link {
        max-width: 112px;
        text-align: right;
        line-height: 1.2;
    }

    .setup-hero__inner {
        padding: 50px 20px 44px;
        gap: 34px;
    }

    .setup-intro,
    .section-heading > p:last-of-type,
    .coming-soon-copy > p:last-child {
        font-size: 1rem;
    }

    .setup-progress {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .setup-progress li:nth-child(3) {
        border-left: 0;
    }

    .setup-progress li:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }

    .device-console {
        padding: 20px;
        grid-template-columns: 70px minmax(0, 1fr);
        column-gap: 16px;
    }

    .device-console img {
        width: 70px;
        height: 70px;
    }

    .device-console strong {
        font-size: 1.4rem;
    }

    .content-grid,
    .coming-soon-inner,
    .directory-inner {
        padding: 54px 20px;
    }

    .steps-list li {
        min-height: 0;
        padding: 18px 18px 18px 69px;
    }

    .steps-list li::before {
        left: 16px;
        top: 18px;
        width: 38px;
        height: 38px;
    }

    .device-links {
        grid-template-columns: 1fr;
    }

    .device-links a {
        min-height: 92px;
    }

    .setup-footer {
        padding-left: 20px;
        padding-right: 20px;
        flex-direction: column;
        gap: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .console-signal i {
        animation: none;
    }

    .steps-list li,
    .device-links a {
        transition: none;
    }
}
