:root {
    --bw-ink: #040b10;
    --bw-ink-soft: #08151b;
    --bw-teal: #65b6c4;
    --bw-teal-bright: #a8edf1;
    --bw-gold: #cba45f;
    --bw-gold-bright: #f2d99b;
    --bw-paper: #f6ead0;
    --bw-muted: #aebdc1;
    --bw-line: rgba(226, 195, 132, 0.3);
    --pointer-x: 0px;
    --pointer-y: 0px;
    --scroll-shift: 0px;
}

html {
    background: var(--bw-ink);
    color-scheme: dark;
}

body {
    overflow-x: hidden;
    background: var(--bw-ink);
}

.start-page {
    position: relative;
    isolation: isolate;
    overflow: clip;
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 18%, rgba(62, 137, 151, 0.2), transparent 42%),
        linear-gradient(180deg, #03090d 0%, #071218 60%, #03090d 100%);
}

.start-page::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(2, 7, 10, 0.92) 0%, rgba(2, 7, 10, 0.48) 26%, rgba(2, 7, 10, 0.08) 50%, rgba(2, 7, 10, 0.5) 78%, rgba(2, 7, 10, 0.9) 100%),
        linear-gradient(180deg, rgba(2, 7, 10, 0.18) 0%, rgba(2, 7, 10, 0.02) 42%, #071218 99%);
    content: "";
    mix-blend-mode: normal;
    pointer-events: none;
}

.start-page::after {
    position: fixed;
    inset: 0;
    z-index: 8;
    border: 1px solid rgba(231, 203, 146, 0.08);
    box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.34);
    content: "";
    pointer-events: none;
}

.hero-scene {
    position: absolute;
    inset: 0 0 auto;
    z-index: -3;
    height: max(760px, 100svh);
    overflow: hidden;
    pointer-events: none;
}

.hero-scene::before,
.hero-scene::after {
    position: absolute;
    content: "";
    pointer-events: none;
}

.hero-scene::before {
    inset: 0;
    z-index: 2;
    background:
        radial-gradient(circle at 52% 37%, rgba(96, 204, 220, 0.15), transparent 27%),
        linear-gradient(180deg, rgba(3, 8, 11, 0.04), rgba(4, 11, 15, 0.2) 57%, #071218 100%);
}

.hero-scene::after {
    top: -30%;
    left: 44%;
    z-index: 3;
    width: 34%;
    height: 110%;
    opacity: 0.2;
    background: linear-gradient(108deg, transparent 28%, rgba(170, 236, 243, 0.22) 48%, transparent 68%);
    filter: blur(20px);
    transform: translateX(-45%) rotate(2deg);
    animation: bw-light-sweep 11s ease-in-out infinite alternate;
}

.hero-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    filter: saturate(0.9) contrast(1.03) brightness(0.87);
    transform: translate3d(var(--pointer-x), calc(var(--pointer-y) + var(--scroll-shift)), 0) scale(1.045);
    transform-origin: center 45%;
    animation: bw-scene-breathe 18s ease-in-out infinite alternate;
    will-change: transform;
}

.hero-noise {
    position: absolute;
    inset: 0;
    z-index: 4;
    opacity: 0.08;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
}

#battle-embers {
    position: absolute;
    inset: 0 0 auto;
    z-index: -1;
    width: 100%;
    height: max(760px, 100svh);
    pointer-events: none;
}

.start-topbar {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 5;
    width: min(1320px, calc(100% - 48px));
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transform: translateX(-50%);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: var(--bw-paper);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.brand-sigil {
    position: relative;
    width: 42px;
    height: 48px;
    display: grid;
    place-items: center;
    color: #081015;
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: 900;
    background: linear-gradient(145deg, #f0d99e, #9e7133);
    clip-path: polygon(50% 0, 91% 17%, 84% 76%, 50% 100%, 16% 76%, 9% 17%);
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.42));
}

.brand-sigil::after {
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(7, 18, 24, 0.58);
    content: "";
    clip-path: inherit;
}

.brand-copy {
    display: grid;
    gap: 3px;
}

.brand-copy strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    letter-spacing: 0.18em;
}

.brand-copy span {
    color: rgba(214, 230, 232, 0.64);
    font-size: 9px;
    letter-spacing: 0.24em;
}

.start-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 13px;
    border: 1px solid rgba(130, 196, 205, 0.2);
    border-radius: 999px;
    color: #c5d9dc;
    background: rgba(4, 13, 17, 0.44);
    backdrop-filter: blur(10px);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.start-status::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #8bd2b0;
    box-shadow: 0 0 0 4px rgba(139, 210, 176, 0.1), 0 0 14px rgba(139, 210, 176, 0.6);
    content: "";
    animation: bw-status-pulse 2.6s ease-in-out infinite;
}

.hero {
    position: relative;
    z-index: 2;
    width: min(1320px, calc(100% - 48px));
    min-height: max(760px, 100svh);
    margin: 0 auto;
    padding: 126px 0 72px;
    display: grid;
    grid-template-columns: minmax(350px, 480px) minmax(260px, 1fr) 330px;
    gap: 26px;
    align-items: center;
}

.hero-copy {
    grid-column: 1;
    max-width: 480px;
    padding: 32px 0 0;
    filter: drop-shadow(0 18px 44px rgba(0, 0, 0, 0.5));
    animation: bw-reveal-left 0.9s cubic-bezier(0.2, 0.75, 0.24, 1) both;
}

.eyebrow {
    margin-bottom: 16px;
    color: var(--bw-gold-bright);
    letter-spacing: 0.2em;
}

.eyebrow::before {
    width: 48px;
    background: linear-gradient(90deg, transparent, var(--bw-gold-bright));
    box-shadow: 0 0 12px rgba(235, 200, 130, 0.5);
}

h1 {
    max-width: 470px;
    color: var(--bw-paper);
    font-size: clamp(55px, 6.4vw, 96px);
    line-height: 0.86;
    letter-spacing: -0.035em;
    text-wrap: balance;
    text-shadow: 0 5px 24px rgba(0, 0, 0, 0.82), 0 0 42px rgba(94, 171, 183, 0.12);
}

.lead {
    max-width: 455px;
    margin-top: 24px;
    color: #d4e0e2;
    font-size: clamp(16px, 1.5vw, 19px);
    line-height: 1.68;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 28px;
}

.hero-point {
    min-height: 0;
    padding: 9px 12px;
    border: 1px solid rgba(223, 194, 135, 0.2);
    border-radius: 999px;
    background: rgba(4, 13, 17, 0.44);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
}

.hero-point strong {
    margin: 0;
    color: #ead6a8;
    font-size: 11px;
    letter-spacing: 0.04em;
}

.hero-point span {
    display: none;
}

.login-card {
    position: relative;
    grid-column: 3;
    width: 100%;
    align-self: center;
    overflow: hidden;
    border: 1px solid rgba(231, 203, 145, 0.3);
    border-radius: 20px;
    padding: 22px;
    background:
        linear-gradient(145deg, rgba(17, 34, 40, 0.86), rgba(3, 10, 14, 0.82)),
        radial-gradient(circle at 100% 0, rgba(111, 194, 207, 0.13), transparent 35%);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.54), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(18px) saturate(1.16);
    animation: bw-reveal-right 0.9s 0.12s cubic-bezier(0.2, 0.75, 0.24, 1) both;
}

.login-card::before {
    position: absolute;
    top: 0;
    left: -70%;
    width: 48%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #f2d99b, transparent);
    content: "";
    animation: bw-card-shine 6s 1.5s ease-in-out infinite;
}

.login-card::after {
    position: absolute;
    inset: auto 20px 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(100, 185, 199, 0.4), transparent);
    content: "";
}

.login-card h2 {
    margin-bottom: 4px;
    color: var(--bw-paper);
    font-size: 25px;
}

.login-card p {
    margin-bottom: 16px;
    color: #9eb0b5;
    font-size: 12px;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.form-group input {
    height: 43px;
    border-color: rgba(215, 185, 130, 0.22);
    border-radius: 10px;
    padding: 0 13px;
    background: rgba(0, 5, 8, 0.58);
    font-size: 14px;
}

.form-group input::placeholder {
    color: #71858a;
}

.form-group input:focus {
    border-color: rgba(139, 210, 220, 0.66);
    box-shadow: 0 0 0 3px rgba(104, 184, 196, 0.1), 0 0 24px rgba(104, 184, 196, 0.08);
}

.message {
    margin-bottom: 10px;
    padding: 9px 11px;
    border-radius: 9px;
    font-size: 12px;
}

.actions {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 13px;
}

.btn-main,
.btn-secondary {
    position: relative;
    min-height: 42px;
    overflow: hidden;
    border-radius: 10px;
    font-size: 11px;
    letter-spacing: 0.07em;
}

.btn-main {
    background: linear-gradient(135deg, #f1d99d 0%, #b6813d 78%);
    box-shadow: 0 12px 26px rgba(175, 125, 54, 0.24);
}

.btn-main::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.36) 48%, transparent 70%);
    content: "";
    transform: translateX(-130%);
    transition: transform 0.65s ease;
}

.btn-main:hover::after {
    transform: translateX(130%);
}

.btn-main:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
}

.below-fold {
    position: relative;
    z-index: 2;
    width: min(1160px, calc(100% - 48px));
    margin-top: -1px;
    padding: 44px 0 80px;
    gap: 16px;
}

.below-fold::before {
    position: absolute;
    top: 0;
    left: 50%;
    width: min(900px, 80vw);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(221, 193, 135, 0.36), transparent);
    content: "";
    transform: translateX(-50%);
}

.seo-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding: 26px;
    background: linear-gradient(145deg, rgba(12, 27, 33, 0.72), rgba(4, 12, 16, 0.66));
    transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}

.seo-card:hover {
    border-color: rgba(225, 195, 133, 0.46);
    background: linear-gradient(145deg, rgba(15, 34, 41, 0.8), rgba(5, 15, 19, 0.7));
    transform: translateY(-4px);
}

.seo-card h2 {
    font-size: 23px;
}

.seo-card p {
    color: #b8c7ca;
    font-size: 14px;
    line-height: 1.75;
}

.scroll-cue {
    position: absolute;
    bottom: 23px;
    left: 50%;
    z-index: 3;
    display: grid;
    justify-items: center;
    gap: 6px;
    color: rgba(215, 230, 232, 0.52);
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    transform: translateX(-50%);
}

.scroll-cue::after {
    width: 1px;
    height: 30px;
    background: linear-gradient(180deg, rgba(225, 198, 140, 0.78), transparent);
    content: "";
    animation: bw-scroll-cue 2.2s ease-in-out infinite;
}

@keyframes bw-scene-breathe {
    from { transform: translate3d(var(--pointer-x), calc(var(--pointer-y) + var(--scroll-shift)), 0) scale(1.045); }
    to { transform: translate3d(var(--pointer-x), calc(var(--pointer-y) + var(--scroll-shift) - 7px), 0) scale(1.065); }
}

@keyframes bw-light-sweep {
    from { opacity: 0.08; transform: translateX(-72%) rotate(2deg); }
    to { opacity: 0.28; transform: translateX(5%) rotate(2deg); }
}

@keyframes bw-card-shine {
    0%, 55% { left: -70%; opacity: 0; }
    68% { opacity: 1; }
    82%, 100% { left: 122%; opacity: 0; }
}

@keyframes bw-status-pulse {
    0%, 100% { opacity: 0.62; transform: scale(0.92); }
    50% { opacity: 1; transform: scale(1.08); }
}

@keyframes bw-reveal-left {
    from { opacity: 0; transform: translate3d(-28px, 18px, 0); }
    to { opacity: 1; transform: none; }
}

@keyframes bw-reveal-right {
    from { opacity: 0; transform: translate3d(30px, 18px, 0); }
    to { opacity: 1; transform: none; }
}

@keyframes bw-scroll-cue {
    0%, 100% { opacity: 0.25; transform: scaleY(0.55); transform-origin: top; }
    50% { opacity: 0.9; transform: scaleY(1); transform-origin: top; }
}

@media (max-width: 1100px) {
    .hero {
        grid-template-columns: minmax(320px, 430px) minmax(120px, 1fr) 300px;
    }

    .hero-scene {
        opacity: 0.93;
    }

    .hero-art {
        object-position: 51% center;
    }

    h1 {
        font-size: clamp(54px, 7.5vw, 76px);
    }
}

@media (max-width: 860px) {
    .start-page::before {
        background:
            linear-gradient(180deg, rgba(2, 7, 10, 0.74) 0%, rgba(2, 7, 10, 0.16) 30%, rgba(2, 7, 10, 0.5) 58%, #071218 100%),
            linear-gradient(90deg, rgba(2, 7, 10, 0.55), rgba(2, 7, 10, 0.12), rgba(2, 7, 10, 0.58));
    }

    .start-topbar {
        width: calc(100% - 28px);
        min-height: 72px;
    }

    .brand-copy span,
    .start-status {
        display: none;
    }

    .brand-sigil {
        width: 36px;
        height: 41px;
    }

    .hero {
        width: min(620px, calc(100% - 28px));
        min-height: 980px;
        padding: 92px 0 72px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 20px;
    }

    .hero-copy {
        width: 100%;
        max-width: 560px;
        padding-top: 10px;
        align-self: flex-start;
    }

    h1 {
        max-width: 500px;
        font-size: clamp(54px, 14vw, 78px);
    }

    .lead {
        max-width: 480px;
        font-size: 15px;
    }

    .hero-scene,
    #battle-embers {
        height: 980px;
    }

    .hero-art {
        object-position: 53% center;
    }

    .login-card {
        width: min(100%, 380px);
        margin-top: auto;
        align-self: flex-end;
    }

    .below-fold {
        grid-template-columns: 1fr;
        width: min(620px, calc(100% - 28px));
        padding-bottom: 50px;
    }

    .scroll-cue {
        display: none;
    }
}

@media (max-width: 560px) {
    .hero {
        min-height: 920px;
    }

    .hero-scene,
    #battle-embers {
        height: 920px;
    }

    .hero-scene::before {
        background:
            linear-gradient(180deg, rgba(2, 7, 10, 0.15), rgba(3, 9, 12, 0.06) 45%, #071218 95%),
            radial-gradient(circle at 50% 30%, transparent, rgba(1, 5, 7, 0.24));
    }

    .hero-art {
        object-position: 52% center;
        filter: saturate(0.82) contrast(1.02) brightness(0.78);
    }

    .hero-copy {
        text-align: center;
    }

    .eyebrow {
        justify-content: center;
        font-size: 10px;
    }

    h1 {
        margin-inline: auto;
        font-size: clamp(50px, 16vw, 68px);
    }

    .lead {
        margin-inline: auto;
        font-size: 14px;
        line-height: 1.55;
    }

    .hero-points {
        justify-content: center;
    }

    .hero-point {
        padding: 8px 10px;
    }

    .login-card {
        width: 100%;
        padding: 18px;
    }

    .actions {
        grid-template-columns: 1fr;
    }

    .seo-card {
        padding: 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-art {
        transform: scale(1.045);
    }

    #battle-embers {
        display: none;
    }
}
