/* ============================================
   Denbigh High School Class of 1976 — 50th Reunion
   Brand: Navy #193567, Red #E41E26, White, Gray #7C7A7A
   ============================================ */

:root {
  --navy: #193567;
  --red: #E41E26;
  --white: #FFFFFF;
  --gray: #7C7A7A;
  --light-bg: #F5F5F7;
  --dark-text: #1A1A1A;
  --font-heading: 'Merriweather', Georgia, serif;
  --font-body: 'Source Sans 3', 'Source Sans Pro', Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--dark-text);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--red); }

h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.3; }
h1 { font-size: 3rem; }
h2 { font-size: 2.2rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- HEADER / NAV ---- */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--navy);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo img {
  height: 48px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  position: relative;
}

.nav-links a:hover { color: var(--red); }

.nav-links a.btn-rsvp {
  background: var(--red);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 700;
}

.nav-links a.btn-rsvp:hover {
  background: #C41A22;
  color: var(--white);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--navy);
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.3s;
}

/* ---- HERO ---- */
.hero {
  background: var(--navy);
  color: var(--white);
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
}

.hero .subtitle {
  font-size: 1.35rem;
  max-width: 650px;
  margin: 0 auto 36px;
  opacity: 0.9;
  line-height: 1.7;
}

.btn-primary {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  padding: 16px 40px;
  border-radius: 8px;
  font-size: 1.15rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover {
  background: #C41A22;
  color: var(--white);
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-block;
  border: 2px solid var(--white);
  color: var(--white);
  padding: 14px 36px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}

/* ---- COUNTDOWN ---- */
.countdown-section {
  background: var(--light-bg);
  padding: 60px 0;
  text-align: center;
}

.countdown-section h2 {
  color: var(--navy);
  margin-bottom: 32px;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.countdown-item {
  background: var(--navy);
  color: var(--white);
  border-radius: 12px;
  padding: 24px 32px;
  min-width: 120px;
  text-align: center;
}

.countdown-item .number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  display: block;
  line-height: 1;
}

.countdown-item .label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 8px;
  opacity: 0.8;
}

/* ---- EVENT DETAILS CARD ---- */
.event-details {
  padding: 60px 0;
  text-align: center;
}

.event-details h2 {
  color: var(--navy);
  margin-bottom: 40px;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.detail-card {
  background: var(--white);
  border: 2px solid #E8E8E8;
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  transition: border-color 0.2s;
}

.detail-card:hover { border-color: var(--navy); }

.detail-card .icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.detail-card .detail-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray);
  margin-bottom: 8px;
}

.detail-card .detail-value {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
}

/* ---- WHY ATTEND ---- */
.why-attend {
  background: var(--light-bg);
  padding: 80px 0;
  text-align: center;
}

.why-attend h2 {
  color: var(--navy);
  margin-bottom: 48px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.card {
  background: var(--white);
  border-radius: 12px;
  padding: 48px 32px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.card .card-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.card h3 { color: var(--navy); }

.card p {
  color: var(--gray);
  margin-top: 12px;
  font-size: 1.05rem;
}

/* ---- REMEMBER WHEN ---- */
.memories-teaser {
  padding: 80px 0;
  text-align: center;
  background: var(--white);
}

.memories-teaser h2 {
  color: var(--navy);
  margin-bottom: 16px;
}

.memories-teaser .intro {
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto 48px;
  font-size: 1.1rem;
}

.memory-quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.memory-quote {
  background: var(--light-bg);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  padding: 28px 24px;
  text-align: left;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--navy);
}

/* ---- CTA BANNER ---- */
.cta-banner {
  background: var(--navy);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}

.cta-banner h2 {
  font-size: 2.4rem;
  margin-bottom: 16px;
}

.cta-banner p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 32px;
}

/* ---- ABOUT PAGE ---- */
.page-header {
  background: var(--navy);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}

.page-header h1 { font-size: 2.8rem; }
.page-header p {
  font-size: 1.2rem;
  opacity: 0.85;
  margin-top: 12px;
}

.content-section {
  padding: 80px 0;
}

.content-section:nth-child(even) {
  background: var(--light-bg);
}

.content-section h2 {
  color: var(--navy);
  margin-bottom: 24px;
}

.content-section p {
  max-width: 800px;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Committee grid */
.committee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

.committee-member {
  text-align: center;
}

.committee-member .avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--light-bg);
  border: 3px solid var(--navy);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--navy);
}

.committee-member h3 {
  font-size: 1.15rem;
  color: var(--navy);
}

.committee-member p {
  color: var(--gray);
  font-size: 0.95rem;
}

/* ---- GALLERY ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.gallery-item {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--light-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s;
  border: 2px solid #E8E8E8;
}

.gallery-item:hover { transform: scale(1.02); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

.upload-section {
  background: var(--navy);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}

.upload-section h2 { margin-bottom: 16px; }
.upload-section p { opacity: 0.9; margin-bottom: 24px; }

/* ---- FAQ ACCORDION ---- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid #E8E8E8;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 24px 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
  transition: transform 0.3s;
  color: var(--red);
}

.faq-item.active .faq-question::after {
  content: '-';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding-bottom: 24px;
}

.faq-answer p {
  color: #555;
  line-height: 1.7;
}

/* ---- CONTACT FORM ---- */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--navy);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #E8E8E8;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--navy);
}

.form-group textarea { min-height: 150px; resize: vertical; }

.form-status {
  padding: 16px;
  border-radius: 8px;
  margin-top: 16px;
  display: none;
}

.form-status.success {
  background: #E8F5E9;
  color: #2E7D32;
  display: block;
}

.form-status.error {
  background: #FFEBEE;
  color: #C62828;
  display: block;
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--navy);
  color: var(--white);
  padding: 48px 0 24px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--white);
}

.footer-col p,
.footer-col a {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
  line-height: 1.8;
}

.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

.footer-bottom a { color: rgba(255,255,255,0.7); }
.footer-bottom a:hover { color: var(--white); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  h1 { font-size: 2.2rem; }
  .hero h1 { font-size: 2.5rem; }
  .hero { padding: 70px 0 60px; }
  .details-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid { grid-template-columns: 1fr; }
  .memory-quotes { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 3px solid var(--navy);
    padding: 16px 24px;
    gap: 16px;
  }

  .nav-links.active { display: flex; }

  .details-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

  .committee-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero h1 { font-size: 2rem; }
  .hero .subtitle { font-size: 1.1rem; }
  .details-grid { grid-template-columns: 1fr; }
  .countdown { gap: 16px; }
  .countdown-item { min-width: 80px; padding: 16px 20px; }
  .countdown-item .number { font-size: 2rem; }
  .btn-primary { width: 100%; text-align: center; }
}

/* ---- SKIP TO CONTENT (Accessibility) ---- */
.skip-link {
  position: absolute;
  top: -9999px;
  left: -9999px;
  background: var(--navy);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  z-index: 10000;
}
.skip-link:focus {
  top: 0;
  left: 16px;
  color: var(--white);
}

/* ---- FOCUS STYLES (Accessibility) ---- */
*:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

/* ---- SPREAD THE WORD ---- */
.spread-word {
  background: var(--light-bg);
  padding: 80px 0;
  text-align: center;
}
.spread-word h2 { color: var(--navy); margin-bottom: 16px; }
.spread-word .intro { color: var(--gray); max-width: 600px; margin: 0 auto 40px; font-size: 1.1rem; }

.share-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.share-card {
  background: var(--white);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: left;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.share-card h4 {
  color: var(--navy);
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.share-card .share-text {
  background: var(--light-bg);
  border-radius: 8px;
  padding: 16px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333;
  margin-bottom: 12px;
  border: 1px solid #E8E8E8;
}
.share-card .btn-copy {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.share-card .btn-copy:hover { background: #0f2347; }
.share-card .btn-copy.copied { background: #2E7D32; }

/* ---- LIGHTBOX ---- */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
}
.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--white);
  font-size: 1rem;
  background: rgba(0,0,0,0.6);
  padding: 8px 20px;
  border-radius: 6px;
}

/* ---- PRINT STYLES ---- */
@media print {
  .site-header, .menu-toggle, .cta-banner, .site-footer,
  .btn-primary, .btn-outline, .btn-rsvp, .btn-copy,
  .lightbox-overlay, .upload-section, .spread-word,
  script, [class*="chat"] { display: none !important; }

  body { font-size: 14pt; color: #000; background: #fff; }
  .hero { background: #fff !important; color: #000 !important; padding: 24pt 0; }
  .hero h1 { color: #193567 !important; }
  .hero .subtitle { color: #333 !important; opacity: 1 !important; }

  .countdown-section { background: #fff !important; }
  .countdown-item { background: #fff !important; color: #000 !important; border: 2px solid #193567; }
  .countdown-item .number { color: #193567 !important; }

  .page-header { background: #fff !important; color: #000 !important; border-bottom: 3px solid #193567; }
  .page-header h1 { color: #193567 !important; }
  .page-header p { color: #333 !important; opacity: 1 !important; }

  .content-section { padding: 24pt 0; }
  a { color: #193567 !important; }
  a::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; }
  a[href^="/"]::after { content: " (denbighhsclassof76.com" attr(href) ")"; }
  a[href^="mailto"]::after { content: " (" attr(href) ")"; }

  .detail-card { border: 1px solid #ccc; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  .gallery-item { border: 1px solid #ccc; }
}
