/* ============================================
   pfSentinel Website — main.css
   ============================================ */

/* ---------- Self-hosted Fonts ---------- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/inter-v20-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/inter-v20-latin-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/inter-v20-latin-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/inter-v20-latin-700.woff2') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/jetbrains-mono-v24-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/jetbrains-mono-v24-latin-500.woff2') format('woff2');
}

/* ---------- Custom Properties ---------- */
:root {
    --color-primary: #667eea;
    --color-secondary: #2d3748;
    --gradient: linear-gradient(135deg, #667eea 0%, #2d3748 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(45, 55, 72, 0.06) 100%);

    --color-text: #2d3748;
    --color-text-muted: #718096;
    --color-text-light: #a0aec0;
    --color-bg: #ffffff;
    --color-bg-alt: #f7fafc;
    --color-border: #e2e8f0;

    --color-success: #48bb78;
    --color-warn: #ecc94b;
    --color-error: #fc8181;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.04);

    --nav-height: 72px;
    --container-max: 1140px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    color: var(--color-secondary);
}

img {
    max-width: 100%;
    display: block;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

/* ---------- Utilities ---------- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

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

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-text);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45);
    color: #fff;
}

.btn-secondary {
    background: var(--color-bg);
    color: var(--color-text);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: box-shadow 0.3s;
}

.navbar.scrolled {
    box-shadow: var(--shadow);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

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

.nav-logo:hover {
    color: var(--color-text);
}

.nav-logo-img {
    width: 28px;
    height: 28px;
    border-radius: 4px;
}

.footer-logo-img {
    width: 24px;
    height: 24px;
    border-radius: 3px;
}

.nav-logo i {
    font-size: 1.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color 0.2s;
}

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

.nav-btn {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    background: var(--color-text);
    color: #fff !important;
    font-size: 0.9rem !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-btn:hover {
    background: var(--color-primary);
    color: #fff !important;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ============================================
   Hero
   ============================================ */
.hero {
    position: relative;
    padding: calc(var(--nav-height) + 80px) 0 100px;
    overflow: hidden;
    text-align: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-subtle);
    z-index: -1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: 28px;
}

.hero-badge i {
    color: var(--color-primary);
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 580px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-subtitle strong {
    color: var(--color-text);
}

/* Install block */
.install-block {
    max-width: 440px;
    margin: 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.install-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #1a1a2e;
}

.install-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.install-label {
    font-size: 0.75rem;
    color: #666;
    font-family: var(--font-mono);
}

.install-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #0f0f23;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: #e2e8f0;
}

.install-body .prompt {
    color: var(--color-success);
    margin-right: 8px;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 1rem;
}

.copy-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.copy-btn.copied {
    color: var(--color-success);
}

/* Install alt links */
.install-alt {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 10px;
    margin-bottom: 36px;
}

.install-alt a {
    color: var(--color-text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.install-alt a:hover {
    color: var(--color-primary);
}

.install-alt i {
    margin-right: 2px;
    font-size: 0.8em;
}

/* Download buttons (Quick Start) */
.download-buttons {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #0f0f23;
    color: #e2e8f0 !important;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

.dl-btn:hover {
    background: var(--color-primary);
    color: #fff !important;
    transform: translateY(-1px);
}

.dl-btn .fa-windows {
    color: #0078d4;
    font-size: 1.1em;
}

.dl-btn:hover .fa-windows {
    color: #fff;
}

.dl-btn .dl-tux {
    width: 1.1em;
    height: 1.1em;
    display: inline-block;
}

.dl-file {
    font-family: var(--font-mono);
    font-size: 0.8em;
    color: var(--color-text-light);
    margin-left: 2px;
}

.dl-btn:hover .dl-file {
    color: rgba(255, 255, 255, 0.7);
}

/* Hero actions */
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

/* Hero stats */
.hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    padding: 16px 32px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.platform-icons {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.platform-icons .fa-windows {
    color: #0078d4;
}

.platform-icons .tux-icon {
    width: 1.4em;
    height: 1.4em;
    vertical-align: -0.2em;
    display: inline-block;
}

/* Inline notification service icons */
.notify-icon {
    font-size: 1.05em;
    vertical-align: -0.05em;
}

.notify-icon.telegram {
    color: #26a5e4;
}

.notify-icon.slack {
    color: #4a154b;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--color-border);
}

/* ============================================
   Features
   ============================================ */
.features {
    padding: 100px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    padding: 24px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--gradient-subtle);
    margin-bottom: 14px;
}

.feature-icon i {
    font-size: 1.25rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.feature-card code {
    background: var(--color-bg-alt);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--color-primary);
}

/* ============================================
   Software Preview (Terminals)
   ============================================ */
.preview {
    padding: 100px 0;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    align-items: stretch;
}

.terminal {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.terminal-body {
    flex: 1;
    background: #0f0f23;
    padding: 20px;
    overflow-x: auto;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #1a1a2e;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-title {
    font-size: 0.8rem;
    color: #666;
    font-family: var(--font-mono);
}

.terminal-body pre {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.7;
    color: #c9d1d9;
    white-space: pre;
    margin: 0;
}

/* Terminal syntax colors */
.t-prompt { color: #48bb78; }
.t-cmd { color: #63b3ed; }
.t-info { color: #667eea; }
.t-success { color: #48bb78; }
.t-warn { color: #ecc94b; }
.t-error { color: #fc8181; }
.t-muted { color: #4a5568; }
.t-tab { color: #718096; padding: 0 6px; }
.t-tab.t-active {
    color: #667eea;
    border-bottom: 2px solid #667eea;
}


/* ============================================
   Quick Start
   ============================================ */
.quickstart {
    padding: 100px 0;
    background: var(--color-bg-alt);
}

.steps {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    font-size: 1.125rem;
    font-weight: 700;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.code-block {
    background: #0f0f23;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #e2e8f0;
    line-height: 1.8;
    overflow-x: auto;
}

.step-desc {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* ============================================
   Highlights
   ============================================ */
.highlights {
    padding: 80px 0 100px;
    background: var(--color-bg-alt);
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.highlight {
    text-align: center;
}

.highlight i {
    font-size: 1.5rem;
    margin-bottom: 16px;
    display: inline-block;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.highlight p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: 64px 0 32px;
    background: #1a202c;
    color: #a0aec0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand {
    max-width: 320px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

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

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.6;
}

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

.footer-col h4 {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    color: #a0aec0;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid #2d3748;
    font-size: 0.85rem;
}

.footer-made i {
    color: #fc8181;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge,
.hero-title,
.hero-subtitle,
.install-block,
.hero-actions,
.hero-stats {
    animation: fadeInUp 0.7s ease both;
}

.hero-badge { animation-delay: 0.1s; }
.hero-title { animation-delay: 0.2s; }
.hero-subtitle { animation-delay: 0.3s; }
.install-block { animation-delay: 0.4s; }
.hero-actions { animation-delay: 0.5s; }
.hero-stats { animation-delay: 0.6s; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .preview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 64px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        padding: 8px 0;
        box-shadow: var(--shadow);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 12px 24px;
    }

    .nav-btn {
        margin: 8px 24px;
        text-align: center;
        justify-content: center;
    }

    .hero {
        padding: calc(var(--nav-height) + 48px) 0 72px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .features,
    .preview,
    .quickstart,
    .highlights {
        padding: 72px 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
    }

    .footer-links {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .footer-col:last-child {
        grid-column: 1 / -1;
    }

    .footer-col h4 {
        margin-bottom: 10px;
    }

    .footer-col ul {
        gap: 6px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .highlights-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        flex-direction: column;
        gap: 12px;
        padding: 16px 24px;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        justify-content: center;
    }

    .install-body {
        font-size: 0.85rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 32px;
    }

    .terminal-body pre {
        font-size: 0.72rem;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ---------- Back to Top ---------- */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
}

/* ---------- Fade-in on scroll ---------- */
.fade-target {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-target.visible {
    opacity: 1;
    transform: translateY(0);
}
