/* ------------------------------------------------------------------
   Red Dirt Biennale — RDB ONE
   One white page. Black type. The logo's red as the only accent.
   ------------------------------------------------------------------ */

:root {
    --white: #ffffff;
    --black: #000000;
    --red: #bf4028;
    --red-tint: #f6e9e4;
    --grey: #6b6560;
    --rule: #000000;

    --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;

    --gutter: clamp(16px, 3vw, 48px);
    --max: 1320px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.55;
    background-color: var(--white);
    color: var(--black);
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 3px;
}

h2, h3 {
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.01em;
}

/* ---------- Sticky top bar (appears after the wordmark scrolls away) ---------- */

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 10px var(--gutter);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--black);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.topbar.is-visible {
    transform: translateY(0);
}

.topbar-name {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--red);
    letter-spacing: 0.02em;
}

.topbar-nav {
    display: flex;
    gap: 20px;
    margin-left: auto;
    font-size: 0.95rem;
}

.topbar-cta {
    font-size: 0.95rem;
    font-weight: 600;
    padding: 8px 16px;
    border: 1.5px solid var(--black);
    border-radius: 999px;
}

.topbar-cta:hover {
    background: var(--black);
    color: var(--white);
    text-decoration: none;
}

@media (max-width: 720px) {
    .topbar-nav {
        display: none;
    }
    .topbar-cta {
        margin-left: auto;
    }
}

/* ---------- Header: the wordmark, untouched ---------- */

header {
    width: 100%;
    padding: 24px max(16px, 2vw) 0;
}

.wordmark {
    width: 100%;
    margin: 0 0 28px;
    line-height: 0;
}

.wordmark svg {
    display: block;
    width: 100%;
    height: auto;
}

.wordmark text {
    font-family: Georgia, 'Times New Roman', serif;
    fill: var(--red);
}

.wordmark a {
    display: block;
}

.masthead {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 calc(var(--gutter) - max(16px, 2vw)) 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px 40px;
    border-bottom: 1px solid var(--black);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    font-size: 1.05rem;
    font-weight: 500;
}

.site-nav a[aria-current="page"] {
    color: var(--red);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Place and date: the highlighted line under the wordmark */
.masthead-when {
    flex-basis: 100%;
    margin-top: 16px;
    font-family: var(--serif);
    line-height: 1.05;
    letter-spacing: -0.01em;
}

.masthead-when span {
    display: block;
}

.masthead-when .place {
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    font-weight: 400;
}

.masthead-when .date {
    font-size: clamp(2.2rem, 5vw, 4.4rem);
    font-weight: 600;
    color: var(--red);
    margin-top: 6px;
}

@media (max-width: 720px) {
    .masthead .site-nav,
    .masthead .cta-links {
        flex-basis: 100%;
    }
}

/* ---------- Buttons ---------- */

.cta-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cta-btn {
    display: inline-block;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
    border: 1.5px solid var(--black);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.cta-btn:hover {
    text-decoration: none;
}

.cta-btn.primary {
    background-color: var(--black);
    color: var(--white);
}

.cta-btn.primary:hover {
    background-color: var(--red);
    border-color: var(--red);
}

.cta-btn.secondary {
    background-color: var(--white);
    color: var(--black);
}

.cta-btn.secondary:hover {
    background-color: var(--black);
    color: var(--white);
}

/* ---------- Gallery carousel ---------- */

.gallery {
    max-width: var(--max);
    margin: 0 auto;
    padding: 40px var(--gutter) 0;
}

.carousel {
    position: relative;
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

/* A horizontal strip: each square image shown whole on the white page,
   with the edge of the next one peeking in on wide screens */
.carousel-track {
    gap: 16px;
}

.carousel-slide {
    flex: 0 0 min(100%, 78vh);
    scroll-snap-align: start;
    background: var(--white);
}

.carousel-slide img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.carousel-controls {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 0 0;
    border-top: 1px solid var(--black);
    margin-top: 16px;
}

.carousel-count {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-variant-numeric: tabular-nums;
    min-width: 4ch;
}

.carousel-dots {
    display: flex;
    gap: 8px;
}

.carousel-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 1.5px solid var(--black);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.carousel-dots button[aria-current="true"] {
    background: var(--red);
    border-color: var(--red);
}

.carousel-arrows {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--black);
    border-radius: 50%;
    background: var(--white);
    color: var(--black);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.carousel-btn:hover {
    background: var(--black);
    color: var(--white);
}

.carousel-btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Main content ---------- */

main {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* Facts table */
.facts {
    margin-top: 56px;
    background: var(--red-tint);
}

.facts dl {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.facts dl > div {
    padding: 22px 24px 26px;
    border-left: 1px solid var(--red);
}

.facts dl > div:first-child {
    border-left: none;
}

.facts dt {
    font-size: 0.95rem;
    color: var(--red);
    margin-bottom: 6px;
}

.facts dd {
    font-family: var(--serif);
    font-size: 1.35rem;
    line-height: 1.25;
}

.facts-schedule dd {
    color: var(--red);
    font-weight: 600;
    font-size: 1.75rem;
}

@media (max-width: 720px) {
    .facts dl {
        grid-template-columns: 1fr;
    }
    .facts dl > div {
        border-left: none;
    }
    .facts dl > div:nth-child(n + 2) {
        border-top: 1px solid var(--red);
    }
}

/* Manifesto: centered, as on the poster */
.manifesto {
    margin-top: 80px;
    padding: 36px 0 24px;
    border-top: 6px solid var(--red);
    text-align: center;
}

.manifesto-equations {
    font-weight: 700;
    font-size: clamp(1.3rem, 2.6vw, 2rem);
    line-height: 1.3;
    letter-spacing: 0.02em;
}

.manifesto-archive {
    margin: 40px auto 0;
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(1.3rem, 2.6vw, 2rem);
    line-height: 1.3;
}

.manifesto-text {
    max-width: 64ch;
    margin: 56px auto 0;
    text-align: left;
    font-size: 1.1rem;
}

.manifesto-text p + p {
    margin-top: 1.1em;
}

/* Text blocks: heavy red rule, title left, text right */
.block {
    display: grid;
    grid-template-columns: 4fr 8fr;
    gap: 32px 64px;
    padding: 28px 0 88px;
    margin-top: 80px;
    border-top: 6px solid var(--red);
}

.block-head h2 {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    position: sticky;
    top: 80px;
}

.block-note {
    margin-top: 20px;
    font-size: 0.95rem;
    color: var(--grey);
    max-width: 30ch;
}

.block-body {
    max-width: 68ch;
}

.block-body p + p {
    margin-top: 1.1em;
}

.lede {
    font-family: var(--serif);
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    line-height: 1.3;
    margin-bottom: 1.2em;
}

@media (max-width: 860px) {
    .block {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-bottom: 64px;
        margin-top: 56px;
    }
    .block-head h2 {
        position: static;
    }
}

/* Theme: the one oversized moment */
.theme {
    margin-top: 64px;
    padding: 56px 0 24px;
    border-top: 1px solid var(--black);
}

.theme-title {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(4rem, 14vw, 13rem);
    line-height: 0.9;
    letter-spacing: -0.035em;
    color: var(--red);
    margin: 12px 0 28px -0.04em;
}

.theme-text {
    font-family: var(--serif);
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    line-height: 1.3;
    max-width: 38ch;
}

/* Site index: names only */
.site-list {
    list-style: none;
}

.site-list li {
    padding: 18px 0;
    border-top: 1px solid var(--black);
}

.site-list li:last-child {
    border-bottom: 1px solid var(--black);
}

.site-list h3 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

/* Final call: just the two buttons, centered */
.involve {
    padding: 64px 0 88px;
    border-top: 6px solid var(--red);
}

.involve .cta-links {
    justify-content: center;
}

/* Secondary page (Why Camp Hill) */
.page-block {
    margin-top: 0;
    border-top: none;
    padding-top: 48px;
}

.page-figure {
    margin-top: 48px;
    max-width: 520px;
}

/* ---------- Artists ---------- */

.artists-intro {
    padding: 48px 0 32px;
    display: grid;
    grid-template-columns: 4fr 8fr;
    gap: 16px 64px;
    align-items: end;
}

.artists-intro h2 {
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: -0.03em;
    line-height: 0.95;
}

.artists-intro p {
    font-family: var(--serif);
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    line-height: 1.3;
    max-width: 34ch;
    padding-bottom: 8px;
}

.artists-grid-wrap {
    padding-bottom: 72px;
    border-top: 6px solid var(--red);
}

.artists-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px 24px;
    padding-top: 32px;
}

.artist-tile {
    display: block;
    color: var(--black);
}

.artist-tile:hover {
    text-decoration: none;
}

.artist-tile img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: opacity 0.2s ease;
}

.artist-tile:hover img,
.artist-tile:focus-visible img {
    opacity: 0.85;
}

.artist-name {
    display: block;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--black);
    font-family: var(--serif);
    font-size: 1.35rem;
    line-height: 1.1;
}

.artist-tile:hover .artist-name,
.artist-tile:focus-visible .artist-name {
    color: var(--red);
}

.artist-role {
    display: block;
    margin-top: 6px;
    font-size: 0.9rem;
    color: var(--grey);
}

@media (max-width: 1100px) {
    .artists-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 860px) {
    .artists-intro {
        grid-template-columns: 1fr;
    }
    .artists-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 560px) {
    .artists-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px 16px;
    }
}

/* One artist */
.artist-back {
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.artist-back a::before {
    content: "\2190\00a0";
}

.artist-portrait {
    width: 100%;
    max-width: 360px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-bottom: 24px;
}

.artist-page .block-head h2 {
    position: static;
}

.artist-page .block-body p:first-child {
    font-family: var(--serif);
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    line-height: 1.35;
}

.artist-pager {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 0 64px;
    border-top: 1px solid var(--black);
    font-family: var(--serif);
    font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.artist-page {
    padding-bottom: 64px;
}

.artist-pager a span {
    display: block;
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--grey);
    margin-bottom: 4px;
}

.artist-pager a[rel="next"] {
    text-align: right;
}

.artist-pager a:hover {
    color: var(--red);
    text-decoration: none;
}

/* ---------- Footer ---------- */

footer {
    border-top: 1px solid var(--black);
    padding: 48px var(--gutter) 40px;
}

.footer-inner {
    max-width: var(--max);
    margin: 0 auto;
}

.logo {
    width: 220px;
    max-width: 55%;
    height: auto;
    margin: 0 auto 48px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 4fr 4fr 4fr;
    gap: 24px 48px;
}

.contact-grid h2 {
    font-size: 1.6rem;
}

address {
    font-style: normal;
    line-height: 1.6;
}

.contact-name {
    font-weight: 600;
}

.colophon {
    margin-top: 64px;
    font-size: 0.9rem;
    color: var(--grey);
}

@media (max-width: 720px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .carousel-track {
        scroll-behavior: auto;
    }
    .topbar,
    .cta-btn,
    .carousel-btn {
        transition: none;
    }
}
