/* Cinemapp blog theme
   Fonts and colours mirror cinemapp.be:
   body DM Sans, display headings DM Serif Display,
   primary yellow #eea600, ink #101820, grey scale from the app stylesheet. */

@font-face {
    font-display: swap;
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 400;
    src: url("../fonts/dm-sans-v15-latin-regular.woff2") format("woff2");
}
@font-face {
    font-display: swap;
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 500;
    src: url("../fonts/dm-sans-v15-latin-500.woff2") format("woff2");
}
@font-face {
    font-display: swap;
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 700;
    src: url("../fonts/dm-sans-v15-latin-700.woff2") format("woff2");
}
@font-face {
    font-display: swap;
    font-family: "DM Serif Display";
    font-style: normal;
    font-weight: 400;
    src: url("../fonts/dm-serif-display-v15-latin-regular.woff2") format("woff2");
}

:root {
    --white: #ffffff;
    --primary: #eea600;
    --primary-hover: #c58a00;
    --primary-disabled: #fff6e1;
    --dark: #101820;
    --gray3: #595959;
    --gray2: #b2b2b2;
    --gray1: #ebebeb;
    --gray0: #f9f9f9;
    --font-sans: var(--gh-font-body, "DM Sans"), "Helvetica Neue", Arial, sans-serif;
    --font-serif: var(--gh-font-heading, "DM Serif Display"), Georgia, serif;
    --content-width: 720px;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 500;
    line-height: 1.2;
    color: var(--dark);
}

a {
    color: var(--dark);
    text-decoration: underline;
    text-decoration-color: var(--primary);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
a:hover {
    color: var(--primary-hover);
}

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

/* Layout */

.site-main,
.site-footer {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 0 20px;
    background: var(--white);
    border-bottom: 1px solid var(--gray1);
}
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 12px 0;
}

.site-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
}
.site-logo {
    display: block;
    text-decoration: none;
}
.site-logo img {
    display: block;
    width: auto;
    height: 28px;
}

.site-cta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.site-cta-text {
    font-size: 0.875rem;
    line-height: 1.25;
    color: var(--gray3);
    text-align: right;
}

.site-main {
    padding-bottom: 40px;
}

/* Signup call to action. The whole header is sticky, so the button stays
   reachable from anywhere on the page without any JavaScript. */

.signup-btn {
    display: inline-block;
    padding: 9px 22px;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--dark);
    background: var(--primary);
    border-radius: 40px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.signup-btn:hover,
.signup-btn:focus {
    color: var(--dark);
    background: var(--primary-hover);
    text-decoration: none;
}

.signup-btn:focus-visible {
    outline: 2px solid var(--dark);
    outline-offset: 3px;
}

.site-footer {
    padding-top: 30px;
    padding-bottom: 60px;
    border-top: 1px solid var(--gray1);
    font-size: 0.875rem;
    color: var(--gray3);
    text-align: center;
}
.site-footer p {
    margin: 0;
}

/* Posts */

.post {
    padding: 48px 0;
    border-top: 1px solid var(--gray1);
}
.post:first-child {
    border-top: 0;
    padding-top: 32px;
}
.post-feed-empty {
    text-align: center;
    color: var(--gray3);
}

.post-header {
    margin-bottom: 24px;
}
.post-date {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--gray3);
}
.post-title {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 2.25rem;
    line-height: 1.15;
}
.post-title a {
    text-decoration: none;
}
.post-title a:hover {
    color: var(--dark);
    text-decoration: underline;
    text-decoration-color: var(--primary);
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

.post-feature-image {
    margin: 0 0 28px;
}
.post-feature-image img {
    display: block;
    width: 100%;
    border-radius: 8px;
}
.post-feature-image figcaption {
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--gray3);
    text-align: center;
}

/* Post content (Ghost editor output) */

.gh-content > * + * {
    margin-top: 1.25em;
}
.gh-content h1,
.gh-content h2,
.gh-content h3,
.gh-content h4 {
    margin-top: 1.8em;
}
.gh-content h1 { font-size: 1.75rem; }
.gh-content h2 { font-size: 1.5rem; }
.gh-content h3 { font-size: 1.25rem; }
.gh-content h4 { font-size: 1.125rem; }
.gh-content h5,
.gh-content h6 { font-size: 1rem; }
.gh-content p {
    margin-bottom: 0;
}
.gh-content ul,
.gh-content ol {
    padding-left: 1.4em;
}
.gh-content li + li {
    margin-top: 0.4em;
}
.gh-content hr {
    height: 1px;
    margin: 2.5em 0;
    border: 0;
    background: var(--gray1);
}
.gh-content blockquote {
    margin: 0;
    padding: 4px 0 4px 20px;
    border-left: 4px solid var(--primary);
    font-size: 1.125rem;
    color: var(--gray3);
}
.gh-content blockquote.kg-blockquote-alt {
    padding: 0;
    border: 0;
    text-align: center;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--dark);
}
.gh-content code {
    padding: 2px 6px;
    font-size: 0.9em;
    background: var(--gray0);
    border: 1px solid var(--gray1);
    border-radius: 4px;
}
.gh-content pre {
    padding: 16px 20px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.5;
    background: var(--dark);
    color: var(--white);
    border-radius: 8px;
}
.gh-content pre code {
    padding: 0;
    background: none;
    border: 0;
    color: inherit;
}
.gh-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.gh-content th,
.gh-content td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--gray1);
}
.gh-content th {
    font-weight: 500;
}
.gh-content figure {
    margin: 0;
}
.gh-content figcaption {
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--gray3);
    text-align: center;
}
.gh-content iframe,
.gh-content video {
    max-width: 100%;
}

/* Ghost card widths */

.kg-width-wide {
    width: min(100vw - 40px, var(--content-width) + 240px);
    margin-left: 50%;
    transform: translateX(-50%);
}
.kg-width-full {
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}
.kg-image-card img,
.kg-width-wide img,
.kg-width-full img {
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}
.kg-width-full img {
    border-radius: 0;
}

.kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.kg-gallery-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 6px;
}
.kg-gallery-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.kg-embed-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.kg-embed-card iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
}

.kg-bookmark-card a {
    display: flex;
    flex-wrap: wrap;
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--gray1);
    border-radius: 8px;
    overflow: hidden;
}
.kg-bookmark-content {
    flex: 1 1 300px;
    padding: 16px;
}
.kg-bookmark-title {
    font-weight: 500;
}
.kg-bookmark-description {
    margin-top: 6px;
    font-size: 0.9rem;
    color: var(--gray3);
}
.kg-bookmark-metadata {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--gray3);
}
.kg-bookmark-icon {
    width: 18px;
    height: 18px;
    margin-right: 6px;
    vertical-align: middle;
}
.kg-bookmark-thumbnail {
    flex: 0 0 200px;
}
.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kg-button-card {
    display: flex;
}
.kg-button-card.kg-align-center {
    justify-content: center;
}
.kg-btn {
    display: inline-block;
    padding: 12px 24px;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark);
    background: var(--primary);
    border-radius: 40px;
    text-decoration: none;
}
.kg-btn:hover {
    color: var(--dark);
    text-decoration: underline;
}

.kg-callout-card {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-radius: 8px;
    background: var(--gray0);
}
.kg-callout-card-yellow {
    background: var(--primary-disabled);
}
.kg-callout-text {
    margin: 0;
}

.kg-toggle-card {
    padding: 16px 20px;
    border: 1px solid var(--gray1);
    border-radius: 8px;
}
.kg-toggle-heading-text {
    font-size: 1.125rem;
    font-weight: 500;
}
.kg-toggle-content {
    margin-top: 12px;
}

.kg-header-card {
    padding: 40px 20px;
    text-align: center;
    background: var(--dark);
    color: var(--white);
}
.kg-header-card h2,
.kg-header-card h3 {
    color: inherit;
}

.kg-file-card a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--gray1);
    border-radius: 8px;
    text-decoration: none;
}

.kg-signup-card,
.kg-product-card {
    padding: 24px;
    border: 1px solid var(--gray1);
    border-radius: 8px;
}

/* Small screens */

@media (max-width: 600px) {
    body {
        font-size: 1rem;
    }
    .post {
        padding: 36px 0;
    }
    .site-header {
        padding: 0 16px;
    }
    .site-header-inner {
        gap: 12px;
        padding: 10px 0;
    }
    .site-logo img {
        height: 22px;
    }
    .site-cta-text {
        display: none;
    }
    .signup-btn {
        padding: 8px 18px;
        font-size: 0.875rem;
    }
    .post-title {
        font-size: 1.75rem;
    }
    .kg-width-wide {
        width: 100vw;
    }
    .kg-width-wide img {
        border-radius: 0;
    }
}

/* Only rendered when there are more than 100 posts */

.pagination {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 30px 0 10px;
    border-top: 1px solid var(--gray1);
    font-weight: 500;
}
.pagination a {
    text-decoration: none;
}
.pagination .older-posts {
    margin-left: auto;
}
