/* ==========================================================================
   ONSM — Bootstrap overrides & legacy utilities
   (kept because they are still referenced by templates/content — verified
   against templates/**/*.html and content/**/*.md before trimming)
   ========================================================================== */

/* Base rem scale — Bootstrap's rem-based spacing (mb-3, mr-4, etc.) shrinks
   on small screens since it scales off this. */
html {
  font-size: 12px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-size: medium;
}

.footer {
  white-space: nowrap;
}

/* Real nav (site header) */
.nav-link {
  font-size: 1.1rem;
  font-weight: 500;
}

.dropdown-toggle {
  font-size: 1.1rem;
  font-weight: 500;
}

.dropdown-item {
  font-size: 1rem;
  font-weight: 500;
}

.dropdown .dropdown-menu {
  border-radius: 0;
}

.dropdown:hover > .dropdown-menu {
  display: block;
  margin-top: 0;
  border-radius: 0;
}

.dropdown > .dropdown-toggle:active {
  pointer-events: none;
}

.dropdown-toggle::after {
  margin-left: 0;
}

.text-pulse {
  animation: pulse-animation 3s infinite ease-in-out;
}

@keyframes pulse-animation {
  0% { opacity: 1; }
  50% { opacity: .6; }
  100% { opacity: 1; }
}

/* Brand blue, used by dropdown-menu (About Us), and some content buttons/cards */
.btn-primary {
  color: #fff;
  background-color: #093f89;
  border-color: #093f89;
}

.btn-outline-primary {
  color: #093f89;
  border-color: #093f89;
}

.btn-outline-primary:hover {
  border-color: #093f89;
  background-color: #093f89;
}

.text-primary {
  color: #093f89 !important;
}

.bg-light {
  background-color: rgb(235, 235, 235);
}

.bg-dark {
  background: #1a252f;
  color: #fff;
}

/* Anchor jump targets (e.g. #flag, #anthem) — offsets past the sticky topbar */
:target {
  padding-top: 80px;
  margin-top: -80px;
  display: inline-block;
}

/* Auto photo gallery grid (templates/page.html) */
.row {
  display: flex;
  flex-wrap: wrap;
  padding: 0 4px;
}

.column {
  flex: 20%;
  max-width: 20%;
  padding: 0 4px;
}

.column img {
  margin-top: 8px;
  vertical-align: middle;
  width: 100%;
}

@media screen and (max-width: 1000px) {
  .column {
    flex: 50%;
    max-width: 50%;
  }
}

@media screen and (max-width: 600px) {
  .column {
    flex: 100%;
    max-width: 100%;
  }
}

/* Site search (static/js/search.js) */
.search-container {
  display: inline-block;
  position: relative;
}

.search-container input {
  width: 100%;
  padding: .5rem;
}

.search-results {
  display: none;
  position: absolute;
  z-index: 999;
  background: white;
  color: black;
  padding: 1rem;
  box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, .5);
  max-height: 60vh;
  overflow: auto;
  width: 160%;
  max-width: 92vw;
  left: 0;
}

.search-results__items {
  list-style: none;
}

.search-results li {
  margin-top: 1rem;
  border-bottom: 1px solid #ccc;
  font-size: .9rem;
}

.search-results li:first-of-type {
  margin-top: 0;
}

.search-results__item {
  margin-bottom: 1rem;
}

.search-results__item a {
  font-size: 1.2rem;
  display: inline-block;
  margin-bottom: .5rem;
}

/* ==========================================================================
   ONSM — Design system
   ========================================================================== */

:root {
  --navy: #0E1F38;
  --navy-2: #152B4A;
  --crimson: #C8102E;
  --crimson-deep: #A50E26;
  --gold: #C9A227;
  --paper: #F6F1E7;
  --paper-2: #EFE8D8;
  --ink: #1A1A1A;
  --muted: #5E5E5E;
  --line: #E1D8C4;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  display: block;
  flex: 1 0 auto;
  min-height: 1px;
}

footer {
  flex-shrink: 0;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* -- top bar ------------------------------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 241, 231, .92);
  backdrop-filter: blur(8px);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: .02em;
  font-size: 19px;
}

.brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--crimson);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, .25);
}

.chip {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .03em;
  padding: 7px 13px;
  border: 1px solid var(--navy);
  color: #fff;
  background: var(--navy);
  border-radius: 999px;
  white-space: nowrap;
}

.topbar .chip {
  display: none;
}

@media (min-width: 640px) {
  .topbar .chip {
    display: inline-block;
  }
}

/* -- hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  background: radial-gradient(120% 90% at 78% 8%, #1a355c 0%, var(--navy) 46%, #0a1729 100%);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--crimson) 0 33%, #2b6cb0 33% 66%, var(--gold) 66% 100%);
  opacity: .9;
}

.stars span {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  opacity: .85;
  box-shadow: 0 0 10px 1px rgba(255, 255, 255, .5);
  animation: tw 4s ease-in-out infinite;
}

.s1 { width: 5px; height: 5px; top: 14%; right: 16%; }
.s2 { width: 4px; height: 4px; top: 30%; right: 9%; }
.s3 { width: 6px; height: 6px; top: 40%; right: 22%; }
.s4 { width: 4px; height: 4px; top: 56%; right: 14%; }
.s5 { width: 3px; height: 3px; top: 33%; right: 19%; }

.stars .s2 { animation-delay: .8s; }
.stars .s3 { animation-delay: 1.5s; }
.stars .s4 { animation-delay: 2.2s; }
.stars .s5 { animation-delay: 3s; }

@keyframes tw {
  0%, 100% { opacity: .35; }
  50% { opacity: .95; }
}

.hero .wrap {
  position: relative;
  z-index: 2;
  padding: 86px 24px 92px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(40px, 7vw, 74px);
  line-height: 1.02;
  letter-spacing: -.01em;
  max-width: 15ch;
}

.hero h1 em {
  font-style: italic;
  color: #fff;
}

.hero-heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.hero-heading-row h1 {
  margin: 0;
  flex: 1 1 auto;
}

.hero-heading-row .countdown {
  flex: 0 0 auto;
  margin: 0;
}

.hero .lede {
  margin-top: 26px;
  font-size: clamp(17px, 2.3vw, 20px);
  max-width: 56ch;
  color: #D9E2F0;
}

.hero.wide h1,
.hero.wide .lede {
  max-width: none;
}

.cta-row {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 15.5px;
  padding: 15px 24px;
  border-radius: 10px;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  border: 1px solid transparent;
}

.btn-flag {
  background: var(--crimson);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(200, 16, 46, .7);
}

.btn-flag:hover {
  background: var(--crimson-deep);
  transform: translateY(-2px);
  color: whitesmoke;
}

.btn-anthem {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .35);
}

.btn-anthem:hover {
  border-color: #fff;
  transform: translateY(-2px);
  color: whitesmoke;
}

.hero-meta {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  font-size: 14.5px;
  color: #B9C6DB;
}

.hero-meta b {
  color: #fff;
  font-weight: 600;
}

.countdown {
  margin-top: 28px;
  margin-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.countdown-item {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 58px;
  text-align: center;
}

.countdown-num {
  display: block;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  min-width: 2ch;
}

.countdown-label {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #B9C6DB;
}

/* -- section scaffolding -------------------------------------------------- */

section {
  padding: 78px 0;
}

.kicker {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -.01em;
}

h2 {
  font-size: clamp(28px, 4.4vw, 42px);
  line-height: 1.08;
}

.section-lede {
  margin-top: 18px;
  font-size: 16px;
  color: var(--muted);
  max-width: 60ch;
}

.section-lede.wide {
  max-width: none;
}

/* -- intro band ------------------------------------------------------------ */

.intro p {
  font-size: 16px;
  max-width: 64ch;
}

.intro.wide p {
  max-width: none;
}

.intro .motto {
  margin-top: 24px;
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  color: var(--crimson);
}

/* -- diptych / cards -------------------------------------------------------- */

.diptych {
  background: var(--navy);
  color: #fff;
}

.diptych.light {
  background: var(--paper-2);
  color: var(--ink);
}

.diptych.light .card {
  background: #fff;
  border-color: var(--line);
}

.diptych.light .card.flag .tag { color: var(--crimson-deep); }
.diptych.light .card.anthem .tag { color: var(--navy); }
.diptych.light .card .sub { color: var(--muted); }
.diptych.light .card li { color: var(--ink); }
.diptych.light .prize { border-top-color: var(--line); }
.diptych.light .prize .amt { color: var(--ink); }
.diptych.light .prize .amt small { color: var(--muted); }
.diptych.light .card .dl { color: var(--ink); }
.diptych.light .legacy-note { color: var(--muted); }

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  margin-top: 44px;
}

@media (min-width: 820px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

#team .cards {
  grid-template-columns: 1fr;
  justify-items: start;
}

#team .card {
  width: 80%;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  padding: 34px 30px 30px;
  position: relative;
  overflow: hidden;
}

.card .tag {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 600;
}

.card.flag .tag { color: #F2A6B1; }
.card.anthem .tag { color: var(--gold); }

.card .sub {
  color: #C4D0E4;
  font-size: 15.5px;
  margin-bottom: 22px;
}

.card ul {
  list-style: none;
  display: grid;
  gap: 11px;
  margin: 0 0 24px;
}

.card li {
  position: relative;
  padding-left: 24px;
  font-size: 15.5px;
  color: #E7ECF5;
}

.card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  transform: rotate(45deg);
}

.card.flag li::before { background: var(--crimson); }
.card.anthem li::before { background: var(--gold); }

.prize {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.prize .amt {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 600;
  color: #fff;
}

.prize .amt small {
  font-size: 15px;
  color: #B9C6DB;
  font-weight: 400;
  font-family: var(--body);
}

.card .dl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-weight: 600;
  font-size: 14.5px;
  color: #fff;
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: border-color .15s;
}

.card.flag .dl:hover { border-color: var(--crimson); }
.card.anthem .dl:hover { border-color: var(--gold); }

.legacy-note {
  margin-top: 14px;
  font-size: 13.5px;
  color: #93A3BE;
  font-style: italic;
}

/* -- rules ------------------------------------------------------------------ */

.rules .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 42px;
}

@media (min-width: 720px) {
  .rules .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.rule {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 24px;
}

.rule h4 {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 8px;
}

.rule p {
  font-size: 15px;
  color: var(--muted);
}

.rule .mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--paper-2);
  margin-bottom: 16px;
  font-weight: 700;
  color: var(--crimson);
  font-family: var(--display);
}

.grid.compact {
  gap: 10px;
}

.grid.compact .rule {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.grid.compact .rule .mark {
  width: 28px;
  height: 28px;
  margin-bottom: 0;
  flex: none;
  font-size: 14px;
}

.grid.compact .rule h4 {
  margin-bottom: 0;
  font-size: 16px;
}

.grid.compact .rule.wide-cell h4 {
  white-space: nowrap;
}

.grid.compact .rule.wide-cell {
  grid-column: 1 / -1;
}

.ai-flag {
  margin-top: 34px;
  background: var(--crimson);
  color: #fff;
  border-radius: 14px;
  padding: 22px 26px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  font-size: 15.5px;
}

.ai-flag b {
  font-weight: 700;
}

.ai-flag .x {
  font-family: var(--display);
  font-size: 22px;
  line-height: 1;
  flex: none;
}

/* -- steps / timeline --------------------------------------------------------- */

.steps {
  background: var(--paper-2);
}

.tl {
  margin-top: 44px;
  display: grid;
  gap: 0;
}

.tl .row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.tl .row:last-child {
  border-bottom: 1px solid var(--line);
}

.tl .n {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  color: var(--crimson);
  width: 44px;
}

.tl .when {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  text-transform: uppercase;
}

.tl h4 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  margin: 3px 0 4px;
}

.tl p {
  font-size: 15px;
  color: var(--muted);
  max-width: 60ch;
}

/* -- two-stage callout ---------------------------------------------------------- */

.stage-box {
  margin-top: 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 22px 26px;
}

.stage-box h4 {
  font-family: var(--display);
  font-size: 18px;
  margin-bottom: 6px;
}

.stage-box p {
  font-size: 15px;
  color: var(--muted);
}

/* -- faq ---------------------------------------------------------------------- */

details {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}

details:last-of-type {
  border-bottom: 1px solid var(--line);
}

summary {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

summary::-webkit-details-marker {
  display: none;
}

summary .ic {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--crimson);
  color: var(--crimson);
  display: grid;
  place-items: center;
  font-size: 18px;
  transition: transform .2s;
}

details[open] summary .ic {
  transform: rotate(45deg);
}

details p {
  margin-top: 12px;
  font-size: 15.5px;
  color: var(--muted);
  max-width: 66ch;
}

/* -- final cta ------------------------------------------------------------------ */

.final {
  background: var(--navy);
  color: #fff;
  text-align: center;
}

.final h2 {
  color: #fff;
}

.final p {
  margin: 18px auto 0;
  max-width: 52ch;
  color: #C4D0E4;
  font-size: 18px;
}

.final .cta-row {
  justify-content: center;
}

.final .email {
  margin-top: 30px;
  font-size: 15px;
  color: #B9C6DB;
}

.final .email a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
}

/* -- decorative footer (templates/page.html, templates/section.html) ------------- */

footer {
  background: #0a1729;
  color: #8595AE;
  font-size: 13.5px;
  padding: 34px 0;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

/* -- accessibility / motion -------------------------------------------------------- */

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

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

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}
