/* Whatever Bar — styles
   Palette pulled from the bar itself: navy wainscot, red trim, cream walls, neon blue. */
:root {
  --navy: #1c2b4f;
  --navy-deep: #111a33;
  --red: #c41e2e;
  --red-dark: #9c1724;
  --cream: #f4ecd8;
  --cream-dim: #d9cfb8;
  --charcoal: #24262b;
  --neon: #6fd3ff;
  --felt: #2f9e6e;

  --display: "Big Shoulders Display", "Oswald", "Arial Narrow", Impact, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --header-h: 4rem;

  /* painted-wood grain texture, very faint */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.02 0.9' numOctaves='3' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* pennant bunting, like the strings hung over the bar */
  --bunting: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='26'%3E%3Cpath d='M0 2 Q48 6 96 2' stroke='%23f4ecd8' stroke-width='1.5' fill='none'/%3E%3Cpath d='M4 3 L16 3 L10 22Z' fill='%23c41e2e'/%3E%3Cpath d='M28 4 L40 4 L34 23Z' fill='%23f4ecd8'/%3E%3Cpath d='M52 4 L64 4 L58 23Z' fill='%236fd3ff'/%3E%3Cpath d='M76 3 L88 3 L82 22Z' fill='%23f4ecd8'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--navy-deep);
  color: var(--cream);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 900; line-height: 0.95; margin: 0 0 1rem; letter-spacing: 0.01em; }
h2 { font-size: clamp(2.5rem, 7vw, 4.5rem); }
h3 { font-size: clamp(1.75rem, 4vw, 2.25rem); }
p { margin: 0 0 1rem; max-width: 38em; }
ul, ol { list-style: none; margin: 0; padding: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

:focus-visible { outline: 3px solid var(--neon); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--cream); color: var(--navy-deep); padding: .75rem 1rem; font-weight: 700;
}
.skip:focus { top: calc(1rem + env(safe-area-inset-top, 0px)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: .75rem 1.5rem;
  font-family: var(--display); font-weight: 900; font-size: 1.375rem; letter-spacing: .03em;
  text-decoration: none; border: 3px solid transparent; border-radius: 4px;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-red { background: var(--red); color: var(--cream); border-color: var(--red); }
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-ghost { color: var(--cream); border-color: var(--cream); }
.btn-ghost:hover { background: var(--cream); color: var(--navy-deep); }
.btn-small { min-height: 2.75rem; font-size: 1.125rem; padding: .5rem 1.1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--navy-deep);
  border-bottom: 3px solid var(--red);
}
.header-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
  min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.wordmark {
  font-family: var(--display); font-weight: 900; font-size: 1.9rem; line-height: 1;
  text-decoration: none; color: var(--cream); letter-spacing: .01em;
}
.wordmark span { color: var(--red); margin-left: .2em; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .6rem;
  min-height: 2.75rem; padding: 0 .9rem; background: none; color: var(--cream);
  border: 2px solid var(--cream-dim); border-radius: 4px;
  font: 700 1rem var(--body); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 20px; height: 2px; background: currentColor; position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.site-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--navy-deep); border-bottom: 3px solid var(--red);
  padding: .5rem var(--gutter) 1.5rem;
  display: none;
}
.site-nav.is-open { display: block; }
.site-nav ul { margin-bottom: 1rem; }
.site-nav li a {
  display: block; padding: .8rem 0; font-family: var(--display); font-weight: 700; font-size: 1.75rem;
  text-decoration: none; border-bottom: 1px solid rgba(244,236,216,.15);
}
.site-nav li a:hover { color: var(--neon); }
.site-nav .btn { width: 100%; }

@media (min-width: 52rem) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static; display: flex !important; align-items: center; gap: 1.75rem;
    background: none; border: 0; padding: 0;
  }
  .site-nav ul { display: flex; gap: 1.5rem; margin: 0; }
  .site-nav li a { font-size: 1.3rem; padding: .5rem 0; border: 0; }
  .site-nav .btn { width: auto; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--navy); overflow: hidden; }
.hero-photo { position: absolute; inset: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(17,26,51,.55) 0%, rgba(17,26,51,.7) 45%, rgba(17,26,51,.95) 100%);
}
.hero-copy {
  position: relative; z-index: 1;
  padding: clamp(6rem, 22vh, 12rem) var(--gutter) 3rem;
  min-height: min(88vh, 46rem);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hero-title {
  font-size: clamp(3.5rem, 17.5vw, 11rem); line-height: .82; margin: 0 0 1rem;
  text-transform: uppercase; letter-spacing: -.005em;
  text-shadow: 0 3px 0 var(--red-dark), 0 0 24px rgba(0,0,0,.5);
}
.hero-title span { display: block; }
.hero-title span + span { color: var(--red); text-shadow: 0 3px 0 rgba(0,0,0,.4), 0 0 18px rgba(196,30,46,.35); }
.hero-tag { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 5vw, 2.25rem); line-height: 1.1; margin: 0 0 .4rem; }
.hero-hours { font-weight: 700; font-size: 1.15rem; margin: 0 0 .25rem; color: var(--cream-dim); }
.status { min-height: 1.6em; margin: 0 0 1.5rem; font-weight: 700; }
.status .dot {
  display: inline-block; width: .65em; height: .65em; border-radius: 50%; margin-right: .5em;
  background: var(--neon); box-shadow: 0 0 10px var(--neon);
}
.status.is-closed .dot { background: var(--cream-dim); box-shadow: none; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-actions .btn { flex: 1 1 12rem; }

@media (min-width: 52rem) {
  .hero { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); min-height: min(90vh, 52rem);
          background: var(--navy) var(--grain); }
  .hero-photo { position: relative; grid-column: 2; grid-row: 1; }
  .hero-photo::after { background: linear-gradient(90deg, var(--navy) 0%, rgba(28,43,79,0) 30%); }
  .hero-copy { grid-column: 1; grid-row: 1; min-height: 0; justify-content: center;
               padding: 4rem var(--gutter) 4rem max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); }
  .hero-title { font-size: clamp(6rem, 9.5vw, 10.5rem); }
  .hero-actions .btn { flex: 0 0 auto; }
}

/* ---------- Bunting ---------- */
.bunting { height: 26px; background: var(--bunting) repeat-x 0 0 / 96px 26px; }
.hero + .bunting { background-color: var(--red); height: 32px; background-position: 0 3px; }

/* ---------- Event strip ---------- */
.strip { background: var(--red); color: var(--cream); }
.strip-list {
  max-width: var(--wrap); margin: 0 auto; padding: 1.25rem var(--gutter) 1.5rem;
  display: grid; gap: .9rem;
}
.strip-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
                 border-bottom: 2px dashed rgba(244,236,216,.4); padding-bottom: .6rem; }
.strip-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.strip-list strong { font-family: var(--display); font-weight: 900; font-size: 1.6rem; line-height: 1.1; }
.strip-list span { font-weight: 700; white-space: nowrap; }
@media (min-width: 52rem) {
  .strip-list { grid-template-columns: repeat(3, 1fr); gap: 0; padding: 1.5rem var(--gutter); }
  .strip-list li { flex-direction: column; justify-content: center; align-items: flex-start; gap: .2rem;
                   border: 0; border-left: 2px dashed rgba(244,236,216,.45); padding: 0 1.5rem; }
  .strip-list li:first-child { border-left: 0; padding-left: 0; }
}

/* ---------- Real Stoughton ---------- */
.real { background: var(--cream); color: var(--charcoal); padding: clamp(3.5rem, 9vw, 6.5rem) 0; }
.real h2 { color: var(--navy); max-width: 12ch; }
.real-grid { display: grid; gap: 2.5rem; align-items: center; }
.real-photo { margin: 0; border: 10px solid #fff; box-shadow: 0 0 0 3px var(--navy); transform: rotate(1.5deg); max-width: 26rem; justify-self: center; }
.real-photo img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 40%; width: 100%; }
@media (min-width: 52rem) { .real-grid { grid-template-columns: 1.2fr 1fr; gap: 4rem; } }

/* ---------- Pool / atmosphere ---------- */
.pool { position: relative; background: var(--charcoal); display: grid; }
.pool-photo img { width: 100%; height: 100%; max-height: 70vh; object-fit: cover; object-position: 50% 45%; }
.pool-copy { padding: 2.5rem var(--gutter) 3rem; background: var(--charcoal) var(--grain); }
.pool-copy h2 { color: var(--cream); }
.pool-copy p { color: var(--cream-dim); }
@media (min-width: 52rem) {
  .pool { grid-template-columns: 1fr 1fr; min-height: 34rem; }
  .pool-photo img { max-height: none; height: 100%; }
  .pool-copy { display: flex; flex-direction: column; justify-content: center; padding: 4rem; border-left: 6px solid var(--red); }
}

/* ---------- Events board ---------- */
.events { background: var(--navy) var(--grain); padding: clamp(3.5rem, 9vw, 6.5rem) 0; }
.lede { color: var(--cream-dim); margin-bottom: 2.5rem; }
.board { border: 4px solid var(--cream); border-radius: 6px; background: var(--navy-deep); }
.board-row { display: grid; gap: 1rem; padding: 1.75rem 1.5rem; }
.board-row + .board-row { border-top: 2px dashed rgba(244,236,216,.35); }
.board-day { display: block; font-weight: 700; color: var(--neon); font-size: 1.05rem; }
.board-time { display: block; white-space: nowrap; font-family: var(--display); font-weight: 900; font-size: clamp(3.5rem, 13vw, 5.5rem); line-height: .9; color: var(--cream); }
.board-what h3 { margin-bottom: .4rem; color: var(--cream); }
.board-what p { color: var(--cream-dim); margin-bottom: .75rem; }
.cal-link {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  font-weight: 700; color: var(--cream); text-decoration-color: var(--red); text-decoration-thickness: 3px; text-underline-offset: 5px;
}
.cal-link:hover { color: var(--neon); }
@media (min-width: 52rem) {
  .board-row { grid-template-columns: 22rem 1fr; align-items: center; gap: 2.5rem; padding: 2rem 2.5rem; }
}

/* ---------- Meet ---------- */
.meet { background: var(--red); padding: clamp(3.5rem, 9vw, 6rem) 0; }
.meet-inner > * { max-width: 46rem; }
.meet h2 { font-size: clamp(3rem, 10vw, 6rem); }
.meet p { font-size: clamp(1.2rem, 2.6vw, 1.45rem); }
.meet-sign {
  display: inline-block; margin-top: .75rem; padding: .5rem 1rem;
  font-family: var(--display); font-weight: 700; font-size: 1.5rem !important;
  border: 3px solid var(--cream); border-radius: 4px;
}

/* ---------- Gallery ---------- */
.gallery { background: var(--navy-deep); padding: clamp(3.5rem, 9vw, 6rem) 0; }
.gallery-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 36rem) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-item {
  display: block; width: 100%; padding: 0; border: 3px solid var(--cream); border-radius: 4px;
  background: none; cursor: zoom-in; overflow: hidden;
}
.gallery-item img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.03); }

.lightbox {
  padding: 0; border: 4px solid var(--cream); background: var(--navy-deep); color: var(--cream);
  max-width: min(92vw, 40rem); max-height: 92vh;
}
.lightbox::backdrop { background: rgba(10,15,30,.88); }
.lightbox img { max-height: calc(92vh - 4.5rem); width: auto; margin: 0 auto; }
.lightbox form { display: flex; justify-content: flex-end; padding: .5rem; margin: 0; }
.lightbox-close {
  min-height: 2.75rem; padding: 0 1.25rem; background: var(--red); color: var(--cream);
  border: 0; border-radius: 4px; font: 700 1rem var(--body); cursor: pointer;
}

/* ---------- Find us ---------- */
.find { background: var(--cream); color: var(--charcoal); padding: clamp(3.5rem, 9vw, 6rem) 0; }
.find h2 { color: var(--navy); }
.find-grid { display: grid; gap: 2.5rem; }
address { font-style: normal; font-size: 1.35rem; line-height: 1.45; margin-bottom: 1.5rem; }
address strong { font-family: var(--display); font-size: 1.75rem; color: var(--red); }
.hours { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.25rem; margin: 0 0 2rem; }
.hours dt { font-weight: 700; }
.hours dd { margin: 0; }
.map { min-height: 20rem; border: 4px solid var(--navy); border-radius: 4px; overflow: hidden; background: var(--cream-dim); }
.map iframe { display: block; width: 100%; height: 100%; min-height: 20rem; border: 0; }
@media (min-width: 52rem) { .find-grid { grid-template-columns: 1fr 1.3fr; align-items: stretch; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); }
.site-footer .bunting { background-color: var(--navy); }
.footer-inner { padding-top: 2.5rem; padding-bottom: 3rem; text-align: center; }
.footer-inner p { margin: 0 auto .3rem; }
.footer-big { font-family: var(--display); font-weight: 900; font-size: clamp(2.25rem, 7vw, 3.5rem); line-height: 1; margin-bottom: 1rem !important; }
.footer-small { color: var(--cream-dim); font-size: .95rem; margin-top: 1.25rem !important; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .gallery-item:hover img { transform: none; }
}
