@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --glacier: #e6ecec;
  --ink: #10201f;
  --slate: #4a5d5e;
  --signal: #d93a17;
  --night: #0d1819;
  --mint: #4affa0;
  --night-text: #d7e2e1;
  --night-muted: #93a6a5;

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Serif 4", Georgia, serif;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --measure: 34rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--glacier);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.1875rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: var(--glacier);
  font-family: var(--display);
}
.skip:focus {
  top: 0.75rem;
}

/* Header */
.top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.5rem var(--gutter);
  font-family: var(--display);
  font-weight: 500;
}
.top .name {
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.top nav {
  display: flex;
  gap: 1.75rem;
}
.top nav a {
  text-decoration: none;
  color: var(--slate);
}
.top nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Hero: the quake map is the page's one big gesture */
.hero {
  position: relative;
  min-height: min(100svh, 60rem);
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  padding: 7rem var(--gutter) 1.5rem;
}

.quake-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.quake-map .grid line {
  stroke: var(--ink);
  stroke-opacity: 0.1;
  vector-effect: non-scaling-stroke;
  stroke-width: 1px;
}
.quake-map .dot {
  fill: var(--signal);
  fill-opacity: 0.7;
  mix-blend-mode: multiply;
}
.quake-map .dot.big {
  fill-opacity: 0.9;
  stroke: var(--signal);
  stroke-width: 0.4;
  stroke-opacity: 0.35;
}
.quake-map.sweep .dot {
  opacity: 0;
  animation: appear 0.5s ease-out forwards;
}
@keyframes appear {
  from {
    opacity: 0;
    transform: scale(0.2);
    transform-box: fill-box;
    transform-origin: center;
  }
  to {
    opacity: 1;
    transform: scale(1);
    transform-box: fill-box;
    transform-origin: center;
  }
}

.hero-copy {
  position: relative;
  align-self: end;
  max-width: 62rem;
}
.hero h1 {
  margin: 0;
  max-width: 14ch;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 9.5vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-wrap: balance;
  /* Keeps the headline readable where dots pass behind it. */
  text-shadow: 0 0 0.35em var(--glacier), 0 0 0.12em var(--glacier);
}

.map-caption {
  position: relative;
  margin: 2.5rem 0 0;
  max-width: 48rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--slate);
}

/* Projects */
.project {
  padding: clamp(4rem, 10vw, 9rem) var(--gutter);
  display: grid;
  gap: clamp(2.5rem, 6vw, 6rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}
.project h2 {
  margin: 0 0 1.5rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.75rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.project p {
  max-width: var(--measure);
  margin: 0 0 1.25rem;
}
.project .lede {
  font-size: 1.4rem;
  line-height: 1.45;
}

.button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--glacier);
  font-family: var(--display);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s;
}
.button:hover {
  background: var(--signal);
}

.geopulse {
  border-top: 1px solid rgba(16, 32, 31, 0.15);
}
.categories {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 2rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.categories li {
  break-inside: avoid;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(16, 32, 31, 0.15);
}
.categories .hero-link {
  color: var(--signal);
}

.bodycomp {
  background: var(--night);
  color: var(--night-text);
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
}
.bodycomp h2 {
  color: #fff;
}
.bodycomp .lede {
  color: #fff;
}
.bodycomp .button {
  background: var(--mint);
  color: var(--night);
}
.bodycomp .button:hover {
  background: #fff;
}
.bodycomp :focus-visible {
  outline-color: var(--mint);
}

.phones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.5rem, 1.5vw, 1.25rem);
  align-items: start;
}
.phones img {
  border-radius: clamp(14px, 2.2vw, 26px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.phones img:nth-child(2) {
  margin-top: clamp(2rem, 7vw, 6rem);
}
.phones img:nth-child(3) {
  margin-top: clamp(1rem, 3.5vw, 3rem);
}

/* Footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 2rem var(--gutter) 2.5rem;
  background: var(--night);
  color: var(--night-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--display);
  font-size: 0.95rem;
}
.foot p {
  margin: 0;
}
.foot nav {
  display: flex;
  gap: 1.5rem;
}
.foot a:hover {
  color: #fff;
}

/* Legal pages */
.legal {
  max-width: 44rem;
  margin: 0 auto;
  padding: 7rem var(--gutter) 5rem;
}
.legal h1 {
  margin: 0 0 2rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.035em;
}
.legal h2 {
  margin: 2.5rem 0 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.legal p,
.legal address {
  margin: 0 0 1rem;
  font-style: normal;
}

@media (max-width: 860px) {
  .project,
  .bodycomp {
    grid-template-columns: minmax(0, 1fr);
  }
  .top nav {
    gap: 1.25rem;
  }
  .hero {
    padding-top: 6rem;
  }
}

@media (max-width: 480px) {
  .categories {
    columns: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .quake-map.sweep .dot {
    animation: none;
    opacity: 1;
  }
}
