/* Fete: printed village-fete flyer. White paper, bunting colours, rounded poster type, hard offset shadows. */
:root {
  --paper: #FFFFFF;        /* page ground */
  --ink: #1C1A17;          /* text, outlines */
  --muted: #56514A;        /* secondary text on white (7:1) */
  --red: #D42A35;          /* bunting red: buttons, bands (white text 5:1) */
  --blue: #1F5FAD;         /* bunting blue (white text 6.4:1) */
  --teal: #00777A;         /* bunting teal (white text 5.4:1) */
  --yellow: #F2B705;       /* bunting yellow: use with ink text only */
  --pink: #E4477F;         /* bunting pink: use with ink text only */
  --tint: #EEF6F3;         /* cool pale mint for quiet panels */
  --font-display: "Fredoka", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 26px;
  --hard: 6px 6px 0 var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font-body);
  overflow-x: clip;
}
@media (min-width: 760px) { body { font-size: 1.0625rem; } }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; line-height: 1; margin: 0 0 .5em; }
h1 { font-size: clamp(3rem, 9.5vw, 7.25rem); line-height: .9; }
h2 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h3 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); line-height: 1.1; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.35rem); max-width: 38em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.section { padding: clamp(56px, 8vw, 104px) 0; border-top: 4px solid var(--ink); }
.kicker {
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem;
  color: var(--red); margin: 0 0 .75em;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px;
}
.skip-link:focus { top: 12px; }

/* Buttons: pill, ink outline, hard shadow that drops on press */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  min-height: 48px; padding: .75em 1.4em; border-radius: 999px;
  border: 3px solid var(--ink); background: var(--paper); color: var(--ink);
  font: 700 1.05rem/1.1 var(--font-display); text-decoration: none;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-red { background: var(--red); color: #fff; }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-white { background: #fff; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* Bunting strip, swaying gently (CSS only) */
.bunting {
  width: 100%; height: 44px; object-fit: fill;
  transform-origin: 50% 0;
  animation: sway 7s ease-in-out infinite alternate;
}
@keyframes sway { from { transform: rotate(-.6deg); } to { transform: rotate(.6deg); } }
.bunting-row { overflow: hidden; }

/* Header */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px max(16px, calc((100% - 1180px) / 2 + 16px)); border-bottom: 4px solid var(--ink); background: var(--paper);
  position: relative;
}
.wordmark { display: inline-block; min-height: 32px; padding: 4px 0; font: 700 1.35rem/1 var(--font-display); text-decoration: none; }
.wordmark span { color: var(--red); }
.nav-wide { display: none; }
.nav-wide ul, .menu ul { list-style: none; margin: 0; padding: 0; }
.nav-wide ul { display: flex; gap: 6px; }
.nav-wide a, .menu a {
  display: inline-block; padding: 8px 12px; border-radius: 999px; text-decoration: none; font-weight: 700;
}
.nav-wide a:hover, .menu a:hover { background: var(--yellow); }
.nav-wide a[aria-current="page"], .menu a[aria-current="page"] { background: var(--ink); color: #fff; }
.header-cta { display: none; min-height: 44px; padding: .5em 1em; font-size: .95rem; }
.menu { position: relative; }
.menu summary {
  list-style: none; cursor: pointer; min-height: 44px; padding: 8px 14px;
  border: 3px solid var(--ink); border-radius: 999px; font: 700 1rem/1 var(--font-display);
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--ink); color: #fff; }
.menu nav {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 5;
  min-width: 220px; padding: 10px; background: #fff; border: 3px solid var(--ink);
  border-radius: 20px; box-shadow: var(--hard);
}
.menu ul { display: grid; gap: 4px; }
@media (min-width: 760px) {
  .menu { display: none; }
  .nav-wide { display: block; }
  .header-cta { display: inline-flex; }
}

/* Hero */
.hero { position: relative; padding-bottom: clamp(56px, 8vw, 100px); }
.hero-grid { display: grid; gap: 36px; align-items: center; padding-top: 28px; }
.hero-art { margin: 0; transform: rotate(-2deg); }
.hero-art img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: 12px 12px 0 var(--red);
}
.hero-art figcaption { font-weight: 700; margin-top: 14px; font-size: .95rem; }
.h1-line { color: var(--red); display: block; }
.halftone { position: relative; isolation: isolate; }
.halftone::before {
  content: ""; position: absolute; inset: -8px -10px auto auto; width: 42%; height: 62%;
  background-image: radial-gradient(var(--ink) 1.4px, transparent 1.8px);
  background-size: 11px 11px; opacity: .16; z-index: -1; border-radius: 0 var(--radius) 0 0;
}
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }

/* Facts strip */
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fact {
  margin: 0; padding: 20px; border: 3px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--hard); background: var(--paper);
}
.fact dt { font: 600 .95rem/1.2 var(--font-display); text-transform: uppercase; letter-spacing: .04em; }
.fact dd { margin: 6px 0 0; font: 700 1.3rem/1.15 var(--font-display); }
.fact--red { background: var(--red); color: #fff; }
.fact--blue { background: var(--blue); color: #fff; }
.fact--teal { background: var(--teal); color: #fff; }
.fact--yellow { background: var(--yellow); color: var(--ink); }
@media (min-width: 900px) { .facts { grid-template-columns: repeat(4, 1fr); } }

/* On the day highlights: one big card, two small */
.grid-on { display: grid; gap: 20px; margin-top: 32px; }
.event-card {
  position: relative; padding: 26px; border: 4px solid var(--ink); border-radius: var(--radius);
  background: #fff; box-shadow: var(--hard); margin: 0;
}
.event-card time {
  display: inline-block; font: 700 1rem/1 var(--font-display); padding: 8px 12px;
  border-radius: 999px; background: var(--ink); color: #fff; margin-bottom: 14px;
}
.event-card p { margin: 0; color: var(--muted); }
.event-card--big { background: var(--yellow); }
.event-card--big p { color: var(--ink); }
.event-card--big h3 { font-size: clamp(2rem, 5vw, 3.4rem); }
.event-card--pink { background: var(--pink); }
.event-card--pink p { color: var(--ink); }
.event-card--teal { background: var(--teal); color: #fff; }
.event-card--teal time { background: #fff; color: var(--ink); }
.event-card--teal p { color: #fff; }
@media (min-width: 900px) {
  .grid-on { grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto; }
  .event-card--big { grid-row: span 2; }
}

/* Two panels: stalls and volunteers */
.split { display: grid; gap: 20px; }
.panel { padding: clamp(24px, 4vw, 40px); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--ink); }
.panel--stalls { background: var(--tint); }
.panel--help { background: var(--ink); color: #fff; }
.panel--help a { color: #fff; }
.panel--help a.btn { color: var(--ink); }
.stat { font: 700 clamp(3.5rem, 9vw, 6rem)/.9 var(--font-display); margin: 8px 0 16px; color: var(--red); }
.panel--help .stat { color: var(--yellow); }
.panel--help .kicker { color: var(--yellow); }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }

/* Find us strip */
.find { display: grid; gap: 20px; align-items: start; }
.find-address { font: 700 1.3rem/1.35 var(--font-display); margin: 0 0 12px; }
@media (min-width: 900px) { .find { grid-template-columns: 1fr auto; } }

/* Closing band */
.band {
  background: var(--red); color: #fff; text-align: left; position: relative; overflow: hidden;
  border-top: 4px solid var(--ink);
}
.band::after {
  content: ""; position: absolute; right: -40px; bottom: -40px; width: 260px; height: 260px;
  border-radius: 50%; background: var(--yellow); border: 4px solid var(--ink); z-index: 0;
}
@media (max-width: 719px) { .band::after { width: 120px; height: 120px; right: -50px; bottom: -50px; } }
.band .wrap { position: relative; z-index: 1; }
.band h2 { max-width: 14em; }
.band p { max-width: 36em; }
.band .btn { margin-right: 10px; }
.band .tel { color: #fff; font-weight: 700; }
.band .kicker { color: #fff; }

/* Footer */
.site-footer { background: var(--ink); color: #fff; padding: 56px 0 40px; }
.site-footer a { color: #fff; }
.site-footer .wordmark { color: #fff; }
.footer-grid { display: grid; gap: 28px; }
.footer-grid h2 { font-size: 1.2rem; color: var(--yellow); margin-bottom: 8px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-grid a { display: inline-block; min-height: 28px; padding: 4px 0; }
.fine { font-size: .9rem; opacity: .9; margin-top: 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }

/* Inner page heads */
.page-head { padding-block: 40px 48px; }
.page-head .lead { margin-bottom: 0; }

/* Pitch tiles (stallholders) */
.tiles { display: grid; gap: 18px; margin-top: 28px; }
.tile {
  margin: 0; padding: 24px; border: 4px solid var(--ink); border-radius: var(--radius);
  background: #fff; box-shadow: var(--hard);
}
.tile .price { font: 700 2.6rem/1 var(--font-display); color: var(--red); margin: 10px 0 6px; }
.tile--yellow { background: var(--yellow); }
.tile--yellow .price { color: var(--ink); }
.tile--teal { background: var(--teal); color: #fff; }
.tile--teal .price { color: #fff; }
.tile p { margin: 0; }
.tile { transition: transform .2s ease; }
.tile:hover { transform: rotate(-1deg) translateY(-3px); box-shadow: 9px 9px 0 var(--ink); }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(3, 1fr); } }

/* Numbered rules */
.rules { counter-reset: r; list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.rules li {
  counter-increment: r; position: relative; padding: 18px 18px 18px 72px;
  border: 3px solid var(--ink); border-radius: 22px; background: #fff;
}
.rules li::before {
  content: counter(r); position: absolute; left: 16px; top: 14px; width: 42px; height: 42px;
  border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center;
  font: 700 1.3rem/1 var(--font-display);
}
.rules li:nth-child(3n+2)::before { background: var(--pink); color: var(--ink); }
.rules li:nth-child(3n)::before { background: var(--teal); }

/* Tear-off tabs */
.tabs { display: grid; gap: 14px; margin-top: 36px; }
.tab {
  display: block; padding: 18px 22px 18px 22px; border: 3px dashed var(--ink); border-radius: 18px;
  text-decoration: none; background: var(--tint); transition: transform .15s ease;
}
.tab strong { font: 700 1.2rem/1.2 var(--font-display); display: block; }
.tab:hover { transform: rotate(-1deg) translateY(-2px); }
.tab span { color: var(--muted); }
@media (min-width: 900px) { .tabs { grid-template-columns: repeat(3, 1fr); } }

/* Forms (inside the slot template; the plugin reuses these classes) */
.slot-copy { padding: 24px; border: 3px solid var(--ink); border-radius: var(--radius); background: var(--tint); }
.form-card { padding: clamp(22px, 4vw, 40px); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard); margin-top: 24px; background: #fff; }
.form-grid { display: grid; gap: 18px; }
.field label, .stall-form legend { display: block; font-weight: 700; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; color: var(--ink);
  border: 3px solid var(--ink); border-radius: 14px; background: #fff;
}
.field textarea { min-height: 120px; resize: vertical; }
.check { display: flex; gap: 12px; align-items: center; font-weight: 700; }
.check input { width: 24px; height: 24px; accent-color: var(--red); }
@media (min-width: 760px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .wide { grid-column: 1 / -1; } }

/* Schedule */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 32px; }
.filters { display: none; } .js .filters { display: flex; }
.filters button {
  min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 3px solid var(--ink);
  background: #fff; color: var(--ink); font: 700 1rem/1 var(--font-display); cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.day-block { margin-top: 36px; }
.day-block h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
.run { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.run li {
  --stage: var(--ink);
  display: grid; grid-template-columns: 1fr; gap: 4px 16px; padding: 16px 18px;
  border: 3px solid var(--ink); border-left: 14px solid var(--stage); border-radius: 20px; background: #fff;
}
.run li[hidden] { display: none; }
.run li[data-stage="green"] { --stage: var(--teal); }
.run li[data-stage="tea"] { --stage: var(--red); }
.run li[data-stage="kids"] { --stage: var(--pink); }
.run time { font: 700 1.35rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.run strong { font-size: 1.15rem; }
.run small { color: var(--muted); font-weight: 700; }
.run .where { color: var(--muted); }
@media (min-width: 760px) { .run li { grid-template-columns: 130px 1fr auto; align-items: center; } }

/* Volunteer roles */
.roles { display: grid; gap: 16px; margin-top: 28px; }
.role {
  display: grid; gap: 8px; padding: 22px; border: 3px solid var(--ink); border-radius: var(--radius); background: #fff;
}
.role .need {
  justify-self: start; padding: 6px 12px; border-radius: 999px; background: var(--yellow); font-weight: 700;
  border: 2px solid var(--ink); font-size: .95rem;
}
.role p { margin: 0; }
.role--pink { background: #FDE7EF; }
@media (min-width: 900px) { .roles { grid-template-columns: 1fr 1fr; } }
.group-title { margin-top: 48px; }

/* Map page */
.plan { margin: 0; border: 4px solid var(--ink); border-radius: var(--radius); background: #fff; overflow-x: auto; box-shadow: var(--hard); }
.plan svg { width: 100%; height: auto; min-width: 680px; }
@media (min-width: 760px) { .plan { overflow: hidden; } .plan svg { min-width: 0; } }
.map-bg { fill: #FFFFFF; }
.map-grass { fill: #D7EDCB; stroke: var(--ink); stroke-width: 3; }
.map-stall { fill: #FFFFFF; stroke: var(--ink); stroke-width: 3; }
.map-stall--red { fill: var(--red); }
.map-stall--blue { fill: var(--blue); }
.map-stall--teal { fill: var(--teal); }
.map-tent { fill: var(--yellow); stroke: var(--ink); stroke-width: 3; }
.map-path { fill: none; stroke: var(--ink); stroke-width: 3; stroke-dasharray: 2 10; stroke-linecap: round; }
.map-gate { fill: var(--pink); stroke: var(--ink); stroke-width: 3; }
.map-park { fill: #E6E6E1; stroke: var(--ink); stroke-width: 3; }
.map-label { font: 700 19px var(--font-body); fill: var(--ink); }
.map-label--white { fill: #fff; }
.map-label--small { font-size: 15px; }
.legend { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
@media (min-width: 760px) { .legend { grid-template-columns: 1fr 1fr; } }
.legend li { padding: 14px 16px; border: 3px solid var(--ink); border-radius: 18px; background: #fff; }
.access { margin-top: 32px; }
.access-grid { display: grid; gap: 16px; margin-top: 20px; }
@media (min-width: 900px) { .access-grid { grid-template-columns: 1fr 1fr 1fr; } }

/* Art frames */
.photo-frame { margin: 0; }
.photo-frame img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 4px solid var(--ink);
  border-radius: var(--radius); box-shadow: 10px 10px 0 var(--blue);
}
.feature-split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .feature-split { grid-template-columns: 1fr 1fr; } }

/* 404 and privacy */
.plain { max-width: 42em; }
.center { text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
