/* John Greater's Slettler — making-of page extensions */
/* Gold accent from SLETTLER.png title (#f2d64a) instead of JGreaterLab red */

body.slettler-page {
    --cb-accent: #d4b83a;
    --cb-accent-bright: #f2d64a;
    --cb-accent-deep: #8f6f14;
    --cb-rose: #ffe97a;
    --cb-warm: #e8c040;
    --shadow-glow: 0 0 60px -12px rgba(242, 214, 74, 0.4);
    --slettler-nav-h: 56px;
    scroll-snap-type: y proximity;
    scroll-padding-top: var(--slettler-nav-h);
}

body.slettler-page .hero-gradient {
    background:
        radial-gradient(ellipse 100% 80% at 50% -30%, rgba(242, 214, 74, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 100% 10%, rgba(212, 184, 58, 0.16) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 0% 40%, rgba(61, 40, 16, 0.14) 0%, transparent 45%);
}

body.slettler-page .hero-eyebrow {
    color: var(--cb-accent-bright);
    border-color: rgba(242, 214, 74, 0.45);
    background: rgba(242, 214, 74, 0.1);
}

body.slettler-page .btn-primary {
    box-shadow: 0 4px 24px rgba(212, 184, 58, 0.45);
}

body.slettler-page .btn-primary:hover {
    box-shadow: 0 8px 32px rgba(242, 214, 74, 0.55);
}

body.slettler-page .tool-link-card {
    background:
        radial-gradient(120% 90% at 50% 0%, rgba(242, 214, 74, 0.14) 0%, rgba(242, 214, 74, 0) 58%),
        linear-gradient(180deg, rgba(15, 15, 15, 0.98) 0%, rgba(8, 8, 8, 0.98) 100%);
}

body.slettler-page .tool-link-card:hover {
    border-color: rgba(242, 214, 74, 0.38);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(242, 214, 74, 0.14);
}

body.slettler-page .tool-icon-badge {
    border-color: rgba(242, 214, 74, 0.45);
    background: rgba(242, 214, 74, 0.12);
    color: #ffe97a;
}

body.slettler-page .nav-toggle.is-open {
    border-color: rgba(242, 214, 74, 0.5);
    background: rgba(242, 214, 74, 0.12);
}

.slettler-nav-brand {
    text-decoration: none;
}

.slettler-nav-brand .nav-brand-text {
    display: inline;
}

.slettler-nav-brand .nav-brand-name {
    color: var(--cb-text);
}

.slettler-nav-brand:hover .nav-brand-name {
    color: var(--cb-accent-bright);
}

/* Screen 1: exactly one viewport — gallery must not peek below */
.slettler-hero {
    min-height: 100svh;
    min-height: 100dvh;
    box-sizing: border-box;
    padding: calc(var(--slettler-nav-h) + 1rem) 24px 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.slettler-hero .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 820px;
    min-height: 0;
    flex: 0 1 auto;
}

.slettler-hero .hero-eyebrow {
    margin-top: -0.75rem;
    margin-bottom: 1.35rem;
    font-size: clamp(0.9rem, 2.1vw, 1.05rem);
    letter-spacing: 0.14em;
    padding: 0.45rem 1.05rem;
    flex-shrink: 0;
}

.slettler-hero .hero-title-visual {
    margin: 0 0 0.65rem;
    line-height: 0;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: min(38dvh, 42svh, 280px);
}

.slettler-hero .hero-title-graphic {
    display: block;
    width: auto;
    height: auto;
    max-width: min(94vw, 680px);
    max-height: min(38dvh, 42svh, 280px);
    object-fit: contain;
    margin: 0 auto;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.slettler-hero .hero-subtitle {
    margin-bottom: 0.45rem;
    flex-shrink: 0;
}

.slettler-hero .hero-description {
    max-width: 640px;
    margin-bottom: 1.15rem;
    font-size: clamp(0.9rem, 1.6vw, 1.05rem);
    line-height: 1.5;
    flex-shrink: 0;
}

.slettler-hero .hero-buttons {
    flex-shrink: 0;
    gap: 0.75rem;
}

@media (max-height: 720px) {
    .slettler-hero {
        padding-top: calc(var(--slettler-nav-h) + 0.5rem);
        padding-bottom: 1rem;
    }

    .slettler-hero .hero-eyebrow {
        margin-top: -0.5rem;
        margin-bottom: 1rem;
        font-size: 0.85rem;
    }

    .slettler-hero .hero-title-visual,
    .slettler-hero .hero-title-graphic {
        max-height: min(30dvh, 200px);
    }

    .slettler-hero .hero-description {
        margin-bottom: 0.85rem;
    }
}

.hero-title-retro {
    font-family: "Press Start 2P", monospace;
    font-size: clamp(0.55rem, 2.4vw, 1rem);
    line-height: 1.65;
    color: #f2d64a;
    text-shadow: 3px 3px 0 #3d2810, 4px 4px 0 #000;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
}

.page-section {
    padding: 4.5rem 0;
    border-top: 1px solid var(--cb-border);
    scroll-snap-align: start;
    scroll-margin-top: var(--slettler-nav-h);
}

.page-section:nth-of-type(even) {
    background: var(--cb-bg-raised);
}

.about-slettler {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 768px) {
    .about-slettler {
        grid-template-columns: minmax(200px, 280px) 1fr;
    }
}

.about-slettler-img {
    width: 100%;
    max-width: 280px;
    height: auto;
    object-fit: contain;
    aspect-ratio: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--cb-border-strong);
    display: block;
}

.about-slettler .lead {
    font-size: 1.12rem;
    color: var(--cb-text-secondary);
    margin-bottom: 1rem;
    line-height: 1.65;
}

.about-slettler p {
    color: var(--cb-text-tertiary);
    margin-bottom: 0.85rem;
}

.masonry-gallery {
    column-count: 2;
    column-gap: 1rem;
}

@media (min-width: 768px) {
    .masonry-gallery {
        column-count: 3;
    }
}

@media (min-width: 1100px) {
    .masonry-gallery {
        column-count: 4;
    }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: block;
    transition: transform var(--transition), box-shadow var(--transition);
}

.masonry-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(242, 214, 74, 0.22);
}

.masonry-item img {
    width: 100%;
    height: auto !important;
    max-height: none;
    object-fit: contain;
    aspect-ratio: auto;
    display: block;
    vertical-align: middle;
}

.clips-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 900px) {
    .clips-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.clip-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--cb-border-strong);
    background: var(--cb-surface);
    overflow: hidden;
}

.clip-card h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    padding: 0.85rem 1rem 0;
    margin: 0;
    color: var(--cb-text-secondary);
}

.clip-card video {
    width: 100%;
    display: block;
    background: #000;
    margin-top: 0.5rem;
}

.tech-list {
    list-style: none;
    display: grid;
    gap: 0.65rem;
    max-width: 720px;
}

.tech-list li {
    position: relative;
    padding-left: 1.35rem;
    color: var(--cb-text-secondary);
    line-height: 1.55;
}

.tech-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cb-accent);
}

.tech-intro,
.credits-intro,
.credits-legal {
    color: var(--cb-text-tertiary);
    max-width: 720px;
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

.credits-legal {
    margin-top: 1.75rem;
    font-size: 0.88rem;
}

.credits-subtitle {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin: 2rem 0 1rem;
    color: var(--cb-text-secondary);
}

.credits-subtitle:first-of-type {
    margin-top: 0;
}

.lab-home-banner-wrap {
    padding: 3rem 24px 2.5rem;
    border-top: 1px solid var(--cb-border);
    background: var(--cb-bg-raised);
    text-align: center;
}

.lab-home-banner-link {
    display: inline-block;
    max-width: min(960px, 100%);
    padding: 0;
    border: none;
    background: transparent;
    line-height: 0;
    transition: transform var(--transition), filter var(--transition);
}

.lab-home-banner-link:hover {
    transform: translateY(-3px);
    filter: drop-shadow(0 0 28px rgba(242, 214, 74, 0.45));
}

.lab-home-banner-img {
    width: 100%;
    max-width: 960px;
    height: auto;
    display: block;
    object-fit: contain;
}

.slettler-footer {
    padding: 1.75rem 0 2.5rem;
    text-align: center;
    border-top: 1px solid var(--cb-border);
    background: var(--cb-bg);
}

.slettler-footer p {
    color: var(--cb-text-tertiary);
    font-size: 0.9rem;
}

.slettler-footer a {
    color: var(--cb-accent-bright);
    text-decoration: none;
}

.slettler-footer a:hover {
    text-decoration: underline;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.94);
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: min(96vw, 1400px);
    max-height: 92vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    user-select: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    border: 1px solid var(--cb-border-strong);
    background: rgba(15, 15, 15, 0.85);
    color: var(--cb-text);
    cursor: pointer;
    border-radius: 999px;
    transition: background var(--transition), border-color var(--transition);
    font-family: var(--font-sans);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(242, 214, 74, 0.2);
    border-color: rgba(242, 214, 74, 0.45);
}

.lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
    line-height: 1;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.lightbox-counter {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--cb-text-tertiary);
    font-size: 0.85rem;
}
