/* Saffron drops map — pre-rendered video, then a framed magnifier that shows the school names. */
.saffron-map {
  --sm-paper: #f7eede;
  --sm-ink: #44131d;
  --sm-red: #8f1d2c;
  position: relative;
  padding: clamp(56px, 9vh, 104px) 0 clamp(44px, 7vh, 80px);
  background: linear-gradient(180deg, #ffffff 0, var(--sm-paper) clamp(48px, 8vh, 96px), var(--sm-paper) calc(100% - clamp(48px, 8vh, 96px)), #ffffff 100%);
  color: var(--sm-ink);
  scroll-margin-top: var(--nav-height, 60px);
  overflow-x: clip;   /* the magnifier may rise above the map on phones */
}

.sm-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 24px clamp(8px, 2vh, 20px);
  text-align: center;
}
.sm-kicker {
  margin: 0;
  font: 600 11px/1 Georgia, serif;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: #a3263a;
}
.sm-title {
  margin: 0;
  font-family: "Gloock", Georgia, serif;
  font-weight: 400;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.05;
  color: var(--sm-red);
}

.sm-map {
  position: relative;
  width: min(100%, calc((100svh - 40px) * 1.7778), 1920px);
  aspect-ratio: 1920 / 1080;
  margin: 0 auto;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.sm-map video,
.sm-map .sm-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
  /* soften the rendered paper's edge into the section */
  -webkit-mask-image: radial-gradient(120% 120% at 50% 50%, #000 62%, transparent 100%);
  mask-image: radial-gradient(120% 120% at 50% 50%, #000 62%, transparent 100%);
}
.sm-map .sm-still { opacity: 0; transition: opacity .25s; }
.sm-map.static .sm-still { opacity: 1; }
.sm-map.settled { cursor: none; }

.sm-spot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  background: transparent;
  opacity: 0;
  pointer-events: none;
}

.sm-loupe {
  position: absolute;
  z-index: 5;
  left: 0;
  top: 0;
  width: clamp(240px, 36vw, 500px);
  aspect-ratio: 3 / 2;
  pointer-events: none;
  opacity: 0;
  transform: scale(.94);
  transition: opacity .18s, transform .18s;
  border: 1px solid rgba(68, 19, 29, .9);
  border-radius: 2px;
  background: var(--sm-paper);
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(68, 19, 29, .26), 0 3px 9px rgba(68, 19, 29, .18);
  will-change: transform, left, top;
}
.sm-loupe.show { opacity: 1; transform: scale(1); }
.sm-glass { position: absolute; inset: 0; background-repeat: no-repeat; }
.sm-loupe::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(201, 164, 92, .95);
  border-radius: 1px;
  box-shadow: 0 0 0 4px #fffaf2;
  pointer-events: none;
}

.sm-hint,
.sm-replay {
  position: absolute;
  bottom: 2.4%;
  font: 600 11px/1 Georgia, serif;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sm-ink);
  opacity: 0;
  transition: opacity .4s;
}
.sm-hint { left: 50%; transform: translateX(-50%); pointer-events: none; white-space: nowrap; }
.sm-replay {
  right: 1.6%;
  border: 1px solid rgba(68, 19, 29, .28);
  background: rgba(255, 250, 242, .85);
  padding: 9px 14px;
  border-radius: 2px;
  cursor: pointer;
  pointer-events: none;
}
.sm-map.settled .sm-replay { opacity: 1; pointer-events: auto; }
.sm-map.settled:not(.used) .sm-hint { opacity: .75; }

@media (max-width: 700px) {
  .sm-hint, .sm-replay { font-size: 9px; letter-spacing: .16em; }
  .sm-hint { bottom: -22px; }
  .sm-replay { padding: 7px 10px; }
  .saffron-map { padding-bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .sm-loupe { transition: none; }
}
