/* ==========================================================================
   Notts 4x4 Response — public site styles
   Hand-written, mobile-first. No build step. Easy to retheme via the
   custom properties in :root.
   ========================================================================== */

:root {
  /* Palette: warm orange primary, white surface, near-black text.
     Re-themable via custom properties — change here, the rest follows. */
  --c-bg: #ffffff;
  --c-bg-alt: #fafaf9;          /* very subtle warm off-white for alternating bands */
  --c-surface: #ffffff;
  --c-text: #18181b;            /* near-black */
  --c-text-muted: #71717a;
  --c-border: #e4e4e7;
  --c-primary: #ea580c;         /* orange brand */
  --c-primary-dark: #9a3412;    /* burnt orange — hover/dense panels */
  --c-primary-soft: #fb923c;    /* lighter orange — accents */
  --c-accent: #ea580c;          /* same as primary; CTAs are orange */
  --c-accent-dark: #9a3412;
  --c-accent-soft: #fed7aa;
  /* Charcoal-navy secondary — balances the orange. Used for "weight":
     footer, dense bands, headings, contrast text on white. */
  --c-secondary: #1e293b;       /* slate-800 */
  --c-secondary-dark: #0f172a;  /* slate-900, near-black navy */
  --c-secondary-soft: #475569;  /* slate-600 */
  --c-secondary-tint: #f1f5f9;  /* slate-100, faint navy-tinted bg */
  --c-warning-bg: #fef3c7;
  --c-warning-text: #6b3f00;
  --c-error: #b91c1c;
  --c-link: var(--c-primary-dark);

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-1: 0 1px 2px rgba(15, 23, 19, 0.04), 0 1px 3px rgba(15, 23, 19, 0.06);
  --shadow-2: 0 4px 8px rgba(15, 23, 19, 0.06), 0 8px 24px rgba(15, 23, 19, 0.08);

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --container-max: 1140px;
  --container-narrow: 760px;

  --header-h: 72px;
}

/* ---------- base reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--c-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--c-primary-dark); text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
}
h1, h2, h3, h4 { font-family: var(--font-sans); line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.8rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 1.25rem; }
.container.narrow { max-width: var(--container-narrow); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -100px; left: 1rem; background: var(--c-primary);
  color: #fff; padding: 0.6rem 1rem; border-radius: var(--radius-sm); z-index: 100;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.muted { color: var(--c-text-muted); }
.small { font-size: 0.9rem; }

/* ---------- emergency banner ---------- */
.emergency-banner {
  background: var(--c-warning-bg);
  color: var(--c-warning-text);
  border-bottom: 1px solid #f1d27a;
  font-size: 0.92rem;
  padding: 0.55rem 0;
}
.emergency-banner .container { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: baseline; }
.emergency-banner strong { font-weight: 700; }
.emergency-banner a { color: var(--c-warning-text); text-decoration: underline; }

/* ---------- site announcement ---------- */
.site-announcement {
  background: var(--c-primary);
  color: #fff;
  padding: 0.55rem 0;
  font-size: 0.95rem;
  text-align: center;
}

/* ---------- header / nav ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-1);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h); gap: 1rem;
  padding-top: 0.5rem; padding-bottom: 0.5rem;
}
.brand {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none; color: var(--c-text);
}
.brand:hover { color: var(--c-primary); }
.brand-mark { display: inline-flex; flex-shrink: 0; }
.brand-mark img {
  width: 36px; height: 36px; display: block; object-fit: contain;
  border-radius: 50%; background: transparent;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-line1 { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand-line2 { display: none; color: var(--c-text-muted); font-size: 0.78rem; }
@media (min-width: 900px) {
  .brand-line2 { display: block; }
}

.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 4px; padding: 8px 10px;
  background: transparent; border: 1px solid var(--c-border); border-radius: var(--radius-sm); cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--c-text); }
@media (min-width: 720px) {
  .nav-toggle { display: none; }
}

.primary-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--c-surface); border-bottom: 1px solid var(--c-border);
  display: none;
}
.primary-nav.is-open { display: block; }
.primary-nav ul {
  list-style: none; padding: 0.5rem 1.25rem 1rem; margin: 0;
  display: flex; flex-direction: column; gap: 0.25rem;
}
.primary-nav a {
  display: block; padding: 0.6rem 0.5rem;
  font-weight: 600; text-decoration: none; color: var(--c-text);
  border-radius: var(--radius-sm);
}
.primary-nav a[aria-current="page"] { color: var(--c-primary); background: var(--c-bg-alt); }
.primary-nav a:hover { background: var(--c-bg-alt); }

@media (min-width: 720px) {
  .primary-nav { position: static; display: block; border: 0; background: transparent; }
  .primary-nav ul { flex-direction: row; gap: 0.5rem; padding: 0; }
  .primary-nav a { padding: 0.4rem 0.85rem; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 0.7rem 1.25rem;
  font-family: inherit; font-size: 1rem; font-weight: 600;
  border-radius: var(--radius); border: 2px solid transparent;
  text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: transform 0.06s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-accent { background: var(--c-accent); color: #fff; }
.btn-accent:hover { background: var(--c-accent-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn-ghost:hover { background: var(--c-primary); color: #fff; }

/* ---------- hero (home) ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--c-primary-dark);
  color: #fff;
  min-height: clamp(360px, 60vh, 560px);
  display: grid; place-items: end stretch;
}
.hero-media {
  position: absolute; inset: 0; z-index: -1;
}
.hero-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.hero-placeholder {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(234, 88, 12, 0.55), transparent 55%),
    linear-gradient(135deg, var(--c-secondary-dark) 0%, var(--c-secondary) 55%, var(--c-secondary-soft) 100%);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.55);
}
.hero-placeholder::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 12px, transparent 12px 24px);
  pointer-events: none;
}
.hero-placeholder-label { text-align: center; font-size: 0.95rem; }
.hero-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.0) 75%);
  width: 100%; padding: 3rem 0 2rem;
}
.hero-eyebrow {
  margin: 0 0 0.4rem; font-size: 0.85rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--c-accent-soft); font-weight: 600;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800;
  margin: 0 0 0.6rem; max-width: 22ch; letter-spacing: -0.02em;
}
.hero-strapline {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 50ch; opacity: 0.92;
  margin: 0 0 1.4rem;
}
.hero-cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 0; }
.hero-cta-row .btn-ghost { color: #fff; border-color: #fff; }
.hero-cta-row .btn-ghost:hover { background: #fff; color: var(--c-primary-dark); }

/* ---------- generic page hero ---------- */
.page-hero {
  background: linear-gradient(180deg, var(--c-secondary) 0%, var(--c-secondary-dark) 100%);
  color: #fff; padding: 3rem 0 2.5rem;
  position: relative;
}
.page-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, var(--c-primary) 0%, var(--c-primary-soft) 100%);
}
.page-hero .hero-eyebrow { color: var(--c-accent-soft); }
.page-title {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 0 0 0.8rem; max-width: 28ch;
  letter-spacing: -0.02em;
}
.page-intro { font-size: 1.05rem; max-width: 60ch; margin: 0; opacity: 0.95; }
.page-intro a { color: #fff; }
.page-hero--narrow { padding: 2.5rem 0 1.5rem; }

/* ---------- features (two-up) ---------- */
.features { padding: 3rem 0; background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.features-grid {
  display: grid; gap: 2rem; grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .features-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
.feature { display: flex; flex-direction: column; gap: 1rem; }
.feature-media { aspect-ratio: 16/10; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.feature-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  text-align: center; color: rgba(255,255,255,0.85); font-size: 0.95rem; padding: 1rem;
}
.image-placeholder--river {
  background:
    linear-gradient(135deg, #18181b 0%, #3f3f46 60%, #52525b 100%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0 10px, transparent 10px 20px);
}
.image-placeholder--road {
  background:
    linear-gradient(135deg, #9a3412 0%, #c2410c 60%, #ea580c 100%);
}
.feature-body p { margin: 0 0 0.7em; }
.feature-body p:first-child { font-size: 1.15rem; font-weight: 700; color: var(--c-secondary); margin-bottom: 0.4rem; }
.feature-body strong { color: var(--c-secondary); }

/* ---------- about/cards grid ---------- */
.section-heading {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: 0 0 1.5rem;
  display: flex; align-items: baseline; gap: 0.75rem;
}
.section-heading::after {
  content: ""; flex: 1; height: 1px; background: var(--c-border);
}
.about-grid { padding: 3rem 0; background: var(--c-bg); }
.about-detail { padding: 3rem 0 1.5rem; background: var(--c-bg); }
.cards {
  display: grid; gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .cards { grid-template-columns: 1fr 1fr 1fr; } }

.card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); padding: 1.4rem 1.4rem 1.2rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  position: relative; overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--c-primary);
  transition: width 0.18s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--c-primary-soft);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(234, 88, 12, 0.08);
}
.card:hover::before { width: 6px; }
.card:hover .card-heading { color: var(--c-primary-dark); }
.card-num {
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.12em;
  color: var(--c-accent-dark);
}
.card-heading { font-size: 1.1rem; margin: 0; color: var(--c-secondary); }
.card-body p { margin: 0 0 0.7em; font-size: 0.97rem; }
.card-body p:last-child { margin-bottom: 0; }

/* ---------- prose section ---------- */
.prose-section { padding: 2rem 0 3rem; background: var(--c-surface); border-top: 1px solid var(--c-border); }
.prose h2 { color: var(--c-secondary); margin-top: 1.5rem; }
.prose p { font-size: 1.02rem; line-height: 1.65; }
.prose a { color: var(--c-primary-dark); }

/* ---------- events ---------- */
.events-section { padding: 2.5rem 0; background: var(--c-secondary-tint); }
.events-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.event {
  display: grid; grid-template-columns: 90px 1fr; gap: 1rem;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 1rem 1.2rem;
}
.event-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--c-secondary); color: #fff; border-radius: var(--radius-sm);
  padding: 0.6rem 0.4rem;
  border-left: 3px solid var(--c-primary);
}
.event-date-day { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.event-date-month { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.15rem; color: var(--c-accent-soft); }
.event-date-time { font-size: 0.75rem; margin-top: 0.4rem; opacity: 0.85; }
.event-title { margin: 0 0 0.2rem; font-size: 1.1rem; color: var(--c-secondary); }
.event-location { margin: 0 0 0.5rem; color: var(--c-text-muted); font-size: 0.9rem; }
.event-desc p { margin: 0 0 0.5em; font-size: 0.95rem; }

/* ---------- closing CTA ---------- */
.closing-cta {
  background: linear-gradient(135deg, var(--c-secondary-dark) 0%, var(--c-secondary) 100%);
  color: #fff; padding: 3rem 0;
  text-align: center;
  position: relative;
}
.closing-cta::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--c-primary) 0%, var(--c-primary-soft) 100%);
}
.closing-cta h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 1rem; color: #fff; }
.closing-cta-body { max-width: 60ch; margin: 0 auto 1.5rem; opacity: 0.95; }
.closing-cta-body a { color: var(--c-accent-soft); }
.closing-cta-actions { margin: 0; }

/* ---------- gallery (public) ---------- */
.gallery-section { padding: 2.5rem 0 4rem; background: var(--c-bg); }
.gallery-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.gallery-tile {
  margin: 0; background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-1);
}
.gallery-tile-btn {
  border: 0; padding: 0; background: transparent; cursor: zoom-in;
  display: block; width: 100%; aspect-ratio: 4/3; overflow: hidden;
}
.gallery-tile-btn img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.3s ease;
}
.gallery-tile-btn:hover img { transform: scale(1.04); }
.gallery-tile figcaption {
  padding: 0.7rem 0.85rem; font-size: 0.92rem; color: var(--c-text);
  border-top: 1px solid var(--c-border);
}
.gallery-tile figcaption strong { display: block; margin-bottom: 0.2rem; color: var(--c-primary-dark); }
.gallery-caption-body p { margin: 0 0 0.4em; }
.gallery-caption-body p:last-child { margin-bottom: 0; }

.gallery-lightbox {
  border: 0; padding: 0; max-width: min(92vw, 1280px); max-height: 92vh;
  background: transparent; color: #fff;
}
.gallery-lightbox::backdrop { background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(2px); }
.gallery-lightbox-figure {
  margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
}
.gallery-lightbox-figure img {
  max-width: 100%; max-height: 80vh; height: auto; display: block;
  border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  background: #111;
}
.gallery-lightbox-figure figcaption {
  background: rgba(0, 0, 0, 0.55); padding: 0.6rem 1rem; border-radius: var(--radius);
  max-width: 80ch; text-align: center;
}
.gallery-lightbox-figure figcaption strong { color: #fff; }
.gallery-lightbox-figure figcaption a { color: var(--c-accent-soft); }
.gallery-lightbox-close, .gallery-lightbox-nav {
  position: absolute;
  background: rgba(0, 0, 0, 0.55); color: #fff;
  border: 0; width: 44px; height: 44px;
  font-size: 1.6rem; line-height: 44px; text-align: center;
  border-radius: 50%; cursor: pointer;
  transition: background 0.15s;
}
.gallery-lightbox-close:hover, .gallery-lightbox-nav:hover { background: var(--c-accent); }
.gallery-lightbox-close { top: 12px; right: 12px; }
.gallery-lightbox-prev { top: 50%; left: 12px; transform: translateY(-50%); }
.gallery-lightbox-next { top: 50%; right: 12px; transform: translateY(-50%); }

@media (max-width: 540px) {
  .gallery-lightbox-prev { left: 6px; }
  .gallery-lightbox-next { right: 6px; }
  .gallery-lightbox { max-width: 100vw; max-height: 100vh; margin: 0; }
}

/* ---------- contact form ---------- */
.contact-section { padding: 2.5rem 0 4rem; background: var(--c-bg); }
.contact-form { background: var(--c-surface); padding: 2rem; border-radius: var(--radius-lg); border: 1px solid var(--c-border); box-shadow: var(--shadow-1); }
.form-intro { color: var(--c-text-muted); margin-top: 0; }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.required { color: var(--c-error); }
.optional { color: var(--c-text-muted); font-weight: 400; font-size: 0.9rem; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="url"], .field input[type="password"], .field input[type="datetime-local"], .field select, .field textarea {
  width: 100%; padding: 0.65rem 0.75rem; font-family: inherit; font-size: 1rem;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-sm);
}
.field textarea { resize: vertical; min-height: 7em; }
.field-help { color: var(--c-text-muted); font-size: 0.85rem; margin: 0.3rem 0 0; }
.field-error { color: var(--c-error); font-size: 0.9rem; margin: 0.3rem 0 0; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--c-error); background: #fef6f6; }
.form-success {
  background: #ecfdf5; border: 1px solid #86efac; padding: 1.5rem 1.75rem;
  border-radius: var(--radius); color: #064e3b;
}
.form-success h2 { color: #064e3b; margin: 0 0 0.5rem; }
.form-privacy { margin-top: 1rem; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--c-secondary-dark); color: #cbd5e1;
  padding: 3rem 0 1.5rem; margin-top: 0;
  position: relative;
  border-top: 4px solid var(--c-primary);
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--c-accent-soft); }
.footer-grid {
  display: grid; gap: 2rem; grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 3rem; }
}
.footer-heading {
  font-size: 1rem; color: var(--c-primary-soft); text-transform: uppercase;
  letter-spacing: 0.12em; margin: 0 0 1rem;
}
.site-footer .footer-emph { color: var(--c-primary-soft); }
/* Links inside footer-emph keep the default footer link colour (white) so
   only the surrounding text reads as orange. */
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.footer-bottom { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.55); }

/* ---------- prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .btn:hover { transform: none; }
}

/* ---------- print ---------- */
@media print {
  .site-header, .site-footer, .nav-toggle, .emergency-banner, .site-announcement, .closing-cta { display: none !important; }
  body { background: #fff; color: #000; }
}
