/*
Theme Name: pandu-vanilla
Theme URI: https://localhost:8085
Author: pandupewe
Description: Lightweight classic theme for the Pandupewe local archive.
Version: 1.0.0
*/

:root {
    --paper: #f6f2e9;
    --paper-rgb: 246 242 233;
    --ink: #101010;
    --ink-rgb: 16 16 16;
    --muted: #56534d;
    --line: rgba(16, 16, 16, .68);
    --hairline: rgb(var(--ink-rgb) / .18);
    --accent-surface: rgba(200, 155, 60, .28);
    --gold: #a97e2c;
}

:root.night-mode {
    color-scheme: dark;
    --paper: #151713;
    --paper-rgb: 21 23 19;
    --ink: #eee9dc;
    --ink-rgb: 238 233 220;
    --muted: #aaa59b;
    --line: rgba(238, 233, 220, .62);
    --hairline: rgb(var(--ink-rgb) / .18);
    --accent-surface: rgba(210, 167, 79, .22);
    --gold: #d2a74f;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: "IBM Plex Mono", SFMono-Regular, monospace;
    font-size: 13px;
    line-height: 1.65;
    font-synthesis: none;
    -webkit-font-smoothing: antialiased;
}

@media (min-width: 700px) {
    body {
        background-image:
            linear-gradient(rgb(var(--ink-rgb) / .07) 1px, transparent 1px),
            linear-gradient(90deg, rgb(var(--ink-rgb) / .07) 1px, transparent 1px);
        background-size: 24px 24px;
    }
}

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

img {
    display: block;
    max-width: 100%;
}

button,
input {
    color: inherit;
    font: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: 0;
    border-radius: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: -3px;
}

button:active {
    transform: translateY(1px);
}

[hidden] {
    display: none !important;
}

.shell {
    display: flex;
    flex-direction: column;
    max-width: 1240px;
    min-height: 100dvh;
    margin: 0 auto;
    border-inline: 1px solid var(--line);
    background: var(--paper);
}

@media (min-width: 700px) {
    .shell {
        box-shadow: 0 0 0 8px var(--paper);
    }
}

.label {
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.value {
    font-family: "Space Grotesk", "Helvetica Neue", sans-serif;
    font-weight: 500;
    letter-spacing: -.03em;
}

.muted-copy {
    max-width: 34ch;
    color: var(--muted);
}

/* Header and mobile panel */
.hud {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--ink);
    background: rgb(var(--paper-rgb) / .96);
}

.hud > * {
    border-right: 1px solid var(--hairline);
}

.hud > *:last-child {
    border-right: 0;
    border-left: 1px solid var(--hairline);
}

.brand {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2px;
    min-width: 180px;
    padding: 10px 14px;
}

.brand strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 19px;
    font-weight: 700;
    line-height: .95;
    letter-spacing: -.04em;
}

.mainnav {
    display: flex;
    flex: 1;
}

.mainnav a,
.hud-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 14px;
    border-right: 1px solid var(--hairline);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: background .15s, color .15s;
}

.mainnav a:last-child {
    border-right: 0;
}

.mainnav a:hover,
.mainnav a[aria-current="page"],
.hud-btn:hover {
    background: var(--ink);
    color: var(--paper);
}

.hud-btn {
    min-width: 52px;
    font-size: 9px;
    writing-mode: vertical-rl;
}

.menu-toggle {
    display: none;
}

.mobile-panel {
    position: fixed;
    z-index: 30;
    display: none;
    inset: 0;
}

.mobile-panel.open {
    display: block;
}

.mobile-panel::before {
    position: absolute;
    content: "";
    inset: 0;
    background: #10101073;
}

.mobile-panel nav {
    position: absolute;
    top: 0;
    left: 50%;
    display: flex;
    flex-direction: column;
    width: min(420px, calc(100% - 32px));
    margin-top: 64px;
    transform: translateX(-50%);
    border: 1px solid var(--ink);
    background: var(--paper);
}

.mobile-panel a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 15px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.mobile-panel a:hover,
.mobile-panel a[aria-current="page"] {
    background: var(--ink);
    color: var(--paper);
}

.mobile-panel .panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 16px;
    border-bottom: 1px solid var(--ink);
}

.mobile-panel .panel-head span {
    font-family: "Space Grotesk", sans-serif;
    font-size: 16px;
    font-weight: 500;
}

.mobile-panel .panel-head button {
    min-height: 46px;
    padding: 0 16px;
    border-left: 1px solid var(--ink);
    font-size: 10px;
    letter-spacing: .1em;
}

/* Ticker */
.ticker {
    overflow: hidden;
    border-bottom: 1px solid var(--ink);
    background: var(--accent-surface);
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: ticker 30s linear infinite;
}

.ticker-track span {
    padding: 6px 0;
    color: var(--ink);
    white-space: nowrap;
    font-size: 9px;
    letter-spacing: .14em;
    text-transform: uppercase;
}

@keyframes ticker {
    to {
        transform: translateX(-50%);
    }
}

/* Home hero and program */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    border-bottom: 1px solid var(--ink);
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 56px 40px 40px;
    border-right: 1px solid var(--hairline);
}

.hero-copy h1 {
    max-width: 16ch;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(32px, 4.8vw, 60px);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -.045em;
}

.hero-copy .lead {
    max-width: 44ch;
    color: var(--muted);
}

.hero-figure {
    display: flex;
    flex-direction: column;
}

.hero-figure img {
    width: 100%;
    height: 100%;
    border-bottom: 1px solid var(--ink);
    object-fit: contain;
    object-position: center;
    background: var(--paper);
    filter: saturate(.92);
}

.figcap {
    display: flex;
    justify-content: space-between;
    padding: 8px 14px;
}

.program {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--ink);
}

.program > a {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 26px;
    min-height: 132px;
    padding: 18px;
    transition: background .15s, color .15s;
}

.program > a + * {
    border-left: 1px solid var(--hairline);
}

.program > a:hover {
    background: var(--ink);
    color: var(--paper);
}

.program > a:hover .label {
    color: inherit;
}

.program .value,
.cell-row .value {
    max-width: 16ch;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.05;
}

.program .count,
.cell-row .count {
    color: var(--gold);
    font-size: 10px;
    letter-spacing: .1em;
}

/* Buttons, page heads, and archive controls */
.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 6px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 20px;
    border: 1px solid var(--ink);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    transition: background .15s, color .15s;
}

.btn + .btn {
    border-left: 0;
}

.btn.primary {
    background: var(--ink);
    color: var(--paper);
}

.btn.primary:hover {
    background: transparent;
    color: var(--ink);
}

.btn:not(.primary):hover {
    background: var(--ink);
    color: var(--paper);
}

.btn .arrow {
    font-family: "Space Grotesk", sans-serif;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 34px 40px 26px;
    border-bottom: 1px solid var(--hairline);
}

.page-head .crumb {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.page-head h1 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(30px, 4.4vw, 54px);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -.045em;
}

.page-head .lead {
    max-width: 52ch;
    color: var(--muted);
    font-size: 12px;
}

.archive-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 34px 40px 22px;
    border-bottom: 1px solid var(--hairline);
}

.archive-head h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(26px, 3.4vw, 42px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.04em;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--ink);
}

.tool-cell {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
    border-right: 1px solid var(--hairline);
}

.tool-cell.grow {
    flex: 1;
    min-width: 220px;
}

.search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.search-wrap input {
    flex: 1;
    min-height: 36px;
    border: 0;
    border-bottom: 1px solid var(--ink);
    background: transparent;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.search-wrap input::placeholder {
    color: var(--muted);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    min-height: 44px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: background .15s, color .15s, border-color .15s;
}

.chip:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.chip[aria-pressed="true"] {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
}

.results-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* Cards and grid */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    background: var(--paper);
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 196px;
    padding: 18px 18px 16px;
    background: var(--paper);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    transition: background .15s, color .15s;
}

.card.featured {
    grid-column: span 2;
    min-height: 320px;
}

.card.featured .thumb {
    aspect-ratio: 16 / 7;
}

.card.featured h3 {
    max-width: 24ch;
    font-size: clamp(22px, 2.6vw, 32px);
}

.card-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.card .idx {
    color: var(--muted);
    font-family: "Space Grotesk", sans-serif;
    font-size: 13px;
    font-weight: 500;
    transition: color .15s;
}

.card h3 {
    max-width: 18ch;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(17px, 1.6vw, 20px);
    font-weight: 500;
    line-height: 1.06;
    letter-spacing: -.02em;
}

.card p.ex {
    color: var(--muted);
    font-size: 11.5px;
    transition: color .15s;
}

.card .meta {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--hairline);
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: color .15s, border-color .15s;
}

.card .thumb {
    order: -1;
    overflow: hidden;
    margin: -18px -18px 0;
    border-bottom: 1px solid var(--hairline);
    aspect-ratio: 16 / 9;
}

.card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(.92);
    transition: transform .3s;
}

.card:hover .thumb img {
    transform: scale(1.02);
    filter: saturate(.92) brightness(.85);
}

.card .tag,
.spec .tag {
    align-self: flex-start;
    padding: 3px 10px;
    border: 1px solid var(--line);
    color: var(--gold);
    font-size: 8.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.card:hover {
    background: var(--ink);
    color: var(--paper);
}

.card:hover .idx {
    color: var(--gold);
}

.card:hover p.ex,
.card:hover .meta {
    border-color: rgb(var(--paper-rgb) / .25);
    color: rgb(var(--paper-rgb) / .72);
}

.card:hover .tag {
    border-color: rgb(var(--paper-rgb) / .35);
}

.empty {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 14px;
    padding: 60px 20px;
    border-bottom: 1px solid var(--ink);
    text-align: center;
}

.empty:not(.show) {
    display: none;
}

.empty-title {
    font-size: 22px;
}

.empty p,
.noscript-copy {
    color: var(--muted);
}

.noscript-copy {
    padding: 24px 16px;
}

.load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    min-height: 88px;
    padding: 18px;
    border-bottom: 1px solid var(--ink);
}

.load-more .btn[disabled] {
    cursor: wait;
    opacity: .55;
}

.load-status {
    color: var(--muted);
}

.load-sentinel {
    height: 1px;
    width: 100%;
}

.archive-browser[aria-busy="true"] .grid {
    opacity: .58;
}

.archive-browser[aria-busy="true"] .card {
    pointer-events: none;
}

/* Detail and native block content */
.detail {
    display: grid;
    grid-template-columns: minmax(260px, 360px) 1fr;
    border-bottom: 1px solid var(--ink);
}

.detail-aside {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--hairline);
}

.portrait-figure {
    margin: 0;
}

.portrait-figure img {
    width: 100%;
    filter: saturate(.92);
}

.portrait-figure figcaption,
.detail-featured figcaption {
    display: flex;
    justify-content: space-between;
    padding: 8px 14px;
    border-top: 1px solid var(--hairline);
}

.spec {
    display: flex;
    flex-direction: column;
}

.spec > div {
    display: grid;
    grid-template-columns: minmax(90px, 110px) 1fr;
    gap: 14px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--hairline);
}

.spec > div:last-child {
    border-bottom: 0;
}

.spec dt {
    padding-top: 2px;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.spec dd {
    font-size: 12px;
}

.spec .tag {
    justify-self: start;
    padding: 2px 10px;
}

.detail-body {
    max-width: 72ch;
    padding: 40px;
}

.detail-body .prose-lede {
    margin-bottom: 22px;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(20px, 2.4vw, 27px);
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -.03em;
}

.detail-body p {
    margin-bottom: 1.1em;
    color: var(--muted);
    font-size: 12.5px;
}

.about-layout {
    align-items: start;
}

.about-layout .detail-body {
    display: block;
    max-width: none;
}

.about-prose {
    max-width: 62ch;
}

.about-facts {
    width: min(100%, 42rem);
    margin: clamp(32px, 5vw, 72px) 0 0 auto;
    border-top: 1px solid var(--hairline);
}

.detail-featured {
    margin: 0 0 26px;
    border: 1px solid var(--ink);
}

.detail-featured img {
    width: 100%;
    filter: saturate(.92);
}

.detail-body .wp-block-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1px;
    margin: 26px 0;
    background: var(--line);
    list-style: none;
}

.detail-body .wp-block-gallery .wp-block-image {
    display: flex;
    flex-direction: column;
    margin: 0;
    background: var(--paper);
}

.detail-body .wp-block-gallery .wp-block-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(.92);
}

.detail-body .wp-block-image figcaption {
    padding: 8px 14px;
    border-top: 1px solid var(--hairline);
    color: var(--muted);
    font-size: 9px;
}

.underlined-link,
.big-cell .value a {
    border-bottom: 1px solid var(--ink);
}

.underlined-link:hover,
.big-cell .value a:hover {
    background: var(--ink);
    color: var(--paper);
}

.page-content {
    border-bottom: 1px solid var(--ink);
}

/* Sections and footer */
.sec-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 28px 40px 18px;
    border-bottom: 1px solid var(--hairline);
}

.sec-head h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(22px, 2.8vw, 32px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.04em;
}

.related-grid {
    border-bottom: 1px solid var(--ink);
}

.big-cell {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 44px 40px;
    border-bottom: 1px solid var(--ink);
}

.big-cell .value {
    max-width: 22ch;
    font-size: clamp(22px, 3.4vw, 40px);
    line-height: 1.06;
}

.cell-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--ink);
}

.cell-row > * {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 26px;
    min-height: 132px;
    padding: 18px;
    border-right: 1px solid var(--hairline);
    transition: background .15s, color .15s;
}

.cell-row > *:last-child {
    border-right: 0;
}

.cell-row a:hover {
    background: var(--ink);
    color: var(--paper);
}

footer {
    margin-top: auto;
    border-top: 1px solid var(--ink);
}

.foot-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
}

.foot-grid > div,
.foot-grid > a {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    min-height: 120px;
    padding: 18px;
    border-right: 1px solid var(--hairline);
}

.foot-grid > :last-child {
    border-right: 0;
}

.foot-grid .value {
    font-family: "Space Grotesk", sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.04em;
}

.foot-grid a.cell {
    transition: background .15s, color .15s;
}

.foot-grid a.cell:hover {
    background: var(--ink);
    color: var(--paper);
}

.play-cell {
    background: var(--accent-surface);
}

.contact-value {
    font-size: 15px !important;
    font-weight: 500 !important;
}

.foot-base {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 14px;
    border-top: 1px solid var(--line);
}

/* Reveal */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity .55s cubic-bezier(.16, 1, .3, 1), transform .55s cubic-bezier(.16, 1, .3, 1);
}

.js-reveal .reveal {
    opacity: 0;
    transform: translateY(14px);
}

.reveal.in {
    opacity: 1;
    transform: none;
}

body.menu-open {
    overflow: hidden;
}

@media (max-width: 1020px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card.featured {
        grid-column: span 1;
    }
}

@media (max-width: 920px) {
    .mainnav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        padding: 40px 24px 32px;
        border-right: 0;
        border-bottom: 1px solid var(--hairline);
    }

    .hero-figure img {
        height: clamp(340px, 64vw, 560px);
        object-position: center;
    }

    .archive-head,
    .page-head,
    .sec-head {
        padding-right: 24px;
        padding-left: 24px;
    }

    .detail {
        grid-template-columns: 1fr;
    }

    .detail-aside {
        border-right: 0;
        border-bottom: 1px solid var(--hairline);
    }

    .detail-body {
        padding: 28px 24px;
    }

    .about-layout .detail-body {
        display: block;
    }

    .about-facts {
        margin-top: 36px;
    }

    .big-cell {
        padding: 32px 24px;
    }
}

@media (min-width: 701px) and (max-width: 920px) {
    .hero {
        grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
    }

    .hero-copy {
        padding: 40px 24px 32px;
        border-right: 1px solid var(--hairline);
        border-bottom: 0;
    }

    .hero-figure img {
        height: clamp(320px, 48vw, 480px);
    }
}

@media (max-width: 700px) {
    .program,
    .cell-row,
    .foot-grid {
        grid-template-columns: 1fr;
    }

    .program > a + * {
        border-top: 1px solid var(--hairline);
        border-left: 0;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .card {
        border-right: 0;
    }

    .hero-figure img {
        height: clamp(300px, 82vw, 360px);
        object-position: center;
    }

    .hero-copy .lead,
    .page-head .lead,
    .archive-head .lead,
    .detail-body p,
    .page-content p {
        font-size: 16px;
        line-height: 1.55;
    }

    .card p.ex {
        font-size: 14px;
        line-height: 1.45;
    }

    .cell-row > * {
        border-right: 0;
        border-bottom: 1px solid var(--hairline);
    }

    .cell-row > *:last-child {
        border-bottom: 0;
    }

    .foot-grid > div,
    .foot-grid > a {
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid var(--hairline);
    }

    .foot-grid > :last-child {
        border-bottom: 0;
    }

    .brand {
        flex: 1;
        min-width: 0;
    }

    .detail-body .wp-block-gallery {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .ticker-track {
        animation: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}
