/* ============================================
   atlas of reciprocal architecture
   shared stylesheet
   ============================================ */

@font-face {
  font-family: 'Combine';
  src: url('fonts/Combine.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Euripides';
  src: url('fonts/Euripides.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #000;
  --paper: #fff;
  --muted: #666;
  --line: rgba(0, 0, 0, 0.12);
  --pin: #cc0000;

  --display: 'Combine', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --body: 'Euripides', Georgia, 'Times New Roman', serif;

  --nav-h: 96px;
  --pad-x: 28px;
  --pad-y: 20px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── typography primitives ─────────────────── */

.t-display {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink);
}

.t-body {
  font-family: var(--body);
  font-weight: 400;
  color: var(--ink);
}

/* ── shared navigation ─────────────────────── */

.page-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--pad-y) var(--pad-x) 0;
  pointer-events: none;
}

.page-nav > * {
  pointer-events: auto;
}

/* pages that scroll: keep the bar legible as content passes under it */
.page-nav--solid {
  background: var(--paper);
  padding-bottom: 14px;
}

.nav-logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(13px, 1.4vw, 18px);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.3;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

.nav-logo:hover {
  opacity: 0.45;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  flex-shrink: 0;
}

.nav-btn {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(18px, 2.2vw, 28px);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.nav-btn:hover {
  opacity: 0.45;
}

.nav-btn[aria-current='page'] {
  opacity: 0.35;
}

/* ── about overlay ─────────────────────────── */

.about-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px var(--pad-x);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.about-overlay[data-open='true'] {
  opacity: 1;
  visibility: visible;
}

.about-close {
  position: absolute;
  top: var(--pad-y);
  right: var(--pad-x);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(18px, 2.2vw, 28px);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--ink);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.about-close:hover {
  opacity: 0.45;
}

.about-inner {
  max-width: 560px;
}

.about-inner h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.about-body {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.about-contact {
  font-family: var(--body);
  font-size: 15px;
  margin-top: 20px;
}

.about-contact a {
  color: var(--ink);
  text-decoration: underline;
}

/* ── shared utilities ──────────────────────── */

.shimmer {
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.04) 25%,
    rgba(0, 0, 0, 0.08) 50%,
    rgba(0, 0, 0, 0.04) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.is-hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ── mapbox overrides ──────────────────────── */

.mapboxgl-popup-content {
  font-family: var(--display);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 0;
  border: 1px solid var(--ink);
  box-shadow: none;
  background: var(--paper);
  color: var(--ink);
  pointer-events: none;
}

.mapboxgl-popup-tip,
.mapboxgl-popup-close-button {
  display: none;
}

@media (max-width: 700px) {
  :root {
    --pad-x: 16px;
    --pad-y: 12px;
    --nav-h: 76px;
  }

  /* the clamp minimums are desktop-sized: three buttons plus the
     logo overflow a phone. Scale the whole bar down instead. */
  .page-nav {
    gap: 12px;
  }

  .nav-logo {
    font-size: 10px;
    letter-spacing: 0.06em;
  }

  .nav-links {
    gap: 14px;
  }

  .nav-btn,
  .about-close {
    font-size: 15px;
    letter-spacing: 0.03em;
  }

  .about-overlay {
    padding: 72px var(--pad-x) 40px;
  }

  .about-inner h2 {
    font-size: 14px;
  }

  .about-body,
  .about-contact {
    font-size: 14px;
  }
}

/* very narrow phones */
@media (max-width: 360px) {
  .nav-logo {
    font-size: 9px;
  }

  .nav-btn,
  .about-close {
    font-size: 13px;
  }

  .nav-links {
    gap: 11px;
  }
}
