/* Taft Class of 1977 reunion site.
   Colors are Taft's red, gold and black. Change them here to restyle the whole site. */

:root {
  --red: #8c1c22;         /* Toreador red: buttons, headings, links */
  --red-dark: #6a1419;    /* hover */
  --red-tint: #fbeeee;    /* selected answer background */
  --gold: #d6a72b;        /* decorative accents only (not for text) */
  --gold-tint: #fbf3dc;
  --ink: #1a1a1a;         /* main text */
  --ink-soft: #454545;    /* hints and secondary text */
  --paper: #fffdf8;       /* page background */
  --card: #ffffff;
  --border: #6b6b6b;      /* form field borders */
  --line: #e2dccd;        /* dividers */
  --error: #a4000f;
  --error-tint: #fff0f0;
  --success: #1c5e2b;
  --success-tint: #edf7ef;
  --focus: #1a1a1a;

  --radius: 10px;
  --measure: 40rem;
}

/* Base text is 20px; "Larger text" button raises it to 24px. */
html { font-size: 125%; -webkit-text-size-adjust: 100%; }
html.text-larger { font-size: 150%; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3 {
  font-family: "Libre Baskerville", Georgia, "Times New Roman", serif;
  line-height: 1.25;
  color: var(--red);
  margin: 0 0 0.6em;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.45rem; margin-top: 1.8em; }
h3 { font-size: 1.15rem; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: 0.4em; }
strong { font-weight: 700; }

a { color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--red-dark); text-decoration-thickness: 3px; }

:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 16px; }
.page { padding-top: 2rem; padding-bottom: 3rem; }

.skip-link {
  position: absolute; left: 1rem; top: -10rem;
  background: var(--ink); color: #fff; padding: 0.75rem 1rem; z-index: 10; border-radius: 6px;
}
.skip-link:focus { top: 1rem; }

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

/* ---- Header & footer ---- */

.site-header { background: var(--red); color: #fff; border-bottom: 6px solid var(--gold); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; padding-top: 0.9rem; padding-bottom: 0.9rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark {
  flex: none; display: grid; place-items: center;
  width: 3rem; height: 3rem; border-radius: 50%;
  background: var(--gold); color: var(--ink);
  font-family: "Libre Baskerville", Georgia, serif; font-weight: 700; font-size: 1.05rem;
  border: 3px solid #fff;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 1.05rem; }
.brand-text span { font-size: 0.85rem; }

.text-size-toggle {
  font: inherit; font-size: 0.85rem; font-weight: 700;
  color: #fff; background: transparent;
  border: 2px solid #fff; border-radius: 999px;
  padding: 0.45rem 1rem; min-height: 2.75rem; cursor: pointer;
}
.text-size-toggle:hover { background: rgba(255, 255, 255, 0.15); }
.text-size-toggle[aria-pressed="true"] { background: #fff; color: var(--red); }
.text-size-toggle[aria-pressed="true"]::before { content: "✓ "; }
.text-size-toggle:focus-visible { outline-color: #fff; }

.site-nav { background: var(--ink); }
.site-nav ul {
  list-style: none; margin: 0 auto; padding: 0 16px; max-width: var(--measure);
  display: flex; flex-wrap: wrap; gap: 0 1.25rem;
}
.site-nav li { margin: 0; }
.site-nav a {
  display: inline-block; color: #fff; padding: 0.7rem 0; font-weight: 700;
  text-decoration: none; border-bottom: 4px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--gold); color: #fff; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--gold); }
.site-nav a:focus-visible { outline-color: #fff; }

.site-footer {
  border-top: 1px solid var(--line); margin-top: 2rem; padding: 1.5rem 0 2.5rem;
  color: var(--ink-soft); font-size: 0.9rem;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: inherit; font-weight: 700; font-size: 1.1rem; line-height: 1.3;
  color: #fff; background: var(--red);
  border: 3px solid var(--red); border-radius: var(--radius);
  padding: 0.85rem 1.75rem; min-height: 3.4rem;
  text-decoration: none; cursor: pointer; text-align: center;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn[disabled] { opacity: 0.65; cursor: wait; }
.btn-big { font-size: 1.25rem; padding: 1rem 2.25rem; min-height: 3.8rem; }
.btn-block { width: 100%; }
.btn-secondary { color: var(--red); background: var(--card); }
.btn-secondary:hover { color: #fff; }
.btn-small { font-size: 0.9rem; padding: 0.45rem 1rem; min-height: 2.75rem; border-width: 2px; }

/* ---- Home page ---- */

.hero { background: var(--gold-tint); border-bottom: 1px solid var(--line); }
.hero .wrap { padding-top: 2.25rem; padding-bottom: 2.25rem; }
.hero .lead { font-size: 1.15rem; }
.cta { margin: 1.5rem 0 0.5rem; }
.cta-note { color: var(--ink-soft); font-size: 0.95rem; }

.callout {
  background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--gold);
  border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.5rem 0;
}
.callout > :last-child { margin-bottom: 0; }

.signoff { font-style: italic; }

/* ---- Text the committee edits (home page, page introductions) ---- */

.prose > :first-child { margin-top: 0; }
.prose h2:first-child { margin-top: 0; }
.lead p { margin-bottom: 0.6em; }
.hero h1 { margin-bottom: 0.5em; }
.callout h2 { font-size: 1.15rem; margin: 0 0 0.5em; }
.signoff p { font-style: italic; }

.announcement {
  background: var(--gold-tint); border-bottom: 3px solid var(--gold);
  font-weight: 700; font-size: 1.05rem;
}
.announcement .wrap { padding-top: 0.8rem; padding-bottom: 0.8rem; }
.announcement p { margin: 0; }
.announcement p + p { margin-top: 0.4em; }

/* ---- Name lists (Who's Interested, Help Us Find, In Memoriam) ---- */

.list-area { margin: 1.5rem 0 2rem; }
.list-count { font-weight: 700; color: var(--ink-soft); }
.list-empty { font-style: italic; color: var(--ink-soft); }

.name-filter { margin: 1rem 0 1.5rem; max-width: 26rem; }
.name-filter label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.name-filter input {
  display: block; width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 2px solid var(--border); border-radius: 8px; padding: 0.7rem 0.8rem; min-height: 3.2rem;
}
.name-filter input:focus-visible { outline: 4px solid var(--focus); outline-offset: 1px; }
.filter-status { margin: 0.5rem 0 0; color: var(--ink-soft); }
.filter-status:empty { display: none; }

.letter-nav { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 1rem 0 1.5rem; }
.letter-nav a {
  display: grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem;
  font-weight: 700; text-decoration: none; border: 2px solid var(--line); border-radius: 8px; background: var(--card);
}
.letter-nav a:hover { border-color: var(--red); }

.letter-group h2 {
  font-size: 1.5rem; margin: 1.5rem 0 0.5rem; padding-bottom: 0.2rem;
  border-bottom: 3px solid var(--gold); scroll-margin-top: 1rem;
}

.name-list { list-style: none; padding: 0; margin: 0; columns: 2 15rem; column-gap: 2rem; }
.name-list li { break-inside: avoid; padding: 0.35rem 0; margin: 0; border-bottom: 1px solid var(--line); }
.list-name { font-weight: 700; }
.list-former { color: var(--ink-soft); }

/* In Memoriam */
.memoriam-page h1 { text-align: center; }
.memoriam-page .prose { text-align: center; }
.memoriam-page .list-count { text-align: center; }
.memoriam-rule { width: 6rem; height: 3px; background: var(--gold); margin: 0 auto 1.5rem; border-radius: 2px; }
.memoriam-list { list-style: none; padding: 0; margin: 1.5rem 0 0; text-align: center; }
.memoriam-list li { padding: 1rem 0; margin: 0; border-bottom: 1px solid var(--line); }
.memoriam-list li:last-child { border-bottom: 0; }
.memoriam-list .list-name { font-family: "Libre Baskerville", Georgia, serif; font-size: 1.2rem; color: var(--ink); }
.memoriam-list .list-note { display: block; font-style: italic; color: var(--ink-soft); margin-top: 0.2rem; }
.memoriam-page .name-filter { margin-left: auto; margin-right: auto; }

/* ---- Survey form ---- */

.form-intro { color: var(--ink-soft); }

.form-section {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.25rem 0.5rem; margin: 1.5rem 0;
}
.form-section h2 { margin-top: 0; }
.section-note { color: var(--ink-soft); }

.field { margin-bottom: 1.5rem; }
.field > label, legend {
  display: block; font-weight: 700; font-size: 1.05rem; margin-bottom: 0.3rem; padding: 0;
}
fieldset { border: 0; margin: 0 0 1.5rem; padding: 0; min-width: 0; }
.req { font-weight: 400; color: var(--ink-soft); }
.hint { display: block; color: var(--ink-soft); margin: 0 0 0.5rem; font-size: 0.95rem; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"], select, textarea {
  display: block; width: 100%;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 2px solid var(--border); border-radius: 8px;
  padding: 0.7rem 0.8rem; min-height: 3.2rem;
}
textarea { min-height: 7rem; resize: vertical; }
select { appearance: auto; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 4px solid var(--focus); outline-offset: 1px; border-color: var(--ink);
}

.choices { display: grid; gap: 0.6rem; }
.choice {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.75rem 1rem; min-height: 3.4rem;
  background: #fff; border: 2px solid var(--border); border-radius: 8px;
  cursor: pointer; font-weight: 400;
}
.choice:hover { border-color: var(--red); }
.choice:has(input:checked) { border-color: var(--red); background: var(--red-tint); font-weight: 700; }
.choice:has(input:focus-visible) { outline: 4px solid var(--focus); outline-offset: 2px; }
.choice input { flex: none; width: 1.6rem; height: 1.6rem; margin: 0; accent-color: var(--red); cursor: pointer; }
.choice input:focus-visible { outline: none; }

.photo-preview { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 0.75rem; }
.photo-preview img { max-width: 10rem; max-height: 10rem; border-radius: 8px; border: 1px solid var(--line); }

input[type="file"] { font: inherit; font-size: 0.95rem; max-width: 100%; }
input[type="file"]::file-selector-button {
  font: inherit; font-weight: 700; color: var(--red); background: #fff;
  border: 2px solid var(--red); border-radius: 8px; padding: 0.6rem 1.1rem; margin-right: 0.75rem; cursor: pointer;
}

/* Hidden from people; bots tend to fill it in. */
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.submit-area { margin: 2rem 0 1rem; }
.privacy-note { color: var(--ink-soft); font-size: 0.95rem; margin-top: 1rem; }

/* Errors */
.error-summary {
  border: 4px solid var(--error); background: var(--error-tint); border-radius: var(--radius);
  padding: 1rem 1.25rem; margin: 1.5rem 0;
}
.error-summary h2 { color: var(--error); margin: 0 0 0.5rem; font-size: 1.25rem; }
.error-summary ul { margin: 0; padding-left: 1.25rem; }
.error-summary a { color: var(--error); font-weight: 700; }
.error-message { display: block; color: var(--error); font-weight: 700; margin: 0.25rem 0 0.5rem; }
.error-message::before { content: "⚠ "; }
.has-error input[type="text"], .has-error input[type="email"], .has-error input[type="tel"],
.has-error select, .has-error textarea, .has-error .choice { border-color: var(--error); }
.has-error { border-left: 5px solid var(--error); padding-left: 0.85rem; }
.error-list { color: var(--error); font-weight: 700; }

.notice {
  border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1rem 0;
  background: var(--gold-tint); border: 2px solid var(--gold);
}

/* ---- Thank-you page ---- */

.big-check {
  width: 4.5rem; height: 4.5rem; border-radius: 50%;
  background: var(--success); color: #fff;
  display: grid; place-items: center; font-size: 2.4rem; margin-bottom: 1rem;
}
.copy-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.copy-status { color: var(--success); font-weight: 700; }

@media (max-width: 480px) {
  h1 { font-size: 1.7rem; }
  .site-nav a { padding: 0.4rem 0; }
  .site-nav ul { padding-top: 0.25rem; padding-bottom: 0.25rem; }
  .btn-big { width: 100%; }
  .form-section { padding: 1rem 0.9rem 0.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-nav, .text-size-toggle, .site-footer { display: none; }
}
