/* ============================================
   High Impact Mailer — shared styles
   Palette: cream / royal blue / postmark red
============================================ */
:root {
  --cream: #F1ECD8;
  --cream-deep: #E8E1C2;
  --blue: #2323C8;
  --blue-deep: #1A1AA0;
  --red: #E23636;
  --red-deep: #C42626;
  --ink: #1A1A3A;
}

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

html, body {
  background: var(--cream);
  color: var(--blue);
  font-family: 'Archivo', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* Font stacks for the wordmark tweak */
.font-chunky { font-family: 'Chango', 'Bungee', system-ui, sans-serif; }
.font-slab   { font-family: 'Alfa Slab One', 'Rockwell', Georgia, serif; }

/* ================= Top nav ================= */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 28px 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  z-index: 50;
  pointer-events: none;
}
.top-nav > * { pointer-events: auto; }

.logo-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--red);
  font-family: 'Chango', sans-serif;
  font-size: 22px;
  letter-spacing: 0.02em;
  line-height: 1;
}
.logo-mark svg { display: block; }

.town-nav {
  display: flex;
  gap: 48px;
  justify-content: center;
}
.town-nav a {
  color: var(--red);
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  padding: 6px 0;
  transition: color .2s;
}
.town-nav a:hover { color: var(--blue); }
.town-nav a::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 0; height: 3px;
  background: var(--blue);
  transition: width .25s ease;
}
.town-nav a:hover::after { width: 100%; }
.town-nav a.active { color: var(--blue); }

.nav-right {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  color: var(--red);
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ================= Footer ================= */
.site-footer {
  padding: 28px 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
}
.site-footer .tag { opacity: .7; }
.site-footer.fixed-below-hero {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  pointer-events: none;
  z-index: 40;
}
.site-footer.fixed-below-hero > * { pointer-events: auto; }

/* ================= Sub-page slim top nav ================= */
.sub-top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 20px 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  z-index: 50;
  background: var(--cream);
  border-bottom: 2px solid transparent;
  transition: transform .3s ease, border-color .3s ease;
}
.sub-top-nav.scrolled { border-bottom-color: rgba(35,35,200,0.15); }
.sub-top-nav.hidden { transform: translateY(-100%); }

.sub-top-nav .left,
.sub-top-nav .right {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  transition: color .2s;
}
.sub-top-nav .left { justify-self: start; }
.sub-top-nav .right { justify-self: end; }
.sub-top-nav .left:hover,
.sub-top-nav .right:hover { color: var(--blue); }

.sub-top-nav .center-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--red);
  font-family: 'Chango', sans-serif;
  font-size: 14px;
  letter-spacing: 0.04em;
}

/* ================= Sub-page bottom nav (moved-down top nav) ================= */
.sub-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 22px 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  z-index: 45;
  background: var(--cream);
  border-top: 2px solid rgba(35,35,200,0.15);
  transition: transform .3s ease;
}
.sub-bottom-nav.hidden { transform: translateY(100%); }

.sub-bottom-nav .town-nav a { font-size: 14px; }
.sub-bottom-nav .nav-right { font-size: 12px; }
.sub-bottom-nav .logo-mark { font-size: 18px; }

@media (max-width: 720px) {
  .sub-top-nav, .sub-bottom-nav { padding: 14px 20px; }
  .sub-top-nav .left, .sub-top-nav .right { font-size: 10px; letter-spacing: 0.15em; }
  .sub-bottom-nav .town-nav { gap: 16px; }
  .sub-bottom-nav .town-nav a { font-size: 11px; }
}

/* ================= Starburst cursor ================= */
#cursor-badge {
  position: fixed;
  top: 0; left: 0;
  width: min(18vw, 24vh);
  aspect-ratio: 1;
  pointer-events: none;
  z-index: 1000;
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
  transition: opacity .22s ease;
}
#cursor-badge .starburst {
  width: 100%; height: 100%;
  animation: badgeSpin 8s linear infinite;
  display: block;
}
#cursor-badge .starburst-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--cream);
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: min(1.2vw, 1.8vh);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
  padding: 0 22%;
}
#cursor-badge.hidden { opacity: 0; }
@keyframes badgeSpin { to { transform: rotate(360deg); } }

/* ================= Static section badge (sub-pages) ================= */
.section-badge {
  position: relative;
  width: 220px;
  aspect-ratio: 1;
  display: inline-block;
  flex-shrink: 0;
}
.section-badge.blue .starburst-fill { fill: var(--blue); }
.section-badge.cream .starburst-fill { fill: var(--cream); }
.section-badge.cream .starburst-label { color: var(--blue); }
.section-badge .starburst {
  width: 100%; height: 100%;
  display: block;
  animation: badgeSpin 7s linear infinite paused;
}
.section-badge.spinning .starburst { animation-play-state: running; }
.section-badge .starburst-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--cream);
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.25;
  padding: 0 22%;
}

.town-nav a.cursor-hover,
.nav-right a.cursor-hover,
.sub-top-nav a.cursor-hover,
a.cursor-hover { color: var(--blue) !important; }
.town-nav a.cursor-hover::after { width: 100% !important; }

@media (max-width: 720px) {
  html, body { cursor: auto; }
  #cursor-badge { display: none; }
  .section-badge { width: 160px; }
}

/* ================= Buttons / CTAs ================= */
.btn-red {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--red);
  color: var(--cream);
  padding: 18px 28px;
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  transition: transform .15s ease, background .15s ease;
}
.btn-red:hover { background: var(--red-deep); transform: translate(-1px,-1px); }

.btn-blue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--blue);
  color: var(--cream);
  padding: 18px 28px;
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  transition: transform .15s ease, background .15s ease;
}
.btn-blue:hover { background: var(--blue-deep); transform: translate(-1px,-1px); }

/* ================= Tweaks panel ================= */
#tweaks {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 280px;
  background: var(--cream-deep);
  border: 2px solid var(--blue);
  border-radius: 8px;
  padding: 16px;
  font-family: 'Archivo', sans-serif;
  color: var(--blue);
  z-index: 2000;
  display: none;
  box-shadow: 4px 4px 0 var(--blue);
}
#tweaks.visible { display: block; }
#tweaks h3 {
  font-family: 'Chango', sans-serif;
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--red);
}
#tweaks label {
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 14px 0 6px;
}
#tweaks .opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
#tweaks button {
  background: var(--cream);
  border: 2px solid var(--blue);
  color: var(--blue);
  padding: 10px 8px;
  font-family: inherit;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: none;
  transition: background .12s;
}
#tweaks button:hover { background: var(--cream); }
#tweaks button.on {
  background: var(--blue);
  color: var(--cream);
}
#tweaks .row-single { grid-template-columns: 1fr; }
