/**
 * CTFLAB - Landing Pages
 * Design riche, dark/light mode, animations
 */

/* ==========================================
   RESET & BASE
   ========================================== */
.lp-page {
    min-height: 100vh;
    padding-top: 80px;
    overflow-x: hidden;
}

/* ==========================================
   HERO
   ========================================== */
.lp-hero {
    position: relative;
    padding: 80px 0 60px;
    overflow: hidden;
}

.lp-hero::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(74,222,128,0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.lp-hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 64px;
    position: relative;
    z-index: 1;
}

@media (max-width: 900px) {
    .lp-hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .lp-hero-visual {
        order: -1;
    }
}

/* Breadcrumb */
.lp-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.lp-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 150ms;
}
.lp-breadcrumb a:hover { color: var(--primary); }
.lp-breadcrumb-sep { opacity: 0.4; }

/* Badge */
.lp-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(74,222,128,0.1);
    border: 1px solid rgba(74,222,128,0.3);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

/* Title */
.lp-title {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 20px;
}
.lp-title .hl {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtitle */
.lp-subtitle {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 520px;
}

/* CTA group */
.lp-cta-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* Hero Visual */
.lp-hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lp-card-mock {
    width: 100%;
    max-width: 460px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.15), 0 0 0 1px var(--glass-border);
    animation: cardFloat 5s ease-in-out infinite;
}

[data-theme="dark"] .lp-card-mock {
    box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 60px rgba(74,222,128,0.08);
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

.lp-card-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
}
.lp-dot { width: 10px; height: 10px; border-radius: 50%; }
.lp-dot-r { background: #f87171; }
.lp-dot-y { background: #fbbf24; }
.lp-dot-g { background: #4ade80; }
.lp-card-titlebar-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 6px;
    font-family: var(--font-mono);
}

.lp-card-body {
    padding: 20px;
}

/* Terminal lines */
.lp-terminal {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    line-height: 1.7;
}
.lp-term-line { display: flex; gap: 8px; margin-bottom: 4px; }
.lp-term-prompt { color: #4ade80; user-select: none; }
.lp-term-cmd { color: var(--text-primary); }
.lp-term-out { color: var(--text-secondary); padding-left: 20px; font-size: 0.75rem; }
.lp-term-success { color: #4ade80; }
.lp-term-info { color: #60a5fa; }
.lp-term-warn { color: #fbbf24; }
.lp-term-cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: #4ade80;
    vertical-align: middle;
    animation: blink 1.2s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0;} }

/* Scoreboard mock */
.lp-scoreboard {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lp-sb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    transition: border-color 0.2s;
}
.lp-sb-row:hover { border-color: var(--primary); }
.lp-sb-rank {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 20px;
    text-align: center;
}
.lp-sb-rank.gold { color: #fbbf24; }
.lp-sb-rank.silver { color: #94a3b8; }
.lp-sb-rank.bronze { color: #f97316; }
.lp-sb-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}
.lp-sb-name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}
.lp-sb-score {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-mono);
}
.lp-sb-bar-wrap {
    width: 60px;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}
.lp-sb-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Docker visual */
.lp-docker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.lp-docker-node {
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    text-align: center;
    font-size: 0.75rem;
}
.lp-docker-node i { font-size: 1.25rem; color: var(--primary); display: block; margin-bottom: 4px; }
.lp-docker-node span { color: var(--text-secondary); font-family: var(--font-mono); font-size: 0.6875rem; }
.lp-docker-node.active { border-color: var(--primary); background: rgba(74,222,128,0.05); }
.lp-docker-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 12px;
    justify-content: center;
}
.lp-docker-status-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #4ade80;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.5;} }

/* Comparison chart visual */
.lp-compare-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.lp-compare-bar-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lp-compare-bar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}
.lp-compare-bar-label strong { color: var(--text-primary); font-size: 0.75rem; }
.lp-compare-track {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    gap: 4px;
}
.lp-compare-fill-a {
    height: 100%;
    border-radius: 4px;
    background: var(--gradient-primary);
    transition: width 1s var(--ease-out-expo);
}
.lp-compare-fill-b {
    height: 100%;
    border-radius: 4px;
    background: rgba(100,116,139,0.4);
    transition: width 1s var(--ease-out-expo);
}

/* ==========================================
   STATS BAR
   ========================================== */
.lp-stats {
    padding: 40px 0;
    margin: 0 0 20px;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.lp-stats-inner {
    display: flex;
    justify-content: center;
    gap: 64px;
    flex-wrap: wrap;
}

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

.lp-stat-value {
    display: block;
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.lp-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 600;
}

/* ==========================================
   SECTIONS
   ========================================== */
.lp-section {
    padding: 80px 0;
}

.lp-section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 56px;
}

.lp-section-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 12px;
}

.lp-section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.lp-section-desc {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Divider */
.lp-divider {
    border: none;
    height: 1px;
    background: var(--glass-border);
    margin: 0;
}

/* ==========================================
   FEATURES GRID
   ========================================== */
.lp-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .lp-features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .lp-features-grid { grid-template-columns: 1fr; }
}

.lp-feat {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
    position: relative;
    overflow: hidden;
}

.lp-feat::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.25s;
}

.lp-feat:hover {
    border-color: rgba(74,222,128,0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1), 0 0 0 1px rgba(74,222,128,0.15);
}

[data-theme="dark"] .lp-feat:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 30px rgba(74,222,128,0.08);
}

.lp-feat:hover::after { opacity: 1; }

.lp-feat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(74,222,128,0.1);
    border: 1px solid rgba(74,222,128,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.125rem;
    margin-bottom: 18px;
}

.lp-feat h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.lp-feat p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ==========================================
   PROCESS / STEPS
   ========================================== */
.lp-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    counter-reset: step;
    position: relative;
}

@media (max-width: 900px) {
    .lp-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
    .lp-steps { grid-template-columns: 1fr; }
}

.lp-step {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 28px 24px;
    position: relative;
}

.lp-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.875rem;
    font-weight: 800;
    margin-bottom: 16px;
    box-shadow: 0 0 20px rgba(74,222,128,0.3);
}

.lp-step h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.lp-step p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ==========================================
   COMPARISON TABLE
   ========================================== */
.lp-table-wrap {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
}

.lp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.lp-table thead tr {
    background: var(--bg-secondary);
}

.lp-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
}

.lp-table th.lp-th-best {
    color: var(--primary);
    background: rgba(74,222,128,0.05);
}

.lp-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-secondary);
    vertical-align: middle;
}

.lp-table td:first-child {
    color: var(--text-primary);
    font-weight: 500;
}

.lp-table td.lp-td-best {
    background: rgba(74,222,128,0.03);
    color: var(--text-primary);
    font-weight: 600;
}

.lp-table tr:last-child td { border-bottom: none; }

.lp-table .lp-yes { color: #4ade80; font-weight: 700; }
.lp-table .lp-no { color: #f87171; }
.lp-table .lp-partial { color: #fbbf24; }

/* ==========================================
   HIGHLIGHT BLOCK (1 wide card)
   ========================================== */
.lp-highlight-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}
@media (max-width: 700px) {
    .lp-highlight-pair { grid-template-columns: 1fr; }
}

.lp-highlight {
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
}

.lp-highlight.lp-highlight-green {
    border-color: rgba(74,222,128,0.3);
    background: rgba(74,222,128,0.04);
}

.lp-highlight h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.lp-highlight h3 i { color: var(--primary); }

.lp-highlight p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==========================================
   CTA SECTION
   ========================================== */
.lp-cta {
    margin: 80px 0 40px;
    padding: 64px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.lp-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(74,222,128,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.lp-cta h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin-bottom: 14px;
    position: relative;
}

.lp-cta p {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 32px;
    line-height: 1.7;
    position: relative;
}

@media (max-width: 640px) {
    .lp-cta { padding: 40px 24px; }
}

/* ==========================================
   RELATED LINKS
   ========================================== */
.lp-related {
    padding: 32px 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 16px;
}

.lp-related-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    font-weight: 500;
}

.lp-related-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ==========================================
   FOOTER
   ========================================== */
.lp-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    padding: 40px 0 28px;
    margin-top: 0;
}

.lp-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.lp-footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.lp-footer-logo {
    height: 36px;
    width: auto;
    background: #0b2b17;
    border-radius: 10px;
    padding: 6px;
}

.lp-footer-name {
    font-size: 1rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lp-footer-copy {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: center;
    flex: 1;
}

.lp-footer-links {
    display: flex;
    gap: 20px;
}

.lp-footer-links a {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 150ms;
}
.lp-footer-links a:hover { color: var(--primary); }

/* ==========================================
   ANIMATIONS (data-animate)
   ========================================== */
[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

[data-animate-delay="100"] { transition-delay: 100ms; }
[data-animate-delay="200"] { transition-delay: 200ms; }
[data-animate-delay="300"] { transition-delay: 300ms; }
[data-animate-delay="400"] { transition-delay: 400ms; }
[data-animate-delay="500"] { transition-delay: 500ms; }

[data-animate-stagger] [data-animate] {
    transition-delay: calc(var(--stagger-i, 0) * 80ms);
}
