/* econdev.css — Chandler Economic Development's own pieces: the corridor
 * hero and its finder, the map, the wafer figures and die rows, the spec
 * plates, and the Start a Project band.
 *
 * Two marks carry the site. The die row: a run of small squares, one for a
 * fixed amount (a thousand jobs, or a share of the largest value in a table),
 * the furrow of the City's logo recut as the dies on a wafer. And the wafer:
 * a disc of dies lit from the bottom so the lit AREA is the percentage it
 * stands beside. Both are decoration next to a printed number, never the
 * only place the number appears.
 */

/* Seven two-word destinations: the row tightens before it would wrap. */
.primary-nav__list {
  gap: 0 clamp(0.85rem, 1.5vw, 2rem);
}

@media (max-width: 78rem) {
  .primary-nav__list a {
    font-size: 0.9375rem;
  }
}

@media (min-width: 64rem) and (max-width: 72rem) {
  .primary-nav__list {
    gap: 0 0.7rem;
  }

  .primary-nav__list a {
    font-size: 0.875rem;
    letter-spacing: -0.01em;
  }
}

/* ----------------------------------------------------------- shared marks */
.eyebrow,
.row__kicker {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.dierow {
  --d: 10px;
  --g: 3px;
  --die: var(--slate);
  display: inline-block;
  width: calc(var(--share, 0%) * 0.62);
  min-width: 13px;
  height: var(--d);
  vertical-align: middle;
  background: repeating-linear-gradient(to right, var(--die) 0 var(--d), transparent var(--d) calc(var(--d) + var(--g)));
}

.is-lead .dierow,
.dierow--count {
  --die: var(--accent);
}

.dierow--count {
  --d: clamp(6px, 0.72vw, 10px);
  display: block;
  width: calc(var(--dies, 0) * (var(--d) + var(--g)));
  max-width: 100%;
}

@property --fill {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

.wafer {
  --lit: var(--slate);
  --dim: #dfe7ee;
  position: relative;
  display: inline-block;
  width: 3.5rem;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  vertical-align: middle;
  background: linear-gradient(to top, var(--lit) var(--fill), var(--dim) var(--fill));
}

.wafer::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(to right, transparent 0 7px, var(--paper) 7px 8px),
    repeating-linear-gradient(to bottom, transparent 0 7px, var(--paper) 7px 8px);
}

.wafer--lead {
  --lit: var(--accent);
}

/* Lit once as it comes on screen; a figure already in view, or a reader who
   asked for less motion, simply sees it lit. */
.wafer.is-in {
  animation: wafer-fill 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes wafer-fill {
  from {
    --fill: 0%;
  }
}

/* ------------------------------------------------------------- stat lists */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 0 2rem;
  margin: 0;
  border-top: 2px solid var(--ink);
}

.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 0.25rem;
  padding: 0.9rem 0 1rem;
  border-bottom: 1px solid var(--rule);
}

.stat dt {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.4;
  text-transform: uppercase;
}

.stat dd {
  margin: 0;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.2rem);
  font-weight: 500;
  line-height: 1.15;
}

.prose .stats {
  margin-block: 1.5rem;
}

/* ---------------------------------------------------------------- figures */
.figures {
  display: grid;
  gap: 2.5rem clamp(2rem, 4vw, 3.5rem);
}

.figures--two {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 25rem), 1fr));
  align-items: start;
}

.figure {
  margin: 0;
  padding-top: 0.9rem;
  border-top: 2px solid var(--ink);
}

.figure__title {
  font-size: 1.1875rem;
  letter-spacing: 0;
}

.figure__note,
.figure__source {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
}

.figure__note {
  margin-top: 0.2rem;
}

.figure__source {
  margin-top: 0.7rem;
}

.figure__source a {
  display: inline-block;
  padding-block: 0.15rem;
}

.figure__table {
  width: 100%;
  margin-top: 0.6rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.figure__table th,
.figure__table td {
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: middle;
}

.figure__table thead th {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: bottom;
}

.figure__table th[scope="row"] {
  font-weight: 500;
}

.figure__value,
.figure__num {
  font-family: var(--font-mono);
  font-weight: 500;
  white-space: nowrap;
}

.figure__value {
  margin-left: 0.6rem;
}

.figure__table .is-lead th,
.figure__table .is-lead .figure__value,
.figure__table td.is-lead .figure__value {
  color: var(--accent);
  font-weight: 600;
}

.figure--bars td,
.figure--index td,
.employers td {
  width: 62%;
  white-space: nowrap;
}

/* In a table of wafers, each number sits under its disc. */
.figure--wafers thead + tbody td .figure__value {
  display: block;
  margin: 0.25rem 0 0;
}

.figure__table--grid .figure__num,
.figure--table .figure__num {
  text-align: right;
}

.figure__table--grid thead th:not(:first-child),
.figure--table thead th:last-child {
  text-align: right;
}

/* Three columns on a phone: the number stays, its run of dies gives up the room. */
@media (max-width: 34rem) {
  .figure--table .dierow {
    display: none;
  }
}

/* ------------------------------------------------------------------- hero */
.ed-hero {
  padding-top: clamp(2rem, 1rem + 3vw, 3.5rem);
}

.ed-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem clamp(2rem, 4vw, 4rem);
  align-items: start;
}

@media (min-width: 60rem) {
  .ed-hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }
}

.ed-hero h1 {
  margin-top: 0.5rem;
  font-size: clamp(2.5rem, 1.3rem + 4.2vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.ed-hero__lede {
  max-width: 34rem;
  margin-top: 1.1rem;
  color: var(--ink-2);
  font-size: 1.1875rem;
  line-height: 1.5;
}

.ed-hero__corridors {
  margin-top: clamp(2rem, 1.5rem + 2vw, 3.25rem);
}

.ed-hero__sub {
  margin-bottom: 0.6rem;
  font-size: var(--h3);
}

.finder {
  margin-top: 1.75rem;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.finder__title {
  padding: 0.45rem 0.9rem;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.finder__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
  gap: 0.9rem;
  align-items: end;
  padding: 1rem 0.9rem 1.1rem;
}

.finder label {
  display: block;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.finder select {
  width: 100%;
  min-height: 2.75rem;
  margin-top: 0.3rem;
  padding: 0.4rem 0.6rem;
  border: 2px solid var(--rule-strong);
  border-radius: var(--radius-field);
  background: var(--paper);
}

.finder .button {
  width: 100%;
}

/* -------------------------------------------------------------- corridors */
.corridors {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--ink);
}

.corridor {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 17rem) minmax(0, 1fr);
  gap: 0.3rem 1.5rem;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}

.corridor__name {
  font-size: 1.1875rem;
  letter-spacing: 0;
}

.corridor__name a {
  display: inline-block;
  padding-block: 0.15rem;
  color: var(--brand);
  text-decoration: none;
}

.corridor__name a:hover,
.corridor__name a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
}

.corridor__figures {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1.25rem;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.corridor__figures strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
}

@media (max-width: 52rem) {
  .corridor {
    grid-template-columns: minmax(0, 1fr);
  }

  .dierow--count {
    --d: 6px;
    --g: 2px;
  }
}

.corridor-split,
.finder-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

@media (min-width: 64rem) {
  .corridor-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 27rem);
  }

  .finder-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 28rem);
  }

  .finder-split__map {
    position: sticky;
    top: 1rem;
  }
}

.finder-split .rows {
  grid-template-columns: minmax(0, 1fr);
}

.corridor-split__copy > * + * {
  margin-top: 2rem;
}

/* Beside the map the list column is too narrow for three columns until the page is wide. */
@media (max-width: 79.99rem) {
  .corridor-split .corridor {
    grid-template-columns: minmax(0, 1fr);
  }
}

.employers h2,
.corridor-others h2 {
  margin-bottom: 0.6rem;
  font-size: var(--h3);
}

.cross {
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--mint);
  background: var(--tint);
}

/* -------------------------------------------------------------------- map */
.map__canvas {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 2px solid var(--ink);
  background: var(--tint);
}

.map--corridor .map__canvas {
  aspect-ratio: 4 / 3;
}

.map__fallback {
  margin-top: -1px;
  padding: 0.8rem 0.9rem;
  border: 2px solid var(--ink);
  border-top: 0;
  background: var(--paper);
  font-size: 0.9375rem;
}

.map.is-live .map__fallback {
  display: none;
}

/* On a phone the list comes first and the map waits for a tap, so until then
   its empty frame is put away and only the sentence and the button show. */
@media (max-width: 47.99rem) {
  .map:not(.is-live) .map__canvas {
    display: none;
  }

  .map:not(.is-live) .map__fallback {
    margin-top: 0;
    border-top: 2px solid var(--ink);
  }
}

.map__start {
  margin-top: 0.75rem;
}

.map__note,
.map__legend {
  margin-top: 0.5rem;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
}

.map__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.1rem;
  padding: 0;
  list-style: none;
}

.map__legend li::before,
.pin {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  background: var(--pin, #00426a);
  box-shadow: 0 0 0 1px rgb(11 34 51 / 0.55);
}

.map__legend li::before {
  content: "";
  margin-right: 0.4rem;
  vertical-align: -1px;
}

.pin {
  cursor: pointer;
}

.pin--office,
.map__legend .is-office {
  --pin: #00426a;
}

.pin--industrial,
.map__legend .is-industrial {
  --pin: #6c1d45;
}

.pin--coworking,
.map__legend .is-coworking {
  --pin: #00c1a0;
}

.maplibregl-popup-content {
  padding: 0.7rem 0.9rem;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
}

.map-pop__kicker {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.map-pop__title {
  display: block;
  margin-top: 0.1rem;
  font-weight: 600;
}

/* ----------------------------------------------------------------- plates */
.plate {
  margin: 0;
  border: 1px solid var(--ink);
  background: var(--ink);
}

.plate .ph {
  max-width: 100%;
  border-radius: 0;
}

.plate__cap {
  display: block;
  padding: 0.4rem 0.7rem;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.4;
  text-transform: uppercase;
}

.opening__media .plate {
  width: min(100%, var(--plate-w, 100%));
  margin-left: auto;
}

.plates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plate-card {
  border: 1px solid var(--rule-strong);
  background: var(--paper);
}

.plate-card .ph {
  max-width: 100%;
  border-radius: 0;
}

.plate-card__body {
  padding: 0.9rem 1rem 1.1rem;
  border-top: 3px solid var(--accent);
}

.plate-card__title {
  font-size: 1.1875rem;
  letter-spacing: 0;
  line-height: 1.2;
}

.plate-card__title a {
  display: inline-block;
  padding-block: 0.15rem;
  color: var(--brand);
  text-decoration: none;
}

.plate-card__title a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.plate-card__body p {
  margin-top: 0.3rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.cards--text {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}

.card--text {
  border-color: var(--rule-strong);
  border-top: 3px solid var(--brand);
}

/* ------------------------------------------------------------------ bands */
.ed-band {
  padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem);
}

.ed-band--industries {
  background: var(--tint);
}

.band-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-bottom: 1.25rem;
}

.band-head .more {
  margin: 0;
}

.band-head .more a {
  display: inline-block;
  padding-block: 0.2rem;
  font-weight: 600;
}

.cta {
  --focus: #ffffff;
  padding-block: clamp(2.5rem, 2rem + 3vw, 4rem);
  background: var(--accent);
  color: #fff;
}

.cta h2 {
  max-width: 24ch;
  color: #fff;
}

.cta p {
  max-width: 40rem;
  margin-top: 0.9rem;
  font-size: 1.125rem;
}

.cta a:not(.button) {
  color: #fff;
}

.cta .actions {
  margin-top: 1.5rem;
}

.button--light {
  border-color: #fff;
  background: #fff;
  color: var(--accent);
}

.button--light:hover {
  border-color: #fff;
  background: var(--tint);
  color: var(--brand-deep);
}

.button--ghost {
  border-color: #fff;
  background: transparent;
  color: #fff;
}

.button--ghost:hover {
  border-color: #fff;
  background: rgb(255 255 255 / 0.16);
  color: #fff;
}

/* The band already closes the page; the footer follows it without the field of rows between. */
.site-footer {
  margin-top: 0;
}

.site-footer > .furrow--field {
  display: none;
}

.footer-contact img {
  padding: 0.3rem 0.5rem 0.3rem 0;
  border-radius: 2px;
}

/* --------------------------------------------------------------- property */
.property {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

@media (min-width: 52rem) {
  .property {
    grid-template-columns: minmax(0, 22.5rem) minmax(0, 1fr);
  }
}

.property__facts > * + * {
  margin-top: 1.25rem;
}

.property__facts h2 {
  font-size: var(--h3);
}

/* ------------------------------------------------------------------- news */
.news {
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.news__item {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 1.25rem 1.5rem;
  align-items: start;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 1rem;
}

.news__item:not(:has(.ph)) {
  grid-template-columns: minmax(0, 1fr);
}

.news__title {
  margin-top: 0.15rem;
  font-size: 1.1875rem;
  letter-spacing: 0;
  text-wrap: pretty;
}

.news__title a {
  color: var(--brand);
  text-decoration: none;
}

.news__title a:hover {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 40rem) {
  .news__item {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------------------- team */
.team {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.person {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
  scroll-margin-top: 1rem;
}

.person:not(:has(.ph)) {
  grid-template-columns: minmax(0, 1fr);
}

.person__name {
  font-size: 1.1875rem;
  letter-spacing: 0;
}

.person__role {
  margin-bottom: 0.4rem;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.person__body a {
  display: inline-block;
  padding-block: 0.15rem;
  overflow-wrap: anywhere;
}

.office {
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

/* ---------------------------------------------------------------- contact */
.contact > h2,
.page-figures > h2,
.page-corridors > h2 {
  margin-bottom: 1rem;
  font-size: var(--h3);
}

.team--contact {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 24rem));
}

.person__name {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.2;
}

.faces {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 1.25rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.face {
  display: grid;
  gap: 0.15rem;
  align-content: start;
  font-size: 0.9375rem;
  line-height: 1.3;
}

.face .ph {
  margin-bottom: 0.4rem;
}

.face a {
  display: inline-block;
  padding-block: 0.1rem;
  font-weight: 600;
}

.face span {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.figure__bar {
  width: 46%;
  white-space: nowrap;
}

/* -------------------------------------------------------------- documents */
.doc-list {
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--ink);
}

.doc {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.2rem 1.5rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}

.doc__link {
  display: inline-block;
  padding-block: 0.1rem;
  font-weight: 600;
}

.doc__meta {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  white-space: nowrap;
}

.data-group > h2 {
  margin-bottom: 1.25rem;
}

.prose--pairs h3 {
  margin-top: 1.4em;
}
