/* =========================================================================
   paul.creativecorerail.com  |  The Paul Levy '99 Scholarship
   One stylesheet for every page. Source Serif 4 for headings, Source Sans 3
   for everything else, both self-hosted variable fonts in /fonts.
   Palette: warm paper, slate ink, De La Salle maroon (#872634) for the one
   action, the deep maroon (#481823) for the closing band.
   ========================================================================= */

/* ---- Fonts (self-hosted, latin subset, variable weight) ---------------- */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('/fonts/source-serif-4-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('/fonts/source-sans-3-latin.woff2') format('woff2');
}

/* ---- Tokens ------------------------------------------------------------ */
:root {
  --paper:     #F7F3EC;   /* page ground */
  --paper-2:   #EFE9DF;   /* tint bands, footer */
  --raised:    #FBF9F5;   /* cards */
  --ink:       #221E1C;   /* text, 14.9:1 on paper */
  --muted:     #5B544E;   /* secondary text, 6.7:1 on paper */
  --rule:      #D8D0C4;   /* hairlines */
  --maroon:    #872634;   /* De La Salle maroon, 8.1:1 on paper */
  --maroon-2:  #6E1E2A;   /* hover */
  --deep:      #481823;   /* closing band */
  --deep-text: #D9C9CC;   /* small print on the deep band, 9.2:1 */

  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans:  'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --s-1: 8px;  --s-2: 16px; --s-3: 24px; --s-4: 32px;
  --s-5: 48px; --s-6: 64px; --s-7: 96px; --s-8: 128px;
  --section: clamp(64px, 9vw, 112px);
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1120px;
  --measure: 62ch;

  --radius: 6px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Reset and base ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; background: none; border: 0; cursor: pointer; }
ol, ul { list-style: none; }
strong { font-weight: 600; }
::selection { background: var(--maroon); color: #fff; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.012em;
  text-wrap: balance;
  color: var(--ink);
}
h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); }
h3 { font-size: 1.3rem; line-height: 1.25; }
p  { max-width: var(--measure); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
main { flex: 1; }

/* Visible focus everywhere; brand ring plus a light halo so it reads on the deep band. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--maroon);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.85);
}
.band-deep a:focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px rgba(72, 24, 35, 0.9); }

.skip-nav {
  position: absolute; top: -60px; left: 16px; z-index: 999;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: var(--radius);
  text-decoration: none; font-weight: 600;
  transition: top 150ms ease;
}
.skip-nav:focus { top: 12px; }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0.7em 1.35em;
  font-weight: 600; font-size: 1rem; line-height: 1.2;
  border-radius: var(--radius); border: 1.5px solid transparent;
  text-decoration: none; white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--maroon); color: #fff; border-color: var(--maroon); }
.btn-primary:hover { background: var(--maroon-2); border-color: var(--maroon-2); }
.btn-secondary { background: transparent; color: var(--maroon); border-color: var(--maroon); }
.btn-secondary:hover { background: rgba(135, 38, 52, 0.08); }
.btn-arrow::after { content: "\2197"; font-weight: 400; margin-left: 0.1em; }

.band-deep .btn-primary { background: var(--paper); color: var(--deep); border-color: var(--paper); }
.band-deep .btn-primary:hover { background: #fff; border-color: #fff; }
.band-deep .btn-secondary { color: var(--paper); border-color: rgba(247, 243, 236, 0.7); }
.band-deep .btn-secondary:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--paper); }

.link { color: var(--maroon); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link:hover { color: var(--maroon-2); text-decoration-thickness: 2px; }

/* ---- Header ------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 243, 236, 0.92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap { display: flex; align-items: center; gap: var(--s-3); min-height: 66px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-family: var(--serif); font-weight: 600;
  font-size: 1.15rem; letter-spacing: -0.01em; color: var(--ink);
}
.brand img { width: 30px; height: 30px; flex: none; }
.brand span { white-space: nowrap; }
.nav-links { display: none; margin-left: auto; gap: var(--s-3); }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 500; padding: 6px 0; }
.nav-links a:hover { color: var(--ink); }
.site-header .btn { margin-left: auto; min-height: 42px; padding: 0.5em 1.1em; }
@media (min-width: 780px) {
  .nav-links { display: flex; }
  .site-header .btn { margin-left: 0; }
}

/* ---- Hero -------------------------------------------------------------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 96px); }
.hero .wrap { display: grid; gap: var(--s-5); align-items: center; }
.eyebrow {
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--maroon); margin-bottom: var(--s-3);
}
.hero h1 { max-width: 14ch; margin-bottom: var(--s-3); }
.hero .lede { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.375rem); line-height: 1.5; color: var(--ink); max-width: 36ch; }
.hero .lede strong { font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.cta-row .btn { flex: 1 1 auto; }
@media (min-width: 480px) { .cta-row .btn { flex: 0 0 auto; min-width: 180px; } }
.proof { margin-top: var(--s-3); color: var(--muted); font-size: 0.975rem; max-width: 44ch; }
.proof strong { color: var(--ink); font-weight: 600; }

.portrait { width: 100%; max-width: 260px; margin: 0; }
.frame { padding: 10px; border: 1px solid var(--maroon); background: var(--paper); }
.frame img { width: 100%; outline: 1px solid var(--maroon); outline-offset: 4px; }
.portrait figcaption { margin-top: 14px; font-size: 0.9rem; color: var(--muted); }
@media (min-width: 860px) {
  .hero .wrap { grid-template-columns: 1.15fr 0.85fr; gap: var(--s-7); }
  .portrait { max-width: 280px; justify-self: end; }
}

/* ---- Sections ---------------------------------------------------------- */
.section { padding: var(--section) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.band { background: var(--paper-2); }
.section-head { margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { margin-bottom: var(--s-2); }
.section-head .lead { font-size: 1.15rem; color: var(--muted); max-width: 56ch; }
.section-head .lead strong { color: var(--ink); }

/* How to give */
.give-grid { display: grid; gap: var(--s-3); }
@media (min-width: 860px) { .give-grid { grid-template-columns: 1.1fr 0.9fr; gap: var(--s-4); } }
.card {
  background: var(--raised); border: 1px solid var(--rule); border-radius: 10px;
  padding: clamp(24px, 4vw, 40px);
}
.card h3 { margin-bottom: var(--s-3); }
.steps { counter-reset: step; }
.steps li {
  counter-increment: step; position: relative;
  padding-left: 52px; margin-bottom: var(--s-3);
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--maroon); color: var(--maroon);
  font-family: var(--serif); font-weight: 600; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
}
.steps li:last-child { margin-bottom: 0; }
.steps .note { color: var(--muted); font-size: 0.95rem; margin-top: 4px; }
.card .btn { margin-top: var(--s-2); }
.memo {
  font-family: var(--serif); font-weight: 600; color: var(--maroon);
  white-space: nowrap;
}
.field-name { font-style: normal; font-weight: 600; }

.address {
  font-style: normal; font-family: var(--serif); font-size: 1.15rem; line-height: 1.5;
  margin-top: var(--s-3); padding: var(--s-3);
  border-left: 3px solid var(--maroon); background: var(--paper);
}
.address .memo { display: block; }

.facts { display: grid; gap: 0; margin-top: clamp(32px, 5vw, 56px); border-top: 1px solid var(--rule); }
.facts li { padding: var(--s-3) 0; border-bottom: 1px solid var(--rule); }
.facts li strong { display: block; margin-bottom: 4px; }
.facts li p { color: var(--muted); max-width: 48ch; }
@media (min-width: 720px) {
  .facts { grid-template-columns: 1fr 1fr; column-gap: var(--s-6); }
}

/* The scholarship */
.criteria { border-top: 1px solid var(--rule); max-width: 640px; }
.criteria li {
  display: flex; align-items: baseline; gap: var(--s-3);
  padding: 18px 0; border-bottom: 1px solid var(--rule);
  font-family: var(--serif); font-size: 1.25rem; line-height: 1.35;
}
.criteria li::before { content: ''; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--maroon); transform: translateY(-2px); }
.two-col { display: grid; gap: var(--s-5); }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1fr; gap: var(--s-7); align-items: start; } }
.stat-row { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6); margin-bottom: var(--s-4); }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem); line-height: 1.05; color: var(--maroon); }
.stat span { color: var(--muted); font-size: 0.95rem; }

blockquote { position: relative; max-width: 58ch; padding-left: 28px; border-left: 3px solid var(--maroon); }
blockquote p { font-family: var(--serif); font-size: 1.25rem; line-height: 1.45; color: var(--ink); max-width: none; }
blockquote p + p { margin-top: 1em; }
blockquote footer { margin-top: var(--s-2); color: var(--muted); font-size: 0.95rem; }
.fine { color: var(--muted); font-size: 0.95rem; margin-top: var(--s-3); }

/* Paul */
.prose p { margin-bottom: 1.1em; }
.prose p:last-child { margin-bottom: 0; }

.strip-wrap { margin-top: clamp(40px, 6vw, 72px); }
.strip-wrap h3 { margin-bottom: var(--s-3); font-size: 1.1rem; color: var(--muted); font-family: var(--sans); font-weight: 500; }
.strip {
  display: flex; gap: 14px; align-items: flex-start;
  overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  padding: 4px 4px 12px; margin: 0 -4px;
  scrollbar-width: thin;
}
.strip:focus-visible { outline: 2px solid var(--maroon); outline-offset: 4px; }
.strip figure { flex: none; margin: 0; scroll-snap-align: start; }
.strip figure:nth-child(even) { margin-top: 28px; }
.strip img {
  height: 210px; width: auto;
  border: 1px solid var(--rule); background: var(--paper-2);
  transition: transform 220ms var(--ease), box-shadow 220ms ease;
}
.strip figure:hover img { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(34, 30, 28, 0.12); }
@media (min-width: 960px) {
  .strip { flex-wrap: wrap; overflow: visible; row-gap: 20px; }
}

/* Updates */
.tally { margin-top: var(--s-4); }
.tally ol { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; max-width: 560px; }
.tally li { display: flex; flex-direction: column; gap: 8px; }
.tally .track { height: 14px; border-radius: 7px; background: var(--paper); border: 1px solid var(--rule); overflow: hidden; }
.band .tally .track { background: #fff; }
.tally .track::before { content: ''; display: block; height: 100%; width: var(--fill, 0%); background: var(--maroon); border-radius: 7px; }
.tally li span { font-size: 0.85rem; color: var(--muted); }
.tally li.is-full span { color: var(--ink); font-weight: 600; }
.tally .caption { margin-top: var(--s-2); color: var(--muted); font-size: 0.95rem; }
.update-list { margin-top: var(--s-4); display: grid; gap: var(--s-3); max-width: 62ch; }
.update-list li { padding-left: 20px; position: relative; }
.update-list li::before { content: ''; position: absolute; left: 0; top: 0.68em; width: 8px; height: 8px; border-radius: 50%; background: var(--maroon); }
.update-list time { color: var(--muted); font-weight: 600; }
.freshness { margin-top: var(--s-3); color: var(--muted); font-size: 0.9rem; }

/* ---- Closing band ------------------------------------------------------ */
.band-deep { background: var(--deep); color: var(--paper); text-align: left; }
.band-deep h2 { color: var(--paper); }
.band-deep p { color: var(--deep-text); }
.band-deep .closing-inner { max-width: 640px; }
.band-deep .lede { font-size: 1.15rem; margin-top: var(--s-2); }
.band-deep .cta-row { margin-top: var(--s-4); }
.invocation {
  margin-top: var(--s-6); padding-top: var(--s-3);
  border-top: 1px solid rgba(247, 243, 236, 0.25);
  font-family: var(--serif); font-size: 1.05rem; color: var(--deep-text);
}

/* ---- Footer ------------------------------------------------------------ */
.site-footer { background: var(--paper-2); border-top: 1px solid var(--rule); padding: var(--s-5) 0 var(--s-4); font-size: 0.95rem; color: var(--ink); }
.footer-grid { display: grid; gap: var(--s-4); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.2fr 0.8fr; gap: var(--s-6); } }
.site-footer address { font-style: normal; line-height: 1.55; }
.site-footer a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.site-footer a:hover { color: var(--maroon); }
.footer-note { color: var(--muted); margin-top: var(--s-2); max-width: 46ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); }
.footer-meta { margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2); color: var(--muted); }

/* Made by CoreRail (the lockup, never the stamp) */
.corerail-credit { grid-column: 1 / -1; width: 100%; display: flex; justify-content: center; margin-top: 2rem; color: var(--ink); }
.corerail-badge { display: inline-flex; align-items: center; gap: 0.55em; text-decoration: none !important; color: inherit; }
.corerail-badge:hover .corerail-badge__label,
.corerail-badge:focus-visible .corerail-badge__label { text-decoration: underline; text-underline-offset: 3px; }
.corerail-badge__label { font-size: 0.8125rem; letter-spacing: 0.01em; white-space: nowrap; }
.corerail-badge__art { height: 1.3em; width: auto; flex-shrink: 0; display: block; }
.corerail-credit [fill="#6B7F5E"] { fill: var(--corerail-sage, #6B7F5E); }

/* ---- Inner pages (privacy, accessibility, 404) ------------------------- */
.page-head { padding: clamp(40px, 6vw, 72px) 0 var(--s-4); }
.page-head h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); margin-bottom: var(--s-2); }
.page-head .updated { color: var(--muted); font-size: 0.95rem; }
.legal { padding-bottom: var(--section); }
.legal .prose { max-width: 66ch; }
.legal h2 { font-size: 1.35rem; margin: var(--s-5) 0 var(--s-2); }
.legal ul { list-style: disc; padding-left: 1.3em; margin-bottom: 1.1em; }
.legal li { margin-bottom: 0.4em; }
.legal li::marker { color: var(--maroon); }
.notfound { padding: var(--s-7) 0 var(--s-8); }
.notfound .code { font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--maroon); font-weight: 600; margin-bottom: var(--s-2); }
.notfound h1 { margin-bottom: var(--s-3); }

/* ---- Motion: hover and focus states only, and off when the visitor asks -- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .strip figure:hover img { transform: none; }
}
