:root {
    --bg: #fafaf7;
    --fg: #2a2a2a;
    --muted: #596986;
    --accent: #00a7f6;
    --accent-hover: #5cf2d5; /* #32b7f4; */
    --secondary:#3ab693;
    --border: #d1d5dc; /* #e3e0d6; */
    --card: #ffffff;
    --serif: Dosis, Aptos, "Open Sans", serif;
    --sans: "Open Sans", system-ui, -apple-system, sans-serif;
    --max-prose: 42rem;
    --max-wide: 64rem;
    --max-gallery: 72rem;
}

* { box-sizing: border-box; }

html { font-size: 17px; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

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

h1, h2, h3, h4 {
    font-family: var(--serif);
    line-height: 1.2;
    margin: 2rem 0 1rem;
}
h1 { 
    font-size: 2rem;
    font-weight: 400;
}
h2 { 
    font-size: 1.6rem;
    font-weight: 500;
 }
h3 { 
    font-size: 1.25rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--secondary);
}

p, ul, ol, blockquote { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; }
blockquote {
    margin-left: 0;
    padding-left: 1.25rem;
    border-left: 3px solid var(--border);
    color: var(--muted);
    font-style: italic;
}
code {
    background: #f1eee4;
    padding: 0.1em 0.35em;
    border-radius: 3px;
    font-size: 0.9em;
}
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ── site chrome ──────────────────────────────────────────── */

.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.site-header__inner {
    max-width: var(--max-wide);
    margin: 0 auto;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center !important;
    gap: 1rem;
    flex-wrap: wrap;
}
.site-header__brand__container {
    align-self: flex-start !important;
    display: flex;
    align-items: center !important;
}
.site-header__brand__logo{
    max-width: 90px;
    height: auto;
    padding: 5px;
    vertical-align: middle;
}
.site-header__brand {
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 400;
    color: var(--fg);
    text-decoration: none;
    letter-spacing: 0.01em;
}
.site-header__brand:hover { color: var(--accent); text-decoration: underline; }

.site-nav {
    display: flex;
    gap: 1.4rem;
    font-family: var(--sans);
    font-size: 0.95rem;
}
.site-nav a {
    color: var(--fg);
    text-decoration: none;
}
.site-nav a:hover { color: var(--accent); text-decoration:underline }

.site-main { min-height: 60vh; }

.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    padding: 2rem 0;
    color: var(--muted);
    font-family: var(--sans);
    font-size: 0.9rem;
}
.site-footer__inner {
    max-width: var(--max-wide);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.site-footer__inner p { margin: 0; }
.site-footer__links a { color: var(--muted); margin-right: 1rem; }
.site-footer__links a:hover { color: var(--fg); }

/* ── article ──────────────────────────────────────────────── */

.article, .hero {
    max-width: var(--max-prose);
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}
.article--wide { max-width: var(--max-gallery); }

.article__header { margin-bottom: 1.5rem; }
.article__header h1 { margin-top: 0; }
.article__meta {
    font-family: var(--sans);
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}
.article__intro {
    /* font-size: 1.1rem;
    color: var(--muted); */
}
.article__cover {
    margin: -2.5rem -1.5rem 2rem;
}
.article__cover img { width: 100%; object-fit: cover; }

.article__footer-nav {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-family: var(--sans);
    font-size: 0.95rem;
}

/* ── hero (home) ──────────────────────────────────────────── */

.hero {
    text-align: center;
    padding: 2rem 0;
    max-width: var(--max-wide);
    display: flex;
    justify-content: center;
    align-items: stretch;
    /* flex-flow: column wrap; */
    gap: 0;
}
.hero__title { font-size: 3rem; margin-bottom: 1rem; }
.hero__intro { 
    /* max-width: var(--max-prose) */; 
    margin: 1rem;
    /* display: inline-block; */
    /* padding: 0.6rem 1.25rem; */
    font-family: var(--sans);
    font-size: 1rem;
    border: 3px solid var(--secondary);
    border-radius: 6px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    flex: 1 1 50%;
    object-fit: contain;
    min-height: 24rem;
    max-height: 48rem;
}

.hero-cover {
    position: relative;
    margin: 1rem;
    padding: 3rem 1.5rem;
    border-radius: 6px;
    overflow: hidden;
    min-height: 24rem;
    max-width: var(--max-prose); 
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 50%;
    border: 3px solid var(--accent);
}
.hero-cover__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-cover__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-cover--has-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.35);
    z-index: 1;
}
.hero-cover__stack {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    width: 100%;
    max-width: 28rem;
}

.button {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    background: var(--accent);
    color: #fff;
    font-family: var(--sans);
    font-size: 1rem;
    border-radius: 3px;
    text-decoration: none;
    text-align: center;
    width: 100%;
}
.button:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }
.button--ghost {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--border);
}
.button--ghost:hover { background: var(--card); color: var(--fg); }

/* Outline-over-image style used in the hero */
.button--hero {
    background: rgba(255, 255, 255, 0.9);
    color: var(--accent);
    border: 1.5px solid var(--accent);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1.25rem;
}
.button--hero:hover {
    background: var(--accent);
    color: #fff;
}

@media (max-width: 800px) {
     .hero {flex-flow: row wrap; }
}

/* ── gallery index (art page) ─────────────────────────────── */

.gallery-index {
    display: flex  /* grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); */
    gap: 1.5rem;
    margin-top: 2rem;

}
.gallery-index__card {
    border: 0;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.15s ease;
    margin: 3rem;
}
.gallery-index__link{
    color: var(--fg);
    text-decoration: none;
}
.gallery-index__link:hover{
    text-decoration: underline;
    color: var(--muted);
}
.gallery-index__card:hover { 
    transform: translateY(-3px);
    text-decoration: none; 
    /*background: var(--border);  */
}
.gallery-index__card:hover img{
    opacity: 0.5;
}
.gallery-index__card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.gallery-index__title {
    padding: 0.5rem 0rem;
    margin: 0rem;
    font-size: 1.25rem;
    text-transform: uppercase;
    
}

/* ── blog index ───────────────────────────────────────────── */

.post-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
}
.post-list__item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    transition: transform 0.15s ease; 
}
.post-list__item:last-child { border-bottom: 1px solid var(--border); }
.post-list__item:hover img{opacity: 0.5;}
.post-list__item:hover a{color: var(--accent); color 0.15s ease;}
.post-list__thumb img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 20px;
}
.post-list__title { margin: 0 0 0.25rem; font-size: 1.35rem; }
.post-list__title a { color: var(--fg); }
/* .post-list__title a:hover { color: var(--accent); text-decoration: none; }*/
.post-list__meta {
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0 0 0.5rem;
}
.post-list__excerpt { color: var(--muted); margin: 0; }

@media (max-width: 640px) {
    .post-list__item { grid-template-columns: 1fr; }
    .post-list__thumb img { aspect-ratio: 16/9; }
}

/* ── block: prose ─────────────────────────────────────────── */

.prose p, .prose ul, .prose ol { margin-bottom: 1em; }
.prose img {
    margin: 0.25rem auto;
    /* border-radius: 3px; */
}
/* rich-text image sizes — percentages of the prose column */
.richtext-image.img-w66 { width: 66%; }
.richtext-image.img-w50 { width: 50%; }
.richtext-image.img-w33 { width: 33%; }
.prose .left  { float: left;  max-width: 50%; margin: 0.4rem 1.5rem 0.8rem 0; }
.prose .right { float: right; max-width: 50%; margin: 0.4rem 0 0.8rem 1.5rem; }
@media (max-width: 640px) {
    .richtext-image.img-w66, .richtext-image.img-w50 { width: 100%; }
    .richtext-image.img-w33 { width: 50%; }
    .prose .left, .prose .right { float: none; max-width: 100%; margin: 1.5rem auto; }
}
.prose a { text-decoration: underline; text-decoration-color: rgba(0, 167, 246, 0.4); }
.prose a:hover { text-decoration-color: currentColor; }
.prose h2, .prose h3 { margin-top: 2rem; }

/* ── block: single image ──────────────────────────────────── */

.image {
    margin: 2rem 0;
}
.image--center { text-align: center; }
.image--left { float: left; margin: 0 1.5rem 1rem 0; max-width: 50%; }
.image--right { float: right; margin: 0 0 1rem 1.5rem; max-width: 50%; }
.image img { border-radius: 3px; margin-inline: auto; }
.image--w66 { width: 66%; }
.image--w50 { width: 50%; }
.image--w33 { width: 33%; }
.image--center.image--w66, .image--center.image--w50, .image--center.image--w33 { margin-inline: auto; }
@media (max-width: 640px) {
    .image--w66, .image--w50 { width: 100%; }
    .image--w33 { width: 50%; }
}
.image figcaption {
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--muted);
    text-align: center;
    margin-top: 0.5rem;
}

/* ── block: gallery ───────────────────────────────────────── */

.gallery, .gallery--cols-2, .gallery--cols-3, .gallery--cols-4 {
    display: flex;
    gap: 0.75rem;
    margin: 2rem 0;
    flex-flow: row wrap;
    justify-content: center;
    align-content: flex-start;
}
/*
.gallery--cols-2 { grid-template-columns: repeat(2, 1fr); }
.gallery--cols-3 { grid-template-columns: repeat(3, 1fr); }
.gallery--cols-4 { grid-template-columns: repeat(4, 1fr); }
*/

.gallery figure { margin: 0; 
    flex: 1 1 30%;
    align-content: center;
}
.gallery img {
    max-width: 100%;
    /* aspect-ratio: 1;
    object-fit: cover;
    border-radius: 3px; */
}
.gallery figcaption {
    font-family: var(--sans);
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.35rem;
}

@media (max-width: 640px) {
    /* .gallery--cols-3, .gallery--cols-4 { grid-template-columns: repeat(2, 1fr); */
}
}

/* ── tags ─────────────────────────────────────────────────── */

.tag-list { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 3px;
    font-family: var(--sans);
    font-size: 0.8rem;
    color: var(--muted);
}
a.tag:hover {
    color: var(--accent);
    border-color: var(--accent);
    text-decoration: none;
}

/* ── child-page list (SimplePage w/ children, e.g. /frameshift/) ── */

.child-pages {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.child-pages ul { list-style: none; padding: 0; display: flex; gap: 0.75rem; flex-wrap: wrap; font-family: var(--sans); font-size: 0.95rem; }

/* ── mailing list form ────────────────────────────────────── */

.subscribe-cover {
    position: relative;
    margin: 1.5rem 0 2.5rem;
    border-radius: 8px;
    overflow: hidden;
}
.subscribe-cover--has-image {
    min-height: 14rem;
    padding: 2.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.subscribe-cover__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.subscribe-cover__bg img { width: 100%; height: 100%; object-fit: cover; }
.subscribe-cover--has-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.5);
    z-index: 1;
}
.subscribe-cover--has-image .subscribe-form {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.85);
    padding: 1rem;
    border-radius: 6px;
    max-width: 28rem;
    width: 100%;
    margin: 0;
}

.subscribe-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: stretch;
    margin: 1rem 0 2rem;
    font-family: var(--sans);
}
.subscribe-form__field { flex: 1 1 16rem; display: flex; }
.subscribe-form input[type="email"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--card);
    font: inherit;
    color: var(--fg);
}
.subscribe-form input[type="email"]:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}
.subscribe-form .button {
    border: 0;
    cursor: pointer;
    font: inherit;
}
.subscribe-form__honeypot {
    position: absolute;
    left: -9999px;
    height: 0;
    overflow: hidden;
}
.subscribe-form__success, .subscribe-form__error {
    flex-basis: 100%;
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
}
.subscribe-form__success { color: #2f7b3f; }
.subscribe-form__error { color: #c23a3a; }

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── raw-html block table fallback ────────────────────────── */

.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.95rem; }
.prose table th, .prose table td { border: 1px solid var(--border); padding: 0.4rem 0.6rem; text-align: left; }
.prose table th { background: var(--card); font-weight: 600; }
.block-raw_html{
  width: 100vw;
  position: relative;
  left: calc(-50vw + 50%);
  overflow: auto;
}
