/* tek.photos — cinematic zine overlay for London
   Frame matches the 2000×738 cover crop (~2.71:1). */

:root {
    --zine-ink: #0b0a08;
    --zine-paper: #ece6dc;
    --zine-mute: #9a9288;
    --zine-rule: rgba(236, 230, 220, 0.22);
    --zine-ratio: 2000 / 738;
    --zine-gap: 0.55rem;
    --zine-pad: clamp(0.75rem, 1.6vw, 1.4rem);
    --zine-display: "Iowan Old Style", Palatino, "Palatino Linotype", "Times New Roman", serif;
    --zine-sans: "Helvetica Neue", Helvetica, Arial, ui-sans-serif, sans-serif;
}

html {
    background: var(--zine-ink);
    overflow-x: clip;
}

body.zine {
    background: var(--zine-ink);
    color: var(--zine-paper);
    font-family: var(--zine-sans);
    overflow-x: clip;
}

body.zine .site-wrapper,
body.zine .site-main,
body.zine .zine-issue,
body.zine .zine-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    background: var(--zine-ink);
}

body.zine .site-wrapper {
    max-width: none;
}

/* Masthead
/* ---------------------------------------------------------- */

/* Beat London #gh-head height/overflow and the 850px -6vw pull-up. */
body.zine #gh-head.zine-head,
body.zine:not(.is-head-open) #gh-head.zine-head,
body.is-head-open #gh-head.zine-head {
    position: sticky;
    top: 0;
    right: auto;
    bottom: auto;
    left: auto;
    inset: auto;
    z-index: 20;
    height: auto;
    margin: 0;
    overflow: visible;
    background: var(--zine-ink);
    border-bottom: 1px solid var(--zine-rule);
}

body.zine #gh-head.zine-head.gh-outer {
    padding-left: 0;
    padding-right: 0;
}

body.zine #gh-head.zine-head .zine-head-inner,
body.zine #gh-head .gh-head-inner.zine-head-inner,
body.zine.is-head-middle-logo #gh-head .gh-head-inner,
body.zine.is-head-left-logo #gh-head .gh-head-inner,
body.zine.is-head-stacked #gh-head .gh-head-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto;
    grid-auto-flow: row;
    align-items: center;
    column-gap: 1rem;
    row-gap: 0;
    gap: 1rem;
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    padding: 0.7rem var(--zine-pad);
}

body.zine .zine-wordmark {
    justify-self: start;
    min-width: 0;
    color: var(--zine-paper);
    font-family: var(--zine-sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    text-decoration: none;
}

body.zine .zine-wordmark:hover {
    color: var(--zine-paper);
    opacity: 0.7;
}

body.zine .zine-nav {
    justify-self: center;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

body.zine .zine-nav .nav,
body.zine #gh-head .zine-nav .nav,
body.zine #gh-head.zine-head .nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 1.1rem;
    margin: 0;
    padding: 0;
    list-style: none;
    line-height: 1.2;
    white-space: normal;
}

body.zine #gh-head.zine-head .zine-nav .nav li,
body.zine #gh-head.zine-head .nav li {
    opacity: 1;
    transform: none;
    visibility: visible;
}

body.zine .zine-nav a,
body.zine #gh-head.zine-head .zine-nav a,
body.zine #gh-head.zine-head .nav a {
    color: var(--zine-mute);
    font-family: var(--zine-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;
}

body.zine .zine-nav a:hover,
body.zine #gh-head.zine-head .nav a:hover {
    color: var(--zine-paper);
}

body.zine .zine-head-tools {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 0.35rem;
}

body.zine .zine-search {
    color: var(--zine-paper);
    opacity: 0.7;
}

body.zine .zine-burger,
body.zine #gh-head .gh-burger,
body.zine #gh-head .zine-burger {
    display: none;
}

body.zine .gh-head-brand,
body.zine .gh-head-actions,
body.zine .gh-head-members,
body.zine .gh-powered-by {
    display: none;
}

/* Cover
/* ---------------------------------------------------------- */

.zine-cover {
    position: relative;
    width: 100%;
    margin: 0;
    overflow: hidden;
    background: #111;
    border-bottom: 1px solid var(--zine-rule);
}

.zine-cover-image,
.zine-frame img,
body.zine .post-card-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.zine-cover-image,
.zine-frame,
body.zine .post-card.zine-spread {
    width: 100%;
    max-width: 100%;
    aspect-ratio: var(--zine-ratio);
}

.zine-cover-meta {
    position: absolute;
    right: var(--zine-pad);
    bottom: 0.7rem;
    left: var(--zine-pad);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    pointer-events: none;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

.zine-kicker {
    margin: 0;
    color: var(--zine-paper);
    font-family: var(--zine-sans);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.38em;
    text-transform: uppercase;
}

.zine-cover-title {
    color: var(--zine-paper);
    font-family: var(--zine-display);
    font-size: clamp(1.4rem, 3vw, 2.4rem);
    font-style: italic;
    letter-spacing: 0.02em;
}

/* Feed
/* ---------------------------------------------------------- */

body.zine .post-feed,
body.zine .zine-feed {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    margin: 0;
}

body.zine .post-card,
body.zine .post-card-large,
body.zine .zine-spread {
    flex: none;
    width: 100%;
    height: auto;
    overflow: visible;
    background: none;
}

body.zine .zine-spread-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

body.zine .zine-frame {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #111;
}

body.zine .post-card-link {
    position: static;
}

body.zine .post-card-content,
body.zine .zine-spread .post-card-content {
    display: none;
}

.zine-caption {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem var(--zine-pad) 0.85rem;
    border-bottom: 1px solid var(--zine-rule);
    color: var(--zine-mute);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.zine-caption time {
    flex: none;
    font-variant-numeric: tabular-nums;
}

.zine-caption .post-card-title {
    max-width: none;
    margin: 0;
    color: var(--zine-paper);
    font-family: var(--zine-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-align: right;
    text-transform: uppercase;
}

body.zine .zine-spread-link:hover .zine-frame img {
    filter: contrast(1.04);
}

/* Issue / post
/* ---------------------------------------------------------- */

body.zine .post-content {
    padding-top: 1.5rem;
}

.zine-issue-head {
    max-width: none;
    padding: 0 var(--zine-pad) 1rem;
    margin: 0;
    text-align: left;
}

body.zine .post-content-title {
    margin: 0.2rem 0 0;
    color: var(--zine-paper);
    font-family: var(--zine-display);
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    font-weight: 400;
    font-style: italic;
    text-align: left;
}

body.zine .post-content-excerpt {
    color: var(--zine-mute);
    text-align: left;
    opacity: 1;
}

body.zine .post-content-image,
body.zine .zine-body .kg-card,
body.zine .zine-body figure {
    margin: 0 0 var(--zine-gap);
}

body.zine .zine-body {
    max-width: none;
    padding: 0;
    margin: 0;
}

body.zine .zine-body .kg-width-full,
body.zine .zine-body .kg-width-wide,
body.zine .gh-canvas {
    margin-right: 0;
    margin-left: 0;
}

body.zine .zine-body img,
body.zine .post-content-image img,
body.zine .kg-image {
    width: 100%;
    max-width: 100%;
    aspect-ratio: var(--zine-ratio);
    object-fit: cover;
    object-position: center;
}

body.zine .zine-issue,
body.zine .zine-page {
    max-width: 100%;
    min-width: 0;
}

body.zine figure.zine-frame,
body.zine .post-content-image,
body.zine .kg-width-wide,
body.zine .kg-width-full {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    left: auto;
}

body.zine.page-template .gh-canvas,
body.zine .gh-content.zine-prose,
body.zine .zine-prose {
    box-sizing: border-box;
    width: 100%;
    max-width: min(40em, 100vw);
    min-width: 0;
    padding: 3.6rem 2.8rem 6rem;
    margin: 0 auto;
    color: var(--zine-paper);
    font-family: Georgia, "Iowan Old Style", Palatino, "Palatino Linotype", "Times New Roman", serif;
    font-size: 2.1rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.7;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

body.zine .zine-prose p,
body.zine .zine-prose li {
    display: block;
    width: 100%;
    max-width: 100%;
    color: var(--zine-paper);
    font-size: inherit;
    line-height: inherit;
    white-space: normal;
}

body.zine .zine-prose a {
    color: var(--zine-paper);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

body.zine .zine-prose h2,
body.zine .zine-prose h3,
body.zine .zine-prose h4,
body.zine .gh-content.zine-prose h2,
body.zine .gh-content.zine-prose h3,
body.zine .gh-content.zine-prose h4 {
    margin: 2.8rem 0 1rem;
    color: var(--zine-paper);
    font-family: var(--zine-sans);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.4;
    text-transform: none;
    white-space: normal;
    overflow-wrap: break-word;
}

body.zine.page-template .post-content-image {
    margin: 0;
}

body.zine .zine-colophon {
    display: flex;
    justify-content: space-between;
    padding: 1.1rem var(--zine-pad) 1.6rem;
    color: var(--zine-mute);
    font-size: 0.65rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    border-top: 1px solid var(--zine-rule);
}

@media (max-width: 850px) {
    body.zine #gh-head.zine-head,
    body.zine:not(.is-head-open) #gh-head.zine-head {
        margin: 0;
        height: auto;
    }
}

@media (max-width: 767px) {
    body.zine #gh-head.zine-head,
    body.is-head-open #gh-head.zine-head {
        height: auto;
        position: sticky;
        inset: auto;
        overflow: visible;
    }

    body.zine #gh-head.zine-head .zine-head-inner,
    body.zine #gh-head .gh-head-inner.zine-head-inner,
    body.zine.is-head-middle-logo #gh-head .gh-head-inner,
    body.zine.is-head-left-logo #gh-head .gh-head-inner,
    body.zine.is-head-stacked #gh-head .gh-head-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        grid-auto-flow: row;
        column-gap: 0.75rem;
        row-gap: 0.35rem;
        gap: 0.35rem 0.75rem;
        height: auto;
        min-height: 0;
    }

    body.zine #gh-head .gh-burger,
    body.zine #gh-head .zine-burger {
        display: none;
    }

    body.zine .zine-nav,
    body.zine #gh-head .zine-nav,
    body.zine #gh-head.zine-head .zine-nav {
        display: block;
        grid-column: 1 / -1;
        justify-self: stretch;
        opacity: 1;
        visibility: visible;
        position: static;
        transform: none;
        padding: 0.2rem 0 0.15rem;
    }

    body.zine #gh-head.zine-head .nav,
    body.zine #gh-head.zine-head .zine-nav .nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.55rem 1.1rem;
        margin: 0;
        padding: 0;
        list-style: none;
        line-height: 1.2;
        white-space: normal;
    }

    body.zine #gh-head.zine-head .nav li {
        opacity: 1;
        transform: none;
    }

    body.zine #gh-head.zine-head .nav a {
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: 0.18em;
        line-height: 1.2;
        text-transform: uppercase;
        color: var(--zine-mute);
    }

    body.zine .post-card,
    body.zine .post-card-large {
        height: auto;
        flex: none;
    }

    body.zine .gh-content.zine-prose,
    body.zine .zine-prose {
        padding: 2.8rem 2.2rem 4.8rem;
        font-size: 2rem;
        line-height: 1.72;
    }

    body.zine .zine-prose h2,
    body.zine .zine-prose h3,
    body.zine .zine-prose h4,
    body.zine .gh-content.zine-prose h3 {
        font-size: 1.7rem;
        letter-spacing: 0.01em;
        text-transform: none;
    }
}
