/* General styles */
html {
    --text: hsl(104, 56%, 13%);
    --links: hsl(104, 94%, 28%);
    --background: hsl(104, 56%, 46%);
    --mute: hsl(104, 57%, 26%);
    --post-background: hsl(104, 100%, 100%);
    --highlight: hsl(104, 56%, 90%);
    --border: hsl(104, 21%, 76%);

    --font-text: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-headings: "Fraunces", serif;
    --font-mono: "Fira Mono", monospace;

    --logo: var(--post-background);
    /* set rem to 10px */
    font-size: 62.5%;
}

body {
    margin: 32px 0;
    padding: 0;
    color: var(--post-background);
    background: var(--background);
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial;
    font-size: 1.8rem;
    line-height: 145%;
    min-height: 480px;
    min-width: 320px;
}

img,
video {
    max-width: 100%;
    height: auto;
}

a {
    font-weight: 500;
    color: var(--text);
}

.container {
    margin: 0 16px;
}

main.container {
    margin: 0 20px 0 10px;
}

@media (min-width: 600px) {
    body {
        margin-top: 64px;
    }

    .container,
    main.container {
        margin-left: auto;
        margin-right: auto;
        width: 83.33; /* 633px / 960px */
    }
}

@media (min-width: 900px) {
    .container,
    main.container {
        width: 65.9375%; /* 633px / 960px */
    }
}

a.button,
button {
    padding: 8px 12px;
    color: var(--text);
    font-family: var(--font-headings);
    font-size: 1.8rem;
    font-weight: 800;
    border-radius: 4px;
    box-shadow: 1px 1px 0px #4b3c3b, 2px 2px 0px #4b3c3b, 3px 3px 0px #4b3c3b,
        4px 4px 0px #4b3c3b;
    background-color: var(--post-background);
    border: 1px solid var(--text);
    cursor: pointer;
}

a.button {
    display: inline-block;
    margin: 0 4px;
    text-decoration: none;
}

a.button:hover {
    box-shadow: 1px 1px 0px #4b3c3b, 2px 2px 0px #4b3c3b, 3px 3px 0px #4b3c3b,
        4px 4px 0px #4b3c3b, 5px 5px 0px #4b3c3b, 6px 6px 0px #4b3c3b;
    transform: translate(-2px, -2px);
    transition: all 0.1s ease-out;
}

/* Typography */
h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4 {
    font-family: var(--font-headings);
    font-weight: 800;
    margin: 0 auto 0.5em;
}

h1,
.h1 {
    font-size: 2.9rem;
}

h2,
.h2 {
    font-size: 2.4rem;
}

h3,
.h3 {
    font-size: 2.2rem;
}

h4,
.h4 {
    font-size: 1.8rem;
}

.smaller,
.small {
    font-size: 0.8333em;
}

/* elements */
hr {
    border: none;
    background: url("../img/hr.d005307e6a0e.svg") no-repeat center;
    margin: 68px auto;
    height: 20px;
}

blockquote {
    margin: 24px 0;
    padding: 0 0 0 24px;
    border-left: 4px solid var(--background);
    color: var(--mute);
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--highlight);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--text);
}

pre {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--highlight);
    padding: 12px;
    overflow: auto;
    border-radius: 8px;
}

pre code {
    background: none;
    padding: 0;
    font-size: 1em;
}

/* Utilities */
.center {
    text-align: center;
}

.margin-top-0 {
    margin-top: 0;
}

.margin-bottom-0 {
    margin-bottom: 0;
}

.margin-top-48 {
    margin-top: 48px;
}

.margin-left-20 {
    margin-left: 20px;
}

.margin-left-24 {
    margin-left: 24px;
}

.margin-0 {
    margin: 0;
}

.padding-top-16,
.card.padding-top-16 {
    padding-top: 16px;
}

.padding-bottom-16,
.card.padding-bottom-16 {
    padding-bottom: 16px;
}

.bg-highlight,
.card.bg-highlight {
    background-color: var(--highlight);
}

.mute {
    color: var(--mute);
}

.ink {
    color: var(--text);
}

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-space-between {
    justify-content: space-between;
}

.flex-baseline {
    align-items: baseline;
}

.flex-grow {
    flex-grow: 1;
}

.pre {
    white-space: pre-wrap;
}

/* sections */
header {
    margin: 128px auto 64px;
    max-width: 520px;
    font-family: var(--font-headings);
    font-weight: 800;
    font-size: 2.1rem;
}

main {
    max-width: 650px;
}

.card {
    color: var(--text);
    background: var(--post-background);
    border: 1px solid var(--text);
    box-shadow: 1px 1px 0px #4b3c3b, 2px 2px 0px #4b3c3b, 3px 3px 0px #4b3c3b,
        4px 4px 0px #4b3c3b, 5px 5px 0px #4b3c3b, 6px 6px 0px #4b3c3b,
        7px 7px 0px #4b3c3b, 8px 8px 0px #4b3c3b, 9px 9px 0px #4b3c3b,
        10px 10px 0px #4b3c3b, 11px 11px 0px #4b3c3b, 12px 12px 0px #4b3c3b,
        13px 13px 0px #4b3c3b, 14px 14px 0px #4b3c3b, 15px 15px 0px #4b3c3b;

    margin: 80px auto;
    padding: 36px 24px;
    gap: 10px;
}

.card.card-small {
    padding: 20px 24px;
    box-shadow: 1px 1px 0px #4b3c3b, 2px 2px 0px #4b3c3b, 3px 3px 0px #4b3c3b,
        4px 4px 0px #4b3c3b, 5px 5px 0px #4b3c3b, 6px 6px 0px #4b3c3b,
        7px 7px 0px #4b3c3b, 8px 8px 0px #4b3c3b, 9px 9px 0px #4b3c3b,
        10px 10px 0px #4b3c3b;
}

.card h1,
.card .h1 {
    text-align: center;
}

.card h1 a,
.card .h1 a {
    text-decoration: none;
}

.card h2 {
    /* for headings in trix content */
    margin-top: 0.75em;
}

.card a {
    color: var(--links);
    text-decoration: none;
}
.card a:hover {
    text-decoration: underline;
}

.card a.button:hover {
    text-decoration: none;
}

.card-footer {
    margin: 36px -24px -36px -24px;
    padding: 36px 24px;
    width: 100%;
    background-color: var(--highlight);
}

.card .meta {
    font-family: var(--font-headings);
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 auto 8px;
    text-align: center;
}

.card .meta a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    text-decoration-color: var(--background);
    -moz-text-decoration-color: var(--background);
}

.card a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    text-decoration-color: var(--background);
    -moz-text-decoration-color: var(--background);
}

.card button,
.card a.button {
    border-radius: 4px;
    background-color: var(--background);
    color: var(--post-background);
    border: 1px solid var(--background);
}

footer {
    margin-top: 96px;
}

/* forms */
.form-field {
    display: flex;
    flex-direction: column;
    margin: 16px 0;
}

.form-field .helptext {
    color: var(--mute);
    font-weight: normal;
    font-size: 0.833em;
}

label {
    font-weight: 600;
}

input[type="email"],
input[type="number"],
input[type="search"],
input[type="text"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea,
.pseudo-textarea,
select {
    font-family: var(--font-text);
    padding: 8px 12px;
    border: 1px solid var(--text);
    font-size: 1.8rem;
}

input[type="email"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
textarea:focus {
    border-color: var(--links);
    outline: none;
}

#id_honeypot,
label[for="id_honeypot"] {
    display: none;
}

/* Trix Editor */
trix-editor {
    background: var(--post-background);
}

trix-editor.trix-editor-large {
    min-height: 15em;
}

trix-toolbar button {
    box-shadow: none;
}

figure {
    text-align: center;
}

figcaption {
    font-size: 0.8em;
    color: var(--mute);
}

.attachment {
    display: inline-block;
    width: 100%;
    max-width: 100%;
    margin: 1em 0;
    text-align: center;
    line-height: 1;
}

/* Expand iframes to full widht and height */
.iframe-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    margin: 1em 0;
}

.iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
