/* 1990 SFHS Family — warm reunion styles */
:root {
  --bg: #faf6f1;
  --bg-card: #ffffff;
  --ink: #2c2419;
  --ink-soft: #5c5146;
  --accent: #8b4513;
  --accent-hover: #6b3410;
  --gold: #c4a35a;
  --border: #e8ddd0;
  --hero-overlay: rgba(44, 36, 25, 0.45);
  --radius: 12px;
  --shadow: 0 4px 20px rgba(44, 36, 25, 0.08);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --max: 960px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

/* Header / nav */
.site-header {
  background: var(--ink);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

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

.logo {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}
.logo span { color: var(--gold); }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}
.nav a {
  color: #f0e6d8;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.25rem 0;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--gold);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  font-size: 0.9rem;
  cursor: pointer;
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
  }
  .nav.is-open { display: flex; }
}

/* Main */
main { flex: 1; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  background: var(--ink) center/cover no-repeat;
  color: #fff;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20,14,8,0.85) 0%, var(--hero-overlay) 55%, rgba(20,14,8,0.25) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
  width: 100%;
}
.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
}
.hero p {
  margin: 0;
  font-size: 1.1rem;
  max-width: 36em;
  color: #f0e6d8;
}

/* Cards / sections */
.section-title {
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
  color: var(--ink);
}
.lead { color: var(--ink-soft); font-size: 1.05rem; margin: 0 0 1.5rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow);
}
.card h2, .card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}
.card p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.card p:last-child { margin-bottom: 0; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none !important;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn-secondary {
  background: transparent;
  color: var(--accent) !important;
  border: 2px solid var(--accent);
}
.btn-secondary:hover {
  background: var(--accent);
  color: #fff !important;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }

.note {
  background: #fff8e8;
  border-left: 4px solid var(--gold);
  padding: 0.9rem 1.1rem;
  border-radius: 0 8px 8px 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 1.25rem 0;
}

.note.welcome {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow);
  color: var(--ink);
  margin: 0 0 1.75rem;
}
.note.welcome p { margin: 0 0 0.75rem; }
.note.welcome p:last-child { margin-bottom: 0; }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.gallery figure {
  margin: 0;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.gallery figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Forms */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  max-width: 560px;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0 0 0.35rem;
}
.field { margin-bottom: 1rem; }
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
input:focus, textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
textarea { min-height: 100px; resize: vertical; }

.form-hint {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0.75rem 0 0;
}

.meetup-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.meetup-box .tba {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0.5rem 0 1rem;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #cbbfb0;
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: 0.9rem;
}
.site-footer a { color: var(--gold); }
.site-footer p { margin: 0.35rem 0; }

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


.logo {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  max-width: 16rem;
  line-height: 1.2;
}
.logo-sub {
  display: block;
  width: 100%;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.95;
}
.hero-kicker {
  margin: 0 0 0.4rem !important;
  font-size: 0.85rem !important;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold) !important;
}
.hero-tagline {
  margin: 0 0 0.65rem !important;
  font-size: clamp(2.35rem, 7vw, 3.75rem) !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
  line-height: 1.05 !important;
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
}
.hero-tagline::after {
  content: "";
  display: block;
  width: 4.5rem;
  height: 3px;
  margin-top: 0.65rem;
  background: var(--gold);
  border-radius: 2px;
}
.hero-sub {
  margin: 0 !important;
  font-size: 1.1rem !important;
  max-width: 34em;
  color: #f0e6d8 !important;
}
.note.apology {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  box-shadow: var(--shadow);
  color: var(--ink);
  margin: 0 0 1.25rem;
  padding: 1.25rem 1.35rem;
}
.note.apology .apology-title {
  font-size: 1.2rem;
  margin: 0 0 0.85rem !important;
  color: var(--ink);
}
.note.apology p { margin: 0 0 0.75rem; }
.note.apology p:last-child { margin-bottom: 0; }

/* SFHS logo */
.logo{display:inline-flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.logo-img{height:44px;max-height:48px;width:auto;flex-shrink:0}
@media (max-width:600px){.logo-img{height:36px}}


/* 1990 yearbook viewer */
.yearbook-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0 0.5rem;
}
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-secondary:hover {
  background: var(--accent);
  color: #fff;
}
.yearbook-viewer {
  margin-top: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}
.yearbook-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.5rem 0;
}
.yearbook-page-label {
  font-weight: 600;
  min-width: 8rem;
  text-align: center;
}
.yearbook-stage {
  display: flex;
  justify-content: center;
  background: #1a1520;
  border-radius: 8px;
  min-height: 320px;
  padding: 0.5rem;
}
.yearbook-stage img {
  max-height: min(80vh, 900px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.yearbook-jump {
  font-size: 0.9rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.yearbook-jump input {
  width: 4.5rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.optional { color: var(--ink-soft); font-weight: 400; font-size: 0.9em; }

/* Memorial — Brian Manglinong */
.memorial-hero {
  background: linear-gradient(160deg, #2c2419 0%, #4a3a28 55%, #3d3226 100%);
  color: #fff;
  text-align: center;
  padding: 2.5rem 1.25rem 2.75rem;
}
.memorial-hero-inner { max-width: 36rem; margin: 0 auto; }
.memorial-kicker {
  margin: 0 0 1.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.memorial-portrait-wrap {
  display: inline-block;
  padding: 0.45rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(196,163,90,0.55);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  margin-bottom: 1.25rem;
}
.memorial-portrait {
  width: min(220px, 55vw);
  height: auto;
  border-radius: 8px;
  display: block;
}
.memorial-hero h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.6rem, 4.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
}
.memorial-sub {
  margin: 0;
  color: #f0e6d8;
  font-size: 1.05rem;
}
.memorial-page .memorial-lead { max-width: 38em; }
.memorial-tribute p { margin: 0 0 0.75rem; }
.memorial-tribute p:last-child { margin-bottom: 0; }
.memorial-gallery img {
  aspect-ratio: auto;
  object-fit: contain;
  background: #f3eee6;
  max-height: 420px;
  margin: 0 auto;
}
.memorial-upload { max-width: 560px; }
.memorial-upload input[type="file"] {
  width: 100%;
  padding: 0.55rem 0;
  font: inherit;
  color: var(--ink-soft);
}
.card.memorial-card {
  border-left: 4px solid var(--gold);
}


/* Home reunion preview strip */
.home-photo-strip { margin: 2rem 0 1.5rem; }
.gallery.photo-strip { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.85rem; }
.gallery.photo-strip figure { border-radius: var(--radius); }
.gallery.photo-strip a { display: block; }
.gallery.photo-strip img { aspect-ratio: 4/3; object-fit: cover; transition: opacity 0.15s ease; }
.gallery.photo-strip a:hover img { opacity: 0.9; }

/* Classmates directory */
.classmate-search-wrap { margin: 0 0 1.5rem; }
.classmate-search-wrap label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--ink);
  max-width: 22rem;
}
.classmate-search-wrap input {
  font: inherit;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.classmate-section { margin: 2rem 0 1.5rem; }
.count-pill {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: #fff8e8;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  vertical-align: middle;
}
.classmate-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.classmate-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.85rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
  box-shadow: var(--shadow);
}
.classmate-row--have {
  border-left: 4px solid var(--gold);
}
.classmate-row--need {
  border-left: 4px solid #b85c38;
}
.count-pill--need {
  color: #8a3d24;
  background: #fff1eb;
}
.classmate-badge--have {
  color: var(--accent);
  background: #fff8e8;
}
.classmate-badge--need {
  color: #8a3d24;
  background: #fff1eb;
}
.classmate-help {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #8a3d24;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.classmate-help:hover,
.classmate-help:focus {
  color: #5e2816;
}
.classmate-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-end;
}
.classmate-thumb {
  width: 56px;
  height: 72px;
  object-fit: cover;
  object-position: center top;
  border-radius: 6px;
  background: #f3eee6;
}
.classmate-thumb--empty {
  background: linear-gradient(135deg, #f3eee6, #e8ddd0);
}
.classmate-meta { min-width: 0; }
.classmate-name {
  margin: 0;
  font-weight: 650;
  font-size: 1.02rem;
  color: var(--ink);
}
.classmate-badge {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: #fff8e8;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}
.classmate-yb {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  white-space: nowrap;
}
@media (max-width: 520px) {
  .classmate-row {
    grid-template-columns: 48px 1fr;
  }
  .classmate-actions {
    grid-column: 1 / -1;
    align-items: flex-start;
  }
  .classmate-yb {
    justify-self: start;
  }
  .classmate-thumb { width: 48px; height: 62px; }
}

/* Classmates guestbook */
.guestbook-compose {
  margin: 1.75rem 0 2.25rem;
}
.guestbook-compose-lead {
  margin-top: -0.35rem;
  max-width: 40em;
}
.guestbook-form {
  max-width: 560px;
}
.guestbook-wall {
  margin: 0 0 2.5rem;
}
.guestbook-cards {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.guestbook-empty {
  margin: 0;
  padding: 1.25rem 1.35rem;
  background: #fff8e8;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-weight: 550;
}
.guestbook-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
}
.guestbook-author {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  color: var(--ink);
}
.guestbook-hometown {
  font-weight: 500;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.guestbook-about {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  color: var(--accent);
}
.guestbook-message {
  margin: 0 0 0.5rem;
  color: var(--ink);
  white-space: pre-wrap;
}
.guestbook-date {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.classmate-sayhi {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--accent);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff8e8;
  white-space: nowrap;
}
.classmate-sayhi:hover,
.classmate-sayhi:focus {
  color: var(--accent-hover);
  border-color: var(--gold);
  background: #fff3d6;
}
.classmate-guestbook-note {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.35;
}
.classmate-gb-count {
  font-weight: 650;
  color: var(--accent);
}
.classmate-gb-snippet {
  font-style: italic;
}
.optional {
  font-weight: 500;
  color: var(--ink-soft);
  font-size: 0.85em;
}
