/* ===========================================================================
   Wyatt Custom — site + admin styles
   A warm, leather-inspired palette. Vanilla CSS, mobile-first, no frameworks.
   =========================================================================== */

:root {
    --leather:      #5b3a21;   /* deep saddle brown */
    --leather-dark: #3d2817;   /* near-black brown */
    --tan:          #b07d4f;   /* mid tan */
    --cream:        #f5efe6;   /* page background */
    --cream-2:      #ece3d4;   /* alt section */
    --accent:       #a8431f;   /* burnt oxblood */
    --accent-dark:  #863418;
    --ink:          #2a2018;   /* body text */
    --muted:        #7a6a58;   /* secondary text */
    --line:         #ddd0bd;   /* borders */
    --white:        #fffdf9;

    --radius: 10px;
    --shadow: 0 4px 18px rgba(61, 40, 23, 0.12);
    --shadow-lg: 0 12px 34px rgba(61, 40, 23, 0.18);
    --max: 1120px;

    --serif: "Playfair Display", Georgia, "Times New Roman", serif;
    --sans:  "Source Sans 3", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; color: var(--leather-dark); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-family: var(--sans);
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform .08s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
    text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: var(--accent-dark); box-shadow: var(--shadow); }
.btn--ghost { background: transparent; color: var(--leather-dark); border-color: var(--leather); }
.btn--ghost:hover { background: var(--leather); color: var(--white); }
.btn--block { width: 100%; }
.btn--small { padding: 7px 14px; font-size: .9rem; border-radius: 8px; }
.btn--danger { background: #fff; color: var(--accent); border-color: var(--accent); }
.btn--danger:hover { background: var(--accent); color: #fff; }

/* ---------- Header / nav ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(245, 239, 230, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--leather-dark); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand__logo { width: 40px; height: 40px; display: block; }
.brand__name { font-family: var(--serif); font-size: 1.25rem; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { color: var(--leather-dark); font-weight: 600; }
.site-nav__cta { background: var(--leather); color: var(--cream) !important; padding: 8px 18px; border-radius: 8px; }
.site-nav__cta:hover { background: var(--leather-dark); text-decoration: none; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--leather-dark); border-radius: 2px; transition: .25s; }

/* ---------- Hero ---------- */
.hero {
    background:
        /* warm window-light gloss from upper-left */
        radial-gradient(ellipse 110% 60% at 28% -5%, rgba(165,105,45,.42) 0%, transparent 48%),
        /* depth vignette pulling bottom into shadow */
        radial-gradient(ellipse 80% 70% at 50% 120%, rgba(8,2,0,.55) 0%, transparent 52%),
        /* primary grain — light crest + dark valley = embossed feel */
        repeating-linear-gradient(
            85deg,
            rgba(255,200,130,.07) 0px, rgba(255,200,130,.07) 1px,
            rgba(0,0,0,.18)       1px, rgba(0,0,0,.18)       2px,
            transparent           2px, transparent           6px
        ),
        /* cross grain at wider spacing */
        repeating-linear-gradient(
            175deg,
            rgba(0,0,0,.12) 0px, rgba(0,0,0,.12) 1px,
            transparent     1px, transparent     10px
        ),
        /* base: shifts from warm sienna to dark espresso */
        linear-gradient(150deg, #6b4528 0%, #3d2817 35%, #4e3019 65%, #38210e 100%);
    color: var(--cream);
    text-align: center;
}
.hero__inner { padding: 48px 20px 22px; }
.hero__eyebrow { text-transform: uppercase; letter-spacing: 3px; font-size: .8rem; color: var(--tan); margin: 0 0 12px; font-weight: 600; }
.hero__title { font-size: clamp(2.6rem, 7vw, 4.4rem); color: var(--cream); margin: 0 0 14px; }
.hero__tagline { font-size: clamp(1.05rem, 2.4vw, 1.35rem); max-width: 640px; margin: 0 auto 32px; color: #f0e6d6; }
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .btn--ghost { color: var(--cream); border-color: var(--cream); }
.hero .btn--ghost:hover { background: var(--cream); color: var(--leather-dark); }

/* ---------- Sections ---------- */
.section { padding: 36px 0; }
.section--alt { background: var(--cream-2); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 16px; }
.section__title { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 12px; }
.section__lead { color: var(--muted); font-size: 1.08rem; margin: 0; }

/* ---------- Filters ---------- */
.filters { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 24px; }
.filter {
    border: 1px solid var(--line); background: var(--white); color: var(--leather-dark);
    padding: 8px 18px; border-radius: 999px; cursor: pointer; font-weight: 600; font-family: var(--sans);
    transition: .2s;
}
.filter:hover { border-color: var(--tan); }
.filter.is-active { background: var(--leather); color: var(--cream); border-color: var(--leather); }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.card {
    background: var(--white); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); border: 1px solid var(--line);
    display: flex; flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__media { position: relative; aspect-ratio: 4 / 3; background: var(--cream-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__placeholder {
    width: 100%; height: 100%; display: grid; place-items: center;
    font-family: var(--serif); font-size: 2.4rem; color: var(--tan);
    background: repeating-linear-gradient(45deg, #ece3d4 0 14px, #e4d8c4 14px 28px);
}
/* ---------- Card carousel ---------- */
.carousel { position: absolute; inset: 0; }
.carousel__track { width: 100%; height: 100%; }
.carousel__slide {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transition: opacity .3s ease; pointer-events: none;
}
.carousel__slide.is-active { opacity: 1; pointer-events: auto; }
.carousel__arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border: 0; border-radius: 999px;
    background: rgba(61, 40, 23, .55); color: var(--cream);
    font-size: 1.4rem; line-height: 1; cursor: pointer;
    display: grid; place-items: center; z-index: 2;
    opacity: 0; transition: opacity .2s ease, background .2s ease;
}
.card:hover .carousel__arrow,
.carousel__arrow:focus-visible { opacity: 1; }
.carousel__arrow:hover { background: var(--leather-dark); }
.carousel__arrow--prev { left: 8px; }
.carousel__arrow--next { right: 8px; }
.carousel__dots {
    position: absolute; bottom: 10px; left: 0; right: 0; z-index: 2;
    display: flex; gap: 6px; justify-content: center;
}
.carousel__dot {
    width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px;
    background: rgba(245, 239, 230, .55); cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.carousel__dot.is-active { background: var(--cream); }
@media (hover: none) {
    .carousel__arrow { opacity: 1; }
}

.card__body { padding: 20px 20px 24px; }
.card__category { text-transform: uppercase; letter-spacing: 1.5px; font-size: .72rem; color: var(--tan); font-weight: 600; margin: 0 0 6px; }
.card__title { font-size: 1.3rem; margin: 0 0 10px; }
.card__desc { color: var(--muted); margin: 0; font-size: .98rem; }

/* ---------- Status badges ---------- */
.badge {
    position: absolute; top: 12px; left: 12px;
    padding: 5px 12px; border-radius: 999px;
    font-size: .74rem; font-weight: 700; letter-spacing: .4px;
    color: #fff; background: var(--muted); text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.badge--completed   { background: #3f7d4e; }
.badge--in-progress { background: #c1791f; }
.badge--planned     { background: #5a6b88; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: center; }
.about__photo-frame {
    aspect-ratio: 1; border-radius: var(--radius);
    display: grid; place-items: center; padding: 12%;
    background: var(--cream);
    box-shadow: var(--shadow-lg);
}
.about__photo-logo { width: 100%; height: 100%; object-fit: contain; }
.about__text p { margin: 0 0 16px; color: #4a3c2e; }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.field { display: block; margin-bottom: 18px; }
.field > span { display: block; font-weight: 600; margin-bottom: 6px; color: var(--leather-dark); }
.field input, .field textarea, .field select {
    width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px;
    font-family: var(--sans); font-size: 1rem; background: var(--white); color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none; border-color: var(--tan); box-shadow: 0 0 0 3px rgba(176,125,79,.2);
}
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.contact__info h3 { margin-top: 0; }
.contact__line { display: flex; gap: 10px; margin: 0 0 10px; }
.contact__label { font-weight: 700; color: var(--muted); min-width: 56px; }
.socials { display: flex; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.socials a { font-weight: 600; }

/* ---------- Flash + empty ---------- */
.flash { padding: 14px 18px; border-radius: 8px; margin-bottom: 22px; font-weight: 600; }
.flash--ok { background: #e6f1e8; color: #2f6b3e; border: 1px solid #bcd9c3; }
.flash--error { background: #f7e6e1; color: #8f3a1f; border: 1px solid #e6c3b6; }
.empty { text-align: center; color: var(--muted); padding: 30px 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--leather-dark); color: #e9ddca; padding: 30px 0; }
.site-footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--tan); margin-left: 22px; font-weight: 600; }
.site-footer__nav { display: flex; }
.site-footer__nav a:first-child { margin-left: 0; }

/* ===========================================================================
   Admin
   =========================================================================== */
.admin-body { background: var(--cream-2); }
.login {
    max-width: 380px; margin: 8vh auto; background: var(--white);
    padding: 36px 32px; border-radius: var(--radius); box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
}
.login__brand { font-size: 1.7rem; margin: 0; text-align: center; }
.login__sub { text-align: center; color: var(--muted); margin: 2px 0 24px; }
.login__back { text-align: center; margin: 18px 0 0; }

.admin-bar { background: var(--leather-dark); color: var(--cream); }
.admin-bar__inner { display: flex; justify-content: space-between; align-items: center; height: 60px; }
.admin-bar a { color: var(--tan); margin-left: 22px; font-weight: 600; }

.admin-main { padding: 32px 20px 64px; }
.admin-grid { display: grid; grid-template-columns: 420px 1fr; gap: 32px; align-items: start; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.panel h2 { margin-top: 0; }
.admin-form__actions { display: flex; gap: 12px; }
.admin-thumb img { max-width: 160px; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 14px; }

/* Admin image editor (reorderable photos) */
.img-editor { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 12px; }
.img-editor__item {
    position: relative; width: 120px;
    border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--cream-2);
}
.img-editor__item.is-cover { outline: 2px solid var(--accent); }
.img-editor__item img { display: block; width: 120px; height: 90px; object-fit: cover; }
.img-editor__cover-tag {
    position: absolute; top: 4px; left: 4px; display: none;
    background: var(--accent); color: #fff; font-size: .62rem; font-weight: 700;
    padding: 2px 6px; border-radius: 999px; text-transform: uppercase;
}
.img-editor__item.is-cover .img-editor__cover-tag { display: inline-block; }
.img-editor__controls { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; }
.img-editor__controls .btn--small { padding: 4px 8px; font-size: .72rem; }
.img-editor__hint { color: var(--muted); font-size: .82rem; margin: 4px 0 0; }

.admin-list { list-style: none; padding: 0; margin: 0; }
.admin-list__item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.admin-list__item:last-child { border-bottom: 0; }
.admin-list__thumb { position: relative; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--cream-2); display: grid; place-items: center; }
.admin-list__thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-list__noimg { font-size: .68rem; color: var(--muted); text-align: center; }
.admin-list__count {
    position: absolute; bottom: 2px; right: 2px;
    background: rgba(61, 40, 23, .8); color: var(--cream);
    font-size: .62rem; font-weight: 700; padding: 1px 6px; border-radius: 999px;
}
.admin-list__meta { display: flex; flex-direction: column; gap: 4px; }
.admin-list__meta .badge { position: static; align-self: flex-start; }
.admin-list__meta em { color: var(--muted); font-size: .85rem; }
.admin-list__actions { display: flex; gap: 8px; align-items: center; }
.admin-list__actions form { margin: 0; }

/* ===========================================================================
   Responsive
   =========================================================================== */
@media (max-width: 860px) {
    .nav-toggle { display: flex; }
    .site-nav {
        position: absolute; top: 68px; left: 0; right: 0;
        flex-direction: column; gap: 0;
        background: var(--cream); border-bottom: 1px solid var(--line);
        max-height: 0; overflow: hidden; transition: max-height .3s ease;
    }
    .site-nav.is-open { max-height: 320px; }
    .site-nav a { padding: 16px 20px; width: 100%; border-top: 1px solid var(--line); }
    .site-nav__cta { border-radius: 0; }

    .about, .contact__grid, .admin-grid { grid-template-columns: 1fr; }
    .about__photo { max-width: 320px; margin: 0 auto; }
}

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0, 0, 0, .88);
    display: grid; place-items: center;
    cursor: zoom-out;
    padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox__img {
    max-width: 100%; max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 8px 40px rgba(0, 0, 0, .6);
    cursor: default;
}
.lightbox__close {
    position: absolute; top: 16px; right: 20px;
    background: none; border: none;
    color: var(--cream); font-size: 2.4rem; line-height: 1;
    cursor: pointer; opacity: .8;
    padding: 4px 8px;
}
.lightbox__close:hover { opacity: 1; }
.lightbox__prev,
.lightbox__next {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(61, 40, 23, .6); border: none; color: var(--cream);
    font-size: 2.4rem; width: 52px; height: 52px; border-radius: 999px;
    cursor: pointer; line-height: 1; display: grid; place-items: center;
    transition: background .2s ease; opacity: .85;
}
.lightbox__prev:hover,
.lightbox__next:hover { background: var(--leather-dark); opacity: 1; }
.lightbox__prev { left: 20px; }
.lightbox__next { right: 20px; }
.lightbox--single .lightbox__prev,
.lightbox--single .lightbox__next { display: none; }
.carousel__slide.is-active { cursor: zoom-in; }

@media (max-width: 520px) {
    .hero__inner { padding: 28px 20px; }
    .section { padding: 30px 0; }
    .admin-list__item { grid-template-columns: 1fr; }
    .admin-list__thumb { width: 100%; height: 160px; }
    .admin-list__actions { justify-content: flex-start; }
}

/* ---------- Shows section ---------- */
.shows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

.show-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
}
.show-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.show-card__date {
    background: var(--leather);
    color: var(--cream);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.show-card__hours {
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    opacity: 0.85;
    font-size: 0.8rem;
    white-space: nowrap;
}

.show-card__body {
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.show-card__name {
    font-family: var(--serif);
    font-size: 1.15rem;
    color: var(--leather-dark);
    margin: 0 0 2px;
}

.show-card__venue {
    color: var(--muted);
    font-size: 0.875rem;
    margin: 0;
}

.show-card__address {
    color: var(--muted);
    font-size: 0.875rem;
    margin: 0;
}

.show-card__desc {
    font-size: 0.875rem;
    color: var(--ink);
    margin: 6px 0 0;
}

.show-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Map modal */
.map-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .72);
    z-index: 900;
    display: grid;
    place-items: center;
    padding: 16px;
}
.map-modal[hidden] { display: none; }

.map-modal__panel {
    width: min(680px, 100%);
    height: min(520px, 90vh);
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.map-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: var(--leather);
    color: var(--cream);
    flex-shrink: 0;
}

.map-modal__title {
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.map-modal__close {
    background: none;
    border: none;
    color: var(--cream);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    opacity: .8;
}
.map-modal__close:hover { opacity: 1; }

.map-modal__iframe {
    flex: 1;
    width: 100%;
    border: none;
    display: block;
}

/* Admin shows list — date column */
.admin-list__date {
    font-size: 0.8rem;
    color: var(--muted);
    white-space: nowrap;
}
.admin-list__past { opacity: .55; }
