/* =========================================================
   The Dr. S.U. Braly Scholarship — shared design system
   (Fonts are loaded via <link> in each page's <head>.)
   ========================================================= */

:root {
  /* Brand — refined navy + antique gold on warm cream */
  --navy:        #16273f;   /* deep primary navy */
  --navy-mid:    #21466f;   /* lighter navy for layering */
  --navy-soft:   #2c577f;
  --gold:        #c29545;   /* elegant antique gold */
  --gold-bright: #d8b265;   /* highlight gold */
  --gold-deep:   #a87c33;

  --cream:       #f5efe3;   /* page background */
  --cream-2:     #efe7d6;   /* alt warm band */
  --card:        #fdfbf6;   /* card / surface */
  --line:        #e3dac6;   /* hairline on cream */

  --ink:         #1c1a15;   /* warm near-black text */
  --ink-soft:    #4f4a3f;   /* secondary text */
  --ink-muted:   #837b6b;   /* muted text */
  --on-navy:     #f3ede0;   /* text on navy */
  --on-navy-mut: #b9c4d4;   /* muted text on navy */

  --content: 1180px;
  --wide: 1440px;

  --shadow-sm: 0 1px 2px rgba(22,39,63,.06), 0 2px 8px rgba(22,39,63,.06);
  --shadow-md: 0 6px 18px rgba(22,39,63,.10), 0 2px 6px rgba(22,39,63,.06);
  --shadow-lg: 0 24px 60px rgba(22,39,63,.18);

  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --ease: cubic-bezier(.22,.61,.36,1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  margin: 0;
  letter-spacing: .003em;
  text-wrap: pretty;
}

p { margin: 0; text-wrap: pretty; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--content); margin-inline: auto; padding-inline: 28px; }
.wrap-wide { width: 100%; max-width: var(--wide); margin-inline: auto; padding-inline: 28px; }
.section { padding-block: clamp(56px, 8vw, 112px); }

.eyebrow {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .76rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: inline-flex;
  align-items: center;
  gap: .7em;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1.5px;
  background: var(--gold);
  display: inline-block;
}
.eyebrow.center { justify-content: center; }
.eyebrow.on-navy { color: var(--gold-bright); }

.h-xl { font-size: clamp(2.6rem, 5.8vw, 4.6rem); }
.h-lg { font-size: clamp(2.1rem, 4.2vw, 3.3rem); }
.h-md { font-size: clamp(1.7rem, 3vw, 2.4rem); }

.lead { font-size: clamp(1.05rem, 1.5vw, 1.28rem); color: var(--ink-soft); line-height: 1.65; }

.muted { color: var(--ink-muted); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--gold);
  --fg: var(--navy);
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-sans);
  font-weight: 600; font-size: .98rem;
  letter-spacing: .01em;
  padding: 15px 30px;
  background: var(--bg); color: var(--fg);
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

.btn-gold { --bg: var(--gold); --fg: var(--navy); }
.btn-gold:hover { --bg: var(--gold-bright); }
.btn-navy { --bg: var(--navy); --fg: var(--on-navy); }
.btn-navy:hover { --bg: var(--navy-mid); }
.btn-outline {
  background: transparent; color: var(--navy);
  border-color: rgba(22,39,63,.32);
  box-shadow: none;
}
.btn-outline:hover { border-color: var(--navy); background: rgba(22,39,63,.04); }
.btn-outline.on-navy { color: var(--on-navy); border-color: rgba(243,237,224,.4); }
.btn-outline.on-navy:hover { background: rgba(243,237,224,.08); border-color: var(--on-navy); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245,239,227,.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--wide); margin-inline: auto;
  padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark {
  width: 42px; height: 42px; flex: none;
  border-radius: 50%;
  background: var(--navy);
  display: grid; place-items: center;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.32rem;
  border: 1.5px solid var(--gold);
  letter-spacing: -.02em;
}
.brand-name { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name .t1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.3rem; color: var(--navy); letter-spacing: .01em; white-space: nowrap;
}
.brand-name .t2 {
  font-family: var(--font-sans); font-weight: 600;
  font-size: .64rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold-deep);
}
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-weight: 500; font-size: .96rem; color: var(--ink-soft);
  padding: 9px 14px; border-radius: 2px; position: relative;
  transition: color .2s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px;
  height: 1.5px; background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .28s var(--ease);
}
.nav-links a:hover { color: var(--navy); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--navy); font-weight: 600; }
.nav-cta { margin-left: 10px; padding: 11px 22px; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 12px 20px 20px; gap: 2px;
  }
  .nav-links.open a { padding: 13px 6px; border-bottom: 1px solid var(--line); }
  .nav-links.open a::after { display: none; }
  .nav-links.open .nav-cta { margin: 12px 0 0; justify-content: center; }
  .nav-toggle {
    display: inline-grid; place-items: center; gap: 5px;
    width: 44px; height: 44px; background: none; border: none; cursor: pointer;
  }
  .nav-toggle span { width: 22px; height: 2px; background: var(--navy); display: block; transition: .3s var(--ease); }
}

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: var(--on-navy-mut); }
.footer-top {
  max-width: var(--content); margin-inline: auto; padding: 64px 28px 48px;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px;
}
.footer h4 { color: var(--on-navy); font-size: 1.05rem; font-family: var(--font-sans); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 18px; }
.footer-brand .t1 { font-family: var(--font-display); font-size: 1.7rem; color: var(--on-navy); font-weight: 600; }
.footer-brand p { margin-top: 14px; max-width: 42ch; font-size: .96rem; line-height: 1.7; }
.footer-col a { display: block; padding: 7px 0; color: var(--on-navy-mut); font-size: .96rem; transition: color .2s var(--ease); }
.footer-col a:hover { color: var(--gold-bright); }
.footer-bottom {
  border-top: 1px solid rgba(243,237,224,.12);
  max-width: var(--content); margin-inline: auto; padding: 22px 28px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: .84rem; color: var(--on-navy-mut);
}
@media (max-width: 760px) {
  .footer-top { grid-template-columns: 1fr; gap: 34px; }
}

/* ---------- Reveal on scroll ----------
   Opacity stays 1 at all times so content is never invisible if the
   compositor pauses transitions (e.g. offscreen iframes / capture).
   Entrance motion is a transform only — worst case it sits 18px lower. */
.reveal { transform: translateY(18px); transition: transform .7s var(--ease); will-change: transform; }
.reveal.in { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Misc surfaces ---------- */
.band-navy { background: var(--navy); color: var(--on-navy); }
.band-cream2 { background: var(--cream-2); }

.kicker-rule { width: 56px; height: 2px; background: var(--gold); margin: 22px 0; }

.photo-frame {
  position: relative; overflow: hidden; border-radius: 3px;
  box-shadow: var(--shadow-md);
  background: var(--navy);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Subpage hero ---------- */
.page-hero { position: relative; overflow: hidden; background: var(--navy); }
.page-hero .bg { position: absolute; inset: 0; }
.page-hero .bg img { width: 100%; height: 100%; object-fit: cover; opacity: .42; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, rgba(15,26,42,.92), rgba(15,26,42,.55) 70%, rgba(15,26,42,.3)); }
.page-hero .inner { position: relative; z-index: 1; max-width: var(--content); margin-inline: auto; padding: clamp(64px,9vw,128px) 28px clamp(52px,7vw,96px); }
.page-hero h1 { color: var(--on-navy); margin-top: 18px; line-height: 1.12; text-wrap: normal; font-size: clamp(2.2rem, 4.6vw, 3.5rem); }
.page-hero p { color: var(--on-navy-mut); margin-top: 26px; max-width: 52ch; font-size: clamp(1.05rem,1.5vw,1.25rem); line-height: 1.6; }
.crumbs { font-size: .82rem; letter-spacing: .04em; color: var(--on-navy-mut); }
.crumbs a:hover { color: var(--gold-bright); }
.crumbs .sep { margin: 0 8px; color: rgba(185,196,212,.5); }

/* ---------- Prose ---------- */
.prose p { font-size: 1.08rem; line-height: 1.75; color: var(--ink-soft); margin-bottom: 1.1em; }
.prose p:last-child { margin-bottom: 0; }

.section-head { max-width: 640px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-top: 16px; color: var(--navy); }
.section-head p { margin-top: 16px; }
