/* Neuadd Ffynnongroes / Crosswell Hall. Colours come from the building: sign blue, slate render, white doors. */
:root {
  --ink: #16233b; --blue: #1c3fa8; --blue-dark: #122a75; --slate: #7f90a6; --ground: #eef1f5;
  --white: #ffffff; --line: #c3ccd9; --line-soft: #d5dbe4; --muted: #3b4a63;
  --gold: #f2c94c; --warm: #fbf6ec; --warm-line: #e6dcc8; --brown: #8a4b12;
  --green: #2f8f55; --green-bg: #eaf6ee; --green-ink: #10512b;
  --amber: #c99a00; --amber-bg: #fff6d6; --amber-ink: #5c4300; --grey-bg: #e7eaef; --grey-ink: #4a5568;
  --red: #a4262c;
  --wide: 'Archivo', 'Segoe UI', Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--wide); background: var(--ground); color: var(--ink); font-size: 17px; line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: var(--blue); } a:hover { color: var(--blue-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 24px; }
.narrow { max-width: 980px; }
h1, h2, h3 { font-stretch: 110%; font-weight: 800; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(30px, 4vw, 44px); }
.lead { margin: 10px 0 0; max-width: 44em; color: var(--muted); }
.kicker { font-stretch: 125%; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }

/* header */
.site-head { background: var(--ink); color: var(--white); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-block: 14px; }
.plate { background: var(--blue); color: var(--white); padding: 9px 16px 8px; text-align: center; border: 2px solid var(--white); line-height: 1.15; text-decoration: none; }
.plate:hover { color: var(--white); background: var(--blue-dark); }
.plate b { display: block; font-stretch: 125%; font-weight: 600; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.plate span { display: block; font-stretch: 125%; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 2px; flex: 1 1 360px; }
.nav a { min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center; color: var(--white); font-weight: 700; font-size: 15px; text-decoration: none; box-shadow: inset 0 -3px 0 transparent; }
.nav a:hover { color: var(--gold); }
.nav a[aria-current="page"] { color: var(--gold); box-shadow: inset 0 -3px 0 var(--gold); }
.langs { display: flex; gap: 8px; }
.langs button { min-height: 42px; padding: 0 12px; font-weight: 700; font-size: 14px; border: 2px solid #8b97a9; background: transparent; color: var(--white); display: flex; align-items: center; gap: 8px; }
.langs button[aria-pressed="true"] { background: var(--white); color: var(--ink); border-color: var(--white); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 24px; font-weight: 800; border: 2px solid var(--blue); background: var(--blue); color: var(--white); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.btn:hover { color: var(--white); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(22,35,59,.18); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); font-weight: 700; }
.btn.ghost:hover { color: var(--ink); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.gold:hover { color: var(--ink); }
.btn:disabled { background: #8fa1d6; border-color: #8fa1d6; color: var(--ink); transform: none; box-shadow: none; }
.btn.small { min-height: 44px; padding: 8px 14px; font-weight: 700; }
.btn.dark { background: var(--ink); border-color: var(--ink); }

/* home */
.hero { display: flex; flex-wrap: wrap; background: var(--warm); border-bottom: 1px solid var(--warm-line); }
.hero-text { flex: 1 1 460px; min-width: 0; padding: clamp(36px, 6vw, 80px) clamp(24px, 5vw, 72px); display: flex; flex-direction: column; justify-content: center; }
.hero-text .kicker { color: var(--brown); }
.hero-text h1 { margin-top: 14px; font-size: clamp(32px, 4.4vw, 54px); line-height: 1.06; }
.hero-text p { margin: 18px 0 0; font-size: 19px; max-width: 30em; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero > img { flex: 1 1 460px; min-width: 0; width: 100%; height: auto; min-height: 340px; align-self: stretch; object-fit: cover; object-position: 35% center; }
.facts { background: var(--blue); color: var(--white); }
.facts .wrap { display: flex; flex-wrap: wrap; gap: 14px 48px; padding-block: 22px; }
.facts div { display: flex; align-items: baseline; gap: 10px; }
.facts b { font-stretch: 110%; font-weight: 800; font-size: 28px; color: var(--gold); font-variant-numeric: tabular-nums; }
.facts span { font-size: 15px; font-weight: 500; }
.section { padding-block: 60px 72px; }
.section h2 { font-size: clamp(26px, 3.4vw, 38px); }
.cards { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px; }
.card { flex: 1 1 250px; min-width: 0; height: 310px; perspective: 1400px; }
.card-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .65s cubic-bezier(.2,.7,.2,1); }
.card.flipped .card-inner { transform: rotateY(180deg); }
.card-front, .card-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.card-front { padding: 0; border: 0; background: var(--ink); color: var(--white); overflow: hidden; text-align: left; }
.card-front img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card-front:hover img { transform: scale(1.06); }
.card-front span { position: absolute; left: 0; right: 0; bottom: 0; padding: 44px 18px 16px; background: linear-gradient(180deg, rgba(16,26,46,0) 0%, rgba(16,26,46,.9) 70%); display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; font-stretch: 110%; font-weight: 800; font-size: 20px; line-height: 1.15; }
.card-front svg { flex: none; }
.card-back { background: var(--blue); color: var(--white); padding: 22px; display: flex; flex-direction: column; gap: 10px; transform: rotateY(180deg); }
.card-back h3 { font-size: 21px; line-height: 1.15; }
.card-back p { margin: 0; font-size: 16px; flex: 1; }
.card-back div { display: flex; flex-wrap: wrap; gap: 8px; }
.card-back button { min-height: 46px; font-weight: 800; }
.card-back .go { flex: 1 1 120px; border: 0; background: var(--gold); color: var(--ink); }
.card-back .close { flex: 0 1 90px; border: 2px solid var(--white); background: transparent; color: var(--white); font-weight: 700; }
.soon { background: var(--warm); border-top: 1px solid var(--warm-line); }
.soon .wrap { padding-block: 40px; display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; }
.soon h2 { font-size: 24px; flex: 0 0 auto; }
.soon ul { flex: 1 1 400px; margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.soon li b { display: block; font-variant-numeric: tabular-nums; color: var(--brown); font-size: 14px; }

/* pages */
.page { padding-block: 56px 72px; }
.panel { background: var(--white); border: 1px solid var(--line-soft); }
.warm-box { margin-top: 28px; background: var(--warm); border: 1px solid var(--warm-line); padding: 26px 30px; }
.warm-box h2 { font-size: 22px; }
.warm-box ul { margin: 12px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.acc { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.acc-head { width: 100%; min-height: 64px; padding: 0 22px; border: 0; background: var(--white); color: var(--ink); text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-stretch: 110%; font-weight: 800; font-size: 21px; }
.acc-head[aria-expanded="true"] { background: var(--ink); color: var(--white); }
.acc-head i { font-style: normal; font-size: 26px; line-height: 1; }
.acc-body { display: flex; flex-wrap: wrap; animation: rise .45s ease; }
.acc-body img { flex: 3 1 380px; min-width: 0; width: 100%; height: 340px; object-fit: cover; }
.ticks { flex: 2 1 280px; min-width: 0; margin: 0; padding: 14px 26px 20px; list-style: none; }
.ticks li { padding: 12px 0; border-bottom: 1px solid var(--line-soft); display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.ticks svg { flex: none; margin-top: 3px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* what's on */
.split { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 28px; align-items: flex-start; }
.cal { flex: 3 1 480px; min-width: 0; padding: 22px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cal-head strong { font-stretch: 110%; font-weight: 800; font-size: 24px; }
.icon-btn { width: 46px; height: 46px; border: 2px solid var(--ink); background: var(--white); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.cal-dow { margin-top: 16px; text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.cal-grid button { min-height: 58px; padding: 6px 2px; border: 2px solid var(--line-soft); background: var(--white); color: var(--ink); font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.cal-grid button i { width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.cal-grid button.has { background: #fdf3cf; border-color: var(--amber); }
.cal-grid button.has i { background: #b7791f; }
.cal-grid button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--white); }
.cal-grid button[aria-pressed="true"] i { background: var(--gold); }
.cal-grid button.past { color: #7b8798; background: var(--ground); }
.cal-grid span.blank { min-height: 58px; }
.side { flex: 2 1 300px; min-width: 0; }
.blue-box { background: var(--blue); color: var(--white); padding: 24px 26px; }
.blue-box .kicker { color: var(--gold); font-weight: 600; letter-spacing: .18em; }
.blue-box .big { font-stretch: 110%; font-weight: 800; font-size: 22px; margin-top: 8px; overflow-wrap: anywhere; }
.blue-box .sub { margin-top: 4px; color: #dfe6fa; }
.side h2 { margin-top: 26px; font-size: 20px; }
.rows { margin: 10px 0 0; padding: 0; list-style: none; }
.rows li { padding: 12px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.rows li b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rows li span { color: var(--muted); text-align: right; overflow-wrap: anywhere; }

/* booking */
.hires { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hires button { flex: 1 1 220px; min-width: 0; text-align: left; padding: 14px 18px; border: 2px solid var(--line); background: var(--white); color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hires button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.hires b { display: block; font-weight: 800; } .hires small { display: block; font-size: 14px; }
.hires strong { font-stretch: 110%; font-weight: 800; font-size: 28px; font-variant-numeric: tabular-nums; }
.grid-box { margin-top: 18px; padding: 18px; }
.grid-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 0 6px 10px; }
.grid-top strong { font-stretch: 110%; font-weight: 800; font-size: 20px; }
.grid-top div { display: flex; gap: 8px; }
.scroll-x { overflow-x: auto; }
table.week { border-collapse: separate; border-spacing: 5px; width: 100%; min-width: 700px; table-layout: fixed; font-variant-numeric: tabular-nums; }
table.week th:first-child { width: 132px; position: sticky; left: 0; background: var(--white); z-index: 1; }
table.week th { font-size: 13px; font-weight: 700; padding: 6px; }
table.week thead th b { display: block; font-weight: 800; font-size: 20px; line-height: 1.1; }
table.week thead th span { display: block; font-weight: 500; color: var(--muted); }
table.week th[scope="row"], table.week thead th:first-child { text-align: left; font-size: 14px; }
table.week td { padding: 0; }
table.week td button { width: 100%; min-height: 46px; padding: 2px 4px; border: 2px solid var(--line); background: var(--grey-bg); color: var(--grey-ink); font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
table.week td button.free { background: var(--green-bg); color: var(--green-ink); border-color: var(--green); }
table.week td button.pending { background: var(--amber-bg); color: var(--amber-ink); border-color: var(--amber); }
table.week td button.sel { background: var(--blue); color: var(--white); border-color: var(--blue); }
table.week td button.dim { background: #f3f5f8; color: var(--grey-ink); border-color: var(--line); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 12px 6px 0; font-size: 13px; font-weight: 600; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 16px; height: 16px; border: 2px solid; }
.form-box { margin-top: 20px; padding: 26px; display: flex; flex-wrap: wrap; gap: 24px 32px; }
.fields { flex: 2 1 420px; min-width: 0; display: flex; flex-wrap: wrap; gap: 14px 18px; align-content: flex-start; }
.field { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 15px; }
.field.full { flex-basis: 100%; }
.field input, .field select, .field textarea { min-height: 46px; padding: 8px 12px; border: 2px solid #8b97a9; background: var(--white); font-weight: 400; font-size: 17px; width: 100%; }
.field textarea { min-height: 90px; resize: vertical; }
.check { flex: 1 1 100%; display: flex; gap: 12px; align-items: center; min-height: 44px; }
.check input { width: 22px; height: 22px; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.small-note { flex: 1 1 100%; margin: 0; font-size: 14px; color: var(--muted); }
.summary { flex: 1 1 280px; min-width: 0; align-self: flex-start; }
.summary .what { margin-top: 12px; font-size: 19px; font-weight: 700; }
.summary .price { margin-top: 14px; font-stretch: 110%; font-weight: 800; font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; }
.summary p { margin: 10px 0 0; font-size: 14px; color: #dfe6fa; }
.summary .btn { margin-top: 16px; width: 100%; }
.summary .msg { color: var(--white); font-weight: 600; min-height: 1.5em; }
.done { margin-top: 24px; padding: clamp(24px, 4vw, 40px); border-top: 8px solid var(--green); }
.done h2 { font-size: 28px; }
.done dl { margin: 18px 0 0; }
.done dl div { display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.done dt { flex: 0 0 170px; font-weight: 700; color: var(--muted); }
.done dd { margin: 0; flex: 1 1 240px; font-weight: 600; }
.done .call { margin-top: 18px; background: var(--warm); border: 1px solid var(--warm-line); padding: 18px 22px; font-weight: 600; }
.alert { margin-top: 18px; padding: 16px 20px; background: #fdecec; border: 2px solid var(--red); color: #5f1216; font-weight: 600; }

/* find us */
.find { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 28px; }
.find-main { flex: 3 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.find-main img { width: 100%; height: 320px; object-fit: cover; border: 8px solid var(--white); }
.find-main iframe { width: 100%; height: 340px; border: 8px solid var(--white); background: var(--line-soft); }
.find-side { flex: 2 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.info { padding: 18px 22px; }
.info small { display: block; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.info b { display: block; font-size: 19px; margin-top: 4px; overflow-wrap: anywhere; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }

/* footer */
.site-foot { background: var(--ink); color: var(--white); }
.site-foot .wrap { padding-block: 32px; display: flex; flex-wrap: wrap; gap: 14px 40px; align-items: center; justify-content: space-between; font-size: 15px; }
.site-foot a { color: var(--white); }
.site-foot .admin { min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; border: 1px solid #8b97a9; text-decoration: none; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card-inner, .card-front img, .btn { transition: none; }
  .acc-body { animation: none; }
}

.swipe { display: none; padding: 0 6px 8px; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .swipe { display: block; } }

.done dd.code { font-stretch: 110%; font-weight: 800; font-size: 34px; letter-spacing: .06em; color: var(--blue); line-height: 1.1; user-select: all; }
.done .links { margin-top: 16px; }

.code-box { margin-top: 18px; padding: 20px 24px; background: var(--ground); border: 2px solid var(--blue); display: flex; flex-direction: column; gap: 4px; }
.code-box span { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.code-box .code { font-stretch: 110%; font-weight: 800; font-size: clamp(32px, 7vw, 46px); letter-spacing: .06em; color: var(--blue); line-height: 1.1; user-select: all; overflow-wrap: anywhere; }
.code-box small { font-size: 14px; color: var(--muted); }
.warn { margin: 12px 0 0; padding: 14px 18px; background: #fdecec; border: 2px solid var(--red); color: #5f1216; font-weight: 700; }
.mail-box { margin-top: 18px; padding: 20px 22px; border: 1px solid var(--line-soft); background: var(--white); }
.mail-box h3 { font-size: 20px; }
.mail-box p { margin: 6px 0 12px; color: var(--muted); }
.mail-box textarea { width: 100%; padding: 12px 14px; border: 2px solid #8b97a9; background: var(--ground); font: 500 15px/1.6 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; resize: vertical; }
.mail-box .links { margin-top: 12px; align-items: center; }
#copy-msg { font-weight: 700; color: var(--green-ink); }

/* posters on the What's On page */
.posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; margin-top: 18px; }
.posters button { padding: 0; border: 1px solid var(--line-soft); background: var(--white); color: var(--ink); text-align: left; display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease; }
.posters button:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(22,35,59,.18); }
.posters img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }
.posters .poster-img { position: relative; display: block; }
.posters .poster-cap { display: block; padding: 10px 14px 12px; font-weight: 700; overflow-wrap: anywhere; }
.posters .poster-cap small { display: block; font-weight: 500; font-size: 14px; color: var(--muted); margin-top: 2px; }
/* past events: a separate tinted panel, greyed pictures and a badge, so they cannot be mistaken for coming events */
.past-box { margin-top: 48px; padding: 28px clamp(16px, 3vw, 30px) 32px; background: #e3e6ec; border: 2px dashed #8b97a9; }
.past-box h2 { color: var(--grey-ink); }
.posters.past button { background: #f3f4f7; color: var(--grey-ink); }
.posters.past img { filter: grayscale(1) contrast(.9); opacity: .7; }
.past-badge { position: absolute; top: 12px; left: 0; background: var(--ink); color: var(--white); padding: 6px 14px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.past-flag { margin: 0 0 10px; padding: 10px 14px; background: var(--ink); color: var(--white); font-weight: 700; }
dialog#poster-view { border: 0; padding: 14px; max-width: min(96vw, 900px); max-height: 96vh; background: var(--white); }
dialog#poster-view::backdrop { background: rgba(16,26,46,.8); }
dialog#poster-view img { max-width: 100%; max-height: calc(96vh - 90px); height: auto; margin: 0 auto 12px; }
@media (prefers-reduced-motion: reduce) { .posters button { transition: none; } }

/* current posters: large and uncropped, at the top of the What's On page */
#poster-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 24px; }
#poster-grid img { aspect-ratio: auto; object-fit: contain; }
#poster-grid .poster-cap { font-size: 19px; padding: 14px 18px 16px; }
.cal-title { margin-top: 48px; font-size: clamp(24px, 3vw, 32px); }
.cal-title + .split { margin-top: 16px; }
#poster-grid { align-items: start; }
.cal-title + .lead + .split { margin-top: 16px; }
