/* ===== Strathmere Invitational — Shared Styles ===== */

/* --- Page Hero Dot Texture --- */
.page-hero {
  position: relative;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: 0;
}

/* --- FOUC / intro-flash prevention ---
   Hide the page until shared.js fires. shared.js restores opacity immediately
   as its first statement, then synchronously injects the intro overlay — so
   the browser paints them together and the user never sees raw page content. */
html { opacity: 0; }

/* --- Design Tokens --- */
:root {
  --navy: #001F3F;
  --navy-light: #002d5a;
  --gold: #C0272D;
  --gold-light: #e05a5f;
  --cream: #FAF8F3;
  --gray-soft: #F3F0EA;
}

/* --- Base --- */
body {
  font-family: 'Montserrat', sans-serif;
  background: var(--cream);
  color: #1a1a1a;
  transition: padding-top 0.25s ease;
}
h1, h2, h3, .serif {
  font-family: 'Playfair Display', serif;
}
.cormorant {
  font-family: 'Cormorant Garamond', serif;
}

/* --- Navigation --- */
.nav-link {
  transition: all 0.18s;
  font-size: 13.5px;
  letter-spacing: 0.13em;
  padding: 12px 22px;
  border: 1.5px solid transparent;
  border-radius: 2px;
}
/* No tightening at medium desktop — items collapse into More dropdown instead */
.nav-link:hover,
.nav-link.active {
  color: white;
  background: var(--navy);
  border-color: var(--navy);
}
.mob-nav-link {
  display: block;
  text-align: center;
  padding: 10px 16px;
  margin: 4px 0;
  border: 1.5px solid #e5e7eb;
  color: var(--navy);
  transition: all 0.15s;
  letter-spacing: 0.1em;
}
.mob-nav-link:hover {
  border-color: var(--navy);
  background: var(--gray-soft);
}
.mob-nav-link.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.more-dropdown-item {
  display: block;
  padding: 10px 20px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  font-family: 'Montserrat', sans-serif;
}
.more-dropdown-item:hover {
  background: var(--gray-soft);
}
.gold-line {
  width: 60px;
  height: 2px;
  background: var(--gold);
}

/* --- Toast Notifications --- */
@keyframes toast-in {
  from { transform: translateX(24px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: white;
  color: var(--navy);
  padding: 11px 20px 11px 16px;
  border-left: 4px solid var(--gold);
  font-size: 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 32px rgba(0,31,63,0.14);
  z-index: 9999;
  transition: opacity 0.3s;
  animation: toast-in 0.25s ease both;
  max-width: calc(100vw - 48px);
}
#toast.hidden {
  opacity: 0;
  pointer-events: none;
}

/* --- Grain Texture Overlay --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* --- Page Intro Screen --- */
#stm-intro {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.45s ease;
}
#stm-intro.stm-intro-exit { opacity: 0; pointer-events: none; }

/* Full-width sliding band — movement driven by JS transition (no CSS animation, avoids Safari override bug) */
.stm-intro-band {
  position: relative;
  width: 100%;
  height: 116px;
  display: flex;
  align-items: center;
  padding: 0 max(7vw, 28px);
  gap: 26px;
  border-top: 1.5px solid rgba(201,168,76,0.55);
  border-bottom: 1.5px solid rgba(201,168,76,0.55);
  overflow: hidden;
}
/* Dot texture inside band */
.stm-intro-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
/* Sheen sweep */
.stm-intro-band::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.03) 50%, transparent 70%);
  animation: stm-sheen 1.8s ease 0.8s both;
  pointer-events: none;
}
@keyframes stm-sheen {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* Logo badge */
.stm-intro-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid rgba(201,168,76,0.5);
  box-shadow: 0 0 0 4px rgba(201,168,76,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
  animation: stm-badge-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.65s both;
}
@keyframes stm-badge-in {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}
.stm-intro-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

/* Vertical divider */
.stm-intro-divider {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, transparent, rgba(201,168,76,0.5) 30%, rgba(201,168,76,0.5) 70%, transparent);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transform: scaleY(0);
  animation: stm-div-in 0.35s ease 0.9s forwards;
}
@keyframes stm-div-in {
  to { transform: scaleY(1); }
}

/* Text block */
.stm-intro-text {
  flex: 1;
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateX(20px);
  animation: stm-text-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.85s forwards;
}
@keyframes stm-text-in {
  to { opacity: 1; transform: translateX(0); }
}
.stm-intro-eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: rgba(201,168,76,0.75);
  text-transform: uppercase;
  margin-bottom: 7px;
}
.stm-intro-wordmark {
  font-family: 'Playfair Display', serif;
  font-size: clamp(17px, 3.2vw, 32px);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
  line-height: 1.15;
  text-transform: uppercase;
}
.stm-intro-wordmark em {
  font-style: normal;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.18em;
}

/* Year watermark */
.stm-intro-year {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 900;
  color: rgba(255,255,255,0.055);
  flex-shrink: 0;
  line-height: 1;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
  user-select: none;
}

/* --- Scroll Reveal --- */
body.js-reveal .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
body.js-reveal .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
body.js-reveal .reveal-child {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
body.js-reveal .reveal-child.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Announcements System --- */
#stm-alert-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9990;
  box-shadow: 0 4px 20px rgba(0,31,63,0.35);
  transition: transform 0.18s, box-shadow 0.18s;
}
#stm-alert-fab:hover { transform: scale(1.08); box-shadow: 0 8px 32px rgba(0,31,63,0.45); }
.stm-alert-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--gold);
  color: white;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid white;
  line-height: 1;
}
.stm-alert-badge.hidden { display: none; }
#stm-alert-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,10,30,0.6);
  backdrop-filter: blur(4px);
  z-index: 9995;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#stm-alert-overlay.hidden { display: none; }
#stm-alert-overlay.stm-alert-visible { opacity: 1; pointer-events: auto; }
.stm-alert-modal {
  background: white;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 72px rgba(0,15,50,0.35);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
#stm-alert-overlay.stm-alert-visible .stm-alert-modal { transform: translateY(0) scale(1); }
.stm-alert-hdr {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 16px 20px 15px;
  border-bottom: 1.5px solid #f0ede6;
  flex-shrink: 0;
}
.stm-alert-hdr > div:first-child {
  justify-content: center;
}
.stm-alert-hdr-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}
.stm-alert-close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #9ca3af;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
  padding: 0;
}
.stm-alert-close:hover { color: var(--navy); }
.stm-alert-body {
  overflow-y: auto;
  flex: 1;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stm-alert-card {
  border: 1.5px solid #e5e7eb;
  padding: 14px 16px;
}
.stm-alert-card-read { opacity: 0.45; border-color: #f0f0f0; }
.stm-alert-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 8px;
}
.stm-alert-card-body {
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  color: #374151;
  line-height: 1.7;
  margin-bottom: 12px;
}
.stm-alert-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.stm-alert-time {
  font-size: 10.5px;
  color: #9ca3af;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.04em;
}
.stm-alert-dismiss-btn {
  font-size: 10px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  opacity: 0.6;
  transition: opacity 0.15s;
  text-decoration: underline;
}
.stm-alert-dismiss-btn:hover { opacity: 1; }
.stm-alert-seen {
  font-size: 10px;
  font-family: 'Montserrat', sans-serif;
  color: #9ca3af;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.stm-alert-empty {
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
  padding: 28px 0;
  font-family: 'Montserrat', sans-serif;
}
