/* ColoGPU Global Styles — Instrument Serif + DM Sans design system */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Instrument+Serif:ital@0;1&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
    --primary: #2774AE;
    --primary-light: #3a8dc4;
    --accent: #10b981;
    --accent-light: #34d399;
    --cool-1: #0a0e17;
    --cool-2: #0f1a2b;
    --cool-3: #1a2d47;
    --text: #e2e8f0;
    --text-muted: #8a9bb5;
    --text-dim: #64748b;
    --text-dark: #475569;
    --surface: #0d1520;
    --surface-elevated: #131a2b;
    --border: rgba(138, 155, 181, 0.08);
    --border-hover: rgba(39, 116, 174, 0.2);
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--cool-1);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Noise texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

/* ── Navigation ── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1.25rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    background: rgba(10, 14, 23, 0.8);
    border-bottom: 1px solid rgba(39, 116, 174, 0.08);
}

.nav-logo {
    font-family: 'Instrument Serif', serif;
    font-size: 1.6rem;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo .logo-mark {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    position: relative;
    overflow: hidden;
    display: inline-block;
}
.nav-logo .logo-mark::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 5px;
    background: var(--cool-1);
}

/* Legacy logo span gradient (for pages still using Colo<span>GPU</span>) */
.nav-logo span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: color 0.3s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--primary); }

.btn-nav {
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    color: white !important;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    letter-spacing: 0.02em;
    -webkit-text-fill-color: white !important;
}
.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(39, 116, 174, 0.3);
}

/* ── Page layout ── */
.page {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 auto;
    padding: 7rem 2rem 4rem;
}

.page > h1 {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.page > p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ── Page header with tag ── */
.page-header {
    margin-bottom: 2.5rem;
}

.page-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    background: rgba(39, 116, 174, 0.08);
    border: 1px solid rgba(39, 116, 174, 0.15);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-light);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.page-tag::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Article styles ── */
.article-meta {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.article-meta .category {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-light);
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.85rem;
    background: rgba(39, 116, 174, 0.08);
    border: 1px solid rgba(39, 116, 174, 0.15);
    border-radius: 100px;
}

.article-meta time {
    font-size: 0.8rem;
    color: var(--text-dim);
}

article h1 {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

article h2 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.6rem;
    font-weight: 400;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text);
    letter-spacing: -0.01em;
}

article h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

article p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.75;
}

article a {
    color: var(--primary-light);
    text-decoration: none;
    border-bottom: 1px solid rgba(39, 116, 174, 0.3);
    transition: border-color 0.3s;
}
article a:hover { border-color: var(--primary); }

article ul, article ol {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

article li { margin-bottom: 0.5rem; line-height: 1.75; }
article strong { color: var(--text); font-weight: 600; }

article blockquote {
    border-left: 3px solid var(--primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--surface-elevated);
    border-radius: 0 8px 8px 0;
    color: var(--text-muted);
}

/* ── Tables ── */
article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

article th {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--border);
    color: var(--text);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

article td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}

article tr:hover td { background: rgba(39, 116, 174, 0.03); }

/* ── FAQ ── */
.faq-item {
    margin-bottom: 1rem;
    padding: 1.5rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.3s;
}
.faq-item:hover { border-color: var(--border-hover); }

.faq-item h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.faq-item p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* ── CTA box ── */
.cta-box {
    margin-top: 3rem;
    padding: 2.5rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
}

.cta-box h3 {
    font-family: 'Instrument Serif', serif;
    margin-top: 0;
    color: var(--text);
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.cta-box p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.cta-btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.01em;
}
.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(39, 116, 174, 0.3);
}

/* ── City page stats ── */
.city-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: border-color 0.3s;
}
.stat-card:hover { border-color: var(--border-hover); }

.stat-card .number {
    font-family: 'Instrument Serif', serif;
    font-size: 1.75rem;
    color: var(--primary-light);
    display: block;
    letter-spacing: -0.02em;
}

.stat-card .label {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* ── Blog listing ── */
.blog-grid {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.blog-card {
    display: block;
    text-decoration: none;
    padding: 1.25rem 1.5rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s;
}
.blog-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
.blog-card h3 { color: var(--text); font-size: 1rem; margin-bottom: 0.3rem; font-weight: 600; }
.blog-card p { color: var(--text-muted); font-size: 0.85rem; margin: 0; line-height: 1.5; }

/* ── City listing grid ── */
.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.city-card {
    display: block;
    text-decoration: none;
    padding: 1.25rem 1.5rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s;
}
.city-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
.city-card h3 { color: var(--text); font-size: 0.95rem; margin-bottom: 0.2rem; }
.city-card p { color: var(--text-dim); font-size: 0.8rem; margin: 0; }

/* ── Footer ── */
.footer {
    position: relative;
    z-index: 1;
    padding: 3rem;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.footer-left {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.footer-left span {
    font-family: 'Instrument Serif', serif;
    font-size: 1.1rem;
    color: var(--text);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.3s;
}
.footer-links a:hover { color: var(--text); }

/* ── Email capture ── */
.email-capture {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
    text-align: center;
}
.email-capture h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 0.4rem;
}
.email-capture p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
}
.email-capture form {
    display: flex;
    gap: 0.5rem;
    max-width: 440px;
    margin: 0 auto;
}
.email-capture input[type="email"] {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--cool-1);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}
.email-capture input[type="email"]::placeholder { color: var(--text-dim); }
.email-capture input[type="email"]:focus { border-color: var(--primary); }
.email-capture button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}
.email-capture button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(39, 116, 174, 0.3);
}
.email-capture .subscribe-msg {
    margin-top: 0.75rem;
    font-size: 0.82rem;
    color: var(--accent);
    display: none;
}
.email-capture .subscribe-msg.show { display: block; }
.email-capture .subscribe-msg.error { color: #ef4444; }
.email-capture .note {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .nav { padding: 1rem 1.5rem; }
    .nav-links a:not(.btn-nav) { display: none; }
    .page { padding: 6rem 1.25rem 3rem; }
    article h1 { font-size: 1.75rem; }
    article h2 { font-size: 1.35rem; }
    .city-stats { grid-template-columns: 1fr; }
    .city-grid { grid-template-columns: 1fr; }
    article table { font-size: 0.8rem; }
    article th, article td { padding: 0.5rem; }
    .footer { flex-direction: column; gap: 1rem; text-align: center; padding: 2rem 1.5rem; }
}
