:root {
    color-scheme: dark;
    --bg: #070806;
    --panel: rgba(13, 17, 15, 0.82);
    --panel-solid: #111713;
    --text: #f3f4eb;
    --muted: #bac2b5;
    --line: rgba(225, 233, 214, 0.24);
    --accent: #d8ff73;
    --accent-2: #6ee7c8;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    min-height: 100%;
    margin: 0;
    background: var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 1rem clamp(1rem, 4vw, 3rem);
    background: linear-gradient(180deg, rgba(7, 8, 6, 0.88), rgba(7, 8, 6, 0));
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand img {
    display: block;
    width: 42px;
    height: 42px;
    border-radius: 9px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.nav a {
    padding: 0.55rem 0.7rem;
    border-radius: 6px;
}

.nav__cta {
    border: 1px solid var(--line);
    background: rgba(13, 17, 15, 0.78);
    color: var(--text);
    font-weight: 800;
}

.nav a:hover,
.nav a:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.hero {
    position: relative;
    display: grid;
    min-height: 92vh;
    overflow: hidden;
    place-items: end start;
    padding: 7rem clamp(1rem, 5vw, 5rem) clamp(3rem, 7vw, 5rem);
}

.hero__media {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(7, 8, 6, 0.86), rgba(7, 8, 6, 0.32) 52%, rgba(7, 8, 6, 0.74)),
        linear-gradient(180deg, rgba(7, 8, 6, 0.18), rgba(7, 8, 6, 0.84)),
        url("/assets/img/dawson-city-panorama.jpg");
    background-position: center;
    background-size: cover;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 840px;
}

.eyebrow {
    margin: 0 0 0.9rem;
    color: var(--accent-2);
    font-family: "Courier New", monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

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

h1 {
    margin-bottom: 1rem;
    font-size: clamp(5rem, 18vw, 13rem);
    letter-spacing: 0;
    line-height: 0.78;
}

h2 {
    margin-bottom: 0.65rem;
    font-size: clamp(1.35rem, 3vw, 2.45rem);
    line-height: 1;
}

.hero__summary {
    max-width: 700px;
    margin-bottom: 0;
    color: #e2e8dc;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    line-height: 1.42;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.8rem;
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(13, 17, 15, 0.78);
    color: var(--text);
    font-weight: 800;
}

.button--primary {
    border-color: transparent;
    background: var(--accent);
    color: #182006;
}

.overview,
.story,
.runtime-status,
.app-preview,
.access {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.story {
    padding: 4rem 0 2rem;
}

.story h2 {
    max-width: 880px;
}

.story p:last-child {
    max-width: 760px;
    color: var(--muted);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    line-height: 1.5;
}

.overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    padding: 1rem 0 4rem;
}

.overview article,
.runtime-status,
.app-preview,
.access {
    border: 1px solid var(--line);
    background: var(--panel);
    backdrop-filter: blur(10px);
}

.overview article {
    min-height: 250px;
    padding: 1.2rem;
}

.overview span {
    display: block;
    margin-bottom: 2.4rem;
    color: var(--accent-2);
    font-family: "Courier New", monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.overview p {
    color: var(--muted);
    line-height: 1.55;
}

.overview article > a {
    display: inline-flex;
    margin-top: 1rem;
    color: var(--accent);
    font-weight: 800;
}

.runtime-status {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 2rem;
    margin-bottom: 1rem;
    padding: clamp(1.2rem, 4vw, 2rem);
}

.runtime-status ul {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.runtime-status li {
    display: grid;
    gap: 0.18rem;
    padding: 0.85rem;
    border: 1px solid rgba(225, 233, 214, 0.18);
    border-radius: 6px;
    background: rgba(7, 8, 6, 0.42);
}

.runtime-status strong {
    color: var(--text);
}

.runtime-status span {
    color: var(--muted);
    line-height: 1.45;
}

.app-preview,
.access {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 2rem;
    padding: clamp(1.2rem, 4vw, 2rem);
}

.app-preview {
    margin-bottom: 1rem;
}

.access {
    margin-bottom: 4rem;
}

.app-preview p,
.access p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.app-preview .button,
.access .button {
    margin-top: 1.5rem;
    margin-right: 0.6rem;
}

.account-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 7rem 1rem 3rem;
    background-image:
        linear-gradient(90deg, rgba(7, 8, 6, 0.88), rgba(7, 8, 6, 0.58)),
        url("/assets/img/dawson-city-panorama.jpg");
    background-position: center;
    background-size: cover;
}

.account-panel {
    width: min(460px, 100%);
    padding: 1.4rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    backdrop-filter: blur(10px);
}

.account-panel h1 {
    margin-bottom: 0.8rem;
    font-size: clamp(2.6rem, 11vw, 5rem);
    line-height: 0.9;
}

.account-copy {
    color: var(--muted);
    line-height: 1.5;
}

.account-form {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.2rem;
}

.account-form label {
    display: grid;
    gap: 0.35rem;
    color: var(--muted);
    font-weight: 800;
}

.account-form input {
    min-height: 42px;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(7, 8, 6, 0.74);
    color: var(--text);
    font: inherit;
}

.account-error {
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(255, 150, 150, 0.5);
    border-radius: 6px;
    background: rgba(110, 25, 25, 0.32);
    color: #ffd5d5;
}

.account-details {
    display: grid;
    gap: 0.7rem;
    margin: 1.2rem 0;
}

.account-details div {
    display: grid;
    gap: 0.2rem;
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(7, 8, 6, 0.48);
}

.account-details span {
    color: var(--accent-2);
    font-family: "Courier New", monospace;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.account-details strong {
    overflow-wrap: anywhere;
}

.start-page,
.legal-page {
    min-height: 100vh;
    padding: 7rem clamp(1rem, 5vw, 5rem) 3rem;
    background-image:
        linear-gradient(90deg, rgba(7, 8, 6, 0.9), rgba(7, 8, 6, 0.58)),
        url("/assets/img/dawson-city-panorama.jpg");
    background-position: center;
    background-size: cover;
}

.start-shell {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.start-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.start-header h1,
.legal-panel h1 {
    margin-bottom: 0;
    font-size: clamp(2.4rem, 7vw, 5.4rem);
    line-height: 0.9;
}

.start-user {
    display: grid;
    gap: 0.2rem;
    min-width: min(280px, 100%);
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    background: rgba(13, 17, 15, 0.78);
    text-align: right;
}

.start-user span,
.start-panel dt {
    color: var(--accent-2);
    font-family: "Courier New", monospace;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.start-user strong {
    overflow-wrap: anywhere;
}

.start-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
    gap: 1rem;
}

.service-list {
    display: grid;
    gap: 0.65rem;
}

.service-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    min-height: 96px;
    padding: 1rem;
    border: 1px solid var(--line);
    background: rgba(13, 17, 15, 0.86);
    backdrop-filter: blur(10px);
}

.service-row:hover,
.service-row:focus-visible {
    border-color: rgba(216, 255, 115, 0.58);
    background: rgba(22, 30, 23, 0.92);
}

.service-row--disabled {
    opacity: 0.72;
}

.service-row--disabled:hover {
    border-color: var(--line);
    background: rgba(13, 17, 15, 0.86);
}

.service-row__status {
    color: var(--accent);
    font-family: "Courier New", monospace;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.service-row strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1.25rem;
}

.service-row p {
    margin: 0;
    color: var(--muted);
    line-height: 1.4;
}

.service-row__action {
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 800;
}

.start-panel {
    padding: 1rem;
    border: 1px solid var(--line);
    background: rgba(13, 17, 15, 0.86);
    backdrop-filter: blur(10px);
}

.start-panel dl {
    display: grid;
    gap: 0.8rem;
    margin: 1rem 0;
}

.start-panel dt,
.start-panel dd {
    margin: 0;
}

.start-panel dd {
    margin-top: 0.2rem;
    color: var(--text);
    overflow-wrap: anywhere;
}

.start-panel .button {
    width: 100%;
}

.legal-panel {
    width: min(780px, 100%);
    margin: 0 auto;
    padding: 1.4rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    backdrop-filter: blur(10px);
}

.legal-panel p {
    color: var(--muted);
    line-height: 1.6;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem clamp(1rem, 4vw, 3rem);
    border-top: 1px solid var(--line);
    background: #070806;
    color: var(--muted);
}

.site-footer div {
    display: grid;
    gap: 0.2rem;
}

.site-footer strong {
    color: var(--text);
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.85rem;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: var(--text);
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.auth-modal[hidden] {
    display: none;
}

.auth-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 8, 6, 0.78);
}

.auth-modal__panel {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
}

.auth-modal__panel.account-page {
    display: block;
    min-height: auto;
    padding: 0;
    background: none;
}

.auth-modal__close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(7, 8, 6, 0.68);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
}

@media (max-width: 820px) {
    .site-header,
    .nav,
    .overview,
    .runtime-status,
    .app-preview,
    .access {
        display: block;
    }

    .nav {
        margin-top: 0.7rem;
    }

    .nav a {
        display: inline-flex;
    }

    .hero {
        min-height: 86vh;
        padding-top: 8rem;
    }

    .overview article + article {
        margin-top: 0.75rem;
    }

    .start-header,
    .start-layout,
    .site-footer {
        display: block;
    }

    .start-user {
        margin-top: 1rem;
        text-align: left;
    }

    .service-row {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .start-panel {
        margin-top: 0.75rem;
    }

    .site-footer nav {
        justify-content: flex-start;
        margin-top: 1rem;
    }

    .app-preview p,
    .access p,
    .runtime-status ul {
        margin-top: 1.4rem;
    }
}
