/*
Theme Name: Raouf Minimal
Theme URI: https://raouf.se/
Description: Ett redaktionellt bloggtema med evenemang från Kapellet.
Version: 1.6.0
Requires at least: 5.8
Requires PHP: 7.4
Text Domain: raouf-minimal
*/
:root {
    --paper: #f8f6ef;
    --ink: #23231e;
    --muted: #59594f;
    --line: #d4d0c3;
    --accent: #7f3525;
    --serif: Georgia, "Times New Roman", serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 system-ui, sans-serif; overflow-wrap: break-word; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .14em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.08; font-weight: 500; }
h1 { font-size: clamp(2.6rem, 8vw, 6rem); margin: 0; letter-spacing: -.055em; }
h2 { font-size: clamp(1.65rem, 4vw, 2.7rem); margin: 0 0 .6em; letter-spacing: -.03em; }
time { color: var(--muted); font-size: .85rem; }
.shell { width: min(72rem, calc(100% - 2.5rem)); margin-inline: auto; }
.masthead, .section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .75rem 2rem; }
.masthead { padding-block: 1.1rem; }
.site-header { border-bottom: 1px solid var(--line); }
.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; }
.brand { font: 700 1.55rem var(--serif); color: var(--ink); text-decoration: none; }
.site-header ul { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin: 0; padding: 0; list-style: none; }
.site-header nav ul { gap: .45rem; }
.site-header nav a {
    display: block;
    padding: .45rem .85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
}
.site-header nav a:hover { background: #f0e0d6; border-color: var(--accent); }
.site-header nav [aria-current="page"] {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.site-header nav [aria-current="page"]:hover { background: #63291d; }
.intro { padding-block: clamp(2rem, 7vw, 5rem); }
.intro p { color: var(--muted); max-width: 58ch; }
.events, .journal { padding-block: 2rem; border-top: 1px solid var(--line); }
.post-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 14rem); gap: 1.5rem; padding-block: 1.5rem; border-bottom: 1px solid var(--line); }
.post-row h2 { margin: .3rem 0; }
.post-row h2 a { color: var(--ink); text-decoration: none; }
.post-row h2 a:hover { text-decoration: underline; }
.post-row p { margin: .6rem 0 0; max-width: 62ch; }
.post-thumbnail { grid-column: 2; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.reading { max-width: 47rem; margin-inline: auto; }
.reading h1 { margin-top: .15em; font-size: clamp(2.35rem, 7vw, 4.6rem); }
.entry-content { font-size: 1.12rem; }
.entry-content > *, .reading .cover { margin-block: 0 1.5rem; }
.entry-content h2, .entry-content h3 { margin-top: 1.5em; }
.entry-content .alignwide { width: min(66rem, 100%); }
.entry-content pre { overflow: auto; }
.pagination, .post-navigation, .comments { margin-block: 2rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: 1rem; }
input, textarea { max-width: 100%; font: inherit; }
.screen-reader-text { position: absolute; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.skip-link:focus { clip: auto; clip-path: none; width: auto; height: auto; padding: .5rem 1rem; background: var(--paper); z-index: 100000; }
.home #innehall { padding-top: clamp(1.4rem, 4vw, 3rem); }
.home #innehall .intro > h1 {
    position: absolute;
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
    white-space: nowrap;
}
.home #innehall .intro { padding-block: 0; }
.home #innehall .intro > p { margin-top: 0; }

.reading:has(.kapellet-events) { max-width: none; }
.reading:has(.kapellet-events) > :not(.entry-content),
.reading:has(.kapellet-events) .entry-content > :not(:is(.kapellet-events, :has(.kapellet-events))) {
    max-width: 47rem;
    margin-inline: auto;
}
.events, .entry-content { container-type: inline-size; }
.shell .kapellet-events { grid-template-columns: minmax(0, 1fr); }
@container (min-width: 32rem) {
    .shell .kapellet-events { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (min-width: 48rem) {
    .shell .kapellet-events { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.entry-content .kapellet-events__body h3 { margin: 0; }
.shell .kapellet-events__card { border-radius: 0; box-shadow: none; border-color: var(--line); }
.shell .kapellet-events__button { border-radius: 0; background: var(--accent); }
.shell .kapellet-events__button:focus-visible { outline-color: var(--ink); }
@media (max-width: 38rem) {
    .post-row { grid-template-columns: minmax(0, 1fr); }
    .post-thumbnail { grid-column: 1; }
}



.events-slider-controls {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-block: 0 .75rem;
}
.events-slider-controls[hidden] { display: none; }
.events-slider-controls button {
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--accent);
    border-radius: 50%;
    background: var(--paper);
    color: var(--accent);
    font: 1.25rem system-ui, sans-serif;
    cursor: pointer;
}
.events-slider-controls button:hover:enabled { background: var(--accent); color: #fff; }
.events-slider-controls button:disabled { opacity: .4; cursor: default; }
.shell .events-slider {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: .65rem;
}
.events-slider > li { scroll-snap-align: start; }
@container (min-width: 32rem) {
    .shell .events-slider { grid-auto-columns: calc((100% - 1.25rem) / 2); }
}
@container (min-width: 48rem) {
    .shell .events-slider { grid-auto-columns: calc((100% - 2.5rem) / 3); }
}
@media (prefers-reduced-motion: no-preference) {
    .events-slider { scroll-behavior: smooth; }
}


.home #innehall > .events:first-child { border-top: 0; padding-top: 0; }


.home-gallery { margin-bottom: 2rem; }
.home-gallery__images {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    list-style: none;
    margin: 0;
    padding: 0;
}
.home-gallery__images li { scroll-snap-align: start; min-width: 0; }
.home-gallery__images img {
    display: block;
    width: 100%;
    aspect-ratio: 5 / 2;
    object-fit: cover;
}
@media (max-width: 38rem) {
    .home-gallery__images img { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: no-preference) {
    .home-gallery__images { scroll-behavior: smooth; }
}

.home #innehall:has(> .home-gallery) { width: 100%; padding-top: 0; }
.home #innehall:has(> .home-gallery) > :not(.home-gallery) {
    width: min(72rem, calc(100% - 2.5rem));
    margin-inline: auto;
}
.home #innehall:has(> .home-gallery) > .reading:not(:has(.kapellet-events)) {
    max-width: 47rem;
}
.home-gallery { position: relative; }
.home-gallery__images { scrollbar-width: none; }
.home-gallery__images::-webkit-scrollbar { display: none; }
.home-gallery__images img {
    aspect-ratio: auto;
    height: clamp(20rem, 43vw, 42rem);
}
.home-gallery .events-slider-controls {
    position: absolute;
    z-index: 1;
    inset-inline: clamp(.75rem, 3vw, 3rem);
    bottom: 1.25rem;
    justify-content: space-between;
    margin: 0;
    pointer-events: none;
}
.home-gallery .events-slider-controls button {
    pointer-events: auto;
    border-color: #fff;
    background: #23231e;
    color: #fff;
}
.home-gallery__dots {
    position: absolute;
    z-index: 1;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 .4rem;
    border-radius: 999px;
    background: #23231e;
}
.home-gallery__dots button {
    display: grid;
    place-items: center;
    width: 1.9rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.home-gallery__dots button::before {
    content: "";
    width: .55rem;
    height: .55rem;
    border: 1px solid #fff;
    border-radius: 50%;
}
.home-gallery__dots button[aria-current="true"]::before { background: #fff; }
.home-gallery button:focus-visible { outline-color: #fff; }


.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-toggle { display: none; }
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    padding-block: 1.75rem;
}
.footer-widget-area > section + section { margin-top: 1.5rem; }
.footer-widget-title { font-size: 1.4rem; }
.footer-widgets + .masthead { border-top: 1px solid var(--line); }
@media (max-width: 54rem) {
    .footer-widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-header .masthead { align-items: center; }
    .site-header nav { flex-basis: 100%; }
    .site-header nav ul { display: grid; }
    .site-header nav a { border-radius: .6rem; padding: .65rem .85rem; }
    .site-header .menu-toggle[aria-expanded] {
        display: inline-flex;
        align-items: center;
        gap: .5rem;
        padding: .45rem .85rem;
        min-height: 2.75rem;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: var(--paper);
        color: var(--ink);
        font: inherit;
        cursor: pointer;
    }
    .site-header .menu-toggle[aria-expanded="false"] + nav { display: none; }
}
@media (max-width: 32rem) {
    .footer-widgets { grid-template-columns: minmax(0, 1fr); }
}

