/* Eastry Snooker Club
   Follows the original WordPress (Astra + Elementor) design: dark page, light
   menu over full-width photos with a 50% dark overlay, centred titles, blue
   "Welcome" button, Work Sans text and Open Sans headings. Tidied for modern
   browsers: self-hosted fonts, readable line length, a proper mobile menu. */

@font-face { font-family: "Work Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/work-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Work Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/work-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Work Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/work-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/open-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #101218;          /* original page colour */
  --light: #f3f5f5;       /* original menu and title colour */
  --text: #dfe2e6;
  --muted: #9aa1ab;
  --blue: #4175fc;        /* original button colour */
  --blue-hover: #084af3;
  --link: #8fb0ff;
  --line: rgba(255, 255, 255, .12);
  --body: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --head: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.75 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; color: var(--light); line-height: 1.3; }

.skip { position: absolute; left: -999px; top: 0; background: var(--blue); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* Header: transparent, laid over the photo, menu on the right */
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem clamp(1rem, 3vw, 2.5rem);
}
.brand {
  color: var(--light); text-decoration: none; font-family: var(--head); font-weight: 700;
  font-size: 1.05rem; letter-spacing: .02em; white-space: nowrap;
}
.brand:hover { color: #fff; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .1rem 1.4rem; }
.site-nav a {
  display: block; padding: .35rem 0; color: var(--light); text-decoration: none;
  font-weight: 500; font-size: .95rem; border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--blue); }

.nav-toggle { display: none; }

@media (max-width: 68rem) {
  .nav-toggle {
    display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
    background: none; border: 1px solid rgba(243, 245, 245, .5); border-radius: 4px; color: var(--light); cursor: pointer;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    display: block; width: 20px; height: 2px; background: currentColor; content: ""; position: relative;
  }
  .nav-toggle span::before { position: absolute; top: -6px; }
  .nav-toggle span::after { position: absolute; top: 6px; }
  .site-header { flex-wrap: wrap; }
  .js .site-nav { display: none; }
  .site-nav { width: 100%; }
  .js .site-nav.open { display: block; background: rgba(16, 18, 24, .97); margin: .5rem calc(-1 * clamp(1rem, 3vw, 2.5rem)) 0; padding: .5rem clamp(1rem, 3vw, 2.5rem) 1rem; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); color: #fff; font-weight: 600; }
}

/* Photo sections with the original 50% dark overlay */
.hero, .banner {
  position: relative; isolation: isolate; display: grid; place-items: center; text-align: center;
  background: var(--bg) center / cover no-repeat;
}
.hero::before, .banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(16, 18, 24, .5); }
.banner-inner { width: 100%; max-width: 950px; padding: 0 1.25rem; }

.hero { min-height: 100vh; min-height: 100svh; background-image: url("../img/hero-800.jpg"); }
.hero h1 { font-size: clamp(2.2rem, 6.5vw, 4.25rem); text-transform: uppercase; margin: 0 0 2rem; letter-spacing: .01em; }

.banner { padding: 9rem 0 5rem; }
.banner h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin: 0; }
.banner p { margin: .5rem 0 0; color: var(--light); }
.banner-about    { background-image: url("../img/banners/about-900.jpg"); background-position: center 48%; }
.banner-tables   { background-image: url("../img/banners/tables-900.jpg"); }
.banner-clubroom { background-image: url("../img/banners/clubroom-900.jpg"); }
.banner-contact  { background-image: url("../img/banners/contact-900.jpg"); }

@media (min-width: 56rem) {
  .hero { background-image: url("../img/hero.jpg"); }
  .banner { padding: 11rem 0 6.5rem; }
  .banner-about    { background-image: url("../img/banners/about.jpg"); }
  .banner-tables   { background-image: url("../img/banners/tables.jpg"); }
  .banner-clubroom { background-image: url("../img/banners/clubroom.jpg"); }
  .banner-contact  { background-image: url("../img/banners/contact.jpg"); }
}

/* Original pill button */
.button {
  display: inline-block; padding: 16px 34px; border-radius: 100px;
  background: var(--blue); color: #fff; text-decoration: none; font-weight: 500;
}
.button:hover { background: var(--blue-hover); color: #fff; }

/* Page content: original 950px column, text kept to a readable width */
.content { width: 100%; max-width: 950px; margin: 0 auto; padding: 3.5rem 1.25rem 6rem; }
.content > * { max-width: 46rem; }
.content h2 { font-size: 1.4rem; margin: 2.5rem 0 .75rem; }
.content p { margin: 0 0 1.1rem; }
.content ol, .content ul { padding-left: 1.35rem; margin: 0 0 1.25rem; }
.content li { margin-bottom: .65rem; padding-left: .2rem; }
.content ol > li::marker { color: var(--link); font-weight: 600; }
.doc-meta { color: var(--muted); font-size: .95rem; margin-bottom: 1.5rem; }
.sub { color: var(--muted); }
.intro { text-align: center; padding-top: 4rem; }
.intro > * { margin-left: auto; margin-right: auto; }
.lead { font-size: 1.25rem; color: var(--light); }

/* Contact details */
.terms { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; margin: 0 0 2rem; }
.terms dt { color: var(--muted); }
.terms dd { margin: 0; color: var(--light); }
@media (max-width: 30rem) { .terms { grid-template-columns: 1fr; gap: 0; } .terms dd { margin-bottom: .9rem; } }
address { font-style: normal; color: var(--light); margin-bottom: .75rem; }

/* Gallery */
.gallery { list-style: none; margin: 0; padding: 0; max-width: none !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: .75rem; }
.gallery li { margin: 0; padding: 0; }
.gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; background: #1b1e26; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.gallery a:hover img { opacity: .85; }

.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; background: transparent; color: #fff; }
.lightbox::backdrop { background: rgba(10, 11, 15, .95); }
.lightbox figure { margin: 0; height: 100%; display: grid; place-items: center; padding: 3.5rem 3.5rem 2.75rem; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 7rem); object-fit: contain; }
.lightbox figcaption { position: absolute; bottom: .8rem; left: 0; right: 0; text-align: center; color: var(--muted); font-size: .9rem; padding: 0 1rem; }
.lb-btn { position: absolute; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.lb-btn:hover { background: var(--blue); }
.lb-close { top: .75rem; right: .75rem; }
.lb-prev { left: .75rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .75rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 40rem) { .lightbox figure { padding: 3.5rem .5rem 3rem; } .lb-prev, .lb-next { top: auto; bottom: .5rem; transform: none; } }

/* Footer: as the original, right-aligned */
.site-footer { border-top: 1px solid var(--line); padding: 1.25rem clamp(1rem, 3vw, 2.5rem); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; font-size: .92rem; color: var(--muted); }
.site-footer p { margin: 0; }
.site-footer strong { color: var(--light); font-weight: 600; }

@media (prefers-reduced-motion: reduce) { .gallery img { transition: none; } }
@media print {
  .site-header, .site-footer, .hero, .skip { display: none; }
  .banner { padding: 0; background: none; color: #000; }
  body { background: #fff; color: #000; }
  h1, h2 { color: #000; }
}
