/* ==========================================================================
   Site refresh
   Near-black ground, DAF CGOC gold, Raleway Heavy headings over Merriweather.
   Text colors are set by APCA lightness contrast on #0f1215: headings Lc 88,
   body Lc 75, secondary Lc 60. Headings use USSF Silver; the sunken surface
   uses USSF Black.
   ========================================================================== */

:root {
  /* neutrals: one slate hue, each step one layer lighter */
  --n1: #0f1215;   /* page */
  --n2: #101820;   /* USSF Black */
  --n3: #1a1f23;
  --n4: #21262a;
  --n5: #292d32;
  --n6: #31363b;
  --n7: #5c6166;   /* 3:1 on the page, for borders that identify a control */

  --text-hi: #dbe2e9;     /* USSF Silver, Lc 88 */
  --text-body: #cacccf;   /* Lc 75, 11.7:1 */
  --text-meta: #afb2b6;   /* Lc 60, 8.8:1 */

  --gold-hover: #ffd547;
  --gold-text: #f7cc4b;   /* gold for runs of text, Lc 78 */
  --gold-line: #5e4b0c;
  --link-blue: #78bbf7;   /* Lc 62, 9.2:1; #2374b4 stays a fill under white text */
  --success: #3fbf86;
  --warning: #ffa351;

  --surface: var(--n2);
  --surface-2: var(--n3);
  --radius-lg: 14px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --color-text: var(--text-body);
  --color-text-light: var(--text-meta);
  --color-text-bright: var(--text-hi);
  --color-white: var(--text-hi);
  --color-gold-border: var(--gold-line);
  --color-hairline: var(--n5);
}

@supports (color: oklch(0% 0 0)) {
  :root {
    --n3: oklch(23.5% 0.011 250); --n4: oklch(26.5% 0.011 250); --n5: oklch(29.5% 0.011 250);
    --n6: oklch(33% 0.011 250); --n7: oklch(48.9% 0.011 250);
    --text-body: oklch(84.6% 0.005 250); --text-meta: oklch(76.4% 0.006 250);
    --gold-text: oklch(86% 0.15 88); --gold-hover: oklch(89% 0.16 90);
  }
}

body { color: var(--text-body); }
h1, h2, h3, h4, h5, h6, [data-was] { color: var(--text-hi); }

/* Browser surfaces */
::selection { background: rgba(253, 197, 1, 0.9); color: var(--n1); }
html { scrollbar-color: #2b3036 var(--n1); }
a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
[id] { scroll-margin-top: 88px; }

/* Page head: display-size title, short gold rule, low gold light behind */
.section-head { position: relative; }
.section-head::before {
  content: ""; position: absolute; left: 0; right: 0; top: -60px; height: 300px;
  background: radial-gradient(560px 200px at 18% 45%, rgba(253, 197, 1, 0.075), transparent 72%);
  pointer-events: none;
}
.section-head > * { position: relative; }
.section-head h1 {
  font: 44px/1.05 "raleway-heavy", sans-serif;
  font: clamp(2.25rem, 1.35rem + 3vw, 3.75rem) / 1.05 "raleway-heavy", sans-serif;
  text-transform: none;
  letter-spacing: -0.02em;
  margin: 8px 0 26px;
  text-wrap: balance;
}
.section-head h1 span { left: 0; }
.section-head hr { width: 56px; margin-top: 0; margin-left: 0; border: 0; border-top: 2px solid var(--color-gold); opacity: 1; }
.section-head p, .section-writeup { color: var(--text-body); }
@media (prefers-reduced-motion: no-preference) {
  .section-head h1 { animation: cgoc-title-in 0.9s var(--ease-out) both; }
  @keyframes cgoc-title-in {
    from { opacity: 0.35; transform: translateY(10px); filter: blur(4px); }
    to   { opacity: 1; transform: none; filter: none; }
  }
}

/* Home hero: full image band the headline sits on, fading into the page */
.bg { position: relative; height: min(62vh, 600px); }
.bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15, 18, 21, 0.15) 0%, rgba(15, 18, 21, 0.35) 45%, var(--n1) 100%);
}
.center { position: relative; margin-top: -210px; padding: 0 24px 24px; }
.slider__caption { text-wrap: balance; max-width: 1000px; margin-left: auto; margin-right: auto; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6); }
.slider__txt { max-width: 60ch; margin-left: auto; margin-right: auto; color: #d6d8db; }
@media only screen and (max-width: 601px) {
  .bg { height: 320px; }
  .center { margin-top: -150px; }
}

/* Card headings sit one step below the page title */
.partner-card h2, .partner-card [data-was="h3"],
.resource-card h2, .resource-card [data-was="h3"],
.council-contact-card h2, .council-contact-card [data-was="h3"],
.donate-info .card h2, .donate-info .card [data-was="h3"] {
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  line-height: 1.25;
}

/* Reading copy: 16px with a comfortable measure */
.partner-card p, .resource-card p, .opp-card__lead, .section-writeup,
.council-contact-card p, .donate-info p {
  font-size: 16px;
  line-height: 1.75;
  max-width: 70ch;
  color: var(--text-meta);
}

/* Cards: one surface, hairline frame, faint gold top light */
.leadership-card, .year-card, .council-contact-card, .partner-card, .resource-card,
.opportunity-card, .donate-info .card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-hairline);
  border-left: 1px solid var(--color-hairline);
  box-shadow: inset 0 1px 0 rgba(253, 197, 1, 0.28), 0 12px 32px -18px rgba(0, 0, 0, 0.7);
  transition: border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.leadership-card, .year-card { padding: clamp(22px, 3vw, 36px); margin-bottom: 28px; }
.annual-winners { border: 1px solid var(--color-hairline); border-left: 1px solid var(--color-hairline); padding-right: 24px; }
.leadership-card__heading { box-shadow: none; border: 0; border-left: 0; border-bottom: 1px solid var(--gold-line); padding-bottom: 14px; }
.opportunity-card:hover, .partner-card:hover, .resource-card:hover {
  border-color: var(--gold-line);
  transform: translateY(-2px);
}

/* Resources: each category is a card on a two-column grid */
#about .mission:has(> .bgrid > ul) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
#about .mission:has(> .bgrid > ul)::before, #about .mission:has(> .bgrid > ul)::after { content: none; }
#about .mission .bgrid:has(> ul) {
  float: none; width: auto; margin: 0;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-lg);
  padding: 26px 28px 22px;
  box-shadow: inset 0 1px 0 rgba(253, 197, 1, 0.22);
}
#about .mission .bgrid:has(> ul) ul { margin: 6px 0 0; padding: 0; line-height: 2.1; }
#about .mission .bgrid:has(> ul) ul i { color: var(--color-gold); opacity: 0.75; width: 22px; text-align: center; font-size: 16px !important; }
#about .mission .bgrid:has(> ul) ul a { color: #e4e5e7; }
#about .mission .bgrid:has(> ul) ul a:hover { color: var(--color-gold); }
@media only screen and (max-width: 900px) {
  #about .mission:has(> .bgrid > ul) { grid-template-columns: minmax(0, 1fr); padding: 0 16px; }
}

/* Leadership portraits: hairline ring, gold ring on hover */
.member-grid { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.member-grid .member-pic img {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 20px 40px -22px rgba(0, 0, 0, 0.9);
  transition: box-shadow 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.member-grid .member:hover .member-pic img {
  box-shadow: 0 0 0 2px var(--color-gold), 0 24px 44px -22px rgba(0, 0, 0, 0.9);
  transform: translateY(-3px);
}
.member-grid .member-social li a:hover { color: var(--color-gold); }

/* Home gallery: small gutters, soft corners, gold edge on hover */
#portfolio-wrapper .bgrid { padding: 4px; }
.folio-item .item-wrap { border-radius: 10px; overflow: hidden; transition: box-shadow 0.35s var(--ease-out); }
.folio-item:hover .item-wrap, .folio-item .item-wrap:focus-within { box-shadow: 0 0 0 2px var(--color-gold); }

#map { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-hairline); }

.opp-status, .section-tag { font-size: 12px; letter-spacing: 1.2px; }

/* No preloader: the pages are static */
#preloader { display: none; }

/* Buttons */
.btn-gold, .btn-outline-gold {
  border-radius: 8px;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out),
              border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
a.btn-gold:hover, a.btn-gold:focus-visible, .btn-gold:hover { background: var(--gold-hover); color: var(--n1); }
a.btn-outline-gold:hover, a.btn-outline-gold:focus-visible, .btn-outline-gold:hover {
  background: var(--color-gold); color: var(--n1); border-color: var(--color-gold);
}
.btn-gold:active, .btn-outline-gold:active { transform: translateY(1px); }
.skip-link:hover, .skip-link:focus { color: var(--n1); }

/* In-text links: gold underline */
main p a:not([class]), main li a:not([class]) {
  text-decoration: underline; text-decoration-color: var(--gold-line); text-underline-offset: 4px;
}
main p a:not([class]):hover, main li a:not([class]):hover { color: var(--color-gold); text-decoration-color: var(--color-gold); }

/* Gold as text */
.card__heading,
dt,
.section-head h1 span,
#about h3,
#about [data-was="h3"],
#leadership h3,
#leadership [data-was="h3"],
.leadership-card__heading,
#leadership .awards-sidebar h3,
#leadership .awards-sidebar [data-was="h3"],
.incentive-card h4,
.incentive-card [data-was="h4"],
.incentive-card thead,
.year-card__heading,
.annual-winners h4,
.annual-winners [data-was="h4"],
.quarter-block__label,
.council-contact-card h3,
.council-contact-card [data-was="h3"],
.resource-card h3,
.resource-card [data-was="h3"],
.partner-card h3,
.partner-card [data-was="h3"],
.opp-card__details summary,
.event-day__num,
.event-day__month,
.event-detail summary,
#social h3,
#social [data-was="h3"],
#contact h3,
#contact [data-was="h3"] { color: var(--gold-text); }

/* Light surfaces: modal copy, highlights, forms */
.popup-modal .description-box p { color: #55585c; }
.popup-modal .categories { color: #5a5d61; font-size: 12px; }
mark { background: var(--color-gold); color: var(--n1); }
#message-warning { color: var(--warning); }
#message-success { color: var(--success); }
#login .form-row label, #register .form-row label { color: #4b5160; }                      /* 7.9:1 on white */
#login .form-row input, #register .form-row input { border-color: #868b96; }               /* 3.4:1 */
#login .form-row input::placeholder, #register .form-row input::placeholder { color: #6b7180; } /* 4.9:1 */

/* Footer */
footer { color: #8b8e93; border-top: 1px solid var(--color-hairline); }
footer a, footer a:visited { color: #b4b7bb; }
footer .copyright { font-size: 13px; }
footer .social-links { font-size: 22px; }
footer .social-links li { margin-left: 14px; }
footer .social-links li:first-child { margin-left: 0; }
footer .social-links li a, footer .social-links li a:visited {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  color: #7c8086; border: 1px solid rgba(255, 255, 255, 0.12);
  transition: color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
}
footer .social-links li a:hover { color: var(--color-gold); border-color: var(--color-gold); background: rgba(253, 197, 1, 0.08); }

/* Partner ribbon */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.partner-ribbon {
  position: relative;
  margin: 24px 0 8px;
  padding: 44px 0;
  border-top: 1px solid var(--n5);
  border-bottom: 1px solid var(--n5);
  background: linear-gradient(180deg, rgba(253, 197, 1, 0) 0%, rgba(253, 197, 1, 0.035) 50%, rgba(253, 197, 1, 0) 100%);
}
.ribbon {
  overflow: hidden;
  margin-right: 72px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.ribbon__track {
  display: flex; align-items: center; width: max-content;
  margin: 0; padding: 0; list-style: none;
  animation: cgoc-ribbon 60s linear infinite;
}
.ribbon__track li { margin: 0; padding: 0 20px; }
.ribbon__item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 22px 12px 14px;
  border: 1px solid transparent; border-radius: 999px;
  color: var(--text-meta);
  font: 13px/1 "raleway-heavy", sans-serif; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  transition: color 0.3s var(--ease-out), border-color 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}
.ribbon__item:visited { color: var(--text-meta); }
.ribbon__item img {
  height: 44px; width: auto; max-width: 160px; object-fit: contain;
  filter: grayscale(1) brightness(1.2); opacity: 0.7;
  transition: filter 0.4s var(--ease-out), opacity 0.4s var(--ease-out);
}
.ribbon__item:hover, .ribbon__item:focus-visible {
  color: var(--text-hi); border-color: var(--gold-line); background: rgba(253, 197, 1, 0.06);
}
.ribbon__item:hover img, .ribbon__item:focus-visible img { filter: none; opacity: 1; }
.partner-ribbon:hover .ribbon__track,
.partner-ribbon:focus-within .ribbon__track,
.partner-ribbon.is-paused .ribbon__track { animation-play-state: paused; }
@keyframes cgoc-ribbon { to { transform: translateX(-25%); } }

.ribbon__toggle {
  position: absolute; right: 20px; top: 50%; translate: 0 -50%; z-index: 2;
  width: 36px; height: 36px; padding: 0; border-radius: 50%;
  border: 1px solid var(--n7); background: var(--n2); cursor: pointer;
  display: grid; place-items: center;
  transition: border-color 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
}
.ribbon__toggle:hover { border-color: var(--color-gold); background: var(--n4); }
.ribbon__toggle i { color: var(--text-hi); font-size: 12px; }
.ribbon__toggle .fa-play, .partner-ribbon.is-paused .ribbon__toggle .fa-pause { display: none; }
.partner-ribbon.is-paused .ribbon__toggle .fa-play { display: inline; margin-left: 2px; }

@media (prefers-reduced-motion: reduce) {
  .ribbon { -webkit-mask-image: none; mask-image: none; }
  .ribbon__track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; row-gap: 12px; }
  .ribbon__track li:nth-child(n+5) { display: none; }
  .ribbon__toggle { display: none; }
}
@media only screen and (max-width: 600px) {
  .ribbon { margin-right: 0; }
  .partner-ribbon { padding: 28px 0 56px; }
  .ribbon__toggle { top: auto; bottom: 12px; translate: none; right: 50%; margin-right: -18px; }
  .ribbon__item img { height: 36px; }
}
