:root {
    --sts-bg: #0b1020;
    --sts-bg-alt: #121933;
    --sts-card: #182142;
    --sts-accent: #4f8cff;
    --sts-accent-2: #7c5cff;
    --sts-text: #e8ecf6;
    --sts-muted: #9aa6c4;
    --sts-yt: #ff0033;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    background: var(--sts-bg);
    color: var(--sts-text);
    line-height: 1.6;
}

a {
    color: var(--sts-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(11, 16, 32, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 66px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--sts-text);
}

.brand .logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--sts-accent), var(--sts-accent-2));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-links a {
    color: var(--sts-muted);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--sts-text);
    text-decoration: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--sts-accent), var(--sts-accent-2));
    color: #fff;
    box-shadow: 0 8px 24px rgba(79, 140, 255, 0.35);
}

.btn-yt {
    background: var(--sts-yt);
    color: #fff;
    box-shadow: 0 8px 24px rgba(255, 0, 51, 0.35);
}

.btn-ghost {
    background: transparent;
    color: var(--sts-text);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Hero */
.hero {
    position: relative;
    padding: 96px 0 84px;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 60% at 75% 15%, rgba(124, 92, 255, 0.28), transparent 60%),
        radial-gradient(55% 55% at 15% 85%, rgba(79, 140, 255, 0.24), transparent 60%);
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(79, 140, 255, 0.14);
    color: #bcd0ff;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin: 0 0 18px;
    font-weight: 800;
}

.hero h1 .grad {
    background: linear-gradient(120deg, var(--sts-accent), var(--sts-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p.lead {
    color: var(--sts-muted);
    font-size: 1.15rem;
    margin: 0 0 30px;
    max-width: 560px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-visual img {
    width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

/* Sections */
.section {
    padding: 72px 0;
}

.section-alt {
    background: var(--sts-bg-alt);
}

.section-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 46px;
}

.section-head h2 {
    font-size: 2.1rem;
    margin: 0 0 12px;
    font-weight: 800;
}

.section-head p {
    color: var(--sts-muted);
    margin: 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.card {
    background: var(--sts-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 28px;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(79, 140, 255, 0.4);
}

.card .icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.2), rgba(124, 92, 255, 0.2));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
    color: #bcd0ff;
}

.card h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

.card p {
    color: var(--sts-muted);
    margin: 0;
}

/* YouTube promo */
.yt-promo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 0, 51, 0.12), rgba(124, 92, 255, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 44px;
}

.yt-promo h2 {
    font-size: 2rem;
    margin: 0 0 14px;
}

.yt-promo p {
    color: var(--sts-muted);
    margin: 0 0 24px;
}

.yt-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.yt-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Footer */
.footer {
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--sts-bg-alt);
}

.footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer .muted {
    color: var(--sts-muted);
    font-size: 0.92rem;
}

.social {
    display: flex;
    gap: 14px;
}

.social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: var(--sts-text);
    font-size: 18px;
}

.social a:hover {
    background: var(--sts-yt);
    text-decoration: none;
}

/* 404 */
.error-wrap {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

.error-wrap h1 {
    font-size: 6rem;
    margin: 0;
    background: linear-gradient(120deg, var(--sts-accent), var(--sts-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 860px) {
    .hero .container,
    .yt-promo {
        grid-template-columns: 1fr;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2.3rem;
    }
}

/* ---------- Cosmic Quarry case-study page ---------- */
.page-hero {
    position: relative;
    padding: 84px 0 72px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 60% at 80% 10%, rgba(124, 92, 255, 0.30), transparent 60%),
        radial-gradient(55% 55% at 10% 90%, rgba(79, 140, 255, 0.26), transparent 60%);
    z-index: 0;
}

.page-hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 44px;
    align-items: center;
}

.page-hero .badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(124, 92, 255, 0.16);
    color: #d7c9ff;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 18px;
}

.page-hero h1 {
    font-size: 2.8rem;
    line-height: 1.12;
    margin: 0 0 16px;
    font-weight: 800;
}

.page-hero p.lead {
    color: var(--sts-muted);
    font-size: 1.12rem;
    margin: 0 0 26px;
}

.page-hero .shot {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.prose {
    max-width: 780px;
    margin: 0 auto;
    color: var(--sts-text);
}

.prose p {
    color: var(--sts-muted);
    font-size: 1.05rem;
    margin: 0 0 18px;
}

.prose strong {
    color: var(--sts-text);
}

/* Tech-stack badges */
.stack-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.stack-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 18px;
    border-radius: 12px;
    background: var(--sts-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--sts-text);
    font-weight: 600;
    font-size: 0.95rem;
}

.stack-badge i {
    color: #bcd0ff;
}

/* Split feature rows */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 44px;
    align-items: center;
    margin-bottom: 40px;
}

.split:last-child {
    margin-bottom: 0;
}

.split.reverse .split-media {
    order: 2;
}

.split-media img {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.split h3 {
    font-size: 1.4rem;
    margin: 0 0 12px;
}

.split p {
    color: var(--sts-muted);
    margin: 0;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(79, 140, 255, 0.15);
    color: #bcd0ff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* Callout / quote */
.callout {
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.12), rgba(124, 92, 255, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 34px 38px;
    max-width: 860px;
    margin: 0 auto;
}

.callout p {
    font-size: 1.2rem;
    color: var(--sts-text);
    margin: 0 0 10px;
    line-height: 1.5;
}

.callout .who {
    color: var(--sts-muted);
    font-size: 0.95rem;
}

/* Numbered workflow list */
.steps {
    counter-reset: step;
    max-width: 820px;
    margin: 0 auto;
    display: grid;
    gap: 16px;
}

.step {
    position: relative;
    background: var(--sts-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 20px 22px 20px 68px;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 18px;
    top: 18px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--sts-accent), var(--sts-accent-2));
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step h4 {
    margin: 0 0 6px;
    font-size: 1.08rem;
}

.step p {
    margin: 0;
    color: var(--sts-muted);
}

/* Screenshot gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.gallery figure {
    margin: 0;
    background: var(--sts-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    overflow: hidden;
}

.gallery img {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.gallery figcaption {
    padding: 12px 16px;
    color: var(--sts-muted);
    font-size: 0.9rem;
}

.gallery img {
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.gallery figure:hover img {
    transform: scale(1.03);
}

.shot,
.split-media img {
    cursor: zoom-in;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(6, 9, 20, 0.92);
    backdrop-filter: blur(4px);
}

.lightbox.open {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.lightbox-content img {
    max-width: 92vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
    color: var(--sts-text);
    font-size: 0.95rem;
    text-align: center;
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: rgba(24, 33, 66, 0.85);
    color: var(--sts-text);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.lightbox-btn:hover {
    background: var(--sts-accent);
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

.lightbox-close {
    position: absolute;
    top: -54px;
    right: 0;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(24, 33, 66, 0.85);
    color: var(--sts-text);
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lightbox-close:hover {
    background: var(--sts-yt);
}

@media (max-width: 860px) {
    .lightbox-prev {
        left: 6px;
    }

    .lightbox-next {
        right: 6px;
    }

    .lightbox-btn {
        background: rgba(24, 33, 66, 0.95);
    }

    .lightbox-close {
        top: -50px;
    }
}

.cta-band {
    text-align: center;
}

.cta-band .hero-actions {
    justify-content: center;
}

@media (max-width: 860px) {
    .page-hero .container,
    .split,
    .split.reverse .split-media {
        grid-template-columns: 1fr;
        order: 0;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .page-hero h1 {
        font-size: 2.1rem;
    }
}
