/* Starside Labs design system. Dark + Mars-red palette, modernized. */

:root {
    --bg: #0a0a0a;
    --bg-elev: #111113;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);

    --red-400: #f87171;
    --red-500: #ef4444;
    --red-600: #dc2626;
    --red-700: #b91c1c;
    --red-glow: rgba(239, 68, 68, 0.18);

    --text: #f4f4f5;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;

    --green: #22c55e;
    --amber: #fbbf24;

    --maxw: 1140px;
    --radius: 14px;
    --radius-lg: 20px;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Fixed atmospheric backdrop: single calm red glow + starfield. No rainbow cycling. */
.backdrop {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(900px circle at 15% -5%, rgba(220, 38, 38, 0.22), transparent 55%),
        radial-gradient(1000px circle at 95% 110%, rgba(185, 28, 28, 0.16), transparent 55%);
}

.stars {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    animation: twinkle 4s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 0.9; }
}

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

/* Layout helpers */
.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.section-tight {
    padding: 3rem 0;
}

.eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--red-400);
    margin-bottom: 1rem;
}

h1, h2, h3 {
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 700;
}

h2.section-title {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    margin-bottom: 1rem;
}

.lead {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 56ch;
}

.muted {
    color: var(--text-muted);
}

/* Navigation */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav.scrolled {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(16px);
    border-bottom-color: var(--border);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.05rem;
}

.brand img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 12px var(--red-glow);
}

.brand span {
    background: linear-gradient(120deg, #fff, var(--red-400));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    list-style: none;
}

.nav-links a {
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.93rem;
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: var(--text);
    background: var(--surface-hover);
}

.nav-cta {
    color: var(--text) !important;
    border: 1px solid var(--border-strong);
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    padding: 0.4rem 0.6rem;
    font-size: 1.1rem;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(120deg, var(--red-500), var(--red-700));
    color: #fff;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(220, 38, 38, 0.4);
}

.btn-ghost {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text);
}

.btn-ghost:hover {
    background: var(--surface-hover);
    transform: translateY(-2px);
}

/* Hero */
.hero {
    padding: 6rem 0 4rem;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4rem);
    max-width: 18ch;
    margin: 0 auto 1.4rem;
    background: linear-gradient(120deg, #fff 30%, var(--red-400));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .lead {
    margin: 0 auto 2.2rem;
    font-size: 1.2rem;
    text-align: center;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Generic card */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                border-color 0.3s, background 0.3s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--border-red, rgba(239, 68, 68, 0.4));
    background: var(--surface-hover);
}

.card.linkable:hover {
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.grid {
    display: grid;
    gap: 1.5rem;
}

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

/* Initiative + project cards */
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.4rem 0 1rem;
}

.tag {
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    border: 1px solid var(--border-red, rgba(239, 68, 68, 0.25));
    background: rgba(239, 68, 68, 0.08);
    color: var(--red-400);
    letter-spacing: 0.02em;
}

.status {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    border: 1px solid;
}

.status-active { color: var(--green); border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.1); }
.status-beta { color: var(--amber); border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.1); }
.status-soon { color: var(--red-400); border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.1); }

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.card h3 {
    font-size: 1.3rem;
}

.card-kicker {
    font-size: 0.8rem;
    color: var(--red-400);
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.97rem;
    flex: 1;
}

.card-links {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.2rem;
    flex-wrap: wrap;
}

.card-link {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.card-link:hover {
    color: var(--text);
    border-color: var(--border-red, rgba(239, 68, 68, 0.4));
    background: var(--surface-hover);
}

.arrow {
    color: var(--red-400);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 1.1rem;
}

/* Values / feature list */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.value h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.value .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--red-500);
    box-shadow: 0 0 12px var(--red-500);
    margin-bottom: 1rem;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    text-align: center;
}

.stat-num {
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--red-400);
    display: block;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Breadcrumb */
.crumbs {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.crumbs a:hover { color: var(--red-400); }

/* Project detail */
.detail-hero {
    padding: 4rem 0 2rem;
}

.detail-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    margin-bottom: 1rem;
}

.detail-tagline {
    font-size: 1.25rem;
    color: var(--red-400);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    display: grid;
    gap: 0.9rem;
}

.feature-list li {
    padding-left: 1.6rem;
    position: relative;
    color: var(--text-muted);
}

.feature-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--red-500);
}

.prose p { color: var(--text-muted); margin-bottom: 1rem; max-width: 68ch; }
.prose h2 { font-size: 1.6rem; margin: 2.5rem 0 1rem; }
.prose code {
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.1rem 0.4rem;
    font-size: 0.88em;
    color: var(--red-400);
}

/* Footer */
.footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    background: rgba(10, 10, 10, 0.6);
    padding: 3rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.footer ul { list-style: none; display: grid; gap: 0.6rem; }
.footer a { color: var(--text-muted); font-size: 0.92rem; }
.footer a:hover { color: var(--red-400); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-dim);
    font-size: 0.88rem;
}

/* Responsive */
@media (max-width: 900px) {
    .grid-3, .values-grid { grid-template-columns: repeat(2, 1fr); }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(10, 10, 10, 0.97);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border);
        padding: 0.5rem;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 0.8rem 1rem; }
    .nav-toggle { display: block; }
    .grid-3, .grid-2, .values-grid, .stats { grid-template-columns: 1fr; }
    .section { padding: 3.5rem 0; }
}
