/*
 * webmunkeez — CRT green-phosphor terminal.
 * Design handoff: "Logo Webmunkeez rétro" (high fidelity, exact values).
 * Single committed look, dark only. No border-radius anywhere, no CSS
 * transitions — state changes are instant, it's a terminal.
 */

@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/ibm-plex-mono-400-78NWkmx.woff2") format('woff2');
}

@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/ibm-plex-mono-500-QJNNIVc.woff2") format('woff2');
}

:root {
    --bg: #0a0d0b;
    --phosphor: #7defa6;
    --white: #e8fff0;
    --dim: #79b394;
    --line: #1b2a21;
    --hover-bg: #101a14;
    --control: #2e5340;
    --overlay: rgba(4, 7, 5, 0.82);

    --sign-glow: 0 0 1.625rem rgba(125, 239, 166, 0.35);
    --modal-glow: 0 0 3.75rem rgba(125, 239, 166, 0.14);
    --scanlines: repeating-linear-gradient(to bottom, rgba(125, 239, 166, 0.045) 0 1px, transparent 1px 3px);
    --halo: radial-gradient(ellipse at 50% 40%, rgba(125, 239, 166, 0.07), transparent 62%);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--phosphor);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-weight: 400;
    line-height: 1.5;
}

img {
    display: block;
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

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

/* ---- screen ---- */

.screen {
    position: relative;
    min-height: 100vh;
    padding: 0 1.25rem;
    background: var(--bg);
    overflow: hidden;
}

.screen__layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.screen__layer--scanlines {
    background-image: var(--scanlines);
}

.screen__layer--halo {
    background: var(--halo);
}

.shell {
    position: relative;
    max-width: 47.5rem;
    margin: 0 auto;
    padding: 2rem 0 4rem;
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

/* ---- status bar ---- */

.statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--dim);
    letter-spacing: 0.08em;
}

/* ---- logo ---- */

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 0 0;
}

.logo__sign {
    font-size: clamp(4rem, 17vw, 9.25rem);
    font-weight: 500;
    line-height: 0.9;
    letter-spacing: -0.06em;
    color: var(--phosphor);
    text-shadow: var(--sign-glow);
}

.logo__caption {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.logo__word {
    font-size: clamp(1.25rem, 4.4vw, 1.875rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--white);
}

.logo__est {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--dim);
}

/* ---- shell session ---- */

.session {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.75;
}

/* rendered as <h2> for document structure — kept visually a prompt line */
.prompt {
    display: flex;
    gap: 0.75rem;
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.prompt__sigil {
    flex: none;
    color: var(--dim);
}

.prompt__cmd {
    color: var(--white);
}

.answer {
    margin: 0 0 1.5rem 1.25rem;
    color: var(--phosphor);
    text-wrap: pretty;
}

.answer--tight {
    margin-bottom: 0;
}

.answer a,
.footer__meta a {
    color: var(--phosphor);
    text-decoration: none;
    border-bottom: 1px solid var(--control);
}

.answer a:hover,
.footer__meta a:hover {
    color: var(--white);
    border-bottom-color: var(--phosphor);
}

/* ---- product list ---- */

.products {
    display: flex;
    flex-direction: column;
    margin: 0 0 1.5rem 1.25rem;
    border-top: 1px solid var(--line);
}

.product {
    display: flex;
    gap: 1rem;
    align-items: baseline;
    padding: 0.75rem;
    margin: 0 -0.75rem;
    border-bottom: 1px solid var(--line);
    color: var(--phosphor);
    text-decoration: none;
}

.product:hover {
    background: var(--hover-bg);
    border-bottom-color: var(--control);
}

.product__idx {
    flex: none;
    color: var(--dim);
}

.product__label {
    flex: 1 1 auto;
    min-width: 0;
}

.product__desc {
    color: var(--dim);
}

.product__arrow {
    flex: none;
    color: var(--dim);
}

/* ---- cursor ---- */

.cursor-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.75rem;
}

.cursor {
    width: 0.5rem;
    height: 1.125rem;
    background: var(--phosphor);
    animation: v2blink 1.05s step-end infinite;
}

@keyframes v2blink {
    0%,
    49% {
        opacity: 1;
    }
    50%,
    100% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cursor {
        animation: none;
    }
}

/* ---- footer ---- */

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
    font-size: 0.75rem;
    color: var(--dim);
    letter-spacing: 0.08em;
}

.lang-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--control);
    background: transparent;
    color: var(--white);
    font: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}

.lang-btn:hover {
    border-color: var(--phosphor);
    background: var(--hover-bg);
}

/* ---- language modal ---- */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: var(--overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-overlay__catch {
    position: absolute;
    inset: 0;
}

.modal {
    position: relative;
    width: 100%;
    max-width: 23.75rem;
    background: var(--bg);
    border: 1px solid var(--control);
    box-shadow: var(--modal-glow);
}

.modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.75rem;
    color: var(--dim);
    letter-spacing: 0.08em;
}

.modal__close {
    padding: 0;
    border: 0;
    background: none;
    color: var(--dim);
    font: inherit;
    cursor: pointer;
}

.modal__close:hover {
    color: var(--white);
}

.modal__body {
    padding: 0.5rem 0;
}

.locale-opt {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 1rem;
    font-size: 0.875rem;
    color: var(--phosphor);
    text-decoration: none;
}

.locale-opt:hover {
    background: var(--hover-bg);
    color: var(--white);
}

.locale-opt__code {
    color: var(--dim);
}

.locale-opt__name {
    flex: 1 1 auto;
}

.locale-opt__dot {
    color: var(--phosphor);
}
