/* telomere.dev - Terminal Command Line Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0D1117;
    color: #C9D1D9;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.65;
}

/* Typography */
.section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.75rem;
    color: #C9D1D9;
    margin-bottom: 0.75rem;
}

.explain-text {
    font-size: 0.95rem;
    color: #C9D1D9;
    margin-bottom: 1rem;
    line-height: 1.65;
}

/* Terminal Windows */
.terminal {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #1F2937;
}

.terminal.small {
    margin-bottom: 1.25rem;
}

.terminal-header {
    background: #1F2937;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px 8px 0 0;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot.red { background: #FF5F56; }
.dot.yellow { background: #FFBD2E; }
.dot.green { background: #27C93F; }

.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #C9D1D9;
    margin-left: auto;
    font-feature-settings: 'liga' 0;
}

.terminal-body {
    background: #161B22;
    padding: 1rem 1.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    font-feature-settings: 'liga' 0;
    tab-size: 2;
    background-image: repeating-linear-gradient(
        transparent 0px,
        transparent 2px,
        rgba(0, 255, 136, 0.02) 2px,
        rgba(0, 255, 136, 0.02) 4px
    );
}

.line {
    margin-bottom: 0.15rem;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Syntax Colors */
.prompt { color: #7EE787; }
.output { color: #C9D1D9; padding-left: 1rem; }
.syn-blue { color: #79C0FF; }
.syn-green { color: #7EE787; }
.syn-orange { color: #FFA657; }
.syn-red { color: #FF7B72; }
.comment { color: #484F58; }

/* ASCII Art */
.ascii-art {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: #7EE787;
    line-height: 1.2;
    margin: 0.5rem 0;
    font-feature-settings: 'liga' 0;
}

/* Cursor */
.cursor-line {
    display: flex;
    align-items: center;
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: #7EE787;
    animation: blinkCur 1s steps(1) infinite;
}

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

/* Typing Animation */
.typing-line .typed-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid #7EE787;
    animation: typeText 0.8s steps(15) forwards, removeBorder 0.1s 1.0s forwards;
    width: 0;
}

@keyframes typeText {
    from { width: 0; }
    to { width: 15ch; }
}

@keyframes removeBorder {
    to { border-right-color: transparent; }
}

/* Reveal animation for hero lines */
.reveal-block {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reveal-block.revealed {
    opacity: 1;
}

/* Hero Section */
.hero {
    padding: 3rem 2rem 2rem;
}

.hero-terminal {
    max-width: 860px;
}

/* Docs Section */
.docs {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.docs-inner {
    margin-bottom: 1rem;
}

/* Copy Button */
.copy-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #484F58;
    background: transparent;
    border: 1px solid #484F58;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    margin-left: auto;
    transition: color 0.2s ease, border-color 0.2s ease;
    font-feature-settings: 'liga' 0;
}

.copy-btn:hover {
    color: #7EE787;
    border-color: #7EE787;
}

.copy-btn.copied {
    color: #7EE787;
    border-color: #7EE787;
}

/* Playground Section */
.playground {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.playground-inner {
    margin-bottom: 1rem;
}

.playground-terminal {
    margin-bottom: 1rem;
}

.playground-input-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.playground-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #C9D1D9;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-feature-settings: 'liga' 0;
    caret-color: #7EE787;
}

.playground-input::placeholder {
    color: #484F58;
}

.playground-output {
    margin-top: 0.25rem;
}

.playground-output .line {
    padding-left: 0;
}

.playground-examples {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.example-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #79C0FF;
    background: #161B22;
    border: 1px solid #1F2937;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
    font-feature-settings: 'liga' 0;
}

.example-btn:hover {
    border-color: #79C0FF;
    color: #C9D1D9;
}

/* Sequence Visualization */
.sequence-viz {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.viz-inner {
    margin-bottom: 1rem;
}

.sequence-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    letter-spacing: 0.1em;
    line-height: 2;
    word-break: break-all;
    font-feature-settings: 'liga' 0;
}

.nt {
    display: inline-block;
    width: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease, text-shadow 0.2s ease;
}

.nt:hover {
    transform: scale(1.3);
}

.nt.t { color: #7EE787; }
.nt.t:hover { text-shadow: 0 0 8px rgba(126, 231, 135, 0.5); }
.nt.a { color: #79C0FF; }
.nt.a:hover { text-shadow: 0 0 8px rgba(121, 192, 255, 0.5); }
.nt.g { color: #FFA657; }
.nt.g:hover { text-shadow: 0 0 8px rgba(255, 166, 87, 0.5); }

.seq-sep {
    display: inline-block;
    width: 0.5rem;
}

.legend {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #C9D1D9;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-feature-settings: 'liga' 0;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-dot.t { background: #7EE787; }
.legend-dot.a { background: #79C0FF; }
.legend-dot.g { background: #FFA657; }

/* Changelog */
.changelog {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
}

.changelog-inner {
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
    text-align: center;
}

.term-link {
    color: #7EE787;
    text-decoration: none;
    transition: color 0.2s ease;
}

.term-link:hover {
    color: #79C0FF;
}

.footer-copy {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #484F58;
    margin-top: 1rem;
    font-feature-settings: 'liga' 0;
}

/* Fade-in scroll animation */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Playground response JSON formatting */
.json-key { color: #79C0FF; }
.json-string { color: #FFA657; }
.json-number { color: #7EE787; }
.json-bracket { color: #C9D1D9; }
.json-error { color: #FF7B72; }
