/* Palette pulled from the real club marks: the shield crest (forest green +
   mustard gold) and the street-sign poster (navy + cream + clay orange). */
:root {
  --bg: #f8f3e6;
  --bg-alt: #efe6cd;
  --ink: #1b2a20;
  --muted: #6c6650;
  --green: #244a30;
  --green-dark: #142d1c;
  --green-tint: #e8efe4;
  --brass: #cf9f3c;
  --brass-tint: #f6ecd2;
  --clay: #c97c33;
  --border: #e2d7b4;
  --shadow: 0 12px 32px rgba(27, 42, 32, 0.1);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16140e;
    --bg-alt: #1e1b12;
    --ink: #f2ecd9;
    --muted: #b9ad8c;
    --green: #6fa17d;
    --green-dark: #4a7857;
    --green-tint: #1e2a20;
    --brass: #e0b653;
    --brass-tint: #2c2415;
    --clay: #d99257;
    --border: #362f1e;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.6rem;
}

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

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }

.brand-logo { width: 42px; height: auto; }

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: "Fraunces", serif; font-size: 1.15rem; font-weight: 600; }
.brand-text small { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.01em; }

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.social-links {
  display: flex;
  gap: 0.6rem;
}
.social-links a {
  color: var(--muted);
  display: flex;
}
.social-links a:hover { color: var(--green); }

.social-links-footer { margin-top: 0.3rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
}

.site-nav > ul > li { position: relative; }

.site-nav > ul > li > a {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 0;
  display: inline-block;
}
.site-nav > ul > li > a:hover { color: var(--green); text-decoration: none; }

.has-dropdown .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: -0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.4rem;
  min-width: 220px;
  flex-direction: column;
  gap: 0;
  box-shadow: var(--shadow);
  z-index: 10;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  display: flex;
}

.dropdown li a {
  display: block;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.87rem;
  color: var(--ink);
}
.dropdown li a:hover { background: var(--green-tint); text-decoration: none; }

/* ---------- Layout ---------- */

main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.page-header {
  padding: 2.75rem 0 1.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.25rem;
}
.page-header h1 { font-size: 2rem; }
.page-header p { color: var(--muted); margin: 0; max-width: 60ch; }

.prose { max-width: 68ch; }
.prose h2 { margin-top: 2rem; font-size: 1.3rem; }
.prose h3 { margin-top: 1.5rem; font-size: 1.05rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.35rem; }

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding: 4rem 1rem 3.5rem;
  margin: 0 -1.5rem 3rem;
  background:
    radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--brass) 14%, transparent), transparent 45%),
    radial-gradient(circle at 85% 10%, color-mix(in srgb, var(--green) 16%, transparent), transparent 45%),
    var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.1rem, 4.5vw, 3rem);
}
.hero-tagline { color: var(--muted); font-size: 1.1rem; margin: 0 0 0.3rem; }
.hero-hours { color: var(--muted); font-size: 0.9rem; margin: 0 0 2rem; }

.hero-actions { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }

/* Split hero: photo carousel alongside the headline/CTA copy. */
.hero-split {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  align-items: center;
  gap: 2.5rem;
  text-align: left;
  padding: 3rem 1.5rem;
}

.hero-copy { position: relative; }
.hero-copy .hero-actions { justify-content: flex-start; }

/* Recurring brand mark right beside the tagline — no wording, since the
   header logo and the H1 already say the club name; this is decoration,
   not a 3rd repeat of "Falmouth Skeet Club". Anchored to this small row
   (not the whole hero) so it sits right next to "...since 1934" instead
   of drifting to a far corner or behind the button row. */
.hero-tagline-row {
  position: relative;
  display: inline-block;
}
.hero-mark {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  margin-left: 0.25rem;
  width: 260px;
  height: 260px;
  object-fit: contain;
  object-position: left center;
  opacity: 0.08;
  pointer-events: none;
}
@media (prefers-color-scheme: dark) { .hero-mark { opacity: 0.14; } }

/* ---------- Homepage carousel ---------- */

.carousel {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-alt);
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.carousel-slide.is-active { opacity: 1; }

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 16, 10, 0.45);
  color: #fff;
  border: none;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 2;
}
.carousel-nav:hover { background: rgba(20, 16, 10, 0.65); }
.carousel-prev { left: 0.6rem; }
.carousel-next { right: 0.6rem; }

.carousel-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  z-index: 2;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 0;
}
.carousel-dot.is-active { background: #fff; }

@media (max-width: 720px) {
  .hero-split {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 2.5rem 1rem;
  }
  .hero-media { width: 100%; max-width: 360px; margin: 0 auto; }
  .hero-copy .hero-actions { justify-content: center; }
  .hero-mark { width: 200px; height: 200px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-1px); }

/* Primary buttons use the same brass/gold accent as the Payments page
   buttons, site-wide — one consistent accent color instead of mixing
   green + brass. (This becomes a real admin-selectable option later —
   see src/_data/theme.json.) */
.btn-primary {
  background: var(--brass);
  border-color: var(--brass);
  color: #211c12;
}
.btn-primary:hover { background: color-mix(in srgb, var(--brass) 80%, black); border-color: color-mix(in srgb, var(--brass) 80%, black); }

.btn-brass {
  background: var(--brass);
  border-color: var(--brass);
  color: #211c12;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn[disabled]:hover { transform: none; box-shadow: none; }

button.btn { font-family: inherit; }

/* ---------- Content blocks ---------- */

.content-block { margin-bottom: 3rem; }
.content-block h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.content-block > p { color: var(--muted); max-width: 65ch; }

.callouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.callout {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--bg-alt);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.callout:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.callout h3 { margin-top: 0; font-size: 1.05rem; }
.callout p { color: var(--muted); font-size: 0.92rem; margin-bottom: 0.9rem; }
.callout a { font-weight: 600; font-size: 0.88rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.1rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
  background: var(--bg);
}
.card h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.card p { color: var(--muted); font-size: 0.9rem; margin: 0; }

.notice {
  border: 1px solid var(--brass);
  background: var(--brass-tint);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  font-size: 0.92rem;
  margin: 1.5rem 0;
}
.notice strong { color: var(--ink); }

.file-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 0.75rem;
  background: var(--bg-alt);
  color: var(--ink);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
a.file-card:hover {
  text-decoration: none;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.file-card .file-icon {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}
.file-card .file-meta { flex: 1; }
.file-card .file-meta strong { display: block; font-size: 0.92rem; }
.file-card .file-meta span { color: var(--muted); font-size: 0.8rem; }

.contact-line { color: var(--muted); font-size: 0.9rem; }

/* ---------- Forms ---------- */

form.simple-form {
  max-width: 42rem;
  display: grid;
  gap: 1rem;
}
.simple-form label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}
.simple-form input,
.simple-form select,
.simple-form textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.92rem;
}
.simple-form textarea { min-height: 7rem; resize: vertical; }
.simple-form .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.simple-form fieldset {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}
.simple-form legend { font-weight: 600; font-size: 0.88rem; padding: 0 0.4rem; }
.simple-form .radio-row { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; margin-bottom: 0.4rem; }
.simple-form .radio-row input { width: auto; }
.simple-form button { justify-self: start; }

/* ---------- Password gate ---------- */

.gate {
  max-width: 26rem;
  margin: 3rem auto;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  background: var(--bg-alt);
}
.gate p { color: var(--muted); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 0.87rem;
}

.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}

.footer-col strong { color: var(--ink); display: block; margin-bottom: 0.5rem; }
.footer-col p { margin: 0.25rem 0; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--green); }

.footer-copy {
  text-align: center;
  padding: 1rem 1.5rem 1.5rem;
  font-size: 0.8rem;
  margin: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 780px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 0.5rem 1.5rem 1rem;
  }
  .site-nav.is-open { display: block; }

  .site-nav > ul {
    flex-direction: column;
    gap: 0;
  }
  .site-nav > ul > li { border-top: 1px solid var(--border); }
  .site-nav > ul > li:first-child { border-top: none; }
  .site-nav > ul > li > a { display: block; padding: 0.75rem 0; }

  .has-dropdown .dropdown {
    display: flex;
    position: static;
    box-shadow: none;
    border: none;
    padding: 0 0 0.5rem 0.75rem;
  }
  .has-dropdown:hover .dropdown,
  .has-dropdown:focus-within .dropdown { display: flex; }

  .simple-form .field-row { grid-template-columns: 1fr; }
}

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.gallery-thumb {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.gallery-thumb:hover img { transform: scale(1.05); }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 5, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 2rem;
}
.lightbox:not([hidden]) { display: flex; }

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.6rem;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 1.6rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

@media (max-width: 600px) {
  .lightbox-nav { width: 2.4rem; height: 2.4rem; font-size: 1.2rem; }
  .lightbox-close { font-size: 1.8rem; top: 0.75rem; right: 1rem; }
}

/* ---------- Admin: submissions review ---------- */

.admin-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.admin-controls label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 0.3rem; }
.admin-controls select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
}
#submissions-list summary::-webkit-details-marker { display: none; }
#submissions-list .card p { margin: 0.3rem 0; word-break: break-word; }
