/*
 * Dev Info (/ai.php) — style. Port 1:1 v1 ai.php l.110-722 (.worktrees/v1,
 * inline <style>, kotwica inwentaryzacja-faza3.md rozdz. E) — Apple-style
 * showcase, WŁASNY design system (:root --bg/--text-primary/--accent/...),
 * NIE Tailwind (jedyna strona F3 obok changelog.php bez CDN Tailwind — ale
 * inaczej niż changelog.css, tu NIE ma "ręcznej reimplementacji klas
 * Tailwind", tylko oryginalny Apple-vanity CSS). `.dark` na <body> (jak
 * mapa.php w v1, DESYNC z resztą apki, patrz assets/js/ai.js docblock).
 * Ładowany przez <link> w templates/pages/ai/head.php (cache-bust
 * ?v=APP_VERSION), zamiast v1 inline <style> — sankcjonowana zmiana F3.
 */

/* Lucide icon styling */
.tech-icon svg,
.feature-icon svg,
.security-item .icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.tech-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.security-item .icon {
    margin-bottom: 16px;
}

.security-item .icon svg {
    width: 32px;
    height: 32px;
    color: #4ade80;
}
:root {
    --bg: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #fbfbfd;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-tertiary: #6e6e73;
    --accent: #2E7D32;
    --accent-light: #4CAF50;
    --border: rgba(0,0,0,0.08);
    --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --card-hover: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 18px;
    --radius-sm: 12px;
    --transition: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.dark {
    --bg: #000000;
    --bg-secondary: #1c1c1e;
    --bg-tertiary: #2c2c2e;
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-tertiary: #86868b;
    --border: rgba(255,255,255,0.1);
    --card-shadow: 0 2px 12px rgba(0,0,0,0.4);
    --card-hover: 0 8px 30px rgba(0,0,0,0.6);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hero Section */
.hero {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px;
    background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg) 100%);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--accent);
    color: white;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(18px, 3vw, 24px);
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 600px;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
    justify-content: center;
}

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

.hero-stat-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.hero-stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: rgba(255,255,255,0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.dark .nav {
    background: rgba(0,0,0,0.72);
}

.nav-brand {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-brand svg {
    width: 20px;
    height: 20px;
}

.nav-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-link {
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

.nav-link:hover {
    color: var(--accent);
}

.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.theme-toggle:hover {
    background: var(--accent);
    color: white;
}

/* Sections */
.section {
    padding: 100px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.section-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Tech Stack Grid */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.tech-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 32px;
    transition: all var(--transition);
    border: 1px solid transparent;
}

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

.tech-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
}

.tech-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

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

.tech-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    margin-top: 16px;
}

/* Architecture Section */
.architecture {
    background: var(--bg-secondary);
}

.arch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.arch-block {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--card-shadow);
}

.arch-block h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.arch-block ul {
    list-style: none;
}

.arch-block li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.arch-block li:last-child {
    border-bottom: none;
}

.arch-block li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Files Table */
.files-section {
    overflow-x: auto;
}

.files-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.files-table th {
    text-align: left;
    padding: 16px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
}

.files-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.files-table tr:hover td {
    background: var(--bg-secondary);
}

.file-name {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-weight: 500;
    color: var(--accent);
}

.file-type {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.file-type.php { background: #4F5B93; color: white; }
.file-type.css { background: #264de4; color: white; }
.file-type.js { background: #f0db4f; color: #323330; }
.file-type.json { background: #292929; color: #f0db4f; }
.file-type.html { background: #e34c26; color: white; }

.lines-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    min-width: 100px;
}

.lines-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
    border-radius: 4px;
    transition: width 1s ease-out;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.feature-item:hover {
    transform: translateX(4px);
    background: var(--bg-tertiary);
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.feature-content p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Security Badge */
.security-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
}

.security-section .section-label {
    color: #4ade80;
}

.security-section .section-subtitle {
    color: rgba(255,255,255,0.7);
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.security-item {
    text-align: center;
    padding: 32px 24px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.1);
}

.security-item .icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.security-item h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.security-item p {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

/* Footer */
.footer {
    text-align: center;
    padding: 60px 24px;
    background: var(--bg-secondary);
}

.footer-version {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.footer-copy {
    font-size: 12px;
    color: var(--text-tertiary);
}

.footer-links {
    margin-top: 24px;
    display: flex;
    gap: 24px;
    justify-content: center;
}

.footer-links a {
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
}

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

.animate-in {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 100px 20px 60px;
    }

    .hero-stats {
        gap: 32px;
    }

    .hero-stat-value {
        font-size: 36px;
    }

    .section {
        padding: 60px 20px;
    }

    .nav {
        padding: 0 16px;
    }
}

/* Code block */
.code-block {
    background: #1e1e1e;
    border-radius: var(--radius-sm);
    padding: 24px;
    overflow-x: auto;
    margin-top: 32px;
}

.code-block pre {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: #d4d4d4;
    margin: 0;
}

.code-comment { color: #6a9955; }
.code-keyword { color: #569cd6; }
.code-string { color: #ce9178; }
.code-function { color: #dcdcaa; }
