:root {
    /* Base Palette - Deep Slate / Black */
    --bg-body: #050505;
    --bg-surface: #0f1115;
    --bg-surface-hover: #161b22;

    /* Text */
    --text-primary: #ededed;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;

    /* Branding - Signal Green */
    --brand-primary: #00E676;
    --brand-glow: rgba(0, 230, 118, 0.4);
    --brand-dim: rgba(0, 230, 118, 0.1);

    /* Accents */
    --border-subtle: #27272a;
    --border-highlight: #3f3f46;

    /* Status */
    --danger: #ef4444;
    --success: #00E676;

    /* Fonts */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}

p {
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Utilities */
.mono {
    font-family: var(--font-mono);
}

.text-green {
    color: var(--brand-primary);
}

.text-center {
    text-align: center;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--brand-primary);
    color: #000;
    box-shadow: 0 0 20px var(--brand-dim);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 30px var(--brand-glow);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
}

/* Nav */
header.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 0;
}

header .nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--brand-primary);
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

/* Hero */
.hero {
    padding-top: 160px;
    padding-bottom: 100px;
    border-bottom: 1px solid var(--border-subtle);
    background: radial-gradient(circle at 50% 0%, #11221c 0%, var(--bg-body) 60%);
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-content h1 .highlight {
    color: var(--brand-primary);
    text-shadow: 0 0 40px rgba(0, 230, 118, 0.2);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    max-width: 500px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

/* Hero Visual - PR Comment simulation */
.hero-visual {
    perspective: 1000px;
}

.pr-card {
    background: #0d1117;
    /* GitHub Dark Dim */
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.pr-header {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid #30363d;
    padding-bottom: 12px;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #238636;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    font-weight: bold;
}

.pr-meta div:first-child {
    font-weight: 600;
    font-size: 14px;
    color: #c9d1d9;
}

.pr-meta div:last-child {
    font-size: 12px;
    color: #8b949e;
}

.pr-comment {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    margin-bottom: 12px;
}

.comment-header {
    background: #21262d;
    padding: 8px 12px;
    border-bottom: 1px solid #30363d;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #8b949e;
    border-radius: 6px 6px 0 0;
}

.bot-badge {
    background: #388bfd26;
    color: #58a6ff;
    border: 1px solid rgba(56, 139, 253, 0.4);
    border-radius: 2em;
    padding: 0 7px;
    font-size: 11px;
    font-weight: 500;
}

.comment-body {
    padding: 12px;
    color: #c9d1d9;
    font-size: 14px;
}

.prevhq-comment {
    border-color: rgba(0, 230, 118, 0.3);
    animation: fadeIn 0.5s ease-out 1s backwards;
}

.prevhq-comment .comment-header {
    background: rgba(0, 230, 118, 0.1);
    border-bottom-color: rgba(0, 230, 118, 0.2);
    color: var(--brand-primary);
}

.prevhq-link {
    color: var(--brand-primary);
    text-decoration: underline;
    text-underline-offset: 4px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sections */
section {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 60px;
    max-width: 600px;
}

.section-title {
    color: var(--brand-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: block;
}

.section-headline {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

/* Confidence / Timeline */
.timeline-container {
    position: relative;
    padding: 40px 0;
}

.timeline-track {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: #27272a;
    z-index: 0;
    transform: translateY(-50%);
}

.timeline-steps {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.t-step {
    background: var(--bg-surface);
    border: 1px solid var(--border-highlight);
    padding: 24px;
    border-radius: 12px;
    transition: 0.3s;
}

.t-step:hover {
    border-color: var(--brand-primary);
    transform: translateY(-5px);
}

.t-icon {
    width: 40px;
    height: 40px;
    background: #27272a;
    border-radius: 50%;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 1px solid #3f3f46;
}

.t-step:nth-child(2) .t-icon {
    background: rgba(0, 230, 118, 0.1);
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.2);
}

.t-step h3 {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.t-step p {
    font-size: 0.9rem;
}

/* Safety Net / Rollback */
.safety-section {
    background: #0a0a0a;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.safety-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 80px;
    align-items: center;
}

.rollback-ui {
    background: #121212;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 24px;
    position: relative;
}

.rollback-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #666;
    border-bottom: 1px solid #333;
    padding-bottom: 12px;
}

.deploy-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    background: #1a1a1a;
    border: 1px solid transparent;
}

.deploy-item.active {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.deploy-item.previous {
    border-color: var(--success);
    background: rgba(0, 230, 118, 0.05);
}

.btn-rollback {
    background: var(--bg-body);
    border: 1px solid var(--border-highlight);
    color: var(--text-primary);
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
}

.btn-rollback:hover {
    background: var(--text-primary);
    color: #000;
}

/* Tech Specs */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
    align-items: center;
    justify-items: center;
    opacity: 0.6;
}

.tech-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-tertiary);
}

.terminal {
    background: #0d1117;
    border-radius: 8px;
    border: 1px solid #30363d;
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #c9d1d9;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.term-line {
    display: block;
    margin-bottom: 8px;
}

.term-green {
    color: var(--success);
}

.term-blue {
    color: #58a6ff;
}

.caret {
    animation: blink 1s step-end infinite;
    border-right: 8px solid #c9d1d9;
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* Footer */
footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

footer h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

footer .links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 32px;
    margin-bottom: 60px;
}

footer .links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

footer .links a:hover {
    color: var(--brand-primary);
}

/* Video Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    width: 90%;
    max-width: 900px;
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 8px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Responsive */

@media (max-width: 768px) {

    .hero-layout,
    .safety-grid {
        grid-template-columns: 1fr;
    }

    .timeline-steps {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .timeline-track {
        display: none;
    }

    /* Hide horizontal line on mobile */
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .timeline-steps {
        grid-template-columns: 1fr;
    }

    .t-step {
        width: 100%;
        border-left: 2px solid var(--border-highlight);
    }
}