/* Unified Design System - Cerber Lockout Cloudflare Sync Documentation Site */

:root {
    --bg-main: hsl(224, 71%, 4%);
    --bg-card: rgba(17, 24, 39, 0.6);
    --bg-code: rgba(10, 15, 30, 0.8);
    --border-glass: rgba(255, 255, 255, 0.07);
    --border-glass-hover: rgba(255, 255, 255, 0.15);
    
    --text-primary: hsl(210, 40%, 98%);
    --text-secondary: hsl(215, 25%, 72%);
    --text-muted: hsl(215, 16%, 57%);

    --color-orange: hsl(25, 100%, 50%);
    --color-orange-glow: rgba(249, 115, 22, 0.25);
    --color-blue: hsl(217, 91%, 60%);
    --color-blue-glow: rgba(59, 130, 246, 0.25);
    
    --gradient-primary: linear-gradient(135deg, var(--color-orange), var(--color-blue));
    --gradient-hover: linear-gradient(135deg, hsl(28, 100%, 54%), hsl(219, 95%, 65%));
    
    --font-headings: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-code: 'SFMono-Regular', Consolas, 'Fira Code', monospace;
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Background Glowing Blobs */
body::before, body::after {
    content: "";
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    z-index: -1;
    filter: blur(140px);
    opacity: 0.15;
    pointer-events: none;
}

body::before {
    top: -100px;
    left: -100px;
    background: var(--color-orange);
    animation: float-orange 12s ease-in-out infinite alternate;
}

body::after {
    bottom: -150px;
    right: -100px;
    background: var(--color-blue);
    animation: float-blue 15s ease-in-out infinite alternate;
}

@keyframes float-orange {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 35px) scale(1.15); }
}

@keyframes float-blue {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-50px, -45px) scale(1.15); }
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

/* Header & Glassmorphic Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 15, 25, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    transition: var(--transition-smooth);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--font-headings);
    font-weight: 800;
    font-size: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 6px 0;
    position: relative;
    transition: var(--transition-smooth);
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-smooth);
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

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

/* Page Layouts */
.hero {
    padding: 120px 0 80px 0;
    text-align: center;
}

.hero h1 {
    font-family: var(--font-headings);
    font-size: clamp(40px, 7vw, 68px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.hero h1 span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: clamp(17px, 2vw, 21px);
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 48px auto;
    font-weight: 400;
}

.cta-group {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: hsl(224, 71%, 4%);
    box-shadow: 0 4px 20px -2px var(--color-orange-glow);
}

.btn-primary:hover {
    background: var(--gradient-hover);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px -2px var(--color-orange-glow);
}

.btn-secondary {
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-glass-hover);
    transform: translateY(-3px) scale(1.02);
}

/* Glassmorphism Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 36px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--border-glass-hover);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

/* Features Grid */
.features {
    padding: 80px 0;
}

.section-title {
    font-family: var(--font-headings);
    font-size: clamp(28px, 4vw, 40px);
    text-align: center;
    margin-bottom: 54px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.card-icon {
    font-size: 36px;
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
}

.card h3 {
    font-family: var(--font-headings);
    font-size: 22px;
    margin-bottom: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.card p {
    color: var(--text-secondary);
    font-size: 15.5px;
    line-height: 1.6;
}

/* Call to Action Banner */
.cta-banner {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.07), rgba(59, 130, 246, 0.07));
    border: 1px solid rgba(249, 115, 22, 0.15);
    border-radius: 24px;
    padding: 72px 48px;
    text-align: center;
    margin: 80px 0 120px 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.4);
}

.cta-banner h2 {
    font-family: var(--font-headings);
    font-size: clamp(26px, 4vw, 36px);
    margin-bottom: 18px;
    font-weight: 700;
}

.cta-banner p {
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 36px auto;
    font-size: 16.5px;
}

/* Footer styling */
footer {
    border-top: 1px solid var(--border-glass);
    padding: 48px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    background: rgba(10, 14, 23, 0.8);
    position: relative;
    z-index: 10;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
}

footer a:hover {
    color: var(--color-orange);
}

/* Documentation Content Pages Styling */
.doc-layout {
    padding: 60px 0 120px 0;
}

.doc-layout h1 {
    font-family: var(--font-headings);
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.doc-layout .subtitle {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 48px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 24px;
}

.doc-layout h2 {
    font-family: var(--font-headings);
    font-size: 28px;
    font-weight: 700;
    margin: 48px 0 18px 0;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.doc-layout h3 {
    font-family: var(--font-headings);
    font-size: 21px;
    font-weight: 600;
    margin: 32px 0 14px 0;
    color: var(--text-primary);
}

.doc-layout p {
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
}

.doc-layout ol, .doc-layout ul {
    margin: 0 0 32px 24px;
    color: var(--text-secondary);
}

.doc-layout li {
    margin-bottom: 10px;
    font-size: 15.5px;
}

.doc-layout strong {
    color: var(--text-primary);
}

/* Code block container */
.code-container {
    position: relative;
    background: var(--bg-code);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 24px;
    margin: 28px 0;
    overflow-x: auto;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.code-container pre {
    margin: 0;
    overflow: visible;
}

.code-container code {
    font-family: var(--font-code);
    font-size: 14px;
    color: hsl(210, 40%, 90%);
}

.btn-copy {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

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

/* Alert Boxes */
.alert-box {
    background: rgba(249, 115, 22, 0.05);
    border-left: 4px solid var(--color-orange);
    border-radius: 8px;
    padding: 24px;
    margin: 32px 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(249, 115, 22, 0.08);
    border-right: 1px solid rgba(249, 115, 22, 0.08);
    border-bottom: 1px solid rgba(249, 115, 22, 0.08);
}

.alert-box h4 {
    color: var(--text-primary);
    font-family: var(--font-headings);
    font-size: 17px;
    font-weight: 650;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-box p {
    margin-bottom: 0;
    font-size: 15px;
    color: var(--text-secondary);
}

/* Steps list */
.step-list {
    list-style-type: none;
    counter-reset: steps;
    margin-left: 0 !important;
}

.step-list li {
    position: relative;
    padding-left: 56px;
    margin-bottom: 32px;
}

.step-list li::before {
    counter-increment: steps;
    content: counter(steps);
    position: absolute;
    left: 0;
    top: 0;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-headings);
    font-weight: 700;
    color: var(--color-orange);
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Security Flowchart Layout */
.flowchart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 48px 0;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.flow-node {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 20px 28px;
    width: 100%;
    max-width: 540px;
    text-align: center;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    transition: var(--transition-smooth);
}

.flow-node:hover {
    border-color: var(--color-orange);
    background: rgba(255, 255, 255, 0.04);
    transform: scale(1.02);
}

.flow-node h4 {
    font-family: var(--font-headings);
    color: var(--color-orange);
    font-size: 17px;
    margin-bottom: 6px;
    font-weight: 600;
}

.flow-node p {
    margin: 0;
    font-size: 14.5px;
    color: var(--text-secondary);
}

.flow-arrow {
    color: var(--text-muted);
    font-size: 24px;
    line-height: 1;
    font-weight: bold;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

.grid-security {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 28px;
    margin-top: 32px;
}

.security-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 32px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition-smooth);
}

.security-card:hover {
    border-color: var(--color-blue);
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.03);
}

.security-card h3 {
    font-family: var(--font-headings);
    font-size: 19px;
    color: var(--text-primary);
    margin-bottom: 14px;
    font-weight: 600;
}

.security-card p {
    font-size: 14.5px;
    line-height: 1.6;
    margin: 0;
    color: var(--text-secondary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        height: auto;
        padding: 20px 0;
        gap: 16px;
    }
    .hero {
        padding: 80px 0 40px 0;
    }
    .card {
        padding: 24px;
    }
    .cta-banner {
        padding: 40px 24px;
    }
    .flowchart {
        padding: 24px 16px;
    }
}

/* Page Entry Animations (Fade & Slide-up) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero p {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.1s;
}

.hero .cta-group {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.2s;
}

/* Progressive grid delays */
.card {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.features-grid .card:nth-child(1) { animation-delay: 0.1s; }
.features-grid .card:nth-child(2) { animation-delay: 0.2s; }
.features-grid .card:nth-child(3) { animation-delay: 0.3s; }
.features-grid .card:nth-child(4) { animation-delay: 0.4s; }
.features-grid .card:nth-child(5) { animation-delay: 0.5s; }
.features-grid .card:nth-child(6) { animation-delay: 0.6s; }

/* Progressive section delays for docs & security */
.doc-layout h1, .doc-layout .subtitle {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.doc-layout .subtitle {
    animation-delay: 0.1s;
}

.doc-layout section {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.doc-layout section:nth-child(1) { animation-delay: 0.2s; }
.doc-layout section:nth-child(2) { animation-delay: 0.3s; }
.doc-layout section:nth-child(3) { animation-delay: 0.4s; }
.doc-layout section:nth-child(4) { animation-delay: 0.5s; }
.doc-layout section:nth-child(5) { animation-delay: 0.6s; }

.security-card {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.grid-security .security-card:nth-child(1) { animation-delay: 0.2s; }
.grid-security .security-card:nth-child(2) { animation-delay: 0.3s; }
.grid-security .security-card:nth-child(3) { animation-delay: 0.4s; }

/* Storyline Timeline Styles */
.storyline {
    padding: 60px 0 80px 0;
    text-align: center;
}

.dependency-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(249, 115, 22, 0.08);
    color: var(--color-orange);
    border: 1px solid rgba(249, 115, 22, 0.2);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14.5px;
    font-weight: 600;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.05);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.1s;
}

.story-intro {
    font-size: 16.5px;
    color: var(--text-secondary);
    max-width: 760px;
    margin: 0 auto 54px auto !important;
    line-height: 1.7;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.2s;
}

.story-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 24px;
    position: relative;
    text-align: left;
}

.story-step {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 32px 28px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
    transition: var(--transition-smooth);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.story-step:hover {
    transform: translateY(-5px);
    border-color: var(--color-orange);
    box-shadow: 0 20px 40px -15px rgba(249, 115, 22, 0.15);
}

.story-timeline .story-step:nth-child(1) { animation-delay: 0.3s; }
.story-timeline .story-step:nth-child(2) { animation-delay: 0.4s; }
.story-timeline .story-step:nth-child(3) { animation-delay: 0.5s; }
.story-timeline .story-step:nth-child(4) { animation-delay: 0.6s; }

.step-num {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: hsl(224, 71%, 4%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-headings);
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px var(--color-orange-glow);
}

.story-step h3 {
    font-family: var(--font-headings);
    font-size: 19px;
    font-weight: 650;
    margin-bottom: 12px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.story-step p {
    color: var(--text-secondary);
    font-size: 14.5px;
    line-height: 1.6;
}

/* Constants Reference Table */
.constants-table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

.constants-table thead {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-glass);
}

.constants-table th {
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    padding: 14px 20px;
    text-align: left;
}

.constants-table td {
    padding: 16px 20px;
    font-size: 14.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-glass);
    vertical-align: top;
}

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

.constants-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.constants-table code {
    font-family: var(--font-code);
    font-size: 13px;
    color: var(--color-orange);
    background: rgba(249, 115, 22, 0.08);
    padding: 3px 8px;
    border-radius: 5px;
    white-space: nowrap;
}

/* Alert box list items */
.alert-box ul {
    margin: 12px 0 16px 20px;
    padding: 0;
    color: var(--text-secondary);
}

.alert-box li {
    font-size: 14.5px;
    margin-bottom: 6px;
    line-height: 1.5;
}
