/* openday.css — Open Day announcement bar + welcome pop-up.
   Self-contained & easily removable after the event. The bar tucks away on
   scroll (driven by the header's .is-scrolled class) so it never collides with
   the fixed header or the sticky sub-navs, which only engage once scrolled. */

/* ---- global offset while the bar is showing (top of page only) ---- */
html.openday-bar-on { --oday-bar-h: 46px; }
html.openday-bar-on body { padding-top: var(--oday-bar-h); }
html.openday-bar-on .site-header:not(.is-scrolled) { top: var(--oday-bar-h); }

/* ---- the announcement bar ---- */
.openday-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--oday-bar-h, 46px);
  z-index: 40;                 /* under the fixed header (50); no overlap at rest */
  display: flex; align-items: center; justify-content: center;
  background: var(--ba-mint);
  color: var(--ba-navy);
  box-shadow: 0 2px 12px rgba(0, 29, 57, 0.14);
  transition: transform 320ms var(--ease-natural);
  font-family: var(--font-sans);
}
/* hide once the header enters its scrolled state */
.site-header.is-scrolled ~ .openday-bar { transform: translateY(-100%); }

.openday-bar__inner {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ba-navy); border-bottom: 0;
  padding: 0 46px; max-width: 100%;
  font-size: 14px; line-height: 1;
}
.openday-bar__badge {
  background: var(--ba-navy); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; white-space: nowrap;
}
.openday-bar__text { white-space: nowrap; font-size: 14px; }
.openday-bar__text strong { font-weight: 700; }
.openday-bar__date-sm { display: none; }
.openday-bar__tag { opacity: 0.78; }
.openday-bar__cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ba-navy); color: #fff;
  font-weight: 700; font-size: 13px;
  padding: 7px 14px; border-radius: 999px; white-space: nowrap;
  transition: transform 160ms var(--ease-natural);
}
.openday-bar__cta svg { width: 15px; height: 15px; }
.openday-bar__inner:hover .openday-bar__cta { transform: translateX(2px); }
.openday-bar__close {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer; color: var(--ba-navy);
  border-radius: 50%; opacity: 0.7;
}
.openday-bar__close:hover { opacity: 1; background: rgba(0, 29, 57, 0.1); }
.openday-bar__close svg { width: 16px; height: 16px; }

@media (max-width: 640px) {
  .openday-bar__inner { padding: 0 34px; gap: 8px; }
  .openday-bar__badge { font-size: 10px; padding: 4px 8px; letter-spacing: 0.08em; }
  .openday-bar__tag { display: none; }
  .openday-bar__date-lg { display: none; }
  .openday-bar__date-sm { display: inline; }
  .openday-bar__text { font-size: 13px; }
  .openday-bar__cta { padding: 6px 11px; font-size: 12px; }
}
@media (max-width: 360px) {
  .openday-bar__inner { padding: 0 30px; gap: 6px; }
  .openday-bar__badge { font-size: 9px; padding: 4px 7px; }
  .openday-bar__text { font-size: 12px; }
  .openday-bar__cta { font-size: 11px; padding: 5px 10px; }
}

/* ---- the welcome pop-up ---- */
.openday-modal {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(0, 29, 57, 0.55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: odayFade 240ms var(--ease-natural);
}
@keyframes odayFade { from { opacity: 0; } to { opacity: 1; } }
.openday-modal__card {
  position: relative;
  width: 100%; max-width: 430px;
  background: #fff; border-radius: 20px;
  padding: 46px 40px 34px;
  text-align: center;
  box-shadow: 0 40px 120px -30px rgba(0, 29, 57, 0.5);
  border-top: 5px solid var(--ba-mint);
  animation: odayPop 340ms var(--ease-natural);
}
@keyframes odayPop { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }
.openday-modal__close {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer; color: var(--ba-navy);
  border-radius: 50%; opacity: 0.55;
}
.openday-modal__close:hover { opacity: 1; background: rgba(0, 29, 57, 0.07); }
.openday-modal__close svg { width: 18px; height: 18px; }
.openday-modal__kicker {
  font-family: var(--font-sans);
  font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ba-teal-dark); margin-bottom: 10px;
}
.openday-modal__title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: 2.4rem; line-height: 1.05; color: var(--ba-navy);
  margin: 0 0 8px;
}
.openday-modal__date {
  display: inline-block;
  background: rgba(28, 188, 145, 0.14);
  color: var(--ba-navy);
  font-family: var(--font-sans); font-weight: 700; font-size: 1rem;
  padding: 7px 16px; border-radius: 999px;
  margin: 2px 0 18px;
}
.openday-modal__copy {
  font-family: var(--font-sans);
  font-size: 1rem; line-height: 1.6; color: #4a5a68;
  margin: 0 0 26px;
}
.openday-modal__copy em { font-style: italic; color: var(--ba-teal-dark); }
.openday-modal__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  background: var(--ba-navy); color: #fff; border-bottom: 0;
  font-family: var(--font-sans); font-weight: 700; font-size: 1rem;
  padding: 15px 22px; border-radius: 999px;
  transition: transform 160ms var(--ease-natural), background 200ms;
}
.openday-modal__btn:hover { background: #06294a; transform: translateY(-1px); }
.openday-modal__btn svg { width: 18px; height: 18px; }
.openday-modal__later {
  display: block; margin: 14px auto 0;
  background: transparent; border: 0; cursor: pointer;
  color: #6b7783; font-size: 13px; font-family: var(--font-sans);
  opacity: 0.85;
}
.openday-modal__later:hover { opacity: 1; text-decoration: underline; }

@media (max-width: 600px) {
  .openday-modal__card { padding: 42px 26px 28px; border-radius: 18px; }
  .openday-modal__title { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .openday-bar, html.openday-bar-on .site-header,
  .openday-modal, .openday-modal__card { animation: none; transition: none; }
}
