/* ============================================================
   Central York High School — Class of 1969
   Redesigned stylesheet — clean, modern, responsive
   ============================================================ */

:root {
  --green: #0b5c33;
  --green-dark: #073d22;
  --green-light: #e8f3ec;
  --ink: #202324;
  --ink-soft: #55605c;
  --paper: #ffffff;
  --paper-soft: #d3ded1;
  --border: #c3cfc1;
  --accent: #c99a3a;
  --max-width: 1080px;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(20, 30, 25, 0.08);
  --shadow-lg: 0 12px 32px rgba(20, 30, 25, 0.18);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

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

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

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

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--green);
  color: #fff;
  padding: 10px 16px;
  z-index: 2000;
  border-radius: 0 0 6px 0;
}
.skip-link:focus {
  left: 0; top: 0;
}

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 3px solid var(--green);
  position: sticky;
  top: 0;
  z-index: 900;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  height: 40px;
  width: auto;
}
.brand-text {
  font-weight: 700;
  color: var(--green-dark);
  font-size: 1.05rem;
  line-height: 1.2;
}
.brand-text small {
  display: block;
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--green);
  border-radius: 6px;
  width: 42px;
  height: 38px;
  cursor: pointer;
  position: relative;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px;
  height: 2px;
  background: var(--green);
}
.nav-toggle::before { top: 11px; }
.nav-toggle span { top: 18px; }
.nav-toggle::after { top: 25px; }

.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: block;
  padding: 9px 11px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.86rem;
  border-radius: 6px;
  white-space: nowrap;
}
.main-nav a:hover {
  background: var(--green-light);
  color: var(--green-dark);
}
.main-nav a.current {
  background: var(--green);
  color: #fff;
}

/* Below this width the full nav can't fit on one line, so switch to the
   hamburger menu instead of letting items wrap into a second row. */
@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; flex-wrap: nowrap; gap: 2px; padding-bottom: 10px; }
  .main-nav a { white-space: normal; }
  .header-inner { flex-wrap: wrap; }
}

/* ---------- Hero slider ---------- */
.hero-slider {
  position: relative;
  max-width: var(--max-width);
  margin: 14px auto 0;
  overflow: hidden;
  background: #111;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-slider::before {
  content: "";
  display: block;
  padding-top: 34%; /* reserves a wide, shallow banner height */
}
@media (max-width: 640px) {
  .hero-slider { margin-top: 10px; border-radius: 0; }
  .hero-slider::before { padding-top: 62%; }
}
.hero-slider .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.hero-slider .slide.active { opacity: 1; }
.hero-slider .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.35);
  color: #fff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 5;
}
.hero-nav:hover { background: rgba(0,0,0,0.6); }
.hero-nav.prev { left: 14px; }
.hero-nav.next { right: 14px; }
.hero-dots {
  position: absolute;
  bottom: 12px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 5;
}
.hero-dots button {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 0;
}
.hero-dots button.active { background: #fff; }

/* ---------- Page shell ---------- */
.page-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 36px 20px 60px;
}

.page-title {
  font-size: 1.9rem;
  color: var(--green-dark);
  margin: 0 0 8px;
  font-weight: 700;
}
.page-subtitle {
  color: var(--ink-soft);
  margin: 0 0 28px;
}

/* ---------- Home welcome section ---------- */
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  margin-top: 32px;
  align-items: start;
}
@media (max-width: 760px) {
  .welcome-grid { grid-template-columns: 1fr; }
}
.welcome-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
}
.welcome-card h1 {
  color: var(--green-dark);
  margin-top: 0;
}
.welcome-quote {
  font-style: italic;
  color: var(--ink-soft);
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  margin: 20px 0;
}
.hit-counter {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-top: 22px;
}

.side-card {
  background: var(--green-light);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.side-card img {
  border-radius: 8px;
  margin: 0 auto 10px;
}
.side-card p {
  color: var(--green-dark);
  font-weight: 600;
  margin: 6px 0 0;
}
.officers-photo {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

/* ---------- Gallery grid ---------- */
.gallery-intro {
  color: var(--ink-soft);
  margin-bottom: 22px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.gallery-grid figure {
  margin: 0;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-grid figure:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.gallery-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.gallery-grid figcaption {
  font-size: 0.78rem;
  padding: 6px 8px;
  color: var(--ink-soft);
  text-align: center;
}

.hero-photo {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

/* ---------- Memory tree section ---------- */
.memory-tree {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: center;
}
@media (max-width: 640px) {
  .memory-tree { grid-template-columns: 1fr; }
}
.memory-tree img { border-radius: 8px; }
.memory-tree .poem {
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.9;
}
.memory-tree .poem .signature {
  display: block;
  margin-top: 10px;
  text-align: right;
  font-style: normal;
  font-weight: 600;
  color: var(--green-dark);
}

/* ---------- Media / video cards ---------- */
.media-list {
  display: grid;
  gap: 14px;
}
.media-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 20px;
}
.media-icon {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.media-info { flex: 1; }
.media-info strong { display: block; color: var(--ink); }
.media-info span { color: var(--ink-soft); font-size: 0.85rem; }
.media-card a.download-btn {
  flex: none;
  background: var(--green);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.88rem;
}
.media-card a.download-btn:hover { background: var(--green-dark); color: #fff; }
.media-note {
  background: var(--green-light);
  border-left: 3px solid var(--green);
  padding: 12px 16px;
  border-radius: 6px;
  color: var(--green-dark);
  margin-bottom: 22px;
  font-size: 0.92rem;
}

/* ---------- Lightbox ---------- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 10, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 30px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-figure {
  max-width: min(92vw, 1200px);
  max-height: 90vh;
  text-align: center;
}
.lightbox-figure img {
  max-width: 100%;
  max-height: 78vh;
  margin: 0 auto;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.lightbox-figure figcaption {
  color: #fff;
  margin-top: 14px;
  font-size: 0.95rem;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 50%;
}
.lightbox-close {
  top: 20px; right: 20px;
  width: 42px; height: 42px;
  font-size: 1.4rem;
}
.lightbox-prev, .lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  font-size: 1.6rem;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(255,255,255,0.28);
}
.lightbox-counter {
  position: absolute;
  bottom: 18px;
  left: 0; right: 0;
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.85);
  text-align: center;
  padding: 26px 20px;
  font-size: 0.9rem;
}
.site-footer a { color: #fff; text-decoration: underline; }
.site-footer a:hover { color: var(--accent); }
