/* ===========================================================================
   Aaron R. Thomas Memorial Scholarship — styles
   Plain CSS, no build step. Theme is driven by the custom properties in :root.
   Tone: dignified, warm, photo-forward.
   =========================================================================== */

:root {
  /* Palette — warm ivory, deep slate ink, antique-gold accent */
  --bg:        #faf7f1;
  --bg-alt:    #f2ece1;
  --surface:   #ffffff;
  --ink:       #232a31;
  --ink-soft:  #5b6470;
  --line:      #e6ddcd;
  --gold:      #9c7c3c;
  --gold-soft: #c2a567;
  --evergreen: #2f4a3f;

  --maxw: 1080px;
  --radius: 14px;
  --shadow: 0 14px 40px rgba(35, 42, 49, 0.10);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; }

/* ---------- Nav ---------- */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 1rem;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
}
.site-nav nav { display: flex; gap: 1.75rem; }
.site-nav nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.site-nav nav a:hover { color: var(--gold); }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4.5rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 1.1rem;
}
.hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  line-height: 1.04;
  margin: 0;
  color: var(--ink);
}
.hero-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  color: var(--gold);
  margin: 0.4rem 0 0;
}
.hero-tagline {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 40ch;
  margin: 1.6rem 0 0;
}
.hero-note {
  margin: 1.6rem 0 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}

/* ---------- Photo frames (shared) ---------- */
.photo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Placeholder shown when the image file is missing (toggled by script.js) */
.photo-fallback {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.25rem;
  text-align: center;
  color: var(--ink-soft);
  background:
    repeating-linear-gradient(45deg, #efe8da, #efe8da 12px, #ece4d3 12px, #ece4d3 24px);
}
.photo-fallback-icon { font-size: 1.8rem; opacity: 0.7; }
.photo-fallback-text { font-size: 0.88rem; max-width: 24ch; }
.photo.is-missing .photo-img,
.hero-photo.is-missing .photo-img { display: none; }
.photo.is-missing .photo-fallback,
.hero-photo.is-missing .photo-fallback { display: flex; }

.hero-photo { margin: 0; }
.hero-photo .photo-frame { aspect-ratio: 4 / 5; }

/* ---------- Sections ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 5rem 1.5rem;
}
.section-alt {
  max-width: none;
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}
.section-alt > * { max-width: var(--maxw); margin-inline: auto; }

.section-head { text-align: center; margin-bottom: 3rem; }
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
}
.section-head h2 {
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  line-height: 1.12;
  margin: 0.7rem auto 0;
  max-width: 18ch;
  color: var(--ink);
}

.prose {
  max-width: 62ch;
  margin: 0 auto;
  font-size: 1.12rem;
  color: var(--ink);
}
.prose p { margin: 0 0 1.3rem; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Photo gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}
.photo { margin: 0; }
.photo figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 1rem;
  text-align: center;
}
.photo-tag {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.photo-cap { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- Values ---------- */
.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.value-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
}
.value-card::before {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin: 0 auto 1.1rem;
  background: var(--gold-soft);
  border-radius: 2px;
}
.value-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  color: var(--evergreen);
}
.value-card p { margin: 0; color: var(--ink-soft); }

/* ---------- Scholarship callout ---------- */
.scholarship {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
  text-align: center;
}
.scholarship-emblem {
  width: 76px;
  height: 76px;
  margin: 0 auto 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.2rem;
  color: var(--gold);
  background: var(--surface);
  border: 2px solid var(--gold-soft);
  box-shadow: var(--shadow);
}
.scholarship h2 {
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  margin: 0 0 1rem;
  color: var(--ink);
}
.scholarship p {
  max-width: 54ch;
  margin: 0 auto 2rem;
  font-size: 1.12rem;
  color: var(--ink-soft);
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 10px 26px rgba(156, 124, 60, 0.28);
}
.btn-primary:hover { background: #8a6c32; box-shadow: 0 14px 32px rgba(156, 124, 60, 0.4); }

/* ---------- Closing ---------- */
.closing {
  text-align: center;
  padding: 2rem 1.5rem 5rem;
  max-width: 720px;
  margin: 0 auto;
}
.closing-rule {
  display: block;
  width: 60px;
  height: 1px;
  margin: 0 auto 2rem;
  background: var(--gold-soft);
}
.closing-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  margin: 0 0 0.75rem;
  color: var(--ink);
}
.closing-line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
}
.footer-title {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: var(--ink);
}
.site-footer p { margin: 0.2rem 0; }
.muted { color: var(--ink-soft); font-size: 0.9rem; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 2rem;
    text-align: center;
  }
  .hero-tagline { margin-inline: auto; }
  .hero-photo { order: -1; max-width: 360px; margin-inline: auto; }
  .site-nav nav { gap: 1rem; }
}
@media (max-width: 480px) {
  .site-nav { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
