/* Landing Page - Terminal Aesthetic */

/* Hero */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 32px);
    padding: 2rem;
}

.hero-terminal {
    width: 100%;
    max-width: 960px;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

/* tmux status bar */
.tmux-bar {
    background: rgba(5,5,5,0.98);
    padding: 0.35rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    font-size: 0.72rem;
    line-height: 1;
    gap: 0.25rem;
}
.tmux-tabs {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}
.tmux-session {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #000;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 2px;
    font-size: 0.68rem;
    margin-right: 0.15rem;
}
.tmux-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    color: var(--text-dim);
    border-radius: 2px;
    gap: 0.25rem;
    white-space: nowrap;
}
.tmux-tab sup {
    font-size: 0.55rem;
    color: var(--text-dim);
    opacity: 0.6;
    margin-left: 0.1rem;
}
.tmux-tab.active {
    background: rgba(255,255,255,0.1);
    color: var(--text-bright);
    font-weight: 600;
}
.tmux-tab.active sup { opacity: 0.8; }
.tmux-icon {
    font-size: 0.6rem;
    opacity: 0.5;
}
.tmux-tab.active .tmux-icon { opacity: 0.8; }
.tmux-right {
    display: flex;
    align-items: center;
    padding: 0 0.25rem;
    color: var(--text-dim);
    margin-left: auto;
    gap: 0.5rem;
    white-space: nowrap;
    font-size: 0.72rem;
}
.tmux-branch {
    color: var(--accent);
    font-weight: 600;
}
.tmux-right .t-green { color: #5faf5f; }
.tmux-right .t-amber { color: #d7af5f; }
.tmux-right .t-red { color: #af5f5f; }
.tmux-right .t-cyan { color: #5fafaf; }

.term-body {
    padding: 1.25rem;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text);
    white-space: pre-wrap;
    min-height: 120px;
}

.term-art {
    color: var(--accent);
    font-size: 0.5rem;
    line-height: 1.15;
    margin: 0 0 0.5rem 0;
    padding: 0;
    background: none;
    border: none;
    overflow-x: auto;
}

/* Mountains — 256-color grays matching the MUD's ANSI output */
.term-art.mountains { font-size: 0.6rem; line-height: 1.2; margin-bottom: 0; }
.m-far    { color: #3a3a3a; }  /* 237 */
.m-far2   { color: #444444; }  /* 238 */
.m-mid    { color: #4e4e4e; }  /* 239-240 */
.m-mid2   { color: #626262; }  /* 241 */
.m-mid3   { color: #6c6c6c; }  /* 242 */
.m-pk     { color: #808080; }  /* 243-244 */
.m-near   { color: #a8a8a8; }  /* 246-248 */
.m-hz     { color: #af0000; }  /* 124 maroon */
.m-title  { color: #d75f00; }  /* 166 orange */

/* Title and menu */
.t-title    { color: #eeeeee; font-weight: 700; }  /* 255 bright white */
.t-menu-key { color: #ff0000; font-weight: 700; }  /* 196 bright red */

.term-body .t-green { color: #5faf5f; }
.term-body .t-red { color: #af5f5f; }
.term-body .t-amber { color: #d7af5f; }
.term-body .t-cyan { color: #5fafaf; }  /* 73 */
.term-body .t-white { color: #e0e0e0; }
.term-body .t-dim { color: #606060; }
.term-body .t-purple { color: #d75faf; }

.cursor {
    animation: blink 1s step-end infinite;
    color: var(--accent);
}
@keyframes blink {
    50% { opacity: 0; }
}

/* CTA row */
.cta-row {
    display: flex;
    gap: 1rem;
    max-width: 960px;
    margin: -2rem auto 0;
    padding: 0 2rem 3rem;
    position: relative;
    z-index: 1;
}

.cta-card {
    flex: 1;
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: border-color 0.2s, transform 0.15s;
    text-decoration: none;
}
.cta-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    text-decoration: none;
}
.cta-icon {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 700;
}
.cta-label {
    font-size: 0.85rem;
    color: var(--text-bright);
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.cta-desc {
    font-size: 0.7rem;
    color: var(--text-dim);
}

/* Feature rows */
.feature-section {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.feature-row {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
.feature-row.reverse {
    flex-direction: row-reverse;
}
.feature-text {
    flex: 1;
    min-width: 0;
}
.feature-text h2 {
    color: var(--highlight);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    text-transform: lowercase;
}
.feature-text p {
    font-family: var(--font-prose);
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text);
}
.feature-term {
    flex: 1;
    min-width: 0;
    border-radius: 6px;
    overflow: hidden;
}
.feature-term .term-body {
    font-size: 0.75rem;
    padding: 0.85rem;
    min-height: auto;
}

/* Activity Feed */
.activity-section {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}
.activity-panel {
    padding: 1.25rem;
}
.activity-panel h2 {
    color: var(--highlight);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    text-transform: lowercase;
}
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
}
.activity-item:last-child { border-bottom: none; }
.activity-title {
    color: var(--link);
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.activity-meta {
    color: var(--text-dim);
    font-size: 0.7rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Cabals */
.cabals-section {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
    text-align: center;
}
.cabals-section h2 {
    color: var(--highlight);
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
    text-transform: lowercase;
}
.cabals-subtitle {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
}

.cabal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    text-align: left;
}
.cabal-card {
    padding: 1rem;
    transition: border-color 0.2s;
}
.cabal-card:hover { border-color: var(--accent); }
.cabal-card h3 {
    color: var(--accent);
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}
.cabal-card p {
    font-family: var(--font-prose);
    font-size: 0.72rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* Play button in nav */
.nav-play {
    color: var(--accent) !important;
    font-weight: 600;
    border-left: 1px solid var(--border);
    padding: 0 1rem !important;
}
.nav-play:hover { color: var(--accent-hover) !important; }

/* Footer */
.landing-footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 2rem 1.5rem;
    text-align: center;
}
.footer-connect {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.footer-links a {
    color: var(--text-dim);
    font-size: 0.75rem;
}
.footer-links a:hover { color: var(--link); }
.footer-copy {
    color: var(--text-dim);
    font-size: 0.65rem;
    opacity: 0.5;
}

/* Light mode: terminal blocks stay dark — pin all internal colors */
[data-theme="light"] .hero-terminal,
[data-theme="light"] .feature-term {
    background: #0A0A0A;
    border-color: rgba(0,0,0,0.15);
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}
[data-theme="light"] .hero-terminal .tmux-bar,
[data-theme="light"] .feature-term .tmux-bar {
    background: rgba(5,5,5,0.98);
    border-color: rgba(255,255,255,0.06);
}
[data-theme="light"] .hero-terminal .term-body,
[data-theme="light"] .feature-term .term-body { color: #c0c0c0; }
[data-theme="light"] .tmux-tab { color: #606060; }
[data-theme="light"] .tmux-tab sup { color: #606060; }
[data-theme="light"] .tmux-tab.active { background: rgba(255,255,255,0.1); color: #e0e0e0; }
[data-theme="light"] .tmux-tab.active sup { color: #e0e0e0; }
[data-theme="light"] .tmux-session { background: #5faf5f; color: #000; }
[data-theme="light"] .tmux-right { color: #606060; }
[data-theme="light"] .tmux-branch { color: #5faf5f; }
[data-theme="light"] .tmux-right .t-green { color: #5faf5f; }
[data-theme="light"] .tmux-right .t-amber { color: #d7af5f; }
[data-theme="light"] .tmux-right .t-red { color: #af5f5f; }
[data-theme="light"] .tmux-right .t-cyan { color: #5fafaf; }
/* Pin cursor and ASCII art inside terminals */
[data-theme="light"] .hero-terminal .cursor,
[data-theme="light"] .feature-term .cursor { color: #5faf5f; }
[data-theme="light"] .hero-terminal .term-art,
[data-theme="light"] .feature-term .term-art { color: #5faf5f; }
/* Pin status dot inside hero terminal */
[data-theme="light"] .hero-terminal .status-dot.online {
    background: #5faf5f;
    box-shadow: 0 0 4px #5faf5f;
}

/* Light: CTA cards get soft shadows for depth */
[data-theme="light"] .cta-card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
[data-theme="light"] .cta-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Responsive */
@media (max-width: 768px) {
    .hero { min-height: auto; padding: 1.5rem 1rem; }
    .term-art.mountains { font-size: 0.42rem; }
    .term-body { font-size: 0.72rem; }
    .cta-row { flex-direction: column; padding: 0 1rem 2rem; margin-top: -1rem; }
    .feature-section { padding: 0 1rem 2rem; }
    .feature-row, .feature-row.reverse { flex-direction: column; }
    .cabals-section { padding: 0 1rem 2rem; }
    .cabal-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .term-art.mountains { font-size: 0.32rem; }
    .cabal-grid { grid-template-columns: 1fr; }
}
