/* ═══════════════════════════════════════════════════════
   ctrlTAB — Website (Terminal Light Theme)
   ═══════════════════════════════════════════════════════ */

/* --- Variables --- */
:root {
    --color-accent:         #e2003d;
    --color-accent-dim:     rgba(226, 0, 61, 0.08);
    --color-accent-glow:    rgba(226, 0, 61, 0.25);
    --color-highlight:      #fb7185;
    --color-secondary:      #a78bfa;
    --color-success:        #22c55e;
    --color-success-dim:    rgba(34, 197, 94, 0.12);
    --color-bg-primary:     #ffffff;
    --color-bg-secondary:   #f8f9fa;
    --color-bg-tertiary:    #e9ecef;
    --color-bg-elevated:    #ffffff;
    --color-text-primary:   #212529;
    --color-text-secondary: #495057;
    --color-text-muted:     #868e96;
    --color-border:         rgba(0, 0, 0, 0.12);
    --color-border-subtle:  rgba(0, 0, 0, 0.07);
    --font-main: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    --radius: 3px;
    --max-width: 1200px;
    --glow-red:   0 0 8px rgba(226, 0, 61, 0.35), 0 0 20px rgba(226, 0, 61, 0.1);
    --glow-green: 0 0 8px rgba(34, 197, 94, 0.35), 0 0 20px rgba(34, 197, 94, 0.1);
    --color-bg-nav:         rgba(255, 255, 255, 0.96);
    --color-dot:            rgba(0, 0, 0, 0.07);
    --color-hover-subtle:   rgba(0, 0, 0, 0.03);
    --color-step-num-bg:    rgba(0, 0, 0, 0.04);
}

/* --- Dark theme variables --- */
html[data-theme="dark"] {
    --color-success:        #34d399;
    --color-success-dim:    rgba(52, 211, 153, 0.12);
    --color-bg-primary:     #1c1917;
    --color-bg-secondary:   #231f1d;
    --color-bg-tertiary:    #3f3a36;
    --color-bg-elevated:    #292524;
    --color-text-primary:   #fafaf9;
    --color-text-secondary: #a8a29e;
    --color-text-muted:     #78716c;
    --color-border:         rgba(255, 255, 255, 0.10);
    --color-border-subtle:  rgba(255, 255, 255, 0.06);
    --color-bg-nav:         rgba(28, 25, 23, 0.96);
    --color-dot:            rgba(255, 255, 255, 0.04);
    --color-hover-subtle:   rgba(255, 255, 255, 0.03);
    --color-step-num-bg:    rgba(255, 255, 255, 0.04);
    --glow-green: 0 0 8px rgba(52, 211, 153, 0.35), 0 0 20px rgba(52, 211, 153, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

/* --- Body with dot-grid background --- */
body {
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    background-image: radial-gradient(circle, var(--color-dot) 1px, transparent 1px);
    background-size: 28px 28px;
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}


a {
    color: var(--color-accent);
    text-decoration: none;
}

/* --- Layout --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ── Navigation ──────────────────────────────────────── */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-bg-nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: var(--color-text-primary);
    text-decoration: none;
}


.logo-accent {
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}

.nav-links a::before {
    content: '// ';
    color: var(--color-text-muted);
    transition: color 0.15s;
}

.nav-links a:hover {
    color: var(--color-text-primary);
}

.nav-links a:hover::before {
    color: var(--color-accent);
}

.nav-cta {
    color: var(--color-accent) !important;
    font-weight: 700 !important;
}

.nav-cta::before {
    content: '> ' !important;
    color: var(--color-accent) !important;
}

/* ── Hero ────────────────────────────────────────────── */

.hero {
    padding: 6rem 0 5.5rem;
    border-bottom: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}


/* Radial vignette spotlight */
.hero::after {
    content: '';
    position: absolute;
    top: -10%;
    left: -5%;
    width: 55%;
    height: 80%;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.03) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
    animation: glow-pulse 5s ease-in-out infinite;
}


@keyframes glow-pulse {
    0%, 100% { opacity: 0.5; }
    50%       { opacity: 1; }
}

.hero .container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 3.5rem;
}

.hero-content {
    flex: 0 0 42%;
}

.hero-visual {
    flex: 1;
    min-width: 0;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-visual.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.hero-screenshot {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    border: 1px solid var(--color-border-subtle);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.10), 0 4px 12px rgba(0, 0, 0, 0.07);
}

html[data-theme="dark"] .hero-screenshot {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.50), 0 4px 12px rgba(0, 0, 0, 0.30);
}

.hero-label {
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 1em;
    visibility: hidden; /* revealed by JS typewriter */
}

.hero-label::before {
    content: '';
    display: inline-block;
    width: 28px;
    height: 1px;
    background: var(--color-accent);
    flex-shrink: 0;
}

.hero-heading {
    font-size: clamp(2.6rem, 6vw, 4.2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--color-text-primary);
    margin-bottom: 1.75rem;
}

/* Blinking block cursor */
.cursor {
    display: inline-block;
    color: var(--color-accent);
    animation: cursor-blink 0.9s step-end infinite;
    font-weight: 300;
    margin-left: 3px;
    font-size: 0.85em;
    vertical-align: baseline;
}

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

.hero-sub {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.95;
    margin-bottom: 2.75rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

/* ── Buttons ─────────────────────────────────────────── */

.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.35rem;
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '$ ';
    opacity: 0.65;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-accent);
    transform: translateX(-101%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn-primary:hover {
    color: #fff;
    box-shadow: var(--glow-red);
}

.btn-primary:hover::after {
    transform: translateX(0);
}

.btn-text {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}

.btn-text:hover {
    color: var(--color-text-primary);
}

/* ── Highlights strip ────────────────────────────────── */

.highlights {
    padding: 4rem 0;
    border-bottom: 1px solid var(--color-border);
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius);
    overflow: hidden;
}

.highlight {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 2rem 1.75rem;
    background: transparent;
    border-right: 1px solid var(--color-border-subtle);
    transition: background 0.25s;
    position: relative;
    cursor: default;
}

.highlight:last-child {
    border-right: none;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--color-accent), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.highlight:hover {
    background: var(--color-hover-subtle);
}

.highlight:hover::after {
    opacity: 1;
}

.highlight-icon {
    font-size: 1.3rem;
    color: var(--color-text-primary);
    text-shadow: none;
    line-height: 1;
    display: block;
}

.highlight h3 {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-text-primary);
    margin-bottom: 0.2rem;
}

.highlight p {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    line-height: 1.75;
}

/* ── Sections ────────────────────────────────────────── */

.section {
    padding: 5.5rem 0;
}

.section-alt {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-primary);
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title::before {
    content: '#';
    color: var(--color-accent);
    font-size: 1.1em;
    line-height: 1;
}

.section-sub {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin-bottom: 2.75rem;
    padding-left: 1.5rem;
    border-left: 2px solid var(--color-text-muted);
    line-height: 1.65;
}

/* ── Quick Start steps ───────────────────────────────── */

.steps {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius);
    overflow: hidden;
}

.step {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--color-border-subtle);
    transition: background 0.2s;
}

.step:last-child {
    border-bottom: none;
}

.step:hover {
    background: var(--color-hover-subtle);
}

.step-num {
    flex-shrink: 0;
    width: 3.75rem;
    background: var(--color-step-num-bg);
    border-right: 1px solid var(--color-border-subtle);
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--color-text-primary);
    text-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
}

.step-num::before {
    content: '[';
    color: var(--color-text-muted);
    font-weight: 400;
    font-size: 0.9em;
}

.step-num::after {
    content: ']';
    color: var(--color-text-muted);
    font-weight: 400;
    font-size: 0.9em;
}

.step-body {
    padding: 1.5rem 1.75rem;
    flex: 1;
}

.step-body h3 {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    margin-bottom: 0.85rem;
}

/* Terminal-style code block */
.step-body pre {
    background: #111318;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    padding-top: 2.1rem;
}

.step-body pre::before {
    content: '● ● ●  bash';
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 0.32rem 0.9rem;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.25);
    font-family: var(--font-mono);
}

.step-body pre code {
    display: block;
    padding: 0.85rem 1.1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #6dba68;
    line-height: 1.8;
    white-space: pre;
}

.step-note {
    margin-top: 0.8rem;
    font-size: 0.74rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.65;
}

.step-note::before {
    content: 'ℹ';
    color: var(--color-accent);
    flex-shrink: 0;
}

.step-note code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: rgba(226, 0, 61, 0.07);
    border: 1px solid rgba(226, 0, 61, 0.2);
    color: var(--color-accent);
    padding: 0.1em 0.4em;
    border-radius: 2px;
}

/* ── Roadmap ─────────────────────────────────────────── */

.roadmap-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.roadmap-col {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.roadmap-col::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
}

.roadmap-col:first-child::before {
    background: linear-gradient(90deg, var(--color-success), transparent 65%);
    box-shadow: 0 0 12px rgba(0, 135, 90, 0.25);
}

.roadmap-col:last-child::before {
    background: linear-gradient(90deg, var(--color-accent), transparent 65%);
    box-shadow: 0 0 12px rgba(226, 0, 61, 0.3);
}

.roadmap-col-title {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border-subtle);
}

.roadmap-col:first-child .roadmap-col-title {
    color: var(--color-success);
    text-shadow: none;
}

.roadmap-col:last-child .roadmap-col-title {
    color: var(--color-accent);
    text-shadow: 0 0 8px rgba(226, 0, 61, 0.3);
}

.roadmap-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.roadmap-list li {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    padding-left: 2.1rem;
    position: relative;
    line-height: 1.55;
    transition: color 0.15s;
}

.roadmap-list li:hover {
    color: var(--color-text-primary);
}

.roadmap-list.done li::before {
    content: '[✓]';
    position: absolute;
    left: 0;
    color: var(--color-success);
    font-weight: 700;
    font-size: 0.65rem;
    text-shadow: none;
    top: 0.08em;
    letter-spacing: -0.02em;
}

.roadmap-list.upcoming li::before {
    content: '[~]';
    position: absolute;
    left: 0;
    font-size: 0.65rem;
    top: 0.08em;
    letter-spacing: -0.02em;
    animation: upcoming-blink 2.8s ease-in-out infinite;
}

@keyframes upcoming-blink {
    0%, 100% { color: var(--color-text-muted); }
    50%       { color: var(--color-accent); text-shadow: 0 0 6px rgba(226, 0, 61, 0.45); }
}

/* ── Footer ──────────────────────────────────────────── */

.footer {
    border-top: 1px solid var(--color-border);
    padding: 1.5rem 0;
    background: var(--color-bg-secondary);
    box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-copy {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

.footer-link {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
    text-decoration: none;
    transition: text-shadow 0.15s;
}

.footer-link:hover {
    text-shadow: var(--glow-red);
}

/* ── Theme transition (radial reveal) ───────────────── */

@keyframes theme-reveal {
    from { clip-path: circle(0 at var(--theme-x, 50%) var(--theme-y, 50%)); }
    to   { clip-path: circle(150vmax at var(--theme-x, 50%) var(--theme-y, 50%)); }
}

::view-transition-new(root) {
    animation: theme-reveal 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

::view-transition-old(root) {
    animation: none;
    z-index: -1;
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-new(root),
    ::view-transition-old(root) {
        animation: none;
    }
}

/* ── Theme toggle ────────────────────────────────────── */

.theme-toggle {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0.18rem 0.5rem;
    line-height: 1.5;
    transition: color 0.15s, border-color 0.15s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.theme-toggle:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

/* ── Hero enter animations (CSS-first, no FOUC) ─────── */

.hero-heading,
.hero-sub,
.hero-actions {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-heading.is-visible,
.hero-sub.is-visible,
.hero-actions.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Scroll-reveal animations ────────────────────────── */

.observe {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.highlight:nth-child(2).in-view { transition-delay: 0.08s; }
.highlight:nth-child(3).in-view { transition-delay: 0.16s; }

.step:nth-child(2).in-view { transition-delay: 0.06s; }
.step:nth-child(3).in-view { transition-delay: 0.12s; }
.step:nth-child(4).in-view { transition-delay: 0.18s; }

.roadmap-col:nth-child(2).in-view { transition-delay: 0.1s; }

/* ── Responsive ──────────────────────────────────────── */

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

    .highlight {
        border-right: none;
        border-bottom: 1px solid var(--color-border-subtle);
    }

    .highlight:last-child {
        border-bottom: none;
    }

    .roadmap-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

@media (max-width: 640px) {
    /* Quick Start: stack step-num above step-body */
    .step {
        flex-direction: column;
    }

    .step-num {
        width: 100%;
        height: 2.75rem;
        border-right: none;
        border-bottom: 1px solid var(--color-border-subtle);
        justify-content: flex-start;
        padding: 0 1.1rem;
        gap: 0.25rem;
    }

    /* Code blocks scroll horizontally instead of overflowing */
    .step-body pre {
        overflow-x: auto;
    }
}

@media (max-width: 768px) {
    .hero .container {
        flex-direction: column;
        gap: 2.5rem;
    }

    .hero-content {
        flex: none;
        width: 100%;
    }

    .hero-visual {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 4rem 0 3.5rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .nav-links a {
        display: none;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
