:root {
    --cream: #f4ead8;
    --paper: #efe2cc;
    --amber: #dd861f;
    --walnut: #32170f;
    --brown: #6f3a1e;
    --ink: #21110d;
    --light: #fff7ea;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: #2a130d url("/assets/textures/weathered-wood.png") center / cover no-repeat fixed;
    font-family: Georgia, "Times New Roman", serif;
}

a {
    color: inherit;
}

.site-shell {
    width: min(1180px, calc(100% - 36px));
    margin: 22px auto 36px;
    border: 1px solid rgba(255, 247, 234, .45);
    background: rgba(40, 18, 12, .48);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 38px;
    background: rgba(250, 238, 218, .94);
    border-bottom: 1px solid rgba(50, 23, 15, .18);
}

.brand {
    display: grid;
    text-decoration: none;
    line-height: 1.05;
}

.brand span:first-child {
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: 0;
}

.brand span:last-child {
    font-size: .9rem;
}

.nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.menu-toggle {
    display: none;
}

.nav-links a,
.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 10px 16px;
    border-radius: 6px;
    border: 1px solid rgba(50, 23, 15, .22);
    background: rgba(255, 247, 234, .92);
    color: #24120d;
    text-decoration: none;
    font: 700 .92rem/1.1 Georgia, "Times New Roman", serif;
    cursor: pointer;
}

.button.primary,
.nav-links .active {
    background: var(--amber);
    border-color: #a75d12;
}

.button.is-disabled {
    background: rgba(216, 204, 184, .88);
    border-color: rgba(126, 101, 77, .42);
    color: rgba(36, 18, 13, .62);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 510px);
    gap: 7vw;
    align-items: center;
    min-height: 760px;
    padding: 70px 38px 52px;
    background:
        linear-gradient(90deg, rgba(244, 234, 216, .86), rgba(244, 234, 216, .42)),
        url("/assets/textures/paper-grain.png") center / 75% auto repeat;
}

.hero h1 {
    max-width: 530px;
    margin: 0 0 24px;
    font-size: clamp(3.08rem, 7.92vw, 6.69rem);
    line-height: .92;
    color: #24110d;
}

.mission {
    max-width: 520px;
    font-size: clamp(1.1rem, 1.9vw, 1.45rem);
    line-height: 1.45;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.hero-photo {
    position: relative;
    margin: 0;
    border: 1px solid #2d170f;
    overflow: hidden;
    min-height: 560px;
}

.hero-photo::after,
.card-image-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(221, 134, 31, .22), rgba(50, 23, 15, .16));
    pointer-events: none;
}

.hero-photo img,
.content-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.hero-photo img {
    min-height: 560px;
}

.photo-note {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    color: var(--light);
    text-shadow: 0 1px 8px rgba(0,0,0,.55);
}

.photo-note strong,
.photo-note span {
    display: block;
}

.main-frame {
    background:
        linear-gradient(90deg, rgba(50, 23, 15, .86), rgba(111, 58, 30, .55)),
        url("/assets/textures/journey-background.png") center 42% / cover no-repeat;
}

.frame-view {
    display: none;
}

.frame-view.active {
    display: block;
}

.journey-section {
    padding: 72px 38px 40px;
    color: var(--light);
}

.section-head {
    display: grid;
    grid-template-columns: 1.4fr .8fr;
    gap: 34px;
    align-items: start;
}

.title-panel {
    display: inline-block;
    max-width: fit-content;
    padding: 8px 14px;
    background: linear-gradient(90deg, rgba(244, 234, 216, .72), rgba(244, 234, 216, .18));
}

.section-head h2 {
    margin: 0;
    color: #27120c;
    font-size: clamp(2.4rem, 5vw, 4.4rem);
    line-height: 1;
}

.section-head p {
    max-width: 360px;
    margin: 0 0 0 auto;
    text-align: right;
    line-height: 1.5;
}

.journey-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, .85fr);
    gap: 18px;
    margin-top: 20px;
}

.map-panel,
.video-panel {
    border: 1px solid rgba(255,255,255,.26);
    background: rgba(255, 247, 234, .18);
    padding: 14px;
}

.song-map {
    position: relative;
    min-height: 460px;
    overflow: hidden;
    border-radius: 6px;
    background:
        linear-gradient(rgba(248, 239, 221, .84), rgba(248, 239, 221, .84)),
        url("/assets/artist/isaac-map-loading.jpg") center 32% / cover no-repeat;
}

.map-loading {
    position: absolute;
    inset: 0;
    display: grid;
    justify-items: center;
    align-items: start;
    padding: clamp(34px, 9%, 68px) 24px 24px;
    text-align: center;
}

.map-loading span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    min-height: 52px;
    padding: 13px 18px;
    border: 1px solid rgba(50, 23, 15, .22);
    border-radius: 6px;
    background: rgba(255, 247, 234, .82);
    color: var(--ink);
    box-shadow: 0 12px 28px rgba(39, 18, 12, .18);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1;
}

.video-frame {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 205px;
    padding: 20px;
    text-align: center;
    background: linear-gradient(rgba(30,17,12,.25), rgba(30,17,12,.38)), url("/assets/textures/weathered-wood.png") center / 360px auto repeat;
    border-radius: 6px;
    overflow: hidden;
}

.video-frame iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

.play-button {
    width: 0;
    height: 0;
    min-height: 0;
    padding: 0;
    border-top: 22px solid transparent;
    border-bottom: 22px solid transparent;
    border-left: 34px solid rgba(255,255,255,.9);
    border-right: 0;
    background: transparent;
}

.video-fallback-card {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 225px;
    overflow: hidden;
    border-radius: 6px;
    isolation: isolate;
}

.video-fallback-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

.video-fallback-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(rgba(255, 247, 234, .72), rgba(255, 247, 234, .58)),
        linear-gradient(135deg, rgba(221, 134, 31, .28), rgba(50, 23, 15, .22));
}

.video-fallback-copy {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 8px;
    max-width: 330px;
    padding: 18px;
    color: var(--ink);
    text-shadow: 0 1px 0 rgba(255, 247, 234, .55);
}

.video-fallback-copy strong {
    font-size: 1.3rem;
    line-height: 1.08;
}

.video-fallback-copy small {
    max-width: 270px;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.3;
}

.video-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 5px;
}

.video-actions .button {
    min-height: 34px;
    padding: 8px 12px;
}

.calendar-list {
    display: grid;
    gap: 10px;
}

.calendar-item {
    display: grid;
    justify-content: stretch;
    text-align: left;
    color: var(--light);
    background: rgba(255,247,234,.18);
    border-color: rgba(255,255,255,.25);
}

.calendar-item.active,
.calendar-item:hover {
    background: rgba(221,134,31,.62);
}

.leaflet-marker-icon.marker-active {
    filter: drop-shadow(0 0 7px rgba(255, 247, 234, .95)) drop-shadow(0 0 10px rgba(221, 134, 31, .9));
}

.day-marker {
    display: grid;
    place-items: center;
    width: 62px;
    height: 66px;
    background: #ba7c18;
    color: #fff;
    box-shadow: 0 3px 9px rgba(33,17,13,.38);
    clip-path: path("M31 66 C27 58 8 23 7 16 C6 8 14 4 22 5 L40 5 C48 4 56 8 55 16 C54 23 35 58 31 66 Z");
}

.day-marker::after {
    content: "";
    position: absolute;
    inset: 7px 10px 13px;
    border: 2px solid var(--light);
    clip-path: path("M21 46 C18 40 6 18 6 13 C5 6 12 3 18 4 L24 4 C30 3 37 6 36 13 C35 18 24 40 21 46 Z");
}

.day-marker span {
    display: block;
    position: relative;
    z-index: 1;
    font: 800 1rem/1 Georgia, "Times New Roman", serif;
}

.day-marker.marker-active {
    background: var(--amber);
}

.content-band {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: clamp(22px, 4vw, 40px) clamp(18px, 4vw, 38px);
    background:
        linear-gradient(145deg, rgba(247, 232, 207, .38), rgba(63, 36, 24, .18)),
        url("/assets/textures/paper-grain.png") center / 71% auto repeat;
}

.content-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 492px;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(255,247,234,.32);
    border-radius: 6px;
    background: linear-gradient(145deg, rgba(63, 36, 24, .94), rgba(154, 79, 40, .78));
    color: var(--light);
}

.content-card::before {
    content: "";
    position: absolute;
    inset: -18%;
    z-index: -1;
    background-image: url("/assets/textures/paper-grain.png");
    background-size: 136%;
    background-position: 18% 26%;
    opacity: .34;
}

.content-card:nth-child(2)::before {
    background-position: 72% 38%;
    background-size: 152%;
    transform: rotate(180deg);
}

.content-card:nth-child(3)::before {
    background-position: 34% 82%;
    background-size: 124%;
    transform: rotate(90deg);
}

.card-image-frame {
    position: relative;
    height: 250px;
    flex: 0 0 250px;
    overflow: hidden;
}

.card-image-frame::after {
    background: linear-gradient(135deg, rgba(216, 137, 47, .24), rgba(63, 36, 24, .2));
}

.content-card img {
    height: 250px;
    object-position: center top;
    filter: saturate(.96);
}

.content-card .music-image {
    object-position: center 10%;
}

.content-card .journal-image {
    object-position: center 24%;
    transform: scale(1.08);
    transform-origin: center 24%;
}

.content-card .connect-image {
    object-position: center 28%;
}

.card-copy {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 9px;
    flex: 1;
    padding: 16px;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(169, 103, 34, .84);
    border: 1px solid rgba(255,255,255,.35);
    text-transform: uppercase;
    font-size: .78rem;
    font-weight: 800;
}

.content-card h2 {
    margin: 12px 0 8px;
    font-size: 1.45rem;
}

.content-card p {
    margin: 0 0 14px;
    line-height: 1.42;
}

.content-card .button,
.social-links {
    align-self: end;
    margin-top: auto;
}

.social-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: stretch;
}

.content-card .button {
    width: 100%;
}

.social-links a {
    flex: 1 1 0;
}

.feature-page {
    min-height: 610px;
    padding: 52px 38px;
    color: var(--light);
}

.feature-split,
.request-layout {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(320px, 1.15fr);
    gap: 28px;
    align-items: stretch;
}

.request-layout {
    grid-template-columns: minmax(260px, .72fr) minmax(320px, 1fr);
}

.feature-copy {
    display: grid;
    align-content: center;
    gap: 16px;
    padding: 28px;
    border: 1px solid rgba(255,247,234,.28);
    background: rgba(50, 23, 15, .62);
}

.feature-copy h1,
.feature-copy h2 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(2.2rem, 5vw, 4.3rem);
    line-height: .96;
}

.feature-copy h3 {
    margin: 0;
    font-size: 1.35rem;
}

.feature-copy p {
    max-width: 650px;
    margin: 0;
    font-size: 1.13rem;
    line-height: 1.5;
}

.feature-photo {
    position: relative;
    min-height: 450px;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(255,247,234,.32);
}

.feature-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(216, 137, 47, .18), rgba(50, 23, 15, .22));
}

.feature-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.connect-page .feature-photo img {
    object-position: center 28%;
}

.action-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.public-form {
    display: grid;
    gap: 12px;
    padding: 22px;
    border: 1px solid rgba(255,247,234,.3);
    background: rgba(255,247,234,.14);
}

.compact-form {
    margin-top: 4px;
}

.public-form label {
    display: grid;
    gap: 6px;
    color: rgba(255,247,234,.86);
    font-weight: 700;
}

.public-form label[hidden] {
    display: none;
}

.public-form input,
.public-form select,
.public-form textarea {
    width: 100%;
    border: 1px solid rgba(50,23,15,.24);
    border-radius: 6px;
    padding: 11px 12px;
    background: rgba(255,247,234,.94);
    color: var(--ink);
    font: 700 .98rem/1.2 Georgia, "Times New Roman", serif;
}

.public-form label.field-error {
    color: #ff6a58;
}

.public-form [aria-invalid="true"] {
    border-color: #ff4d3d;
    box-shadow: 0 0 0 3px rgba(255, 77, 61, .24);
}

.public-form textarea {
    resize: vertical;
}

.form-status {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(255,247,234,.42);
    border-radius: 6px;
    background: rgba(31, 142, 86, .38);
}

.form-status[hidden] {
    display: none;
}

.form-status.error {
    border-color: rgba(224, 53, 42, .5);
    background: rgba(22, 20, 20, .35);
    color: #ff4d3d;
    font-weight: 800;
}

.journal-section {
    padding: 48px 38px;
    color: var(--light);
}

.journal-head {
    display: grid;
    gap: 10px;
    max-width: 720px;
    margin-bottom: 24px;
}

.journal-head h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
}

.journal-head p {
    max-width: 520px;
    margin: 0;
    line-height: 1.45;
}

.journal-entry-list {
    display: grid;
    gap: 14px;
}

.journal-entry {
    padding: 20px;
    border: 1px solid rgba(255,247,234,.28);
    border-radius: 6px;
    background: rgba(255,247,234,.13);
}

.journal-entry time {
    display: block;
    margin-bottom: 8px;
    color: rgba(255,247,234,.72);
    font-size: .9rem;
    font-weight: 700;
}

.journal-entry h3 {
    margin: 0 0 10px;
    font-size: 1.45rem;
}

.journal-entry p {
    max-width: 780px;
    margin: 0;
    line-height: 1.55;
}

footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 38px;
    color: var(--light);
    background: rgba(33, 17, 13, .75);
}

.setup-message {
    max-width: 760px;
    margin: 80px auto;
    padding: 32px;
    background: var(--cream);
    border: 1px solid rgba(50,23,15,.2);
}

@media (max-width: 900px) {
    .topbar,
    footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero,
    .section-head,
    .journey-grid,
    .content-band,
    .feature-split,
    .request-layout {
        grid-template-columns: 1fr;
    }

    .feature-split .feature-copy {
        order: 1;
    }

    .feature-split .feature-photo {
        order: 2;
    }

    .hero {
        min-height: auto;
    }

    .section-head p {
        margin: 0;
        text-align: left;
    }
}

@media (max-width: 640px) {
    .site-shell {
        width: 100%;
        margin: 0;
        border-left: 0;
        border-right: 0;
    }

    .topbar {
        flex-direction: row;
        align-items: center;
        min-height: 66px;
        padding: 12px 16px;
    }

    .brand span:first-child {
        font-size: 1.15rem;
    }

    .brand span:last-child {
        font-size: .78rem;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
        gap: 4px;
        width: 42px;
        min-width: 42px;
        min-height: 42px;
        margin-left: auto;
        padding: 8px;
    }

    .menu-toggle span {
        display: block;
        width: 19px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 1px);
        left: 0;
        right: 0;
        display: none;
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 10px 16px 14px;
        background: rgba(250, 238, 218, .98);
        border-bottom: 1px solid rgba(50, 23, 15, .18);
        box-shadow: 0 12px 20px rgba(33, 17, 13, .16);
    }

    .topbar.nav-open .nav-links {
        display: grid;
    }

    .nav-links a {
        width: 100%;
        min-height: 42px;
    }

    .hero {
        min-height: auto;
        gap: 28px;
        padding: 34px 18px 28px;
    }

    .hero h1 {
        font-size: clamp(2.65rem, 14vw, 3.45rem);
        line-height: .94;
    }

    .mission {
        font-size: 1.05rem;
    }

    .hero-photo,
    .hero-photo img {
        min-height: 360px;
    }

    .main-frame {
        scroll-margin-top: 74px;
    }

    .journey-section,
    .feature-page,
    .journal-section {
        padding: 34px 18px 28px;
    }

    .section-head {
        gap: 18px;
    }

    .title-panel {
        max-width: 100%;
        padding: 7px 10px;
    }

    .section-head h2,
    .feature-copy h1,
    .feature-copy h2,
    .journal-head h2 {
        font-size: clamp(2.05rem, 11vw, 3rem);
    }

    .journey-grid {
        gap: 14px;
    }

    .map-panel,
    .video-panel {
        padding: 8px;
    }

    .song-map {
        min-height: 380px;
    }

    .feature-copy,
    .public-form {
        padding: 18px;
    }

    .feature-photo {
        min-height: 340px;
    }

    .content-band {
        padding: 24px 18px;
    }

    .content-card {
        min-height: auto;
    }

    footer {
        gap: 10px;
        padding: 18px;
    }
}
