/* lrx.sh - License and Right eXchange
   Terminal-window simulation, dark-academia CLI aesthetic.
   Typography: "Fira Code" (Google Fonts) — primary monospace.
   ASCII art rendered in "Fira Code" at 0.6rem line-height 1.0. */

/* ---------- Reset & root ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #0c0c0c;
    --titlebar: #1a3a1a;
    --text: #d4d4d4;
    --green: #4ec920;
    --blue: #5c9fd4;
    --yellow: #e8c840;
    --red: #e84040;
    --dim: #5a5a5a;
}

html,
body {
    background: #050505;
    color: var(--text);
    font-family: 'Fira Code', 'SFMono-Regular', Menlo, Consolas, monospace;
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    /* faint scanline / CRT vibe */
    background-image:
        radial-gradient(ellipse at center, rgba(78, 201, 32, 0.04) 0%, transparent 60%),
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.012) 0,
            rgba(255, 255, 255, 0.012) 1px,
            transparent 1px,
            transparent 3px
        );
}

/* ---------- Terminal frame ---------- */
.terminal {
    max-width: 800px;
    margin: 2rem auto 0 auto;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    background: var(--bg);
    border: 1px solid #1a1a1a;
}

/* ---------- Title bar ---------- */
.title-bar {
    background: var(--titlebar);
    height: 32px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 6px;
    user-select: none;
    border-bottom: 1px solid #0a1f0a;
}

.traffic-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, filter 0.15s ease;
}

.dot:hover {
    transform: scale(1.15);
    filter: brightness(1.2);
}

.dot-red    { background: #e84040; }
.dot-yellow { background: #e8c840; }
.dot-green  { background: #4ec920; }

.title-bar-text {
    flex: 1;
    text-align: center;
    color: #b8d8b8;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    font-weight: 500;
}

.title-bar-spacer {
    width: 52px; /* mirror the traffic-dots width so title is centered */
}

/* ---------- Content area ---------- */
.terminal-content {
    background: var(--bg);
    padding: 1.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text);
}

.block {
    margin-bottom: 1.5rem;
}

.block:last-child {
    margin-bottom: 0;
}

/* ---------- Generic line ---------- */
.line {
    white-space: pre-wrap;
    word-break: break-word;
}

.indent {
    padding-left: 1.5rem;
}

/* ---------- Prompt lines ---------- */
.prompt-line {
    display: block;
}

.prompt-line::before {
    content: '$ ';
    color: var(--green);
    font-weight: 700;
}

.cmd {
    color: var(--text);
}

/* ---------- Color helpers ---------- */
.green  { color: var(--green); }
.blue   { color: var(--blue); }
.yellow { color: var(--yellow); }
.red    { color: var(--red); }
.dim    { color: var(--dim); }
.comment {
    color: var(--dim);
    font-style: normal;
}

.pipe {
    color: var(--yellow);
    font-weight: 700;
    padding: 0 0.15em;
}

/* ---------- ASCII art logo ---------- */
.ascii-art {
    color: var(--green);
    background: transparent;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    line-height: 1.0;
    margin: 1rem 0 1rem 0;
    text-shadow:
        0 0 2px rgba(78, 201, 32, 0.6),
        0 0 8px rgba(78, 201, 32, 0.25);
    white-space: pre;
    overflow-x: auto;
}

/* ---------- Man-page section headers ---------- */
.man-header {
    color: var(--yellow);
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 1.5rem;
    margin-bottom: 0.4rem;
    font-size: 1rem;
    letter-spacing: 0.05em;
    border-bottom: 1px dashed rgba(232, 200, 64, 0.18);
    padding-bottom: 0.2rem;
}

.block.manpage .line {
    margin-bottom: 0.25rem;
}

/* Option rows: flag in blue, description indented under it */
.option-row {
    margin-top: 0.6rem;
    padding-left: 1.5rem;
}

.option-desc {
    padding-left: 4rem;
    color: var(--text);
}

/* ---------- Cursor ---------- */
.cursor {
    display: inline-block;
    width: 0.6em;
    height: 1.1em;
    background: var(--green);
    margin-left: 0.1em;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
    box-shadow: 0 0 6px rgba(78, 201, 32, 0.6);
}

@keyframes blink {
    0%, 50%   { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

/* ---------- Footer pipeline ---------- */
.footer-pipeline {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(78, 201, 32, 0.18);
}

/* ---------- Selection ---------- */
::selection {
    background: rgba(78, 201, 32, 0.35);
    color: #ffffff;
}

/* ---------- Boot/typing helpers (scripted) ---------- */
.typing .cmd {
    /* placeholder; script writes content */
}

.hidden {
    visibility: hidden;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .terminal {
        margin: 0;
        border-radius: 0;
        max-width: 100%;
        border: 0;
    }
    .terminal-content {
        padding: 1rem;
        font-size: 0.85rem;
    }
    .ascii-art {
        font-size: 0.7rem;
    }
    .option-desc {
        padding-left: 3rem;
    }
}

@media (max-width: 520px) {
    .terminal-content {
        padding: 0.85rem;
        font-size: 0.78rem;
    }
    .ascii-art {
        font-size: 0.6rem;
    }
    .option-row {
        padding-left: 1rem;
    }
    .option-desc {
        padding-left: 2.25rem;
    }
    .title-bar-text {
        font-size: 0.7rem;
    }
}

/* ---------- Reveal animation for blocks ---------- */
.block {
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.block.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero is visible immediately so the page never looks empty */
.block.hero {
    opacity: 1;
    transform: none;
}
