/* NeTTer product site — aligned with ecain.org/pWarden */

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

:root {
    --text: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --accent: #2563eb;
    --accent-dark: #1e40af;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --border: #e2e8f0;
    --header-bg: #0f172a;
    --footer-bg: #0f172a;
    --footer-text: #cbd5e1;
    --footer-link: #93c5fd;
    --code-bg: #1e293b;
    --code-border: #334155;
    --callout-accent: var(--border);
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space: 1.25rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --radius: 8px;
    --radius-pill: 999px;
    --max-width: 1200px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --text: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-muted: #94a3b8;
        --surface: #1e293b;
        --surface-muted: #0f172a;
        --border: #334155;
        --header-bg: #020617;
        --footer-bg: #020617;
        color-scheme: dark;
    }

    body {
        background: #0f172a;
    }

    nav {
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    }

    main {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    }

    code {
        background: #334155;
        color: #e2e8f0;
    }

    .download-section {
        background: var(--surface-muted);
    }

    .screenshot-item {
        background: var(--surface-muted);
    }
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    main {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: #f1f5f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

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

a:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space);
    z-index: 200;
    padding: var(--space-xs) var(--space);
    background: var(--header-bg);
    color: #fff;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
}

.skip-link:focus-visible {
    top: var(--space-sm);
}

header {
    background: var(--header-bg);
    color: #fff;
    padding: var(--space-md) var(--space-lg);
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.header-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.header-logo,
img[src*="logo.png"] {
    width: 32px;
    height: 32px;
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
    display: block;
}

header h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-xs);
}

header .tagline {
    font-size: 1.0625rem;
    opacity: 0.9;
    margin-bottom: var(--space-xs);
}

header .version {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    padding: 4px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: var(--space-xs);
}

nav {
    background: var(--surface);
    padding: var(--space-sm) 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: var(--space);
    border-bottom: 1px solid var(--border);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space);
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
    transition: background-color 0.15s ease, color 0.15s ease;
}

nav a:hover {
    background: var(--surface-muted);
    color: var(--text);
}

nav a[aria-current="page"] {
    background: var(--surface-muted);
    color: var(--text);
    font-weight: 600;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space) var(--space-lg);
    flex: 1;
    width: 100%;
}

main {
    background: var(--surface);
    padding: var(--space-lg);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    animation: main-fade-in 0.2s ease-out;
}

@keyframes main-fade-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

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

section {
    margin-bottom: var(--space-lg);
}

section:last-child {
    margin-bottom: 0;
}

section h2 {
    color: var(--text);
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: var(--space);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--border);
    scroll-margin-top: 5rem;
}

section > h3 {
    color: var(--text);
    font-size: 1.0625rem;
    margin: var(--space-md) 0 var(--space-sm);
    font-weight: 600;
}

section p {
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
    line-height: 1.7;
}

.hero {
    text-align: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border);
}

.hero-lead {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 36rem;
    margin: 0 auto var(--space-md);
    line-height: 1.6;
}

.hero-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: var(--space-sm);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
}

code {
    background: var(--surface-muted);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 0.88em;
    color: var(--text);
}

pre {
    background: var(--code-bg);
    color: #f1f5f9;
    padding: var(--space);
    border-radius: var(--radius);
    border: 1px solid var(--code-border);
    overflow-x: auto;
    margin: var(--space-sm) 0;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

ul,
ol {
    margin-left: 1.25rem;
    margin-bottom: var(--space-sm);
}

li {
    margin-bottom: 0.35rem;
    color: var(--text-secondary);
}

.callout,
.feature-box {
    background: var(--surface-muted);
    border-left: 4px solid var(--callout-accent);
    padding: var(--space);
    margin: var(--space) 0;
    border-radius: var(--radius);
}

.callout ul,
.callout ol {
    margin-bottom: 0;
}

.callout p {
    margin-bottom: 0;
}

.callout p + p {
    margin-top: var(--space-sm);
}

.callout--warn {
    border-left-color: #eab308;
}

.tool-item {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-sm) var(--space);
    margin-bottom: var(--space-xs);
}

.tool-item h4 {
    color: var(--text);
    font-size: 0.9375rem;
    margin-bottom: 0.15rem;
    font-weight: 600;
}

.tool-item p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space);
    margin-top: var(--space-sm);
}

.screenshot-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid var(--border);
}

.screenshot-caption {
    padding: var(--space-sm) var(--space);
}

.screenshot-caption h3 {
    color: var(--text);
    font-size: 0.9375rem;
    margin: 0 0 0.25rem;
    font-weight: 600;
}

.screenshot-caption p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.screenshot-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.upcoming-features {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-left: 4px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-md);
    margin: var(--space) 0;
}

.upcoming-features h3 {
    color: var(--text);
    margin-top: 0;
    font-size: 1.0625rem;
}

.upcoming-features p,
.upcoming-features li {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.toc {
    background: var(--surface-muted);
    padding: var(--space);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: var(--space-lg);
}

.toc h2 {
    font-size: 1.0625rem;
    border: none;
    padding: 0;
    margin-bottom: var(--space-sm);
}

.toc ul {
    list-style: none;
    margin: 0;
    columns: 2;
    column-gap: var(--space-lg);
}

.toc li {
    margin-bottom: 0.25rem;
    break-inside: avoid;
}

.toc a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
}

.toc a:hover {
    color: var(--text);
    text-decoration: underline;
}

/* Blue only for inline links in copy — not headings, nav, or TOC */
main p a,
main li a,
.examples-more a,
.callout a,
.feature-card a,
.info-card a,
.download-section a:not(.btn) {
    color: var(--accent);
}

main p a:hover,
main li a:hover,
.examples-more a:hover,
.callout a:hover,
.feature-card a:hover,
.info-card a:hover {
    color: var(--accent-dark);
}

.examples-more {
    margin-top: var(--space);
    font-size: 0.9375rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    margin: var(--space-lg) 0;
}

.stat-box {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space);
    text-align: center;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space);
    margin-top: var(--space-sm);
}

.feature-card {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space);
}

.feature-card h3 {
    color: var(--text);
    font-size: 1rem;
    margin: 0 0 var(--space-sm);
    font-weight: 600;
}

.feature-card ul {
    list-style: none;
    margin: 0;
}

.feature-card li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    line-height: 1.5;
}

.feature-card li:last-child {
    border-bottom: none;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space);
    margin-top: var(--space-sm);
}

.info-card {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space);
}

.info-card h3 {
    color: var(--text);
    font-size: 1rem;
    margin: 0 0 var(--space-sm);
    font-weight: 600;
}

.info-card p {
    font-size: 0.9375rem;
    margin-bottom: var(--space-xs);
}

.info-card p:last-child {
    margin-bottom: 0;
}

.download-section {
    background: var(--surface-muted);
    padding: var(--space-md);
    border-radius: var(--radius);
    margin: var(--space) 0;
    border: 1px solid var(--border);
    border-left: 4px solid var(--border);
    text-align: center;
}

.download-section h2 {
    margin: 0 0 var(--space-sm);
    color: var(--text);
    font-size: 1.0625rem;
    font-weight: 600;
    border: none;
    padding: 0;
}

.download-section p {
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.download-section .btn {
    font-size: 1rem;
    padding: 0.65rem 1.5rem;
    margin: var(--space-sm) auto 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.55rem 1.25rem;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid var(--accent);
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--surface-muted);
    border-color: var(--text-muted);
    color: var(--text);
}

.site-footer {
    text-align: center;
    padding: var(--space-lg) var(--space);
    color: var(--footer-text);
    background: var(--footer-bg);
    font-size: 0.875rem;
    margin-top: auto;
}

.site-footer p {
    margin-bottom: 0.35rem;
    color: var(--footer-text);
}

.site-footer p:last-child {
    margin-bottom: 0;
}

.site-footer a {
    color: var(--footer-link);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    main {
        padding: var(--space);
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: var(--space-xs);
    }

    section h2 {
        font-size: 1.25rem;
    }

    .toc ul {
        columns: 1;
    }

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

    .hero-actions .btn {
        width: 100%;
    }

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

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
}
