/* The Groupiez Revue. Colors and fonts come from the Groupiez brand kit.
   The memorable thing is the ticket: the newest show's name is printed in ink
   on a paper stub across the foot of its photo, torn where the room and the
   night sit. Everything else stays quiet so the photos carry the page. */

:root {
    --venue: #141210;
    --raised: #1e1b18;
    --paper: #f5f0e8;
    --ink: #1c1917;
    --slate: #6b6560;
    --slate-light: #9c9590;
    --amber: #c9952c;
    --amber-light: #e8c56a;
    --amber-dark: #9a7422;
    --line: rgba(245, 240, 232, 0.16);
    --line-on-paper: rgba(28, 25, 23, 0.3);

    --display: var(--gh-font-heading, "Newsreader", "Iowan Old Style", Georgia, serif);
    --body: var(--gh-font-body, "IBM Plex Sans", "Segoe UI", system-ui, sans-serif);
    --mono: "IBM Plex Mono", "SF Mono", Consolas, monospace;

    --gutter: clamp(16px, 4vw, 56px);
    --wrap: 84rem;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: var(--venue);
    color: var(--paper);
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* Short pages keep the footer at the foot of the window. */
main {
    flex: 1 0 auto;
}

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

a {
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--amber-light);
    outline-offset: 3px;
}

.ticket :focus-visible,
.stub :focus-visible {
    outline-color: var(--amber-dark);
}

.skip {
    position: absolute;
    left: var(--gutter);
    top: -4rem;
    z-index: 2;
    padding: 0.5rem 0.75rem;
    background: var(--paper);
    color: var(--ink);
}

.skip:focus {
    top: 0.5rem;
}

.wrap {
    width: min(var(--wrap), 100% - 2 * var(--gutter));
    margin-inline: auto;
}

.wrap-narrow {
    width: min(64rem, 100% - 2 * var(--gutter));
    margin-inline: auto;
}

/* Dates and rooms: the brand kit sets these in mono caps. */

.room-line,
.list-count,
.rooms-count,
.stub dt,
.ticket-stub dt,
.bill-nav span,
.kg-card figcaption,
.show-hero figcaption {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--slate-light);
}

.stub dt,
.ticket-stub dt {
    color: var(--slate);
}

.room-line {
    margin: 0;
}

/* Masthead */

.masthead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 2rem;
    padding: 1.25rem var(--gutter) 1.1rem;
}

.lockup {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    font-family: var(--display);
    font-size: 1.75rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
}

/* The wordmark file has descenders, so its box sits a little below the serif baseline. */
.lockup img {
    width: auto;
    height: 1.65rem;
    transform: translateY(0.35rem);
}

.masthead-line {
    margin: 0.45rem 0 0;
    font-size: 0.9375rem;
    line-height: 1.4;
    color: var(--slate-light);
}

.masthead nav {
    padding-top: 0.35rem;
}

.masthead nav ul,
.site-foot nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.masthead nav a,
.site-foot nav a {
    font-size: 1rem;
    text-decoration: none;
    text-underline-offset: 0.25em;
}

.masthead nav a:hover,
.site-foot nav a:hover {
    text-decoration: underline;
}

/* The headliner: the newest show's photo, with its ticket under it */

.headliner-photo {
    display: block;
}

.headliner-photo img {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 66vh;
    object-fit: cover;
}

.ticket {
    --notch: 11px;
    --tear: 70%;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30%;
    background: var(--paper);
    color: var(--ink);
    -webkit-mask:
        radial-gradient(circle var(--notch) at var(--tear) 0, transparent 98%, #000) top / 100% 51% no-repeat,
        radial-gradient(circle var(--notch) at var(--tear) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
    mask:
        radial-gradient(circle var(--notch) at var(--tear) 0, transparent 98%, #000) top / 100% 51% no-repeat,
        radial-gradient(circle var(--notch) at var(--tear) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
}

.ticket-name {
    min-width: 0;
    padding: clamp(1.75rem, 3.5vw, 3rem) var(--gutter);
}

.ticket-name h2 {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(2.5rem, 6.6vw, 6.5rem);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.ticket-name h2 a {
    text-decoration: none;
}

/* The whole ticket opens the show. */
.ticket-name h2 a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.ticket-name h2 a:hover {
    text-decoration: underline;
    text-decoration-thickness: 0.05em;
    text-underline-offset: 0.1em;
    text-decoration-color: var(--amber-dark);
}

.ticket-dek {
    max-width: 36rem;
    margin: 1rem 0 0;
    font-family: var(--display);
    font-size: 1.375rem;
    font-weight: 500;
    line-height: 1.3;
}

.ticket-stub {
    display: grid;
    gap: 1.1rem;
    align-content: start;
    margin: 0;
    padding: clamp(1.5rem, 3vw, 2.5rem) var(--gutter) clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 3vw, 2.5rem);
    border-left: 2px dashed var(--line-on-paper);
}

.ticket-stub > div {
    min-width: 0;
}

.ticket-stub dd {
    margin: 0.15rem 0 0;
    font-family: var(--display);
    font-size: 1.375rem;
    font-weight: 500;
    line-height: 1.2;
}

/* Links on the stub sit above the ticket's own link. */
.ticket-stub a {
    position: relative;
    z-index: 1;
    text-decoration: none;
}

.ticket-stub a:hover {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

/* The bill */

.bill {
    padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 3.5rem);
}

.bill-list {
    padding-top: clamp(1.5rem, 4vw, 3rem);
}

.section-title {
    margin: 0 0 clamp(1.25rem, 3vw, 2rem);
    font-family: var(--display);
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 500;
    line-height: 1.2;
    color: var(--slate-light);
}

.act + .act {
    margin-top: clamp(2rem, 4vw, 3rem);
}

.act-link {
    display: grid;
    grid-template-columns: minmax(0, 24rem) minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 3rem);
    align-items: center;
    text-decoration: none;
}

.act-photo {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    background: var(--raised);
}

/* A review without photos keeps its frame so the bill keeps its rhythm. */
.act-photo-none {
    position: relative;
    border: 1px solid var(--line);
}

.act-photo-none::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../images/groupiez-g.png") center / auto 2rem no-repeat;
    opacity: 0.22;
}

.act-name {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.012em;
    text-wrap: balance;
}

.act-link:hover .act-name {
    text-decoration: underline;
    text-decoration-thickness: 0.05em;
    text-underline-offset: 0.1em;
    text-decoration-color: var(--amber-light);
}

.act-text .room-line {
    margin-top: 0.6rem;
}

.act-dek {
    max-width: 36rem;
    margin: 0.75rem 0 0;
    line-height: 1.5;
    color: var(--slate-light);
}

.empty {
    margin: 0;
    font-family: var(--display);
    font-size: 1.875rem;
}

/* Rooms */

.rooms {
    padding: clamp(2rem, 4vw, 3rem) 0 clamp(3rem, 7vw, 5rem);
    border-top: 1px solid var(--line);
}

.rooms ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 2.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rooms li {
    font-family: var(--display);
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.2;
}

.rooms a {
    text-decoration: none;
}

.rooms a:hover {
    text-decoration: underline;
    text-underline-offset: 0.15em;
    text-decoration-color: var(--amber-light);
}

.rooms-count {
    margin-left: 0.4rem;
    white-space: nowrap;
}

/* Room and author pages */

.list-head {
    padding-top: clamp(1.5rem, 4vw, 3rem);
}

.list-head h1 {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.list-count {
    margin: 0.9rem 0 0;
}

/* One show */

.show-hero {
    margin: 0;
}

.show-hero img {
    width: 100%;
    max-height: 88vh;
    object-fit: cover;
}

.show-hero figcaption {
    padding: 0.5rem var(--gutter) 0;
}

.show-head {
    padding-top: clamp(1.5rem, 4vw, 3rem);
}

.show-head h1,
.plain-head h1 {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(2.75rem, 7vw, 6rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.dek {
    max-width: 40rem;
    margin: 1rem 0 0;
    font-family: var(--display);
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.3;
}

/* The stub under a show's name: the same paper as the ticket on the home page. */

.stub {
    --notch: 9px;
    --tear: 68%;
    display: grid;
    grid-template-columns: 1fr 1fr 32%;
    margin: clamp(1.5rem, 3vw, 2.5rem) 0 0;
    background: var(--paper);
    color: var(--ink);
    -webkit-mask:
        radial-gradient(circle var(--notch) at var(--tear) 0, transparent 98%, #000) top / 100% 51% no-repeat,
        radial-gradient(circle var(--notch) at var(--tear) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
    mask:
        radial-gradient(circle var(--notch) at var(--tear) 0, transparent 98%, #000) top / 100% 51% no-repeat,
        radial-gradient(circle var(--notch) at var(--tear) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
}

.stub > div {
    min-width: 0;
    padding: 1rem 1.25rem;
}

.stub dd {
    margin: 0.2rem 0 0;
    font-family: var(--display);
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.2;
}

.stub dd a {
    text-decoration: none;
}

.stub dd a:hover {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.stub-tear {
    border-left: 2px dashed var(--line-on-paper);
}

/* Post and page content */

.gh-content {
    display: grid;
    grid-template-columns:
        [full-start] minmax(var(--gutter), 1fr)
        [wide-start main-start] min(40rem, 100% - 2 * var(--gutter))
        [main-end] minmax(0, 24rem)
        [wide-end] minmax(var(--gutter), 1fr)
        [full-end];
    padding-top: clamp(2rem, 5vw, 3.5rem);
}

.gh-content > * {
    grid-column: main;
    min-width: 0;
    margin: 0 0 1.25em;
}

.gh-content > h2,
.gh-content > h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-family: var(--display);
    font-weight: 600;
    line-height: 1.15;
}

.gh-content > h2 {
    font-size: 2.25rem;
}

.gh-content > h3 {
    font-size: 1.5rem;
}

.gh-content a {
    color: var(--amber-light);
    text-underline-offset: 0.2em;
}

.gh-content > blockquote {
    grid-column: wide;
    margin: 1.5em 0;
    padding: 0;
    font-family: var(--display);
    font-size: clamp(1.75rem, 3.6vw, 2.75rem);
    font-style: italic;
    font-weight: 500;
    line-height: 1.15;
}

.gh-content > hr {
    width: 100%;
    border: 0;
    border-top: 2px dashed var(--line);
}

.gh-content > .kg-width-wide {
    grid-column: wide;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

/* Galleries run the full width: concert photos want the room. */
.gh-content > .kg-gallery-card,
.gh-content > .kg-width-full {
    grid-column: full;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.gh-content > .kg-gallery-card {
    padding-inline: var(--gutter);
}

.gh-content .kg-image {
    width: 100%;
    margin: 0 auto;
}

.gh-content .kg-card figcaption {
    padding: 0.5rem var(--gutter) 0 0;
}

.gh-content .kg-width-full figcaption {
    padding-left: var(--gutter);
}

/* The photos card from plugin/photos.mjs: rows share a height like Ghost's galleries,
   with the camera line that made each frame under it. */

.revue-photos-row {
    display: flex;
    gap: 0.75rem;
}

.revue-photos-row + .revue-photos-row {
    margin-top: 0.75rem;
}

.revue-photo {
    min-width: 0;
    margin: 0;
}

.revue-photo img {
    width: 100%;
    height: auto;
}

.gh-content .revue-photos figcaption {
    padding: 0.4rem 0 0;
    letter-spacing: 0.04em;
    text-transform: none;
}

.gh-content .revue-photos > figcaption {
    padding-top: 0.9rem;
}

/* Bookmark cards, as the editor makes them from a pasted link. Ghost's own card
   stylesheet loads after this one, so these selectors carry the content wrapper. */

.gh-content .kg-bookmark-card a.kg-bookmark-container,
.gh-content .kg-bookmark-card a.kg-bookmark-container:hover {
    background: var(--raised);
    color: var(--paper);
    border: 1px solid var(--line);
    border-radius: 0;
}

.gh-content .kg-bookmark-card a.kg-bookmark-container:hover .kg-bookmark-title {
    text-decoration: underline;
    text-decoration-color: var(--amber-light);
    text-underline-offset: 0.15em;
}

.gh-content .kg-bookmark-content {
    padding: 1.25rem 1.5rem;
    font-family: var(--body);
}

.gh-content .kg-bookmark-title {
    font-family: var(--display);
    font-size: 1.375rem;
    font-weight: 500;
    line-height: 1.2;
}

.gh-content .kg-bookmark-description {
    margin-top: 0.4rem;
    max-height: none;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--slate-light);
    opacity: 1;
    -webkit-line-clamp: 3;
}

.gh-content .kg-bookmark-metadata {
    margin-top: 1rem;
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--slate-light);
}

.gh-content .kg-bookmark-metadata > *:not(img) {
    opacity: 1;
}

/* One name is enough: the author when there is one, else the publisher. */
.gh-content .kg-bookmark-author + .kg-bookmark-publisher {
    display: none;
}

.gh-content .kg-bookmark-metadata > span:nth-of-type(2):before {
    content: ", ";
    margin: 0;
}

.gh-content .kg-bookmark-icon {
    width: 1rem;
    height: 1rem;
}

.gh-content .kg-bookmark-thumbnail img {
    border-radius: 0;
}

.gh-content .kg-embed-card iframe {
    max-width: 100%;
}

/* Foot of a show: the shows either side of it on the bill */

.bill-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gutter);
    margin-top: clamp(2.5rem, 6vw, 5rem);
    padding-bottom: clamp(3rem, 8vw, 6rem);
}

.bill-nav-link {
    display: block;
    min-width: 0;
    text-decoration: none;
}

.bill-nav-link span {
    display: block;
}

.bill-nav-later {
    grid-column: 2;
    text-align: right;
}

.bill-nav-link strong {
    display: block;
    margin-top: 0.3rem;
    font-family: var(--display);
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 500;
    line-height: 1.05;
    color: var(--amber-light);
    text-wrap: balance;
}

.bill-nav-link:hover strong {
    text-decoration: underline;
    text-decoration-thickness: 0.05em;
    text-underline-offset: 0.1em;
}

/* Plain pages */

.plain-head {
    padding-top: clamp(1.5rem, 4vw, 3rem);
}

.plain-image {
    margin: 2rem auto 0;
}

.plain {
    padding-bottom: 4rem;
}

/* Pagination: the partial only renders when there is a second page */

.pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: baseline;
    padding: 0 0 clamp(2rem, 5vw, 3.5rem);
    font-size: 1rem;
}

.pagination a {
    text-decoration: none;
    text-underline-offset: 0.25em;
}

.pagination a:hover {
    text-decoration: underline;
}

.pagination-older {
    text-align: right;
}

.page-number {
    color: var(--slate-light);
}

/* Footer */

.site-foot {
    padding: clamp(2rem, 5vw, 3.5rem) 0;
    background: var(--raised);
    font-size: 0.9375rem;
    color: var(--slate-light);
}

.site-foot-grid {
    display: grid;
    grid-template-columns: auto minmax(0, 40rem);
    justify-content: start;
    gap: 1.5rem;
    align-items: start;
}

.site-foot img {
    width: 2.25rem;
    height: auto;
}

.site-foot-note {
    margin: 0;
}

.site-foot nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    margin-top: 1.1rem;
}

.site-foot nav a {
    color: var(--paper);
}

.site-foot-copy {
    margin: 1.25rem 0 0;
    font-size: 0.8125rem;
}

/* House lights down, stage lights up. The one moment of motion on the site. */

@media (prefers-reduced-motion: no-preference) {
    .house-lights {
        animation: house-lights 900ms ease-out both;
    }

    @keyframes house-lights {
        from {
            opacity: 0.55;
        }

        to {
            opacity: 1;
        }
    }
}

/* Phones */

@media (max-width: 759px) {
    .masthead {
        padding-top: 1rem;
    }

    .lockup {
        font-size: 1.5rem;
    }

    .lockup img {
        height: 1.42rem;
        transform: translateY(0.3rem);
    }

    .masthead nav {
        padding-top: 0;
    }

    .headliner-photo img {
        aspect-ratio: 4 / 3;
        max-height: 70vh;
    }

    .ticket {
        grid-template-columns: 1fr;
        -webkit-mask: none;
        mask: none;
    }

    .ticket-name {
        padding: 1.5rem var(--gutter) 1.4rem;
    }

    .ticket-stub {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        padding: 1.25rem var(--gutter) 1.5rem;
        border-left: 0;
        border-top: 2px dashed var(--line-on-paper);
    }

    .ticket-stub dd {
        font-size: 1.25rem;
    }

    .act-link {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .act + .act {
        margin-top: 2.5rem;
    }

    .stub {
        grid-template-columns: 1fr 1fr;
        -webkit-mask: none;
        mask: none;
    }

    .stub-tear {
        grid-column: 1 / -1;
        border-top: 2px dashed var(--line-on-paper);
        border-left: 0;
    }

    .gh-content > .kg-width-wide {
        grid-column: full;
    }

    .gh-content > .kg-gallery-card {
        padding-inline: 0;
    }

    .gh-content .kg-card figcaption {
        padding-left: var(--gutter);
    }

    /* Thumbnails three across are too small for concert photos on a phone.
       Ghost sets each image's flex inline, so this has to override it. */
    .kg-gallery-row,
    .revue-photos-row {
        flex-direction: column;
    }

    .kg-gallery-image,
    .revue-photo {
        flex: none !important;
    }

    .kg-gallery-image:not(:first-of-type) {
        margin: 0.75rem 0 0 !important;
    }

    .bill-nav {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .bill-nav-later {
        grid-column: 1;
        text-align: left;
    }

    .site-foot-grid {
        grid-template-columns: auto minmax(0, 1fr);
    }
}
