:root {
  --bg: #fbfaf7;
  --text: #1f2421;
  --primary: #2f3e46;
  --accent: #9a7b4f;
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --heading-weight: 600;
}
/* Shared stylesheet for every generated site. Each site prepends its own :root block
   with colors and fonts (see cssVariables in templates.js). */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

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

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  line-height: 1.15;
  color: var(--primary);
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  margin-top: 2.2em;
}

h3 {
  font-size: 1.3rem;
}

p,
ul,
ol,
dl,
blockquote,
figure {
  margin: 0 0 1.1em;
}

.wrap {
  width: min(72rem, 100% - 2.5rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--bg);
  padding: 0.5rem 1rem;
  z-index: 10;
}

.meta,
time {
  color: color-mix(in srgb, var(--text) 62%, var(--bg));
  font-size: 0.95rem;
}

/* header */

.site-header {
  border-bottom: 1px solid color-mix(in srgb, var(--text) 12%, var(--bg));
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding: 1.1rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  font-size: 1.45rem;
  color: var(--primary);
  text-decoration: none;
}

.brand img {
  height: 44px;
  width: auto;
}

.site-header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header nav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.site-header nav a:hover,
.site-header nav a[aria-current='page'] {
  color: var(--primary);
  border-bottom-color: var(--accent);
}

main {
  padding: 2.5rem 0 4rem;
}

/* hero and page headers */

.hero {
  padding: 2rem 0 1rem;
  max-width: 46rem;
}

.lede {
  font-size: 1.2rem;
  max-width: 42rem;
}

.lede p:last-child {
  margin-bottom: 0;
}

.page-header {
  margin-bottom: 2rem;
  max-width: 46rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button,
.contact-form button {
  display: inline-block;
  font: inherit;
  padding: 0.65rem 1.3rem;
  border-radius: 4px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--bg);
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.contact-form button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.button.secondary {
  background: transparent;
  color: var(--primary);
}

/* breadcrumbs */

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--text) 62%, var(--bg));
}

.breadcrumbs li + li::before {
  content: '/';
  margin-right: 0.4rem;
}

/* project cards */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 2rem 1.5rem;
}

.card h2,
.card h3 {
  font-size: 1.3rem;
  margin: 0.75rem 0 0.25rem;
}

.card h2 a,
.card h3 a {
  color: inherit;
  text-decoration: none;
}

.card h2 a:hover,
.card h3 a:hover {
  color: var(--accent);
}

.card p {
  margin-bottom: 0.4rem;
}

.card-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
}

/* project and entry bodies */

.prose {
  max-width: 42rem;
}

.photo {
  margin: 2rem 0;
  max-width: 60rem;
}

.photo img {
  width: auto;
  max-width: 100%;
  max-height: 85vh;
  border-radius: 3px;
}

figcaption {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: color-mix(in srgb, var(--text) 70%, var(--bg));
}

.photo-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-left: 0.5rem;
}

.video {
  margin: 2rem 0;
  max-width: 60rem;
}

.file a::before {
  content: '↓ ';
}

.featured {
  max-width: 42rem;
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 2rem 0;
}

.featured h3 {
  margin: 0.2rem 0;
}

.eyebrow {
  font-size: 0.9rem;
  margin: 0;
  color: color-mix(in srgb, var(--text) 62%, var(--bg));
}

/* tags */

.tag-groups {
  display: grid;
  gap: 0.6rem;
  margin: 2.5rem 0;
  max-width: 46rem;
}

.tag-groups div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.75rem;
}

.tag-groups dt {
  min-width: 7rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.tag-groups dd {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  display: inline-block;
  font-size: 0.85rem;
  line-height: 1.4;
  padding: 0.15rem 0.6rem;
  border: 1px solid color-mix(in srgb, var(--text) 20%, var(--bg));
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
}

a.tag:hover {
  border-color: var(--accent);
  color: var(--primary);
}

/* filters */

.filters {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.filter-label {
  min-width: 6rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.filters button {
  font: inherit;
  font-size: 0.88rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--text) 20%, var(--bg));
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.filters button[aria-pressed='true'] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg);
}

.filters .count {
  opacity: 0.6;
}

/* lists */

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  padding: 0;
}

.entry-list,
.service-list {
  list-style: none;
  padding: 0;
  max-width: 46rem;
}

.entry-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--text) 12%, var(--bg));
}

.entry-item h3 {
  margin: 0.2rem 0 0.4rem;
}

.service-list li {
  margin-bottom: 2rem;
}

.service-list h2 {
  margin-top: 0;
}

.facts {
  display: grid;
  gap: 0.75rem;
  max-width: 46rem;
}

.facts div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
}

.facts dt {
  font-weight: 600;
}

.facts dd {
  margin: 0;
}

.cta {
  margin-top: 3rem;
  font-size: 1.1rem;
}

/* contact form */

.contact-form {
  display: grid;
  gap: 1rem;
  max-width: 32rem;
  margin-top: 2rem;
}

.contact-form label {
  display: grid;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  font-weight: 400;
  padding: 0.55rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--text) 25%, var(--bg));
  border-radius: 4px;
  background: #fff;
  color: #1a1a1a;
}

.contact-form .hp {
  position: absolute;
  left: -9999px;
}

/* footer */

.site-footer {
  border-top: 1px solid color-mix(in srgb, var(--text) 12%, var(--bg));
  padding: 2.5rem 0;
  font-size: 0.95rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.5rem 2rem;
}

.footer-inner p {
  margin: 0 0 0.35rem;
}

.footer-inner ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-name,
.footer-heading {
  font-weight: 600;
}

/* memberships: logos in a row, names where there is no logo yet */

.memberships {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.memberships img {
  display: block;
  height: 56px;
  width: auto;
  max-width: 10rem;
  object-fit: contain;
}

.memberships li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* questions on the home page */

.faq details {
  border-top: 1px solid color-mix(in srgb, var(--text) 12%, var(--bg));
  padding: 0.75rem 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq details .prose {
  margin-top: 0.5rem;
}

blockquote.prose {
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
}

/* photo viewer */

.viewer {
  border: 0;
  padding: 0;
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 10, 10, 0.94);
  color: #f2f2f2;
}

.viewer::backdrop {
  background: rgba(10, 10, 10, 0.94);
}

.viewer figure {
  margin: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  padding: 3.5rem 4rem 1.5rem;
}

.viewer img {
  max-height: calc(100vh - 7rem);
  width: auto;
  object-fit: contain;
}

.viewer figcaption {
  color: #d8d8d8;
}

.viewer button {
  position: absolute;
  font: inherit;
  font-size: 1.5rem;
  background: transparent;
  color: #f2f2f2;
  border: 0;
  padding: 0.75rem 1rem;
  cursor: pointer;
}

.viewer .close {
  top: 0.5rem;
  right: 0.5rem;
}

.viewer .prev {
  left: 0.25rem;
  top: 50%;
}

.viewer .next {
  right: 0.25rem;
  top: 50%;
}

@media (max-width: 40rem) {
  .facts div {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .viewer figure {
    padding: 3.5rem 0.5rem 1rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .card-image img {
    transition: opacity 0.2s;
  }

  .card-image:hover img {
    opacity: 0.88;
  }
}
