/* Pleinvrees (template-parts/shows/pleinvrees.php).
   Black and white, set like the flyer: Barlow Condensed for the titles, Barlow
   Semi Condensed for the text. The front of the flyer is a lowered venetian
   blind with six pairs of eyes behind it; the back a white sheet on a dark
   woven mat, with a blue ballpoint scribble, the page's only colour. */

.pv {
    --asphalt: #1b1b1b;
    --mat: #161616;
    --slat-light: #fbfbf9;
    --slat-mid: #e3e3df;
    --slat-dark: #8f8f8a;
    --stone: #c4c4bf;
    --ballpoint: #2f5fa8;
    --slat: 2rem;

    --pv-condensed: 'Barlow Condensed', var(--font-sans);
    --pv-text: 'Barlow Semi Condensed', var(--font-sans);

    /* The fixed block: a black button, the ballpoint for the status. */
    --show-accent: var(--ink);
    --show-accent-ink: var(--paper);
    --show-accent-text: var(--ballpoint);
    --show-accent-hover: var(--paper);
    --show-accent-hover-ink: var(--ink);

    --ghost-hover: var(--paper);
    --ghost-hover-ink: var(--ink);

    color: var(--ink);
}

/* On the light blind the header is black until the page scrolls (written
   out: the header sits outside .pv). Without the dark gradient, also once
   scrolled: it would appear at once while the ink fades in. */
body:has(.pv) .site-header {
    background-image: none;
}

body:has(.pv) .site-header:not(.scrolled) {
    color: #000;
}

/* ---------- Hero: the blind ---------- */

.pv-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 100svh;
    overflow: clip;
    padding: calc(var(--header-height) + var(--space-xl)) 0 var(--space-2xl);
    background-color: var(--slat-mid);
}

/* The headrail the blind hangs from: a plain band behind the menu, so the
   menu reads on it rather than across the slats. */
.pv-hero::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    z-index: 1;
    height: var(--header-height);
    background: linear-gradient(to bottom, #f7f7f4, #e8e8e4 80%, #b4b4af);
    box-shadow: 0 0.2rem 0.5rem rgb(0 0 0 / 0.2);
}

/* Slats with a shadow under each, and the two ladder cords. */
.pv-blind {
    position: absolute;
    inset: var(--header-height) 0 0;
    background:
        linear-gradient(to right, transparent calc(16% - 1px), rgb(0 0 0 / 0.16) calc(16% - 1px) calc(16% + 1px), transparent calc(16% + 1px) calc(84% - 1px), rgb(0 0 0 / 0.16) calc(84% - 1px) calc(84% + 1px), transparent calc(84% + 1px)),
        repeating-linear-gradient(to bottom, var(--slat-light) 0, #ffffff calc(var(--slat) * 0.3), var(--slat-mid) calc(var(--slat) * 0.8), var(--slat-dark) calc(var(--slat) - 2px), #2e2e2c var(--slat));
}

/* A gap where someone holds two slats apart, and their eyes in it. */
.pv-peek {
    position: absolute;
    top: calc(var(--row) * var(--slat) - var(--slat) * 0.55);
    left: clamp(3.5rem, var(--x), calc(100% - 4.5rem));
    width: 6.5rem;
    transform: translateX(-50%);
}

.pv-peek--l {
    width: 8.5rem;
}

.pv-peek--s {
    width: 5rem;
}

.pv-peek-eyes {
    display: block;
    width: 100%;
    overflow: visible;
}

.pv-gap {
    fill: #0c0c0c;
}

.pv-eye-white {
    fill: #f1f1ec;
}

.pv-iris {
    fill: #4a4a47;
}

.pv-glint {
    fill: #ffffff;
}

/* The pupils follow the pointer (assets/js/shows/pleinvrees.js) and, without
   one, glance about by themselves; now and then the eyes blink. */
.pv-pupil {
    transform: translate(calc(var(--lx, 0) * 1px), calc(var(--ly, 0) * 1px));
    transition: transform 0.2s ease-out;
}

.pv-glance {
    animation: pv-glance 7s ease-in-out infinite;
    animation-delay: calc(-1 * var(--look));
}

.pv-blind.is-watching .pv-glance {
    animation: none;
}

.pv-eye {
    transform-box: fill-box;
    transform-origin: center;
    animation: pv-blink 6s infinite;
    animation-delay: calc(-1.3 * var(--look));
}

@keyframes pv-glance {
    0%, 22% { transform: translate(0, 0); }
    28%, 46% { transform: translate(-6px, 0.5px); }
    52%, 70% { transform: translate(6px, -1px); }
    76%, 100% { transform: translate(0, 0); }
}

@keyframes pv-blink {
    0%, 94%, 100% { transform: scaleY(1); }
    96% { transform: scaleY(0.1); }
}

/* The pull cord, hanging down the right edge. */
.pv-cord {
    position: absolute;
    top: 0;
    right: 0.6rem;
    width: 2px;
    height: 58%;
    background-color: #9a9a95;
}

.pv-cord::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    width: 0.7rem;
    height: 1.2rem;
    border-radius: 45% 45% 50% 50%;
    background-color: #2e2e2c;
    transform: translateX(-50%);
}

.pv-hero-inner {
    position: relative;
}

.pv-author,
.pv-dateline {
    margin: 0;
    font-family: var(--pv-condensed);
    font-weight: 500;
}

/* Small type sits on a white label, clear of the slats. */
.pv-author {
    display: inline-block;
    padding: 0.05em 0.35em;
    background-color: var(--paper);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pv-title {
    margin: var(--space-xs) 0 var(--space-sm);
    font-family: var(--pv-condensed);
    font-size: clamp(4rem, 17vw, 12rem);
    font-weight: 700;
    line-height: 0.82;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.pv-dateline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15rem 0.75rem;
    width: fit-content;
    padding: 0.15em 0.4em;
    background-color: var(--paper);
    font-size: var(--text-lg);
}

.pv-dateline span {
    font-family: var(--pv-text);
    font-size: var(--text-sm);
    font-weight: 400;
}

.pv-btn {
    margin-top: var(--space-md);
    background-color: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}

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

/* ---------- The street: a zebra crossing ---------- */

.pv-crossing {
    height: clamp(6rem, 13vw, 10rem);
    padding-block: 1rem;
    background:
        repeating-linear-gradient(to right, #f0f0ec 0 2.75rem, transparent 2.75rem 5.5rem) content-box,
        var(--asphalt);
}

/* ---------- The back of the flyer, on its mat ---------- */

.pv-mat {
    padding: var(--space-3xl) 0;
    background-color: var(--mat);
    background-image:
        repeating-linear-gradient(45deg, rgb(255 255 255 / 0.04) 0 1px, transparent 1px 4px),
        repeating-linear-gradient(-45deg, rgb(255 255 255 / 0.04) 0 1px, transparent 1px 4px);
    color: var(--paper);
}

.pv-sheet {
    width: min(100% - 2 * var(--gutter), 46rem);
    padding: var(--space-lg) var(--space-md) var(--space-xl);
    background-color: var(--paper);
    color: var(--ink);
    box-shadow: 0 1.5rem 3rem rgb(0 0 0 / 0.5);
    font-family: var(--pv-text);
}

.pv-sheet-head {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.pv-company,
.pv-sheet-title {
    margin: 0;
    font-family: var(--pv-condensed);
    font-weight: 700;
    line-height: 0.9;
}

.pv-company {
    position: relative;
    font-size: var(--text-lg);
}

.pv-company strong {
    font-size: 2.2em;
    line-height: 0.85;
}

.pv-scribble {
    position: absolute;
    top: 0.6em;
    left: 1.2em;
    width: 7.5rem;
    pointer-events: none;
}

.pv-sheet-title {
    justify-self: end;
    font-size: var(--text-sm);
    font-weight: 500;
}

.pv-sheet-title strong {
    display: block;
    font-size: var(--text-2xl);
    font-weight: 700;
    text-transform: uppercase;
}

.pv-story p {
    max-width: none;
    margin-bottom: var(--space-sm);
    font-size: var(--text-base);
    line-height: 1.4;
}

.pv-story .pv-play {
    font-size: var(--text-sm);
    color: var(--smoke);
}

.pv-story .pv-lead {
    font-size: var(--text-xl);
    font-weight: 500;
    line-height: 1.2;
}

.pv-sheet-foot {
    display: grid;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    font-size: var(--text-base);
    line-height: 1.35;
}

.pv-credits div {
    margin-bottom: 0.35rem;
}

.pv-credits dt {
    display: inline;
    font-weight: 500;
}

.pv-credits dd {
    display: inline;
    margin: 0;
}

.pv-venue {
    justify-self: end;
    margin: 0;
    text-align: right;
}

/* ---------- Photos: a contact sheet ---------- */

.pv-contact {
    margin-top: var(--space-3xl);
}

.pv-contact-heading {
    margin: 0;
    font-family: var(--pv-condensed);
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.pv-frames {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xs);
    margin: var(--space-lg) 0;
    list-style: none;
}

.pv-frame {
    display: block;
    width: 100%;
    padding: 0.35rem;
    border: 0;
    background-color: var(--paper);
    cursor: zoom-in;
}

.pv-frame img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    filter: grayscale(1) contrast(1.08);
}

/* ---------- Questions and the fixed block, rising into the foyer ---------- */

.pv-paper {
    padding-top: var(--space-2xl);
    background-color: var(--paper);
}

.pv-paper .show-faq {
    margin-bottom: var(--space-2xl);
    font-family: var(--pv-text);
}

.pv-paper .section-heading {
    font-family: var(--pv-condensed);
    font-style: normal;
    font-weight: 700;
    text-transform: uppercase;
}

.pv-paper .section-heading::after {
    background-color: var(--ink);
}

.pv-info {
    position: relative;
    z-index: 1;
    margin-bottom: calc(-1 * var(--space-2xl));
}

.pv-info .show-info {
    box-shadow: 0 1.5rem 3rem rgb(0 0 0 / 0.35);
    border-top: 4px solid var(--ink);
}

.show-design + .foyer {
    padding-top: calc(var(--space-2xl) + var(--space-lg));
}

@media (prefers-reduced-motion: reduce) {
    .pv-glance,
    .pv-eye {
        animation: none;
    }

    .pv-pupil {
        transition: none;
    }
}

/* ---------- Tablet and up ---------- */

@media (min-width: 640px) {
    .pv {
        --slat: 2.5rem;
    }

    .pv-peek {
        width: 8rem;
    }

    .pv-peek--l {
        width: 10.5rem;
    }

    .pv-peek--s {
        width: 6rem;
    }

    .pv-sheet {
        padding: var(--space-xl) var(--space-xl) var(--space-2xl);
    }

    .pv-cord {
        right: 5%;
    }

    .pv-company {
        font-size: var(--text-xl);
    }

    .pv-scribble {
        width: 10rem;
    }

    .pv-sheet-title strong {
        font-size: var(--text-3xl);
    }

    .pv-sheet-foot {
        grid-template-columns: 1fr auto;
        align-items: end;
    }

    .pv-frames {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .pv {
        --slat: 2.75rem;
    }

    .pv-hero {
        padding-bottom: var(--space-3xl);
    }

    .pv-crossing {
        background:
            repeating-linear-gradient(to right, #f0f0ec 0 3.5rem, transparent 3.5rem 7rem) content-box,
            var(--asphalt);
    }

    .pv-story .pv-lead {
        font-size: var(--text-2xl);
    }
}
