:root {
    --background: #05070b;
    --surface: #0a0f17;
    --surface-raised: #0d1420;
    --surface-hover: #111b2a;
    --border: rgba(131, 160, 201, 0.15);
    --border-strong: rgba(78, 143, 238, 0.34);
    --text: #f3f7fd;
    --muted: #8490a2;
    --blue: #2378ff;
    --blue-light: #6ca6ff;
    --cyan: #5ad8ff;
    --success: #5fe6ad;
    --danger: #ff7380;
    --shell: min(1180px, calc(100% - 40px));
    --shadow: 0 35px 100px rgba(0, 0, 0, 0.48);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 86px;
}

body {
    min-width: 320px;
    margin: 0;
    color: var(--text);
    background: var(--background);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body::before {
    position: fixed;
    z-index: -3;
    inset: 0;
    content: "";
    pointer-events: none;
    background:
        linear-gradient(rgba(94, 137, 198, 0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(94, 137, 198, 0.026) 1px, transparent 1px);
    background-size: 48px 48px;
}

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

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.shell {
    width: var(--shell);
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    color: #fff;
    border-radius: 8px;
    background: var(--blue);
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: fixed;
    z-index: 100;
    top: 0;
    right: 0;
    left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
    background: rgba(5, 7, 11, 0.8);
    backdrop-filter: blur(18px);
}

.nav {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.brand__logo {
    display: block;
    width: 184px;
    height: auto;
    filter: brightness(0) invert(1);
}

.button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 22px;
    color: #fff;
    border: 1px solid rgba(95, 157, 255, 0.46);
    border-radius: 12px;
    background: linear-gradient(135deg, #1264e7, #19499a);
    box-shadow: 0 12px 36px rgba(24, 98, 218, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 720;
    letter-spacing: 0.015em;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.button:hover,
.button:focus-visible {
    border-color: rgba(123, 179, 255, 0.86);
    box-shadow: 0 16px 46px rgba(24, 98, 218, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.button:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
}

.button:disabled,
.keypad button:disabled,
input:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.button--small {
    min-height: 40px;
    padding-inline: 17px;
    margin-left: 8px;
}

.button--full {
    width: 100%;
    min-height: 46px;
    margin-top: 14px;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    color: var(--blue-light);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.eyebrow > span {
    width: 24px;
    height: 1px;
    background: var(--blue-light);
    box-shadow: 0 0 10px var(--blue);
}

.hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    padding: 145px 0 82px;
    border-bottom: 1px solid var(--border);
}

.hero__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(460px, 1fr);
    align-items: center;
    gap: 70px;
}

.hero h1,
.access-card h1 {
    margin: 0;
    font-weight: 660;
    letter-spacing: -0.052em;
    line-height: 1;
}

.hero h1 {
    max-width: 690px;
    font-size: clamp(60px, 6vw, 87px);
}

.hero h1 em,
.access-card h1 em {
    color: var(--blue-light);
    font-style: normal;
    text-shadow: 0 0 45px rgba(35, 120, 255, 0.28);
}

.hero__lead {
    max-width: 520px;
    margin: 28px 0 0;
    color: #96a2b4;
    font-size: 17px;
    line-height: 1.7;
}

.back-link {
    color: #b6c1d0;
    font-size: 13px;
    font-weight: 650;
    transition: color 180ms ease;
}

.back-link span {
    display: inline-block;
    margin-left: 7px;
    color: var(--blue-light);
    transition: transform 180ms ease;
}

.back-link:hover {
    color: #fff;
}

.workspace-visual {
    position: relative;
    display: grid;
    min-height: 520px;
    place-items: center;
}

.workspace-window {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    border: 1px solid rgba(118, 161, 218, 0.23);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(16, 24, 36, 0.98), rgba(7, 11, 17, 0.99));
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.workspace-toolbar {
    display: grid;
    min-height: 56px;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 0 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.012);
}

.window-dots,
.toolbar-actions,
.toolbar-path {
    display: flex;
    align-items: center;
}

.window-dots {
    gap: 5px;
}

.window-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #29364a;
}

.toolbar-path {
    min-width: 0;
    gap: 9px;
}

.toolbar-path i {
    position: relative;
    width: 15px;
    height: 11px;
    border-radius: 2px;
    background: #2b73dc;
}

.toolbar-path i::before {
    position: absolute;
    top: -3px;
    left: 1px;
    width: 6px;
    height: 4px;
    content: "";
    border-radius: 2px 2px 0 0;
    background: #2b73dc;
}

.toolbar-path span {
    display: block;
    width: 54px;
    height: 5px;
    border-radius: 6px;
    background: #263347;
}

.toolbar-path span:last-child {
    width: 32px;
    opacity: 0.6;
}

.toolbar-actions {
    gap: 8px;
}

.toolbar-actions i {
    display: block;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(120, 151, 194, 0.13);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.015);
}

.folder-list {
    padding: 14px;
}

.folder-row {
    display: grid;
    min-height: 62px;
    grid-template-columns: 38px 1fr 72px 20px;
    align-items: center;
    gap: 15px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: 11px;
}

.folder-row + .folder-row {
    border-top-color: rgba(131, 160, 201, 0.06);
}

.folder-row--selected {
    border-color: rgba(70, 139, 239, 0.22);
    background: linear-gradient(90deg, rgba(35, 120, 255, 0.11), rgba(35, 120, 255, 0.025));
    box-shadow: inset 2px 0 0 rgba(78, 148, 255, 0.8);
}

.folder-icon {
    position: relative;
    display: block;
    width: 27px;
    height: 20px;
    border: 1px solid rgba(102, 169, 255, 0.54);
    border-radius: 4px;
    background: linear-gradient(145deg, rgba(43, 117, 226, 0.42), rgba(25, 75, 153, 0.32));
    box-shadow: 0 6px 18px rgba(27, 96, 200, 0.14);
}

.folder-icon::before {
    position: absolute;
    top: -5px;
    left: 2px;
    width: 11px;
    height: 5px;
    content: "";
    border: 1px solid rgba(102, 169, 255, 0.54);
    border-bottom: 0;
    border-radius: 3px 3px 0 0;
    background: rgba(43, 117, 226, 0.35);
}

.folder-name,
.folder-meta {
    display: block;
    height: 6px;
    border-radius: 8px;
    background: #2a3649;
}

.folder-name--long {
    width: 68%;
}

.folder-name--medium {
    width: 53%;
}

.folder-name--short {
    width: 38%;
}

.folder-meta {
    width: 58px;
    justify-self: end;
    opacity: 0.45;
}

.folder-meta--short {
    width: 42px;
}

.folder-menu {
    position: relative;
    width: 3px;
    height: 3px;
    justify-self: end;
    border-radius: 50%;
    background: #42516a;
    box-shadow: 0 -6px 0 #42516a, 0 6px 0 #42516a;
}

.workspace-footer {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    padding: 0 19px;
    border-top: 1px solid var(--border);
}

.workspace-footer > span {
    width: 72px;
    height: 5px;
    border-radius: 8px;
    background: #202b3b;
}

.workspace-footer div {
    display: flex;
    gap: 5px;
}

.workspace-footer i {
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #314158;
}

.access-card__badge {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(91, 154, 242, 0.31);
    border-radius: 14px;
    background: rgba(35, 120, 255, 0.09);
}

.access-card__badge span {
    position: relative;
    display: block;
    width: 16px;
    height: 18px;
    border: 1.5px solid var(--blue-light);
    border-radius: 4px;
    box-shadow: 0 0 12px rgba(74, 146, 255, 0.24);
}

.access-card__badge span::before {
    position: absolute;
    top: -8px;
    left: 3px;
    width: 7px;
    height: 8px;
    content: "";
    border: 1.5px solid var(--blue-light);
    border-bottom: 0;
    border-radius: 5px 5px 0 0;
}

/* Build access */
.access-page {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 50% 40%, rgba(22, 80, 169, 0.16), transparent 30%),
        var(--background);
}

.access-page::after {
    position: fixed;
    z-index: -1;
    top: 50%;
    left: 50%;
    width: 610px;
    height: 610px;
    content: "";
    border: 1px solid rgba(70, 133, 221, 0.075);
    border-radius: 50%;
    transform: translate(-50%, -44%);
    box-shadow: 0 0 0 90px rgba(67, 128, 213, 0.016), 0 0 0 180px rgba(67, 128, 213, 0.01);
}

.access-noise {
    position: fixed;
    z-index: -1;
    inset: 0;
    opacity: 0.3;
    pointer-events: none;
    background-image: radial-gradient(rgba(111, 161, 225, 0.2) 0.6px, transparent 0.6px);
    background-size: 7px 7px;
    mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.access-header {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
}

.access-main {
    display: grid;
    min-height: calc(100vh - 76px);
    place-items: center;
    padding: 20px 20px 45px;
}

.access-card {
    position: relative;
    width: min(100%, 410px);
    padding: 28px 30px 24px;
    border: 1px solid rgba(108, 157, 222, 0.2);
    border-radius: 22px;
    background: linear-gradient(155deg, rgba(15, 22, 33, 0.98), rgba(7, 11, 17, 0.99));
    box-shadow: 0 40px 110px rgba(0, 0, 0, 0.55), 0 0 80px rgba(11, 72, 157, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.access-card__heading {
    display: flex;
    align-items: center;
    gap: 17px;
}

.access-card__badge {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
}

.access-card .eyebrow {
    margin-bottom: 8px;
}

.access-card h1 {
    font-size: 32px;
}

.access-card__lead {
    margin: 17px 0 20px;
    color: #7f8b9d;
    font-size: 12px;
    line-height: 1.6;
}

.form-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 12px;
    color: #ffc0c6;
    border: 1px solid rgba(255, 111, 124, 0.22);
    border-radius: 9px;
    background: rgba(255, 86, 102, 0.07);
    font-size: 10px;
    line-height: 1.4;
}

.form-alert span {
    display: grid;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 111, 124, 0.35);
    border-radius: 50%;
    font-size: 9px;
    font-weight: 800;
}

.form-alert p {
    margin: 0;
}

.form-alert[hidden] {
    display: none;
}

.access-form > label {
    display: block;
    margin-bottom: 7px;
    color: #9ba8ba;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.password-field {
    position: relative;
}

.password-field input {
    width: 100%;
    height: 50px;
    padding: 0 44px 0 17px;
    color: #fff;
    border: 1px solid rgba(112, 151, 204, 0.22);
    border-radius: 10px;
    outline: 0;
    background: #080c12;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 19px;
    letter-spacing: 0.35em;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.password-field input:focus {
    border-color: rgba(85, 156, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(35, 120, 255, 0.1), 0 0 28px rgba(35, 120, 255, 0.08);
}

.password-field input.is-invalid {
    border-color: rgba(255, 111, 124, 0.75);
    animation: shake 300ms ease;
}

.password-field__status {
    position: absolute;
    top: 50%;
    right: 17px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #334055;
    transform: translateY(-50%);
}

.password-field input:focus + .password-field__status {
    background: var(--blue-light);
    box-shadow: 0 0 10px var(--blue);
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin-top: 12px;
}

.keypad button {
    min-height: 40px;
    color: #b9c5d4;
    border: 1px solid rgba(112, 151, 204, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.018);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    cursor: pointer;
    transition: color 150ms ease, border-color 150ms ease, background 150ms ease, transform 100ms ease;
}

.keypad button:hover {
    color: #fff;
    border-color: rgba(91, 154, 242, 0.36);
    background: rgba(35, 120, 255, 0.08);
}

.keypad button:active {
    transform: scale(0.96);
}

.keypad .keypad__action {
    color: #718096;
}

.keypad .keypad__submit {
    color: #fff;
    border-color: rgba(91, 154, 242, 0.4);
    background: rgba(35, 120, 255, 0.18);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    33% { transform: translateX(-5px); }
    66% { transform: translateX(5px); }
}

@media (max-width: 1000px) {
    .hero__grid {
        grid-template-columns: 1fr;
    }

    .hero__copy {
        max-width: 760px;
    }

    .workspace-visual {
        width: min(100%, 590px);
        margin: 10px auto 0;
    }
}

@media (max-width: 720px) {
    :root {
        --shell: min(100% - 28px, 1180px);
    }

    .nav {
        min-height: 68px;
    }

    .brand__logo {
        width: 145px;
    }

    .hero {
        min-height: auto;
        padding: 120px 0 60px;
    }

    .hero h1 {
        font-size: clamp(49px, 15vw, 68px);
    }

    .hero__lead {
        font-size: 15px;
    }

    .workspace-visual {
        min-height: 420px;
    }

    .folder-list {
        padding: 10px;
    }

    .folder-row {
        min-height: 55px;
        grid-template-columns: 34px 1fr 45px 12px;
        gap: 10px;
        padding-inline: 10px;
    }

    .folder-meta {
        width: 38px;
    }

    .access-header {
        min-height: 68px;
    }

    .access-header .brand__logo {
        width: 138px;
    }

    .access-main {
        min-height: calc(100vh - 68px);
        padding: 12px 14px 28px;
    }

    .access-card {
        padding: 24px 20px 20px;
    }

    .access-card h1 {
        font-size: 28px;
    }
}

@media (max-height: 720px) and (min-width: 721px) {
    .access-header {
        min-height: 64px;
    }

    .access-main {
        min-height: calc(100vh - 64px);
        padding-block: 10px 20px;
    }

    .access-card {
        padding-block: 22px 18px;
    }

    .keypad button {
        min-height: 36px;
    }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
