/**
 * DipTwo Design System V2
 * Modern, striking, visually clear
 */

:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #3b82f6;
    --accent-dark: #2563eb;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --warning: #f59e0b;
    --success: #10b981;
    --dark: #0f172a;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f8fafc;
    --white: #ffffff;

    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);

    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
    color: var(--gray);
    line-height: 1.7;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover { color: var(--accent-dark); }

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

.section { padding: 5rem 0; }

/* Header */
.header {
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
}

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

.logo {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--dark);
}

.logo span {
    background: var(--gradient-danger);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav {
    display: flex;
    gap: 2.5rem;
}

.nav a {
    font-weight: 600;
    color: var(--gray);
    font-size: 0.95rem;
}

.nav a:hover { color: var(--dark); }

/* Hero */
.hero {
    background: var(--gradient-dark);
    color: var(--white);
    padding: 7rem 0 5rem;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(239, 68, 68, 0.1) 0%, transparent 50%);
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: var(--white);
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero .tagline {
    font-size: 1.75rem;
    color: #cbd5e1;
    margin-bottom: 2rem;
    font-weight: 500;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border-radius: 30px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-warning {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: var(--dark);
}

.badge-danger {
    background: var(--gradient-danger);
    color: var(--white);
}

/* Cards */
.card {
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    height: 100%;
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
}

/* Scenario Cards */
.scenario-card {
    display: block;
    background: var(--white);
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.scenario-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 0;
    background: var(--gradient-danger);
    transition: height 0.4s ease;
}

.scenario-card:hover::before {
    height: 100%;
}

.scenario-card:hover {
    box-shadow: var(--shadow-2xl);
    transform: translateY(-8px) scale(1.02);
}

.scenario-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.scenario-card .meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--gray-light);
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.scenario-card .second-failure-preview {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(220, 38, 38, 0.08) 100%);
    border-left: 4px solid var(--danger);
    padding: 1.25rem;
    margin-top: 1.5rem;
    border-radius: 8px;
}

.scenario-card .second-failure-preview strong {
    color: var(--danger);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
}

/* Grid */
.grid {
    display: grid;
    gap: 2.5rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Category Pills */
.category-pill {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    font-weight: 700;
    color: var(--dark);
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
}

.category-pill:hover {
    background: var(--gradient-primary);
    color: var(--white);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-weight: 700;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: none;
    font-size: 1.05rem;
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-xl);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--dark);
}

.btn-lg {
    padding: 1.25rem 3rem;
    font-size: 1.125rem;
}

/* Timeline - EPIC VISUAL */
.timeline {
    position: relative;
    padding: 3rem 0;
}

.timeline-item {
    position: relative;
    padding-left: 5rem;
    padding-bottom: 4rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: var(--white);
    border: 4px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.25rem;
    z-index: 2;
    box-shadow: var(--shadow-lg);
}

.timeline-item.second-failure .timeline-marker {
    border-color: var(--danger);
    background: var(--gradient-danger);
    color: var(--white);
    animation: pulse-danger 2s infinite;
    width: 5rem;
    height: 5rem;
    font-size: 1.5rem;
}

@keyframes pulse-danger {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7), var(--shadow-lg);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(239, 68, 68, 0), var(--shadow-xl);
    }
}

.timeline-content {
    background: var(--white);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.timeline-item.second-failure .timeline-content {
    border-color: var(--danger);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.02) 0%, rgba(220, 38, 38, 0.05) 100%);
    border-width: 3px;
}

.timeline-content h4 {
    margin-bottom: 0.75rem;
    font-weight: 800;
    font-size: 1.25rem;
}

.timeline-item.second-failure .timeline-content h4 {
    color: var(--danger);
    font-size: 1.5rem;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.share-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: 2px solid #e2e8f0;
    background: var(--white);
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.reddit {
    border-color: #FF4500;
    color: #FF4500;
}

.share-btn.reddit:hover {
    background: #FF4500;
    color: white;
}

.share-btn.tiktok {
    border-color: #000000;
    color: #000000;
}

.share-btn.tiktok:hover {
    background: #000000;
    color: white;
}

/* Footer */
.footer {
    background: var(--dark);
    color: #94a3b8;
    padding: 4rem 0 2rem;
    margin-top: 5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer h4 {
    color: var(--white);
    margin-bottom: 1.25rem;
    font-weight: 700;
}

.footer a {
    color: #94a3b8;
    display: block;
    margin-bottom: 0.75rem;
}

.footer a:hover {
    color: var(--white);
    transform: translateX(4px);
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 2rem;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .hero h1 { font-size: 2.75rem; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.text-center { text-align: center; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.bg-light { background: var(--light); }
