/* ══════════════════════════════════════
   Work Page Shell — Design Case Studies
   Same design language as AIagentswarm/AIchibluagent.
   Per-page accent via --accent CSS variable on <body>.
   ══════════════════════════════════════ */

:root {
    --bg: #ffffff;
    --surface: #fafaf8;
    --border: #e5e5e0;
    --text: #1a1a1a;
    --text-muted: #57504a;
    --text-soft: #8a8278;
    --accent: #4F46E5;              /* overridden per page */
    --accent-strong: #3f3ac9;
    --accent-soft: #EEF2FF;
    --accent-border: #c7c3fc;
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

img, video {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* ── Floating decorative blobs (behind everything) ── */

.blob {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.blob-accent {
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    filter: blur(80px);
    opacity: 0.08;
}

.blob-soft {
    background: radial-gradient(circle, #F59E0B 0%, transparent 70%);
    filter: blur(80px);
    opacity: 0.05;
}

.blob-cool {
    background: radial-gradient(circle, #10B981 0%, transparent 70%);
    filter: blur(80px);
    opacity: 0.05;
}

.blob-1 { width: 500px; height: 500px; top: -100px; right: -150px; animation: blobFloat1 22s ease-in-out infinite; }
.blob-2 { width: 400px; height: 400px; bottom: 20%; left: -120px; animation: blobFloat2 26s ease-in-out infinite; }
.blob-3 { width: 320px; height: 320px; top: 50%; left: 55%; animation: blobFloat3 18s ease-in-out infinite; }

@keyframes blobFloat1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-30px, 40px); } }
@keyframes blobFloat2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(40px, -30px); } }
@keyframes blobFloat3 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-20px, -30px); } }

/* ── PS Site Nav ── */

nav.ps-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: 64px;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: top 300ms ease;
}

nav.ps-nav.hide { top: -72px; }

nav.ps-nav .logo {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 22px;
    font-weight: 400;
    color: var(--text);
    letter-spacing: -0.02em;
}

nav.ps-nav .navWrap {
    position: absolute;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

nav.ps-nav .navWrap.open {
    display: flex;
    animation: psFadeIn 300ms ease forwards;
}

nav.ps-nav .navWrap a {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    line-height: 240%;
    color: var(--text);
    opacity: 0.35;
    transition: opacity 200ms ease, color 200ms ease;
}

nav.ps-nav .navWrap a:hover { opacity: 1; color: var(--accent); }

nav.ps-nav .menu {
    width: 40px;
    height: 40px;
    cursor: pointer;
    position: relative;
    z-index: 110;
}

nav.ps-nav .menu .rect {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
    position: absolute;
    transition: all 300ms ease;
}

nav.ps-nav .menu .rect[i='1'] { top: 13px; left: 10px; }
nav.ps-nav .menu .rect[i='2'] { top: 19px; left: 10px; }
nav.ps-nav .menu .rect[i='3'] { top: 25px; left: 10px; }
nav.ps-nav .menu .rect[i='4'] { top: 19px; left: 10px; }

nav.ps-nav .menu.open .rect[i='1'],
nav.ps-nav .menu.open .rect[i='3'] { opacity: 0; }
nav.ps-nav .menu.open .rect[i='2'] { transform: rotate(45deg); }
nav.ps-nav .menu.open .rect[i='4'] { transform: rotate(-45deg); }

@keyframes psFadeIn { 0% { opacity: 0; } 100% { opacity: 1; } }

@media only screen and (min-width: 768px) {
    nav.ps-nav {
        height: 72px;
        padding: 0 48px;
    }
    nav.ps-nav .menu { display: none; }
    nav.ps-nav .navWrap {
        width: auto;
        height: auto;
        position: relative;
        background: none;
        display: flex;
        flex-direction: row;
    }
    nav.ps-nav .navWrap > * { margin-left: 36px; }
    nav.ps-nav .navWrap a {
        font-size: 15px;
        font-weight: 500;
        line-height: 150%;
    }
}

/* ── Content wrapper ── */

.content-wrap {
    position: relative;
    z-index: 1;
}

/* ── Hero ── */

.hero {
    padding: 140px 24px 60px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-strong);
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    padding: 8px 16px;
    border-radius: 999px;
    margin-bottom: 24px;
}

.hero-badge svg { width: 14px; height: 14px; }

.hero h1 {
    font-family: 'Inter', 'DM Sans', sans-serif;
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 20px;
}

.hero h1 .accent { color: var(--accent); }

.hero-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 32px;
}

.hero-pills {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    animation: pillFloat 6s ease-in-out infinite;
}

.hero-pill:nth-child(2) { animation-delay: 1.5s; }
.hero-pill:nth-child(3) { animation-delay: 3s; }
.hero-pill:nth-child(4) { animation-delay: 4.5s; }

@keyframes pillFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* ── Sections ── */

section {
    padding: 64px 24px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

section.grey {
    background: var(--surface);
    max-width: none;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding-left: 24px;
    padding-right: 24px;
}

section.grey > * {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.section-eyebrow {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

/* ── Typography ── */

h2 {
    font-family: 'Inter', 'DM Sans', sans-serif;
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 20px;
}

h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
    margin-top: 32px;
    margin-bottom: 10px;
}

p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 16px;
}

p strong {
    color: var(--text);
    font-weight: 600;
}

p a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.quote {
    font-family: 'DM Serif Display', Georgia, serif;
    font-style: italic;
    font-size: clamp(20px, 2.5vw, 28px);
    line-height: 1.4;
    color: var(--accent);
    text-align: center;
    padding: 40px 0;
    max-width: 720px;
    margin: 0 auto;
}

.caption {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-soft);
    text-align: center;
    margin-top: 8px;
}

.center {
    max-width: 720px;
    margin: 0 auto;
}

/* ── Overview (intro section with meta-info) ── */

section.overview {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

.meta-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    border-left: 3px solid var(--accent);
    align-self: start;
}

.meta-item p:first-child {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 4px;
}

.meta-item p:last-child {
    font-size: 15px;
    color: var(--text);
    margin-bottom: 0;
}

.meta-item p strong { display: none; }

/* ── Columns ── */

.col-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 24px 0;
}

.col-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 24px 0;
}

.container { text-align: center; }

/* ── Video embed ── */

.o-video {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 32px;
    padding: 0 24px;
    aspect-ratio: 16 / 9;
}

.o-video iframe {
    position: absolute;
    top: 0;
    left: 24px;
    width: calc(100% - 48px);
    height: 100%;
    border: 0;
    border-radius: 12px;
}

/* ── Misc images ── */

img.title-img {
    margin: 32px auto;
    max-width: 900px;
    border-radius: 12px;
}

img.l {
    width: 100%;
    max-width: 900px;
    margin: 16px auto;
}

/* ── Reveal on scroll ── */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Footer (PS) ── */

footer {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 13px;
    color: var(--text-soft);
    text-align: center;
    padding: 40px 24px;
    position: relative;
    z-index: 1;
}

/* ── Responsive ── */

@media only screen and (min-width: 768px) {
    section {
        padding: 80px 48px;
    }

    section.overview {
        grid-template-columns: 1.3fr 1fr;
        gap: 48px;
        align-items: start;
    }

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

    .meta-info { padding: 32px; }

    .hero { padding: 160px 48px 80px; }
}

@media only screen and (min-width: 992px) {
    section {
        padding: 96px 64px;
        max-width: 1000px;
    }

    .o-video {
        max-width: 1000px;
    }

    section.grey > * {
        max-width: 1000px;
    }
}
