/* ═══════════════════════════════════════════════════════════════════════════
   Proofly — Design System
   Pure Black + Electric Blue + White
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --bg: #000000;
    --bg-card: #0a0a0a;
    --bg-elevated: #111111;
    --bg-subtle: #0d0d0d;
    --accent: #3B82F6;
    --accent-dim: rgba(59, 130, 246, 0.12);
    --accent-border: rgba(59, 130, 246, 0.25);
    --accent-glow: 0 0 30px rgba(59, 130, 246, 0.08);
    --text: #FFFFFF;
    --text-secondary: #A1A1AA;
    --text-muted: #52525B;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --safe: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    --radius: 12px;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

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

button {
    font-family: inherit;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ═══ ANIMATIONS ═══════════════════════════════════════════════════════════ */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

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

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══ NAVIGATION ═══════════════════════════════════════════════════════════ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}

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

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

.nav-logo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

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

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

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

.nav-cta {
    font-size: 0.825rem;
    font-weight: 600;
    padding: 8px 22px;
    border-radius: 100px;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.25s;
}

.nav-cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    margin: 5px 0;
    transition: all 0.3s;
}

/* ═══ HERO ═════════════════════════════════════════════════════════════════ */
.hero {
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black 0%, transparent 70%);
}

.hero-inner {
    position: relative;
    text-align: center;
    max-width: 780px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 8px 20px;
    border-radius: 100px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    color: var(--accent);
    margin-bottom: 32px;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse-dot 2s ease infinite;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -2.5px;
    margin-bottom: 24px;
}

.hero-title-accent {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 40px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.25s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-hover);
}

.btn-outline:hover {
    border-color: var(--accent-border);
    background: var(--accent-dim);
}

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 48px;
    padding: 32px 0;
    border-top: 1px solid var(--border);
}

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

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

.hero-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

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

/* ═══ FEATURES (Bento Grid) ════════════════════════════════════════════════ */
.features {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 64px;
}

.section-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 14px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

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

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    gap: 16px;
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover {
    border-color: var(--accent-border);
    transform: translateY(-4px);
    box-shadow: var(--accent-glow);
}

.bento-card.bento-wide {
    grid-column: span 2;
}

.bento-card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    border-radius: 10px;
    color: var(--accent);
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.bento-card-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.bento-card-desc {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.bento-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bento-card-tags span {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 100px;
    background: var(--bg-elevated);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.bento-card:hover .bento-card-tags span {
    border-color: var(--accent-border);
    color: var(--accent);
}

.bento-card-number {
    position: absolute;
    top: 24px;
    right: 28px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* ═══ HOW IT WORKS ═════════════════════════════════════════════════════════ */
.how-it-works {
    padding: 120px 0;
    background: var(--bg-subtle);
}

.steps-row {
    display: flex;
    align-items: flex-start;
    max-width: 960px;
    margin: 0 auto;
}

.step {
    flex: 1;
    text-align: center;
    padding: 0 20px;
    position: relative;
}

.step-node {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.1rem;
    color: var(--accent);
    transition: all 0.4s;
}

.step:hover .step-node {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

.step-connector {
    width: 100%;
    height: 2px;
    background: var(--border);
    margin-top: 28px;
    position: relative;
}

.step-connector::after {
    content: '';
    position: absolute;
    right: -4px;
    top: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.4s;
}

.step:hover .step-connector::after {
    opacity: 1;
}

.step-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-desc {
    font-size: 0.825rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.step-connector-wrap {
    display: flex;
    align-items: center;
    width: 60px;
    flex-shrink: 0;
    margin-top: 28px;
}

.step-line {
    width: 100%;
    height: 1px;
    background: var(--border);
}

/* ═══ DEMO ═════════════════════════════════════════════════════════════════ */
.demo {
    padding: 120px 0;
}

.demo-container {
    max-width: 720px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
}

.demo-header {
    padding: 32px 36px 0;
    text-align: center;
}

.demo-header h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.demo-header p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.demo-upload-panel {
    padding: 24px 36px 36px;
}

.demo-upload-zone {
    border: 2px dashed var(--border-hover);
    border-radius: var(--radius);
    padding: 48px 28px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: transparent;
}

.demo-upload-zone:hover,
.demo-upload-zone.drag-over {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.demo-upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: var(--accent);
}

.demo-upload-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.demo-upload-title .browse-link {
    color: var(--accent);
    cursor: pointer;
}

.demo-upload-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.demo-file-preview {
    margin-top: 18px;
    padding: 18px;
    background: var(--bg-elevated);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    animation: slideUp 0.3s ease;
}

.demo-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.demo-file-icon {
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.demo-file-details {
    flex: 1;
    min-width: 0;
}

.demo-file-name {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.demo-file-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.demo-file-remove {
    width: 30px;
    height: 30px;
    border: none;
    cursor: pointer;
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.demo-file-remove:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-analyze {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius);
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

.demo-results-panel {
    padding: 36px;
    animation: slideUp 0.4s ease;
}

.result-score-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px;
    margin-bottom: 24px;
}

.result-ring-container {
    position: relative;
    width: 140px;
    height: 140px;
}

.result-ring {
    width: 140px;
    height: 140px;
}

.result-ring-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 6;
}

.result-ring-progress {
    fill: none;
    stroke: var(--accent);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.5s;
}

.result-ring-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.result-pct {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 700;
}

.result-pct-sign {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.result-score-meta {
    text-align: center;
    margin-top: 16px;
}

.result-score-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.result-confidence {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 18px;
    border-radius: 100px;
}

.result-confidence.conf-low {
    background: rgba(34, 197, 94, 0.1);
    color: var(--safe);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.result-confidence.conf-medium {
    background: rgba(234, 179, 8, 0.1);
    color: var(--warning);
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.result-confidence.conf-high {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.result-info-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.result-info-item {
    background: var(--bg-elevated);
    border-radius: 8px;
    padding: 14px;
    border: 1px solid var(--border);
    text-align: center;
}

.result-info-label {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.result-info-value {
    display: block;
    font-size: 0.825rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-signals {
    margin-bottom: 24px;
}

.result-signals-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 14px;
}

.result-signals-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-signals-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 0.825rem;
    color: var(--text-secondary);
    animation: slideUp 0.3s ease both;
}

.signal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: 6px;
    flex-shrink: 0;
}

.btn-new {
    width: 100%;
    padding: 14px;
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-new:hover {
    border-color: var(--accent-border);
}

/* ═══ CTA ══════════════════════════════════════════════════════════════════ */
.cta-section {
    padding: 120px 0;
}

.cta-card {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 80px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-card h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.cta-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 36px;
}

.cta-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ═══ FOOTER ═══════════════════════════════════════════════════════════════ */
.footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-brand-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.footer-desc {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.footer-col-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-col a {
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--text);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

.footer-bottom-links a {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer-bottom-links a:hover {
    color: var(--text-secondary);
}

/* ═══ ERROR TOAST ══════════════════════════════════════════════════════════ */
.error-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elevated);
    border: 1px solid var(--danger);
    color: #fca5a5;
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 200;
}

.error-toast button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
}

.hidden {
    display: none !important;
}

/* ═══ RESPONSIVE ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2.8rem;
        letter-spacing: -1px;
    }

    .hero-stats {
        gap: 24px;
        flex-wrap: wrap;
    }

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

    .bento-card.bento-wide {
        grid-column: span 1;
    }

    .steps-row {
        flex-direction: column;
        gap: 24px;
        align-items: center;
    }

    .step-connector-wrap {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .cta-card {
        padding: 48px 28px;
    }

    .cta-card h2 {
        font-size: 1.8rem;
    }

    .result-info-row {
        grid-template-columns: 1fr;
    }

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