/* Inverurie Panto - site styles.
   The season's show artwork leads the page; production photos bring the colour.
   Season colours (--show, --gold) change each year with the poster.
   Fonts: Young Serif (headings) + Lexend (body, designed for reading ease), both SIL OFL, self-hosted. */

@font-face { font-family: 'Young Serif'; src: url(/fonts/YoungSerif.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Lexend'; src: url(/fonts/Lexend.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
    --paper: #ffffff;
    --ink: #261433;
    --ink-soft: #5d5066;
    --magenta: #a3206f;
    --magenta-deep: #7e1656;
    --plum: #5b2a7c;
    --lilac: #f5eff8;
    --cream-gold: #fff7d6;
    --rule: #ddd3e3;
    --show: #0a4e1a;   /* season: matched to the edge of the 2026 artwork */
    --gold: #f2c500;   /* season */
    --serif: 'Young Serif', Georgia, 'Times New Roman', serif;
    --sans: 'Lexend', Verdana, Arial, sans-serif;
    --measure: 38rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 1.08rem; line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--magenta); text-underline-offset: .18em; }
a:hover { color: var(--magenta-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 .6em; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 4.2vw, 3.2rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 9999; background: var(--paper); padding: 8px 12px; }
.measure { max-width: var(--measure); }
.center { text-align: center; }
.center .measure { margin-left: auto; margin-right: auto; }

/* Sections and colour bands */
.band { padding: 72px 0; }
.band--lilac { background: var(--lilac); }
.band--gold { background: var(--cream-gold); }
.band--ink { background: var(--ink); color: #efe8f3; }
.band--ink h2 { color: #fff; }

/* The programme's row of stars */
.stars { text-align: center; color: #d4a800; letter-spacing: 1.2em; font-size: 1.1rem; margin: 0 0 18px; padding-left: 1.2em; }
.band--ink .stars { color: var(--gold); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 28px; border-radius: 4px; background: var(--magenta); color: #fff; font-family: var(--sans); font-weight: 700; font-size: 1.08rem; text-decoration: none; border: 2px solid var(--magenta); cursor: pointer; transition: background-color .2s, border-color .2s; }
.btn:hover { background: var(--magenta-deep); border-color: var(--magenta-deep); color: #fff; }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--show); }
.btn--gold:hover { background: #ffd633; border-color: #ffd633; color: var(--show); }
.btn--small { min-height: 44px; padding: 8px 18px; font-size: .98rem; }
.btn--plain { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn--plain:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); position: relative; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; }
.brand img { height: 62px; width: auto; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.02rem; }
.nav a:hover { color: var(--magenta); }
.nav a[aria-current="page"] { color: var(--magenta); box-shadow: inset 0 -3px 0 var(--magenta); }
.nav .btn { color: #fff; box-shadow: none; padding: 0 22px; margin-left: 8px; }
.nav-toggle { display: none; min-height: 44px; background: none; border: 2px solid var(--ink); border-radius: 4px; padding: 6px 16px; font: 700 1rem var(--sans); color: var(--ink); cursor: pointer; }

/* ---------- Show hero ---------- */
.show-hero { position: relative; background: var(--show); color: #fff; text-align: center; overflow: hidden; }
.show-hero::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; aspect-ratio: 843 / 1192; transform: translateX(-50%);
    background: url(/img/show-bg.jpg) center / cover no-repeat;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 25%, #000 75%, transparent);
            mask-image: linear-gradient(to right, transparent, #000 25%, #000 75%, transparent); }
.show-hero .wrap { position: relative; padding-top: 56px; padding-bottom: 64px; }
.show-hero__title { width: min(560px, 88%); margin: 0 auto 18px; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .35)); }
.show-hero__when { font-family: var(--serif); font-size: clamp(1.35rem, 2.6vw, 1.9rem); color: var(--gold); margin: 0; }
.show-hero__where { font-size: 1.2rem; margin: 4px 0 28px; }
.show-hero__actions { display: flex; flex-wrap: wrap; gap: 14px 26px; justify-content: center; align-items: center; }
.show-hero__actions a:not(.btn) { color: #fff; font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; }
.show-hero--compact .wrap { padding-top: 40px; padding-bottom: 40px; }
.show-hero--compact .show-hero__title { width: min(340px, 70%); }

/* ---------- Intro ---------- */
.intro p { font-size: 1.2rem; }
.intro .lead { font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 1.8rem); line-height: 1.35; color: var(--ink); }

/* ---------- Production gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: 12px; margin-top: 36px; }
.gallery figure { position: relative; margin: 0; overflow: hidden; border-radius: 3px; background: #000; }
.gallery figure.wide { grid-column: span 2; }
.gallery figure.big { grid-column: span 2; grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery figure:hover img { transform: scale(1.08); }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 10px; font-size: .92rem; font-weight: 700; color: #fff;
    background: linear-gradient(to top, rgba(20, 8, 28, .85), transparent); }

/* ---------- Performance table ---------- */
.key { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 18px 0 0; color: var(--ink-soft); }
.tag { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .82rem; font-weight: 700; color: #fff; white-space: nowrap; }
.tag--bsl { background: var(--plum); }
.tag--relaxed { background: var(--show); }
.perf-week-title { color: var(--magenta); margin: 40px 0 12px; }
.perf-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.perf-table th:nth-child(1) { width: 40%; }
.perf-table th:nth-child(2) { width: 16%; }
.perf-table th:nth-child(3), .perf-table th:nth-child(4) { width: 22%; }
.perf-table th { text-align: left; background: var(--ink); color: #fff; font-family: var(--serif); font-weight: 400; font-size: 1.05rem; padding: 12px 16px; }
.perf-table td { padding: 10px 16px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.perf-table tbody tr:nth-child(even) td { background: #faf7fb; }
.perf-table .when { font-family: var(--serif); font-size: 1.1rem; }
.perf-table .time { font-weight: 700; }
.perf-table .book { text-align: right; }

/* ---------- Charities / history / posters ---------- */
.history { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.history img { border: 1px solid var(--rule); box-shadow: 0 10px 30px rgba(38, 20, 51, .15); transform: rotate(-1.5deg); }
.caption { font-size: .92rem; color: var(--ink-soft); margin-top: 14px; }

.posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 28px 20px; }
.poster { margin: 0; }
.poster div { overflow: hidden; }
.poster img { aspect-ratio: 5 / 7; object-fit: cover; width: 100%; transition: transform .6s ease; }
.poster:hover img { transform: scale(1.06); }
.poster figcaption { margin-top: 8px; font-family: var(--serif); line-height: 1.25; }
.poster figcaption span { display: block; font-family: var(--sans); font-size: .9rem; color: var(--ink-soft); }

.placeholder { background: #ffe680; padding: 0 .3em; }
.page-intro { padding-top: 64px; }
/* FAQ: ticket prices and the seating plans */
.price-table { border-collapse: collapse; margin: 0 0 1em; min-width: 18rem; }
.price-table th, .price-table td { padding: 8px 18px 8px 0; border-bottom: 1px solid var(--rule); text-align: left; }
.price-table thead th { font-size: .9rem; color: var(--ink-soft); }
.seat-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 1.4em; }
.seat-plans a { display: block; text-decoration: none; border: 1px solid var(--rule); border-radius: 3px; background: #fff; }
.seat-plans__label { display: block; padding: 6px 10px; font-family: var(--serif); color: var(--ink); border-bottom: 1px solid var(--rule); }
@media (max-width: 480px) { .seat-plans { grid-template-columns: 1fr; } }
/* Home: this season's charities, logos on white cards (logos are made for white backgrounds) */
/* A centred, wrapping row rather than a grid, so a part-filled last row (e.g. 5 logos, 2 per row on phones) sits in the middle instead of hanging left. */
.charity-logos { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.charity-logos li { flex: 0 1 210px; min-width: 0; }
.charity-logos a { display: flex; align-items: center; justify-content: center; height: 110px; padding: 14px 18px; background: #fff; border-radius: 4px; text-decoration: none; transition: transform .2s; }
.charity-logos a:hover { transform: translateY(-2px); }
.charity-logos img { max-height: 100%; max-width: 100%; width: auto; object-fit: contain; }
.charity-logos span { font-family: var(--serif); font-size: 1.1rem; line-height: 1.25; color: var(--ink); text-align: center; }
/* FAQ: each question folds open (details/summary); the Expand all button is shown by site.js */
.faq-tools { margin: 8px 0 16px; }
.faq { border-top: 1px solid var(--rule); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 14px 0; cursor: pointer; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary h2 { margin: 0; font-size: 1.3rem; }
.faq-item > summary:hover h2 { color: var(--magenta); }
.faq-item > summary::after { content: '+'; flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--lilac); color: var(--magenta); font: 700 1.35rem/1 var(--sans); }
.faq-item[open] > summary::after { content: '\2212'; background: var(--magenta); color: #fff; }
.faq-answer { padding: 0 0 10px; }
.contact-list li { padding: 14px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 9rem 1fr; gap: 16px; align-items: center; min-height: 44px; }
.contact-list li:first-child { border-top: 1px solid var(--rule); }
.contact-list strong { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; }
/* ---------- Forms ---------- */
.contact-form-wrap { margin-top: 28px; }
.contact-other { padding: 48px 0 72px; }
.api-form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; }
.field .optional { font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; color: var(--ink); background: var(--paper);
    border: 2px solid var(--rule); border-radius: 4px; transition: border-color .2s; }
.field textarea { resize: vertical; min-height: 220px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--plum); outline: 3px solid var(--gold); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: var(--magenta); }
.field-error { color: var(--magenta-deep); font-size: .95rem; font-weight: 700; }
.field--check { grid-template-columns: auto 1fr; align-items: start; gap: 12px; }
.field--check input { width: 24px; height: 24px; min-height: 0; margin: 2px 0 0; accent-color: var(--magenta); }
.field--check label { font-weight: 400; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.api-form .btn { justify-self: start; }
.form-status:empty { display: none; }
.form-status { margin: 0; font-weight: 700; }
.form-status--error { color: var(--magenta-deep); }
.form-note { font-size: .95rem; color: var(--ink-soft); margin: 0; }
.form-done { font-family: var(--serif); font-size: 1.35rem; line-height: 1.4; padding: 24px 28px; background: var(--lilac); border-left: 4px solid var(--magenta); }

.signup { max-width: 52rem; }
.signup-form { margin-top: 24px; gap: 12px; }
.signup-fields { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 16px; align-items: end; }
.signup-fields .btn { justify-self: stretch; }
.signup-access { grid-column: 1 / -1; align-self: start; }
.signup .form-done { margin-top: 24px; }

.prose h2 { margin-top: 1.4em; font-size: 1.5rem; }
.prose ul { list-style: disc; padding-left: 1.3em; margin-bottom: 1em; }
.prose li { margin-bottom: .4em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #e9e2ee; padding: 56px 0 28px; font-size: 1rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.footer-logo { width: 170px; margin-bottom: 16px; }
.site-footer h2 { color: #fff; font-size: 1.15rem; margin-bottom: .7em; }
.site-footer li { margin-bottom: 4px; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 36px; }
.footer-icon { width: 20px; height: 20px; margin-right: 10px; flex: none; }  /* Keep in touch icons (white via currentColor) */
.footer-legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .2); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .92rem; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: #fff; text-decoration: underline; cursor: pointer; min-height: 36px; }

/* ---------- Cookie consent ---------- */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 5000; max-width: 620px; margin: 0 auto; background: var(--paper); border: 1px solid var(--rule); border-top: 4px solid var(--magenta); box-shadow: 0 12px 32px rgba(38, 20, 51, .25); padding: 20px 24px; font-size: 1rem; }
.consent p { margin-bottom: 14px; }
.consent .btn { min-height: 44px; padding: 8px 20px; font-size: 1rem; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .gallery img, .poster img { transition: none; }
    .gallery figure:hover img, .poster:hover img { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .history { grid-template-columns: 1fr; gap: 32px; }
    .history img { transform: none; max-width: 420px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
    .show-hero::before { left: 0; width: 100%; transform: none; aspect-ratio: auto; -webkit-mask-image: none; mask-image: none; opacity: .9; }
}
@media (max-width: 780px) {
    .nav-toggle { display: block; }
    .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 4px; background: var(--paper); padding: 16px 28px 24px; border-bottom: 1px solid var(--rule); }
    .nav.open { display: flex; }
    .nav .btn { margin: 8px 0 0; }
    .brand img { height: 50px; }
    .site-header .wrap { min-height: 72px; }
    .wrap { padding: 0 20px; }
    .band { padding: 52px 0; }
    .contact-list li { grid-template-columns: 1fr; gap: 4px; }
    .signup-fields { grid-template-columns: 1fr; }
    .signup-fields .btn { justify-self: start; order: 1; } /* tick-box sits above the button on phones */
    .footer-grid { grid-template-columns: 1fr; }
    /* Table rows become compact stacked rows on phones */
    .perf-table thead { display: none; }
    .perf-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 10px; border-bottom: 1px solid var(--rule); }
    .perf-table tbody tr:nth-child(even) { background: #faf7fb; }
    .perf-table td { padding: 0; border: 0; background: none !important; }
    .perf-table .when { grid-column: 1; }
    .perf-table .time, .perf-table .access { grid-column: 1; }
    .perf-table .book { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}
