/* Areas We Serve: the interactive map
   ============================================================
   List of areas beside a map of eastern Virginia. Hovering,
   focusing or tapping an area draws a route from the fixed practice
   pin (our monogram) to that area. The base map is
   /images/areas/eastern-va.svg; everything on top is positioned in
   percentages of the same projection. See AreasWeServe.jsx.
   ============================================================ */

.aws-map-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: var(--s-64);
  align-items: center;
}
@media (max-width: 899px) {
  .aws-map-layout { grid-template-columns: 1fr; gap: var(--s-32); }
  .aws-map { order: -1; }
}

/* ---------- List ---------- */
.aws-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--c-stone); text-align: left; }
.aws-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-16);
  border-bottom: 1px solid var(--c-stone);
}
.aws-row-main {
  flex: 1;
  display: grid;
  gap: var(--s-4);
  padding: var(--s-16) 0;
  background: none;
  border: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
  color: var(--c-ink);
}
.aws-row-name { font-family: var(--font-display); font-size: 22px; line-height: 1.2; color: var(--c-deep); transition: color var(--d-hover) var(--ease-out); }
.aws-row-meta { font-size: 13px; color: var(--c-slate); }
.aws-row-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--s-8);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--c-sea-text);
  text-decoration: none;
  opacity: 0.0;
  transition: opacity var(--d-hover) var(--ease-out);
}
.aws-row.is-active .aws-row-link, .aws-row-link:focus-visible { opacity: 1; }
.aws-row.is-active .aws-row-name { color: var(--c-sea-text); }
@media (hover: none) { .aws-row-link { opacity: 1; } }
.aws-row-main:focus-visible, .aws-row-link:focus-visible { outline: 2px solid var(--c-sea); outline-offset: 2px; }

/* ---------- Map ---------- */
.aws-map { margin: 0; }
.aws-map-frame {
  position: relative;
  aspect-ratio: 1000 / 813;
  border-radius: 12px;
  overflow: hidden;
  background: var(--c-mint);
  box-shadow: var(--e-sm);
}
.aws-map-frame > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.aws-map figcaption { margin-top: var(--s-12); font-size: 12px; color: var(--c-slate); text-align: left; max-width: 62ch; }

.aws-water {
  position: absolute;
  left: 78%;
  top: 36%;
  font-size: 11px;
  font-style: italic;
  letter-spacing: 0.08em;
  color: var(--c-sea-text);
  opacity: 0.8;
  pointer-events: none;
}

.aws-route { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.aws-route line {
  stroke: var(--c-sea);
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-dasharray: 1;
  animation: aws-draw var(--d-hero) var(--ease-out) both;
}
@keyframes aws-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* Quiet dots for every area; the active one fills. */
.aws-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  padding: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid var(--c-sea);
  background: var(--c-white);
  cursor: pointer;
  transition: background var(--d-hover) var(--ease-out), transform var(--d-hover) var(--ease-out);
}
.aws-dot::before { content: ""; position: absolute; inset: -10px; }
.aws-dot.is-active { background: var(--c-sea); transform: translate(-50%, -50%) scale(1.3); }

.aws-tag {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 1px;
  padding: 8px 12px;
  transform: translate(16px, -50%);
  background: var(--c-white);
  border-radius: 6px;
  box-shadow: var(--e-md);
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--c-slate);
  pointer-events: none;
  animation: aws-tag-in var(--d-enter) var(--ease-out) both;
}
.aws-tag strong { font-size: 13px; color: var(--c-deep); }
.aws-tag--left { transform: translate(calc(-100% - 16px), -50%); }
@keyframes aws-tag-in { from { opacity: 0; } to { opacity: 1; } }

/* The fixed point: our monogram on a white disc. */
.aws-pin {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--c-white);
  border: 2px solid var(--c-deep);
  box-shadow: var(--e-md), 0 0 0 6px rgba(255, 255, 255, 0.55);
  pointer-events: none;
}
.aws-pin img { width: 36px; height: auto; display: block; }
.aws-pin-label {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, 38px);
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--c-deep);
  color: var(--c-ivory);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
  pointer-events: none;
}

@media (max-width: 599px) {
  .aws-pin { width: 44px; height: 44px; }
  .aws-pin img { width: 26px; }
  .aws-pin-label { transform: translate(-50%, 31px); font-size: 9px; }
  .aws-water { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .aws-route line, .aws-tag { animation: none; }
  .aws-dot, .aws-row-link, .aws-row-name { transition: none; }
}
