/* Great 8 – Modern Responsive Stylesheet */
/* Brand palette: dark bg #090101, maroon body #430608, gold #e29f2f, white text */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0d0101;
  --surface:  #1a0303;
  --maroon:   #430608;
  --gold:     #e29f2f;
  --gold-lt:  #f0bc5a;
  --white:    #ffffff;
  --text:     #e8e0d8;
  --muted:    #b0a090;
  --border:   #3a1010;
  --nav-h:    60px;
  --max-w:    1040px;
  --radius:   6px;
  --trans:    0.2s ease;
}

/* ─── Base ────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Trebuchet MS', Helvetica, Verdana, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a { color: var(--gold); text-decoration: none; transition: color var(--trans); }
a:hover, a:focus { color: var(--gold-lt); text-decoration: underline; }

p { margin-bottom: 1em; }

ul, ol { margin: 0 0 1em 1.6em; }
li { margin-bottom: 0.35em; }

strong, b { font-weight: 700; }
em, i { font-style: italic; }

/* ─── Typography ──────────────────────────────── */
h1 {
  color: var(--white);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.2;
  margin-bottom: 0.6em;
  letter-spacing: 0.02em;
}
h2 {
  color: var(--gold);
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  line-height: 1.3;
  margin: 1.4em 0 0.4em;
}
h3 {
  color: var(--gold);
  font-size: 1rem;
  line-height: 1.3;
  margin: 1em 0 0.25em;
}

/* ─── Header & Nav ────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--maroon);
  border-bottom: 2px solid var(--gold);
  height: var(--nav-h);
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo img {
  height: 40px;
  width: auto;
  border-radius: 3px;
}
.site-logo-text {
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ─── Desktop nav ─────────────────────────────── */
.site-nav { display: flex; align-items: center; }

.nav-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 0.1rem;
  flex-wrap: wrap;
}

.nav-list a {
  display: block;
  padding: 0.4rem 0.65rem;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background var(--trans), color var(--trans);
}
.nav-list a:hover,
.nav-list a:focus {
  color: var(--white);
  background: rgba(255,255,255,0.08);
  text-decoration: none;
}
.nav-list a[aria-current="page"] {
  color: var(--white);
  background: rgba(226,159,47,0.18);
}

/* ─── Hamburger ───────────────────────────────── */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  color: var(--gold);
  flex-direction: column;
  gap: 4px;
  width: 40px;
  height: 36px;
  justify-content: center;
  align-items: center;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--trans), opacity var(--trans);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ─── Main content ────────────────────────────── */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

/* ─── Hero (home page) ────────────────────────── */
.hero {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.hero-logo {
  max-width: min(360px, 80vw);
  margin: 0 auto 1.25rem;
  border-radius: var(--radius);
}
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin-bottom: 0.3em;
}
.hero-tagline {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}
.hero-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}
.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  min-width: 200px;
  flex: 1 1 200px;
  max-width: 280px;
  text-align: left;
}
.hero-card h2 { margin-top: 0; font-size: 0.95rem; }
.hero-card p  { font-size: 0.9rem; color: var(--muted); margin: 0; }

.btn {
  display: inline-block;
  background: var(--gold);
  color: #1a0101;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.55rem 1.4rem;
  border-radius: var(--radius);
  transition: background var(--trans), color var(--trans);
  text-decoration: none;
  letter-spacing: 0.03em;
}
.btn:hover, .btn:focus { background: var(--gold-lt); color: #000; text-decoration: none; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover, .btn-outline:focus { background: var(--gold); color: #1a0101; }

/* ─── Page header bar ─────────────────────────── */
.page-header {
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
}

/* ─── Content layout ──────────────────────────── */
.content-body {
  max-width: 820px;
}
.content-body img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.content-body img.float-right {
  float: right;
  margin: 0 0 1rem 1.5rem;
  max-width: min(260px, 45%);
}
.content-body img.float-left {
  float: left;
  margin: 0 1.5rem 1rem 0;
  max-width: min(260px, 45%);
}
.clearfix::after { content: ""; display: table; clear: both; }

/* ─── Venue entry ─────────────────────────────── */
.venue-entry {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.venue-entry:last-child { border-bottom: none; }
.venue-year {
  display: inline-block;
  background: var(--maroon);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.2em 0.7em;
  border-radius: 3px;
  margin-bottom: 0.4em;
}

/* ─── Handicap table ──────────────────────────── */
.handicap-list {
  list-style: none;
  margin: 0 0 1.2em;
  padding: 0;
  max-width: 300px;
}
.handicap-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0.8rem;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
}
.handicap-list li:first-child { border-top: 1px solid var(--border); }
.handicap-list li .hc-num { color: var(--gold); font-weight: 700; }

/* ─── Classics jump nav ───────────────────────── */
.jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.jump-nav a {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
}
.jump-nav a:hover { background: var(--maroon); text-decoration: none; }

.classic-section {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

/* ─── Committee ───────────────────────────────── */
.committee-block {
  background: var(--surface);
  border-left: 3px solid var(--gold);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.committee-block .comm-title { color: var(--gold); font-weight: 700; font-size: 0.9rem; }
.committee-block .comm-chair { color: var(--text); font-size: 0.9rem; }
.committee-block .comm-resp  { color: var(--muted); font-size: 0.875rem; margin-top: 0.3em; }

/* ─── Gallery index ───────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.gallery-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  transition: border-color var(--trans);
}
.gallery-card:hover { border-color: var(--gold); }
.gallery-card h2 { margin-top: 0; font-size: 1rem; }
.gallery-card .year { color: var(--muted); font-size: 0.85rem; }
.gallery-card a { display: block; }

/* ─── Gallery page (thumbnail grid) ──────────── */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 1rem;
}
.thumb-grid a {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: border-color var(--trans), transform var(--trans);
  aspect-ratio: 4/3;
  background: #111;
}
.thumb-grid a:hover { border-color: var(--gold); transform: scale(1.03); }
.thumb-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px);
  transition: opacity var(--trans);
}
.thumb-grid a:hover img { opacity: 0.92; }

/* Past gallery captioned grid */
.past-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.past-gallery-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--trans);
}
.past-gallery-item:hover { border-color: var(--gold); }
.past-gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.past-gallery-item .caption {
  padding: 0.45rem 0.65rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ─── Lightbox ────────────────────────────────── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.93);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
#lightbox.open { display: flex; }

#lb-img {
  max-width: min(90vw, 1100px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.7);
  display: block;
}

#lb-close {
  position: absolute;
  top: 1rem; right: 1.25rem;
  background: none; border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity var(--trans);
}
#lb-close:hover { opacity: 1; }

#lb-prev, #lb-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(67,6,8,0.7);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 1.6rem;
  width: 46px; height: 56px;
  cursor: pointer;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--trans);
}
#lb-prev:hover, #lb-next:hover { background: var(--maroon); }
#lb-prev { left: 0.75rem; }
#lb-next { right: 0.75rem; }

#lb-caption {
  position: absolute;
  bottom: 0.75rem;
  left: 50%; transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
  pointer-events: none;
}

/* ─── Footer ──────────────────────────────────── */
.site-footer {
  background: var(--maroon);
  border-top: 2px solid var(--gold);
  text-align: center;
  padding: 1rem 1.25rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.site-footer a { color: var(--gold); }

/* ─── Poem link ───────────────────────────────── */
.poem-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.7rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  transition: background var(--trans);
}
.poem-link:hover { background: var(--maroon); text-decoration: none; }

/* ─── Responsive ──────────────────────────────── */
@media (max-width: 680px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--maroon);
    border-bottom: 2px solid var(--gold);
    padding: 0.5rem 1rem 0.75rem;
    display: none;
    z-index: 99;
  }
  .site-nav.open { display: block; }

  .nav-list {
    flex-direction: column;
    gap: 0;
  }
  .nav-list a {
    padding: 0.65rem 0.5rem;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }

  .content-body img.float-right,
  .content-body img.float-left {
    float: none;
    margin: 0 0 1rem 0;
    max-width: 100%;
  }

  .hero-card { max-width: 100%; }
  #lb-prev { left: 0.25rem; }
  #lb-next { right: 0.25rem; }
  .thumb-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

@media (max-width: 420px) {
  :root { --nav-h: 54px; }
  h1 { font-size: 1.4rem; }
  .hero-logo { max-width: 80vw; }
}
