@font-face {
    font-family: 'Atkinson Hyperlegible Web';
    src: 
    /* url('fonts/atkinson-hyperlegible-bold-102-webfont.woff2') format('woff2'), */
        url('fonts/atkinson-hyperlegible-bold-102-webfont.woff') format('woff');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Atkinson Hyperlegible Web';
    src: 
    /* url('fonts/atkinson-hyperlegible-bolditalic-102-webfont.woff2') format('woff2'), */
        url('fonts/atkinson-hyperlegible-bolditalic-102-webfont.woff') format('woff');
    font-weight: bold;
    font-style: italic;
}

@font-face {
    font-family: 'Atkinson Hyperlegible Web';
    src: 
    /* url('fonts/atkinson-hyperlegible-italic-102-webfont.woff2') format('woff2'), */
        url('fonts/atkinson-hyperlegible-italic-102-webfont.woff') format('woff');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'Atkinson Hyperlegible Web';
    src: 
    /* url('fonts/atkinson-hyperlegible-regular-102-webfont.woff2') format('woff2'), */
        url('fonts/atkinson-hyperlegible-regular-102-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Typewriter 215FP Web';
    src: 
    /* url('fonts/typewriter215fp-webfont.woff2') format('woff2'), */
        url('fonts/typewriter215fp-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Teko Web';
    src: 
    /* url('fonts/teko-latin-300-normal-webfont.woff2') format('woff2'), */
        url('fonts/teko-latin-300-normal-webfont.woff') format('woff');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Speeches And Cream Calculated Web';
    src: 
    /* url('fonts/speechesandcream-calculated-webfont.woff2') format('woff2'), */
        url('fonts/speechesandcream-calculated-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Speeches And Cream Web';
    src: 
    /* url('fonts/speechesandcream-italic-webfont.woff2') format('woff2'), */
        url('fonts/speechesandcream-italic-webfont.woff') format('woff');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'Roboto Slab Web';
    src: 
    /* url('fonts/roboto-slab-latin-400-normal-webfont.woff2') format('woff2'), */
        url('fonts/roboto-slab-latin-400-normal-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto Slab Web';
    src: 
    /* url('fonts/roboto-slab-latin-700-normal-webfont.woff2') format('woff2'), */
        url('fonts/roboto-slab-latin-700-normal-webfont.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

* {
    box-sizing: border-box;
}

html {
    --serif: "Roboto Slab Web", Iowan Old Style, Apple Garamond, Baskerville, Times New Roman, Droid Serif, Times, Source Serif Pro, serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
    --sans-serif: "Atkinson Hyperlegible Web", -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
    --paper-color: #BDF5FF;
    --accent-color: #0C4F64;
    background-color: var(--paper-color);
}

body {
    max-width: 50rem;
    margin: 0 auto;
    font-family: var(--sans-serif);
    font-size: large;
}

img {
    width: 100%;
    height: auto;
    display: block;
    image-rendering: pixelated;
}

.no-pixel {
    image-rendering: auto;
}

img.icon {
    width: 4rem;
    height: auto;
    vertical-align: middle;
    margin: 0 auto 1rem;
}

figure {
    margin: 0 1rem;
}

figcaption {
    font-size: smaller;
}

.ad figcaption {
    text-align: right;
}

figure.captioned {
    border: 2px solid black;
}

.captioned figcaption {
    background-image: url("images/squished-triangle.svg");
    background-repeat: no-repeat;
    background-size: 15px 100%;
    padding: 0.35rem;
    padding-left: 1rem;
}

.captioned figcaption:first-child {
    background-image: url("images/squished-triangle-flipped.svg");
}

a {
    color: var(--accent-color);
}

a:focus {
    outline: 2px var(--accent-color) solid;
    outline-offset: 2px;
}
a:hover, a:focus {
    text-decoration: none;
}
a:active {
    outline: none;
}

p {
    text-indent: 2em;
    line-height: 1.5;
    padding: 0 1rem;
}

ul,
ol {
    line-height: 1.5;
    font-size: large;
}

li {
    margin-bottom: 0.5em;
    margin-left: 0.5rem;
}

article ul,
article ol {
    margin-left: 1.5rem;
}

h1 {
    font-family: 'Teko Web', -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
    font-weight: 300;
    line-height: 1;
    text-align: center;
    /* font-size: 6rem; */
    grid-area: title;
    margin: 0;
}

h2,
h3 {
    font-family: var(--serif);
}

h2 {
    background-color: black;
    color: var(--paper-color);
    padding: 1rem;
    font-weight: 700;
}

h2 div.subtitle {
    font-size: large;
    font-weight: normal;
    font-family: var(--sans-serif);
    font-style: italic;
}

h3 {
    font-weight: 700;
    padding: 0 1rem;
}

.credits {
    border: 2px black dotted;
    margin: 1rem;
    margin-top: 1.4rem;
    padding-right: 1rem;
    font-size: medium;
}

.credits ul {
    font-size: inherit;
}

.bold {
    font-weight: bold;
}

.italic {
    font-style: italic;
}

/* .sr-only {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
} */

.zine-info {
    display: flex;
    flex-wrap: wrap;
}

.zine-info>* {
    flex: 1 1 15rem;
}

.title-block .sub-title {
    font-family: "Typewriter 215FP Web", Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
    font-size: 2.8rem;
    text-align: right;
    line-height: 1;
    grid-area: subtitle;
    padding: 0;
    margin-top: -10px;
    margin-bottom: 1rem;
}

p.date-and-issue {
    text-align: right;
    grid-area: date;
    margin-bottom: -5px
}

.title-block {
    display: grid;
    margin: 5px;
    grid-template-areas:
        "date"
        "title"
        "subtitle";
}

.hyperlegible-bold-italic {
    font-weight: bold;
    font-style: italic;
    font-family: var(--sans-serif);
}

.roboto-slab-italic {
    font-family: var(--serif);
    font-style: italic;
}

.speeches-n-cream-italics {
    font-family: "Speeches And Cream Web", -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
    font-style: italic;
}

.speeches-n-cream-calculated {
    font-family: "Speeches And Cream Calculated Web", Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
}

.callout-walkabout {
    border-radius: 50%;
    padding: 10px;
    width: min-content;
    text-align: center;
    border: black 4px double;
    transform: rotate(10deg);
}

.callout-walkabout p {
    line-height: 1;
}

section.cover {
    border: 2px solid black;
    padding: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.cover-segment {
    background-color: var(--paper-color);
    /* font-size: larger; */
    display: inline-block;
}

.cover-grid p {
    text-indent: initial;
    margin: 0;
}

.cover-grid h2 {
    color: black;
    background-color: initial;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.cover-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
    column-gap: 0;
    place-items: center;
}

.cover-image {
    height: 100%;
    grid-area: 1 / 1 / 5 / 3;
}

.callout-meta {
    grid-area: 1 / 1 / 2 / 2;
}

.callout-includes {
    grid-area: 1 / 2 / 2 / 3;
    text-align: right;
}

.callout-includes>ul {
    list-style: none;
    padding-left: 1rem;
    padding-right: 1rem;
    margin: 0;
}

.callout-includes li {
    margin: 0;
}

.callout-vr-desktop {
    grid-area: 2 / 1 / 3 / 2;
}

.callout-space {
    grid-area: 3 / 1 / 4 / 2;
}

.callout-walkabout {
    grid-area: 4 / 2 / 5 / 3;
}

/* footer/back page */

footer.cover {
    border: 2px solid black;
    padding: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.back-cover-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(5, 1fr);
    column-gap: 0;
    place-items: center;
}

.back-cover-image {
    height: 100%;
    grid-area: 1 / 1 / 6 / 4;
}

.back-cover-credit {
    grid-area: 5 / 2 / 6 / 3;
    align-self: center;
    justify-self: center;
    text-indent: 0;
    text-align: center;
}

/* text-fit https://kizu.dev/fit-to-width/ */
.text-fit {
    display: flex;
    container-type: inline-size;

    --captured-length: initial;
    --support-sentinel: var(--captured-length, 9999px);

    &>[aria-hidden] {
        display: inline !important; /* because I hid it in the HTML */
        visibility: hidden;
    }

    &> :not([aria-hidden]) {
        flex-grow: 1;
        container-type: inline-size;

        --captured-length: 100cqi;
        --available-space: var(--captured-length);

        &>* {
            --support-sentinel: inherit;
            --captured-length: 100cqi;
            --ratio: tan(atan2(var(--available-space),
                        var(--available-space) - var(--captured-length)));
            --font-size: clamp(1em,
                    1em * var(--ratio),
                    var(--max-font-size, infinity * 1px) - var(--support-sentinel));
            inline-size: var(--available-space);

            &:not(.text-fit) {
                display: block;
                font-size: var(--font-size);

                @container (inline-size > 0) {
                    white-space: nowrap;
                }
            }

            &.text-fit {
                --captured-length2: var(--font-size);
                font-variation-settings:
                    'opsz'
                    tan(atan2(var(--captured-length2), 1px));
            }
        }
    }
}

@property --captured-length {
    syntax: "<length>";
    initial-value: 0px;
    inherits: true;
}

@property --captured-length2 {
    syntax: "<length>";
    initial-value: 0px;
    inherits: true;
}