/* Atlanta Maps: the Sanborn Georeferencer's look (paper, ink, clay; Cormorant Garamond,
   Calluna Sans, Lato), adapted for a public website. */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Calluna Sans";
  src: url("../fonts/calluna-sans-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Lato";
  src: url("../fonts/lato-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Lato";
  src: url("../fonts/lato-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f4efe6;
  --paper-light: #fbf8f2;
  --paper-deep: #e8e0d3;
  --card: #fffdfa;
  --ink: #26221f;
  --ink-soft: #655f58;
  --clay: #d97757;
  --clay-dark: #a9462f;
  --clay-pale: #f5dfd6;
  --grid-blue: #1d5fc4;
  --hairline: rgba(38, 34, 31, 0.15);
  --hairline-strong: rgba(38, 34, 31, 0.27);
  --shadow: 0 8px 28px rgba(46, 39, 32, 0.12);
  --header-h: 76px;
  --panel-w: 392px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Calluna Sans", Avenir, "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--clay-dark);
}

button,
input {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

/* ---------- header ---------- */

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
  padding: 0 28px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(251, 248, 242, 0.97);
}

.wordmark {
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 26px;
}

.site-nav a {
  padding: 6px 0 4px;
  border-bottom: 2px solid transparent;
  color: var(--ink-soft);
  font-size: 17px;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--clay-dark);
}

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--clay);
  color: var(--ink);
}

.nav-toggle {
  display: none;
}

/* ---------- reading pages ---------- */

.reading {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 28px 96px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--clay-dark);
  font-family: Lato, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.reading h1 {
  margin: 0 0 32px;
  font-size: clamp(40px, 5vw, 58px);
  line-height: 1;
  text-transform: lowercase;
}

.reading h2 {
  margin: 44px 0 12px;
  font-size: 30px;
  line-height: 1.1;
}

.reading h3 {
  margin: 28px 0 8px;
  font-size: 23px;
  line-height: 1.15;
}

.reading p,
.reading li {
  font-size: 18px;
  line-height: 1.62;
}

.reading ul {
  padding-left: 1.1em;
}

.reading li + li {
  margin-top: 4px;
}

.contact-lines p {
  font-size: 22px;
}

/* ---------- map page ---------- */

body.map-page {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.map-shell {
  display: grid;
  grid-template-columns: var(--panel-w) minmax(0, 1fr);
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
}

.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--hairline);
  background: var(--paper-light);
}

.panel-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 22px 18px;
}

.panel h1 {
  margin: 0 0 18px;
  font-size: 42px;
  line-height: 0.96;
  text-transform: lowercase;
}

.search {
  position: relative;
  margin-bottom: 16px;
}

.search input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--hairline-strong);
  border-radius: 2px;
  background: var(--card);
  font-size: 17px;
}

.search input::placeholder {
  color: #71726d;
}

.search-results {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  background: var(--card);
}

.search-results li + li {
  border-top: 1px solid var(--hairline);
}

.search-results button {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.35;
  text-align: left;
}

.search-results button:hover {
  background: var(--clay-pale);
}

.search-status {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.control-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 92px;
  color: var(--ink-soft);
  font-family: Lato, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.segmented {
  display: grid;
  flex: 1;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  height: 40px;
  border: 1px solid var(--hairline-strong);
  border-radius: 2px;
  background: var(--card);
}

.segmented button {
  border: 0;
  border-right: 1px solid var(--hairline);
  background: none;
  cursor: pointer;
  font-size: 16px;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button[aria-pressed="true"] {
  background: var(--clay-pale);
  box-shadow: inset 0 -2px 0 var(--clay);
  color: var(--clay-dark);
}

.share-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 18px;
}

.button {
  min-height: 40px;
  padding: 8px 14px 7px;
  border: 1px solid var(--hairline-strong);
  border-radius: 2px;
  background: var(--card);
  cursor: pointer;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.button:hover {
  border-color: var(--clay);
  color: var(--clay-dark);
}

.button.primary {
  border-color: var(--clay-dark);
  background: var(--clay);
  color: #231915;
}

.button.primary:hover {
  background: #e28361;
  color: #231915;
}

.share-status {
  color: var(--ink-soft);
  font-size: 15px;
}

/* the list of maps */

.list-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 8px 0 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--hairline-strong);
}

.list-head .sides {
  display: flex;
  gap: 4px;
}

.list-head .sides span {
  width: 46px;
  color: var(--ink-soft);
  font-family: Lato, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.map-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.map-item {
  border-bottom: 1px solid var(--hairline);
}

.map-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 9px 0;
}

.map-row input[type="checkbox"] {
  width: 19px;
  height: 19px;
  margin: 3px 0 0;
  accent-color: var(--clay);
  cursor: pointer;
}

.map-name {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 16.5px;
  line-height: 1.3;
  text-align: left;
}

.map-name .year {
  margin-right: 5px;
  font-family: Lato, sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.map-item.is-on .map-name {
  color: var(--ink);
}

.row-tools {
  display: flex;
  gap: 4px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 2px;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
}

.icon-button:hover,
.icon-button[aria-expanded="true"] {
  border-color: var(--hairline-strong);
  color: var(--clay-dark);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.side-pick {
  display: flex;
  gap: 4px;
}

.side-pick label {
  display: grid;
  place-items: center;
  width: 46px;
  height: 28px;
  cursor: pointer;
}

.map-details {
  padding: 0 0 12px 34px;
}

.detail-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-top: 6px;
  font-size: 15px;
}

.detail-line .control-label {
  min-width: 0;
  font-size: 15px;
}

.opacity {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
}

.opacity input[type="range"] {
  flex: 1;
  min-width: 120px;
  accent-color: var(--clay);
}

.opacity output {
  width: 42px;
  color: var(--ink-soft);
  font-size: 15px;
  text-align: right;
}

.download-links a,
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--clay-dark);
  cursor: pointer;
  font-size: 15px;
  text-decoration: underline;
  text-decoration-color: rgba(169, 70, 47, 0.35);
  text-underline-offset: 3px;
}

.download-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.muted {
  color: var(--ink-soft);
}

/* the 1911 folder */

.folder > .map-row .map-name {
  font-weight: 400;
}

.folder-toggle svg {
  transition: transform 0.15s ease;
}

.folder.is-open .folder-toggle svg {
  transform: rotate(90deg);
}

.folder-body {
  margin: 0 0 10px 18px;
  padding-left: 12px;
  border-left: 2px solid var(--paper-deep);
}

.folder-body .map-item:last-child {
  border-bottom: 0;
}

.grid-row .map-name {
  color: var(--grid-blue);
}

.credits {
  padding: 10px 22px 12px;
  border-top: 1px solid var(--hairline);
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.4;
}

.credits a {
  color: inherit;
}

/* the map stage */

.map-stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #e9e4da;
}

.map {
  position: absolute;
  inset: 0;
}

.map-right {
  z-index: 2;
}

.divider {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: 0;
  cursor: ew-resize;
}

.divider::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1.5px;
  width: 3px;
  background: var(--card);
  box-shadow: 0 0 0 1px rgba(38, 34, 31, 0.35);
}

.divider-handle {
  position: absolute;
  top: 50%;
  left: -22px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--clay-dark);
  touch-action: none;
}

.divider-handle svg {
  width: 22px;
  height: 22px;
}

.side-tag {
  position: absolute;
  top: 12px;
  z-index: 4;
  max-width: 40%;
  padding: 5px 10px;
  border-radius: 2px;
  background: rgba(251, 248, 242, 0.94);
  box-shadow: 0 1px 4px rgba(38, 34, 31, 0.2);
  font-size: 15px;
  line-height: 1.3;
  pointer-events: none;
}

.side-tag.left {
  left: 12px;
}

.side-tag.right {
  right: 56px;
  text-align: right;
}

.map-notice {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 5;
  padding: 9px 16px;
  border: 1px solid rgba(29, 95, 196, 0.45);
  border-radius: 2px;
  background: rgba(251, 248, 242, 0.96);
  box-shadow: var(--shadow);
  color: var(--grid-blue);
  font-size: 17px;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* the sheet download card (a MapLibre popup) */

.maplibregl-popup-content {
  padding: 14px 16px 14px;
  border-radius: 2px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-family: "Calluna Sans", Avenir, sans-serif;
}

.maplibregl-popup-close-button {
  width: 30px;
  height: 30px;
  color: var(--ink-soft);
  font-size: 22px;
}

.sheet-card h3 {
  margin: 0 28px 10px 0;
  font-size: 24px;
  line-height: 1.1;
}

.sheet-card .buttons {
  display: flex;
  gap: 8px;
}

.sheet-card .button {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  color: var(--ink);
}

.sheet-card .button small {
  color: var(--ink-soft);
  font-size: 15px;
}

.search-marker {
  width: 18px;
  height: 18px;
  border: 3px solid var(--card);
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
}

.maplibregl-ctrl-attrib,
.maplibregl-ctrl-attrib a {
  font-family: "Calluna Sans", Avenir, sans-serif;
  font-size: 15px;
  color: var(--ink-soft);
}

.maplibregl-ctrl-scale {
  font-family: "Calluna Sans", Avenir, sans-serif;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.3;
}

/* info dots */

.info-dot {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-soft);
  cursor: help;
  vertical-align: middle;
}

.info-dot:hover,
.info-dot[aria-expanded="true"] {
  color: var(--clay-dark);
}

.info-dot svg {
  width: 16px;
  height: 16px;
}

.info-pop {
  position: fixed;
  z-index: 100;
  max-width: 340px;
  padding: 10px 13px;
  border: 1px solid var(--hairline-strong);
  border-radius: 2px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-family: "Calluna Sans", Avenir, sans-serif;
  font-size: 15.5px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: none;
}

/* ---------- phones ---------- */

.panel-toggle {
  display: none;
}

@media (max-width: 820px) {
  :root {
    --header-h: 60px;
  }

  .site-header {
    padding: 0 16px;
  }

  .wordmark {
    font-size: 28px;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--hairline-strong);
    border-radius: 2px;
    background: var(--card);
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 6px 16px 12px;
    border-bottom: 1px solid var(--hairline);
    background: var(--paper-light);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--hairline);
    font-size: 19px;
  }

  .map-shell {
    position: relative;
    display: block;
  }

  .map-stage {
    position: absolute;
    inset: 0;
  }

  .panel {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    max-height: 62%;
    border-top: 1px solid var(--hairline-strong);
    border-right: 0;
    box-shadow: 0 -8px 24px rgba(46, 39, 32, 0.14);
    transform: translateY(calc(100% - 56px));
    transition: transform 0.22s ease;
  }

  .panel.is-open {
    transform: none;
  }

  .panel-toggle svg {
    transition: transform 0.22s ease;
  }

  .panel.is-open .panel-toggle svg {
    transform: rotate(180deg);
  }

  .panel-toggle {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 56px;
    padding: 0 16px;
    border: 0;
    border-bottom: 1px solid var(--hairline);
    background: var(--paper-light);
    cursor: pointer;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 26px;
    text-transform: lowercase;
  }

  .panel h1 {
    display: none;
  }

  .panel-scroll {
    padding: 14px 16px;
  }

  .map-notice {
    top: 10px;
    max-width: calc(100% - 24px);
    font-size: 15px;
    white-space: normal;
  }

  .reading {
    padding: 36px 16px 72px;
  }
}
