:root {
  --ink: #2f402c;
  --ink-soft: #678c60;
  --accent: #3a1f60;
  --sky: #cbe8f2;
  --paper: #f8f7f5;
  --white: #fff;

  --font-serif: kopius, Georgia, serif;
  --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --space-xs: 0.9375rem;
  --space-s: 1.875rem;
  --space-m: 3.75rem;
  --space-l: clamp(4rem, 10vw, 7.5rem);

  --measure: 45rem;
  --wide: 75rem;
  --radius: 5px;
  --radius-card: 20px;

  --hero-max-height: 60rem;
  --ground-height: clamp(2.5rem, 7vw, 6rem);
}

/* Base */

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 300;
  line-height: 1.6;
}

main {
  flex: 1;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.25;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

abbr[title] {
  text-decoration: none;
}

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

::selection {
  background: color-mix(in srgb, var(--accent) 50%, transparent);
  color: var(--white);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--white);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Shared elements */

.eyebrow {
  font-size: 1rem;
  letter-spacing: 0.125em;
  text-transform: uppercase;
}

.button {
  display: inline-block;
  padding: 0.9em 1.9em;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: transparent;
  color: var(--accent);
  font: 300 1rem/1.2 var(--font-serif);
  letter-spacing: 0.25em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.button:hover {
  border-color: transparent;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.rule {
  max-width: 52.5rem;
  margin: 0 auto;
  border: 0;
  border-top: 1px solid var(--accent);
}

/* Masthead: header and, on the home page, the hero share the sky background */

.masthead {
  background:
    radial-gradient(ellipse at top, var(--white), var(--sky) 50%) top / 100% max(100%, 100svh) no-repeat
    var(--sky);
}

.masthead--home {
  display: flex;
  flex-direction: column;
  min-height: min(100svh, var(--hero-max-height));
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  background: rgb(0 0 0 / 5%);
}

.topbar a {
  padding: 0.3rem 1.25rem;
  font: italic 0.75rem var(--font-sans);
  text-transform: uppercase;
  opacity: 0.5;
  transition: opacity 0.25s ease;
}

.topbar a:hover {
  opacity: 1;
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 67.5rem;
  margin: 0 auto;
  padding: var(--space-xs) var(--space-s);
}

.nav__logo {
  grid-area: 1 / 2;
  padding: var(--space-xs) var(--space-s);
}

.nav__logo img {
  width: auto;
  height: 60px;
}

.nav__menu {
  display: contents;
}

.nav__links {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__links--start {
  grid-area: 1 / 1;
  justify-content: flex-end;
}

.nav__links--end {
  grid-area: 1 / 3;
}

.nav__links a {
  position: relative;
  display: block;
  padding: var(--space-s);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav__links a::after {
  content: "";
  position: absolute;
  right: 30%;
  bottom: 1.25rem;
  left: 30%;
  height: 1px;
  background: color-mix(in srgb, currentColor 50%, transparent);
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out;
}

.nav__links a:hover::after,
.nav__links a[aria-current]::after {
  opacity: 1;
  transform: none;
}

.nav__toggle {
  display: none;
}

@media (max-width: 50rem) {
  .topbar {
    display: none;
  }

  .nav {
    display: flex;
    justify-content: center;
  }

  .nav__toggle {
    position: fixed;
    top: var(--space-xs);
    right: var(--space-xs);
    z-index: 20;
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    border: 0;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ink) 50%, transparent);
    backdrop-filter: blur(15px);
    cursor: pointer;
  }

  .nav__toggle span,
  .nav__toggle::before,
  .nav__toggle::after {
    content: "";
    grid-area: 1 / 1;
    width: 1.75rem;
    height: 2px;
    background: var(--white);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .nav__toggle::before {
    transform: translateY(-8px);
  }

  .nav__toggle::after {
    transform: translateY(8px);
  }

  .nav__toggle[aria-expanded="true"] span {
    opacity: 0;
  }

  .nav__toggle[aria-expanded="true"]::before {
    transform: rotate(45deg);
  }

  .nav__toggle[aria-expanded="true"]::after {
    transform: rotate(-45deg);
  }

  .nav__menu {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 10;
    display: block;
    width: min(75%, 20rem);
    padding: 6rem var(--space-s) var(--space-s);
    background: color-mix(in srgb, var(--ink) 95%, transparent);
    backdrop-filter: blur(15px);
    visibility: hidden;
    transform: translateX(100%);
    transition: transform 0.25s ease, visibility 0.25s;
  }

  .nav__toggle[aria-expanded="true"] + .nav__menu {
    visibility: visible;
    transform: none;
  }

  .nav__links {
    flex-direction: column;
  }

  .nav__links a {
    padding: var(--space-xs) 0;
    color: var(--white);
  }

  .nav__links a::after {
    display: none;
  }
}

/* Home hero */

.hero {
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  text-align: center;
}

.hero__intro {
  padding: clamp(1.5rem, 6vh, 4rem) var(--space-s) var(--space-m);
}

.hero__title {
  font-size: 1.5rem;
}

.hero__title span {
  display: block;
  color: var(--ink-soft);
  font-weight: 300;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs) var(--space-s);
  margin-top: var(--space-s);
}

.hero__scene {
  position: relative;
  margin-top: auto;
}

.hero__scene img {
  position: relative;
  z-index: 1;
  width: min(60vw, 56rem);
  margin-inline: auto;
}

.hero__ground {
  width: 100%;
  height: var(--ground-height);
  margin-top: calc(var(--ground-height) * -0.6);
  fill: var(--paper);
}

@media (max-width: 50rem) {
  .hero__scene img {
    width: 120vw;
    max-width: none;
    margin-inline: -10vw;
  }
}

/* Home sections */

.newsletter {
  padding: var(--space-m) var(--space-s) 0;
  text-align: center;
}

.newsletter__form {
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: center;
  align-items: center;
  gap: var(--space-xs) var(--space-s);
  margin-top: var(--space-s);
}

.newsletter__form label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.newsletter__form input {
  min-width: 0;
  padding: 0.4rem 0.6rem;
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
  border-radius: 3px;
  background: var(--white);
  font: inherit;
}

.newsletter__form .button {
  grid-column: 1 / -1;
  justify-self: center;
}

@media (max-width: 36rem) {
  .newsletter__form {
    grid-template-columns: minmax(0, 20rem);
  }

  .newsletter__form label {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: var(--space-m);
  max-width: var(--wide);
  margin: 0 auto;
  padding: var(--space-m) var(--space-s);
  list-style: none;
}

.card {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 18.75rem;
  overflow: hidden;
  border-radius: var(--radius-card);
  text-decoration: none;
  transition: transform 0.3s ease;
}

.card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__label {
  position: relative;
  max-width: 50%;
  padding: var(--space-xs) var(--space-s);
  border-top-right-radius: 2.5rem;
  background: color-mix(in srgb, var(--ink) 80%, transparent);
  color: var(--white);
  font-weight: 700;
  transition: background-color 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card:hover .card__label {
  background: var(--ink);
}

.testimonials {
  padding: var(--space-m) var(--space-s);
  background: var(--white);
}

.testimonials__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: var(--space-m);
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.testimonial {
  margin: 0;
  text-align: center;
}

.testimonial .stars {
  height: 1.25rem;
  margin: 0 auto var(--space-s);
  fill: color-mix(in srgb, var(--accent) 50%, var(--white));
}

.testimonial blockquote {
  margin: 0;
  font-style: italic;
}

.testimonial figcaption {
  margin-top: var(--space-s);
  font-weight: 700;
}

.about,
.hours {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-l) var(--space-s);
  text-align: center;
}

.about p {
  max-width: 37.5rem;
  margin-top: var(--space-s);
}

.about .button {
  margin-top: var(--space-s);
}

.hours-table {
  margin-top: var(--space-s);
  border-collapse: collapse;
  text-align: left;
}

.hours-table th {
  padding: 0 var(--space-s) 0.3rem 0;
  font-weight: 700;
}

.hours-table td {
  padding-bottom: 0.3rem;
}

.visit {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 22.5rem;
}

.visit__map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visit::after {
  content: "";
  position: absolute;
  inset: 0 40% 0 0;
  background: linear-gradient(to right, var(--paper), transparent);
}

.visit__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 50rem;
  margin: 0 auto;
  padding: var(--space-s);
}

.visit__content h2 {
  max-width: 18.75rem;
  margin-bottom: var(--space-s);
  font-size: 1.5rem;
}

/* Inner pages */

.page-title {
  padding: var(--space-s);
  background: var(--white);
  text-align: center;
}

.page-title h1 {
  font-size: 2.25rem;
}

.prose {
  max-width: var(--measure);
  margin: 0 auto;
  padding: var(--space-m) var(--space-s);
}

.prose--center {
  text-align: center;
}

.prose > * + * {
  margin-top: 1.25em;
}

.prose h2 {
  margin-top: 2em;
  font-size: 1.5rem;
}

.prose h3 {
  margin-top: 1.75em;
  font-size: 1.125rem;
}

.prose h2 + *,
.prose h3 + * {
  margin-top: 0.5em;
}

.prose a {
  color: var(--accent);
}

.prose img {
  margin-inline: auto;
}

.prose hr {
  max-width: 22.5rem;
  margin-block: 2.5em;
  border: 0;
  border-top: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}

.prose address {
  font-style: normal;
}

.prose .newsletter {
  padding: 0 0 var(--space-m);
}

.callout {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.fine-print {
  font-size: 0.875rem;
  text-align: center;
}

.entry + .entry {
  margin-top: var(--space-m);
  padding-top: var(--space-m);
  border-top: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}

.entry > * + * {
  margin-top: 1.25em;
}

.entry h2 a {
  color: inherit;
  text-decoration: none;
}

.portrait {
  width: auto;
  max-height: 18rem;
  border-radius: var(--radius);
}

/* Footer */

.site-footer {
  padding: var(--space-m) var(--space-s) var(--space-s);
  background: var(--ink);
  color: var(--white);
  text-align: center;
}

.site-footer__logo img {
  width: auto;
  height: 60px;
  margin-inline: auto;
}

.site-footer__contact {
  display: grid;
  gap: 0.25rem;
  margin-top: var(--space-s);
  font-style: normal;
}

.site-footer__contact a {
  text-decoration: none;
}

.site-footer__contact a:hover {
  text-decoration: underline;
}

.site-footer__credit {
  margin-top: var(--space-s);
  font-size: 0.875rem;
  opacity: 0.75;
}
