/* TechSpot WV — shared design system (dark glass) */

:root {
    /* Surfaces */
    --bg-grad: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
    --surface: rgba(255, 255, 255, 0.03);
    --surface-2: rgba(255, 255, 255, 0.05);
    --surface-3: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.15);
    --divider: rgba(255, 255, 255, 0.05);

    /* Text */
    --text: #ffffff;
    --text-muted: #cbd5e0;
    --text-subtle: #a0aec0;
    --text-faint: #718096;

    /* Brand / accent */
    --accent: #667eea;
    --accent-2: #764ba2;
    --accent-grad: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-soft: rgba(102, 126, 234, 0.15);
    --accent-ring: #a3bffa;

    /* Status */
    --success: #68d391;
    --success-bg: rgba(72, 187, 120, 0.15);
    --success-border: rgba(72, 187, 120, 0.3);
    --error: #fc8181;
    --error-bg: rgba(245, 101, 101, 0.15);
    --error-border: rgba(245, 101, 101, 0.3);
    --warning-bg: rgba(237, 137, 54, 0.15);
    --warning-border: rgba(237, 137, 54, 0.3);
    --warning: #f6ad55;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 50px;

    /* Type scale */
    --fs-xs: 0.8rem;
    --fs-sm: 0.9rem;
    --fs-base: 1rem;
    --fs-md: 1.1rem;
    --fs-lg: 1.25rem;
    --fs-xl: 1.5rem;
    --fs-2xl: 2rem;
    --fs-3xl: 2.5rem;

    /* Spacing scale (8pt) */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;
    --sp-10: 40px;
    --sp-12: 48px;
    --sp-15: 60px;

    /* Layout */
    --max-w-prose: 800px;
    --max-w-app: 1100px;
}

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

html { color-scheme: dark; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-muted);
    background: var(--bg-grad);
    background-attachment: fixed;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; }

.container {
    max-width: var(--max-w-app);
    margin: 0 auto;
    padding: var(--sp-5);
}
.container.prose {
    max-width: var(--max-w-prose);
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    color: var(--accent-ring);
    text-decoration: none;
    font-size: var(--fs-sm);
    padding: var(--sp-5) 0;
}
.back-link:hover { text-decoration: underline; }
.back-link:focus-visible {
    outline: 2px solid var(--accent-ring);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Site header (shared across pages) */
.site-header {
    text-align: center;
    padding: var(--sp-15) var(--sp-5) var(--sp-10);
    color: var(--text);
}
.site-header .logo { line-height: 0; margin-bottom: var(--sp-5); display: inline-block; }
.site-header .logo img { max-width: 240px; width: 100%; }
.site-header h1 {
    font-size: var(--fs-3xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: var(--sp-3);
    background: linear-gradient(135deg, #fff 0%, #cbd5e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.site-header .subtitle {
    font-size: var(--fs-md);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto var(--sp-6);
}

/* Headings (prose pages) */
.prose-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--sp-10);
    color: var(--text-muted);
}
.prose-card h2 {
    font-size: 1.75rem;
    color: var(--text);
    margin-bottom: var(--sp-3);
    text-align: center;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.prose-card h3 {
    font-size: var(--fs-lg);
    color: var(--text);
    margin: var(--sp-8) 0 var(--sp-3);
    font-weight: 600;
}
.prose-card p { margin-bottom: var(--sp-4); color: var(--text-muted); }
.prose-card ul {
    list-style: disc;
    margin-left: var(--sp-6);
    margin-bottom: var(--sp-4);
    color: var(--text-muted);
}
.prose-card li { margin-bottom: var(--sp-2); }
.prose-card strong { color: var(--text); font-weight: 600; }
.prose-card a {
    color: var(--accent-ring);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.prose-card a:focus-visible {
    outline: 2px solid var(--accent-ring);
    outline-offset: 2px;
    border-radius: 2px;
}
.last-updated {
    text-align: center;
    color: var(--text-faint);
    margin-bottom: var(--sp-8);
    font-size: var(--fs-sm);
}

/* Section */
.section { padding: var(--sp-15) 0; }
.section-title {
    text-align: center;
    margin-bottom: var(--sp-12);
}
.section-title h2 {
    font-size: var(--fs-2xl);
    color: var(--text);
    margin-bottom: var(--sp-3);
    font-weight: 700;
    letter-spacing: -0.01em;
}
.section-title p {
    color: var(--text-subtle);
    font-size: var(--fs-md);
    max-width: 600px;
    margin: 0 auto;
}

/* Card primitive */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--sp-8);
    transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-strong); }

/* Button / link */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: var(--fs-sm);
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    background: none;
    color: inherit;
    transition: opacity 0.2s, transform 0.1s, background-color 0.2s, border-color 0.2s;
}
.btn:hover { opacity: 0.85; }
.btn:active { transform: scale(0.98); }
.btn:focus-visible {
    outline: 2px solid var(--accent-ring);
    outline-offset: 3px;
}
.btn.primary {
    background: var(--accent-grad);
    color: var(--text);
}
.btn.secondary {
    background: var(--surface-3);
    color: var(--text-muted);
}
.btn.lg {
    padding: 16px 32px;
    font-size: var(--fs-md);
    font-weight: 600;
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}
.btn.full { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Tag / chip */
.tag {
    background: var(--accent-soft);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: var(--fs-xs);
    display: inline-block;
}

/* Forms */
.form-group { margin-bottom: var(--sp-6); }
.form-group label {
    display: block;
    color: var(--text-muted);
    margin-bottom: var(--sp-2);
    font-size: var(--fs-sm);
    font-weight: 500;
}
.form-group .req { color: var(--accent-ring); }
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text);
    font-size: var(--fs-base);
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface-3);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-faint);
}
.form-group textarea {
    min-height: 150px;
    resize: vertical;
}
.form-group select option {
    background: #1a1a2e;
    color: var(--text);
}
.form-group .helper {
    color: var(--text-faint);
    font-size: var(--fs-xs);
    margin-top: var(--sp-2);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    margin-bottom: var(--sp-4);
}
.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--accent);
    flex-shrink: 0;
}
.checkbox-group label {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1.5;
}
.checkbox-group label a {
    color: var(--accent-ring);
    text-decoration: underline;
}

/* Honeypot */
.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    z-index: -1;
}

/* Messages / alerts */
.message {
    padding: var(--sp-4);
    border-radius: var(--radius-sm);
    margin-bottom: var(--sp-6);
    display: none;
    border: 1px solid transparent;
}
.message[hidden] { display: none; }
.message.show, .message:not([hidden]).visible { display: block; }
.message.success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success);
}
.message.error {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error);
}
.message.warning {
    background: var(--warning-bg);
    border-color: var(--warning-border);
    color: var(--warning);
}

/* Footer */
.site-footer {
    text-align: center;
    padding: var(--sp-10) var(--sp-5);
    color: var(--text-faint);
    font-size: var(--fs-sm);
    border-top: 1px solid var(--divider);
    margin-top: var(--sp-15);
}
.site-footer p + p { margin-top: var(--sp-2); }
.site-footer a {
    color: var(--accent-ring);
    text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }
.site-footer a:focus-visible {
    outline: 2px solid var(--accent-ring);
    outline-offset: 3px;
    border-radius: 2px;
}
.site-footer nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--sp-2) var(--sp-5);
    margin-top: var(--sp-3);
}
.footer-cta {
    margin-bottom: var(--sp-4);
}

/* Visually hidden (a11y) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive */
@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-auto-300 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
    .grid-auto-280 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .grid-auto-220 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

@media (max-width: 600px) {
    .site-header { padding: var(--sp-10) var(--sp-5); }
    .site-header h1 { font-size: 2rem; }
    .prose-card { padding: var(--sp-6); }
    .card { padding: var(--sp-6); }
    .section { padding: var(--sp-10) 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .btn:active { transform: none; }
}
