/* ==========================================================================
   Jordan Vocational High School — Class of 1976 · 50th Reunion
   ========================================================================== */

:root {
  /* Palette built around the school carmen */
  --carmen:        #8a0f22;
  --carmen-deep:   #5e0a17;
  --carmen-light:  #b4485b;
  --gold:          #a8873f;

  --ink:           #1c1a19;
  --ink-soft:      #4a4644;
  --muted:         #7d7772;
  --rule:          #e3ded8;
  --wash:          #f7f5f2;
  --paper:         #ffffff;

  --shadow-sm: 0 1px 2px rgba(28,26,25,.06), 0 2px 8px rgba(28,26,25,.05);
  --shadow-md: 0 4px 12px rgba(28,26,25,.08), 0 12px 32px rgba(28,26,25,.08);
  --shadow-lg: 0 12px 28px rgba(28,26,25,.12), 0 32px 64px rgba(28,26,25,.12);

  --display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --wrap: 1140px;
  --gutter: clamp(20px, 5vw, 48px);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0;
  font-weight: 600;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--carmen); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.narrow { max-width: 760px; margin-inline: auto; }

/* Accessibility ----------------------------------------------------------- */
.skip-link {
  position: absolute; left: -9999px;
  background: var(--carmen); color: #fff;
  padding: 12px 20px; z-index: 200; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; top: 0; }

:focus-visible {
  outline: 3px solid var(--carmen-light);
  outline-offset: 3px;
}

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

/* ==========================================================================
   Navigation
   ========================================================================== */

.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 24px;
}

.brand {
  font-family: var(--display);
  font-size: 1.02rem; font-weight: 700;
  color: var(--ink); letter-spacing: -.01em;
  line-height: 1.25; text-decoration: none;
}
.brand:hover { text-decoration: none; color: var(--carmen); }
.brand span {
  display: block; font-family: var(--body);
  font-size: .68rem; font-weight: 600; letter-spacing: .13em;
  text-transform: uppercase; color: var(--carmen); margin-top: 2px;
}

.nav-links { display: flex; align-items: center; gap: 30px; }

.nav-links a {
  font-size: .87rem; font-weight: 550;
  color: var(--ink-soft); letter-spacing: .01em;
  text-decoration: none; padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--carmen); border-bottom-color: var(--carmen); text-decoration: none;
}
.nav-links a.btn-nav {
  background: var(--carmen); color: #fff;
  padding: 9px 20px; border-radius: 4px; border-bottom: none;
}
.nav-links a.btn-nav:hover {
  background: var(--carmen-deep); color: #fff; border-bottom: none;
}

.nav-toggle {
  display: none; background: none; border: 0;
  padding: 8px; cursor: pointer; color: var(--ink);
}
.nav-toggle svg { width: 24px; height: 24px; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: min(78vh, 660px);
  display: flex; align-items: center;
  color: #fff; text-align: center;
  padding: 88px 0;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url('school-photo.jpg') center 42% / cover no-repeat;
  transform: scale(1.03);
}

.hero::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(28,10,14,.62) 0%, rgba(94,10,23,.72) 55%, rgba(28,10,14,.86) 100%);
}

.hero > * { position: relative; z-index: 2; }

.hero-eyebrow {
  font-size: .74rem; font-weight: 650;
  letter-spacing: .26em; text-transform: uppercase;
  color: rgba(255,255,255,.82);
  margin-bottom: 22px;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.3rem, 6.4vw, 4.1rem);
  letter-spacing: -.02em;
  text-shadow: 0 2px 20px rgba(0,0,0,.35);
  margin-bottom: 8px;
}

.hero .hero-class {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3.4vw, 2rem);
  font-style: italic;
  color: rgba(255,255,255,.9);
  margin-bottom: 30px;
}

.hero-rule {
  width: 72px; height: 2px;
  background: var(--gold);
  margin: 0 auto 30px;
}

.hero-meta {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: rgba(255,255,255,.94);
  font-weight: 500;
  margin-bottom: 38px;
}
.hero-meta strong { font-weight: 650; }
.hero-meta .sep { opacity: .45; margin: 0 12px; }

.hero-actions {
  display: flex; gap: 14px;
  justify-content: center; flex-wrap: wrap;
}

/* Countdown --------------------------------------------------------------- */
.countdown {
  display: flex; gap: 10px; justify-content: center;
  margin-bottom: 38px; flex-wrap: wrap;
}
.count-cell {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 6px;
  padding: 12px 6px 10px;
  min-width: 78px;
  backdrop-filter: blur(6px);
}
.count-num {
  font-family: var(--display);
  font-size: 1.85rem; font-weight: 600;
  color: #fff; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.count-lbl {
  font-size: .64rem; letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
  margin-top: 6px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  font-family: var(--body);
  font-size: .95rem; font-weight: 600;
  letter-spacing: .02em;
  padding: 15px 34px;
  border-radius: 4px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--carmen); color: #fff; border-color: var(--carmen); }
.btn-primary:hover { background: var(--carmen-deep); border-color: var(--carmen-deep); color: #fff; }

.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }

.btn-outline { background: transparent; color: var(--carmen); border-color: var(--carmen); }
.btn-outline:hover { background: var(--carmen); color: #fff; }

.btn-block { display: block; width: 100%; text-align: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ==========================================================================
   Sections
   ========================================================================== */

.section { padding: clamp(60px, 9vw, 104px) 0; }
.section-wash { background: var(--wash); }
.section-dark { background: var(--carmen-deep); color: rgba(255,255,255,.86); }
.section-dark h2, .section-dark h3 { color: #fff; }

.section-head { text-align: center; margin-bottom: 54px; }

.eyebrow {
  font-size: .72rem; font-weight: 650;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--carmen); margin-bottom: 14px;
}
.section-dark .eyebrow { color: var(--gold); }

.section-head h2 {
  font-size: clamp(1.85rem, 4.2vw, 2.7rem);
  letter-spacing: -.015em;
  margin-bottom: 16px;
}

.section-head p {
  max-width: 620px; margin: 0 auto;
  color: var(--muted); font-size: 1.04rem;
}
.section-dark .section-head p { color: rgba(255,255,255,.72); }

/* ==========================================================================
   Schedule
   ========================================================================== */

.schedule { max-width: 780px; margin: 0 auto; }

.event {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
}
.event:last-child { border-bottom: 1px solid var(--rule); }

.event-when { text-align: right; }

.event-day {
  font-family: var(--display);
  font-size: 1.22rem; color: var(--ink); font-weight: 600;
  line-height: 1.2;
}
.event-date {
  font-size: .82rem; color: var(--carmen);
  font-weight: 650; letter-spacing: .06em;
  text-transform: uppercase; margin-top: 5px;
}
.event-time {
  font-size: .9rem; color: var(--muted);
  margin-top: 8px; font-variant-numeric: tabular-nums;
}

.event-what h3 {
  font-size: 1.3rem; margin-bottom: 8px;
}
.event-where {
  font-size: .88rem; color: var(--carmen);
  font-weight: 600; margin-bottom: 10px;
}
.event-what p { color: var(--ink-soft); font-size: .97rem; margin-bottom: 0; }

/* ==========================================================================
   Cards / detail grid
   ========================================================================== */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 24px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
}
.card h3 {
  font-size: 1.22rem; margin-bottom: 12px;
}
.card p { font-size: .96rem; }
.card-icon {
  width: 40px; height: 40px; margin-bottom: 18px;
  color: var(--carmen);
}
.card-icon svg { width: 100%; height: 100%; }

/* Deadline bar ------------------------------------------------------------ */
.deadline-bar {
  background: var(--gold);
  color: #2c2306;
  padding: 14px 0;
  font-size: .94rem;
  text-align: center;
}
.deadline-bar strong { font-weight: 650; }
.deadline-bar span { opacity: .78; margin-left: 10px; }

/* Open-to-other-classes note ---------------------------------------------- */
.open-note {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  padding: 20px 24px;
  font-size: .96rem;
  color: var(--ink-soft);
}
.open-note strong { display: block; color: var(--ink); margin-bottom: 4px; }

/* Payment method cards ---------------------------------------------------- */
.pay-card { position: relative; padding-top: 40px; }

.pay-badge {
  position: absolute; top: 0; left: 28px;
  transform: translateY(-50%);
  background: var(--carmen); color: #fff;
  font-size: .66rem; font-weight: 650;
  letter-spacing: .16em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 3px;
}

.pay-price {
  font-family: var(--display);
  font-size: 1.85rem; font-weight: 600;
  color: var(--carmen); line-height: 1;
  margin-bottom: 16px !important;
}
.pay-price span {
  font-family: var(--body); font-size: .78rem;
  font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
  margin-left: 6px;
}

.selectable {
  user-select: all;
  display: inline-block;
  line-height: 1.55;
}

/* Price callout ----------------------------------------------------------- */
.price-band {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(24px, 6vw, 72px); flex-wrap: wrap;
  text-align: center;
}
.price-figure {
  font-family: var(--display);
  font-size: clamp(2.6rem, 7vw, 3.8rem);
  color: #fff; font-weight: 600; line-height: 1;
}
.price-unit {
  font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin-top: 10px; font-weight: 650;
}
.price-note {
  max-width: 380px; text-align: left;
  font-size: .95rem; color: rgba(255,255,255,.78);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  padding: clamp(28px, 5vw, 48px);
}

fieldset { border: 0; padding: 0; margin: 0 0 40px; }
fieldset:last-of-type { margin-bottom: 28px; }

legend {
  font-family: var(--display);
  font-size: 1.32rem; font-weight: 600; color: var(--ink);
  padding: 0 0 12px; margin-bottom: 24px; width: 100%;
  border-bottom: 2px solid var(--carmen);
}

.field { margin-bottom: 22px; }
.field-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
}

label {
  display: block; font-size: .88rem; font-weight: 600;
  color: var(--ink); margin-bottom: 7px;
}
label .opt { font-weight: 400; color: var(--muted); }

input[type=text], input[type=email], input[type=tel],
select, textarea {
  width: 100%;
  font-family: var(--body); font-size: 1rem;
  color: var(--ink);
  padding: 12px 14px;
  border: 1.5px solid var(--rule);
  border-radius: 5px;
  background: var(--paper);
  transition: border-color .16s ease, box-shadow .16s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--carmen);
  box-shadow: 0 0 0 3px rgba(138,15,34,.1);
}
textarea { resize: vertical; min-height: 84px; }

.hint { font-size: .84rem; color: var(--muted); margin-top: 6px; }

.total-line {
  display: flex; align-items: baseline; justify-content: space-between;
  background: var(--wash);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 20px 24px; margin-bottom: 26px;
}
.total-line .lbl {
  font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); font-weight: 650;
}
.total-line .amt {
  font-family: var(--display); font-size: 2rem;
  color: var(--carmen); font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Payment method chooser (RSVP) ------------------------------------------- */
.pay-choice { display: grid; gap: 12px; }

.pay-option {
  display: flex; align-items: flex-start; gap: 14px;
  border: 1.5px solid var(--rule);
  border-radius: 7px;
  padding: 18px 20px;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.pay-option:hover { border-color: var(--carmen-light); background: var(--wash); }
.pay-option input { margin: 4px 0 0; accent-color: var(--carmen); flex: 0 0 auto; }
.pay-option:has(input:checked) {
  border-color: var(--carmen);
  background: rgba(138,15,34,.035);
}
.pay-option-body { flex: 1; }
.pay-option-title {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  font-weight: 650; color: var(--ink); font-size: 1rem;
  margin-bottom: 3px;
}
.pay-option-title em {
  font-style: normal; font-family: var(--display);
  font-size: 1.15rem; color: var(--carmen); font-weight: 600;
}
.pay-option-note { font-size: .87rem; color: var(--muted); }

/* Instructions shown after choosing check or Zelle ------------------------ */
.pay-instructions {
  background: var(--wash);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--carmen);
  border-radius: 6px;
  padding: 22px 24px;
  margin-bottom: 22px;
  font-size: .95rem;
}
.pay-instructions h4 {
  font-family: var(--display); font-size: 1.1rem;
  color: var(--ink); margin-bottom: 10px;
}
.pay-instructions .addr {
  user-select: all;
  display: block;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 14px 16px; margin: 12px 0;
  line-height: 1.55; color: var(--ink);
}

/* Review panel ------------------------------------------------------------ */
.review {
  background: var(--wash);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--carmen);
  border-radius: 6px;
  padding: 26px 28px;
  margin-bottom: 26px;
}
.review h3 { font-size: 1.15rem; margin-bottom: 16px; }
.review dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 9px 20px; }
.review dt {
  font-size: .82rem; font-weight: 650; color: var(--muted);
  letter-spacing: .04em; text-transform: uppercase;
}
.review dd { margin: 0; font-size: .97rem; color: var(--ink); }

.step-note {
  background: #fdf6e8;
  border: 1px solid #ecd9a8;
  border-radius: 6px;
  padding: 16px 20px; margin-bottom: 22px;
  font-size: .92rem; color: #6b5416;
}
.step-note strong { color: #4a3a0d; }

/* Setup flag — visible only while a placeholder is unset ------------------ */
.setup-flag {
  background: #fff4f4;
  border: 1px solid #f0c2c2;
  border-left: 3px solid var(--carmen);
  border-radius: 6px;
  padding: 16px 20px; margin-bottom: 22px;
  font-size: .9rem; color: #7a2020;
}
.setup-flag strong { display: block; margin-bottom: 4px; color: #5e0a17; }
.setup-flag code {
  background: rgba(138,15,34,.08); padding: 1px 6px;
  border-radius: 3px; font-size: .87em;
}

/* ==========================================================================
   Gallery
   ========================================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 18px;
}

.tile {
  position: relative; aspect-ratio: 4 / 3;
  border-radius: 8px; overflow: hidden;
  background: var(--wash);
  border: 1px solid var(--rule);
  cursor: pointer; padding: 0;
  transition: transform .22s ease, box-shadow .22s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tile img { width: 100%; height: 100%; object-fit: cover; }

.tile-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(20,8,10,.86));
  color: #fff; font-size: .88rem; font-weight: 550;
  padding: 26px 16px 13px; text-align: left;
}

.tile-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; cursor: default;
  border-style: dashed; border-color: #d8d0c6;
  color: var(--muted); font-size: .88rem; text-align: center;
  padding: 20px;
}
.tile-empty:hover { transform: none; box-shadow: none; }
.tile-empty svg { width: 30px; height: 30px; opacity: .4; }

/* Lightbox ---------------------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(16,8,10,.94);
  display: none; align-items: center; justify-content: center;
  padding: 32px;
}
.lightbox[open], .lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 82vh;
  border-radius: 6px; box-shadow: var(--shadow-lg);
}
.lightbox-cap {
  position: absolute; bottom: 28px; left: 0; right: 0;
  text-align: center; color: rgba(255,255,255,.9); font-size: .95rem;
}
.lightbox-close {
  position: absolute; top: 22px; right: 26px;
  background: none; border: 0; cursor: pointer;
  color: #fff; font-size: 2.4rem; line-height: 1; padding: 8px;
  opacity: .75;
}
.lightbox-close:hover { opacity: 1; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.62);
  padding: 60px 0 36px;
  font-size: .92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px; margin-bottom: 44px;
}
.site-footer h4 {
  color: #fff; font-family: var(--body);
  font-size: .76rem; font-weight: 650;
  letter-spacing: .16em; text-transform: uppercase;
  margin-bottom: 16px;
}
.site-footer a { color: rgba(255,255,255,.82); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }

.footer-base {
  border-top: 1px solid rgba(255,255,255,.13);
  padding-top: 26px;
  display: flex; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  font-size: .85rem; color: rgba(255,255,255,.45);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

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

  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow-md);
    flex-direction: column; align-items: stretch;
    gap: 0; padding: 8px 0;
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    padding: 13px var(--gutter);
    border-bottom: 1px solid var(--rule);
  }
  .nav-links a:hover, .nav-links a[aria-current="page"] {
    border-bottom-color: var(--rule);
    background: var(--wash);
  }
  .nav-links a.btn-nav {
    margin: 10px var(--gutter);
    padding: 13px 20px; text-align: center;
  }

  .event {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .event-when { text-align: left; }
  .event-time { display: inline; margin-left: 10px; }

  .field-row { grid-template-columns: 1fr; gap: 22px; }

  .price-band { flex-direction: column; gap: 26px; }
  .price-note { text-align: center; }

  .footer-base { flex-direction: column; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .count-cell { min-width: 66px; padding: 10px 4px 8px; }
  .count-num { font-size: 1.5rem; }
  .hero-meta .sep { display: block; height: 0; overflow: hidden; margin: 6px 0; }
}

@media print {
  .site-nav, .hero-actions, .site-footer, .nav-toggle { display: none; }
  .hero::after { background: none; }
  body { color: #000; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
