@layer {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
    background-repeat: no-repeat;
  }

  * {
    padding: 0;
    margin: 0;
  }

  html {
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    block-size: 100%;
  }

  body {
    min-block-size: 100%;
  }

  img,
  iframe,
  audio,
  video,
  canvas {
    display: block;
    max-inline-size: 100%;
    block-size: auto;
  }

  svg {
    max-inline-size: 100%;
  }

  svg:not([fill]) {
    fill: currentColor;
  }

  input,
  button,
  textarea,
  select {
    font: inherit;
  }

  textarea {
    resize: vertical;
  }

  fieldset,
  iframe {
    border: none;
  }

  p,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    overflow-wrap: break-word;
  }

  p {
    text-wrap: pretty;
    font-variant-numeric: proportional-nums;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-variant-numeric: lining-nums;
  }

  p,
  blockquote,
  q,
  figcaption,
  li {
    hanging-punctuation: first allow-end last;
  }

  input,
  label,
  button,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    line-height: 1.1;
  }

  math,
  time,
  table {
    font-variant-numeric: tabular-nums lining-nums slashed-zero;
  }

  code {
    font-variant-numeric: slashed-zero;
  }

  table {
    border-collapse: collapse;
  }

  abbr {
    font-variant-caps: all-small-caps;
    text-decoration: none;

    &[title] {
      cursor: help;
      text-decoration: underline dotted;
    }
  }

  sup,
  sub {
    line-height: 0;
  }

  :disabled {
    opacity: 0.8;
    cursor: not-allowed;
  }

  :focus-visible {
    outline-offset: 0.2rem;
  }
}
/* Breakpoints: use as @media (--sm), @media (--md), etc. */
:root {
  --color-primary: #d44846;
  --color-primary-offset: #b93c3a;
  --color-text: #000;
  --color-text-muted: #718096;
  --color-border: #666;
  --color-border-dark: #444;
  --color-background-light: #eee;
  --color-white: #fff;
}
:root {
  --step--2: clamp(0.6076rem, 0.5944rem + 0.0588vw, 0.64rem);
  --step--1: clamp(0.7292rem, 0.7002rem + 0.1288vw, 0.8rem);
  --step-0: clamp(0.875rem, 0.8239rem + 0.2273vw, 1rem);
  --step-1: clamp(1.05rem, 0.9682rem + 0.3636vw, 1.25rem);
  --step-2: clamp(1.26rem, 1.1363rem + 0.55vw, 1.5625rem);
  --step-3: clamp(1.512rem, 1.3315rem + 0.802vw, 1.9531rem);
  --step-4: clamp(1.8144rem, 1.5579rem + 1.14vw, 2.4414rem);
  --step-5: clamp(2.1773rem, 1.8195rem + 1.59vw, 3.0518rem);

  --font-serif: 'EB Garamond', serif;
  --font-sans: 'Work Sans', sans-serif;
}
body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
}
a {
  color: var(--color-primary);
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
}
.gallery {
  margin-block-end: 2rem;

  h2 {
    margin-bottom: 0.25em;
    display: flex;
    align-items: center;
    justify-content: space-between;

    &,
    a {
      color: var(--color-text-muted);
      font-weight: 400;
      text-decoration: none;
    }

    span {
      font-size: var(--step--1);

      a {
        font-weight: 500;
        color: var(--color-primary);
      }
    }
  }
}
/* One row per gallery; fewer images visible on smaller screens */
.gallery-row {
  display: grid;
  grid-gap: 10px;
  grid-template-columns: repeat(2, 1fr);
}
.gallery-row .gallery-thumbnail-wrap:nth-child(n + 3) {
  display: none;
}
.gallery--portrait .gallery-row {
  grid-template-columns: repeat(2, 1fr);
}
.gallery--portrait .gallery-row .gallery-thumbnail-wrap:nth-child(n + 3) {
  display: none;
}
@media (min-width: 540px) {
  .gallery-row {
    grid-template-columns: repeat(3, 1fr);
  }
  .gallery-row .gallery-thumbnail-wrap:nth-child(n + 3) {
    display: block;
  }
  .gallery-row .gallery-thumbnail-wrap:nth-child(n + 4) {
    display: none;
  }

  .gallery--portrait .gallery-row {
    grid-template-columns: repeat(4, 1fr);
  }
  .gallery--portrait .gallery-row .gallery-thumbnail-wrap:nth-child(n + 3) {
    display: block;
  }
  .gallery--portrait .gallery-row .gallery-thumbnail-wrap:nth-child(n + 5) {
    display: none;
  }
}
@media (min-width: 768px) {
  .gallery-row {
    grid-template-columns: repeat(4, 1fr);
  }
  .gallery-row .gallery-thumbnail-wrap:nth-child(n + 4) {
    display: block;
  }

  .gallery--portrait .gallery-row {
    grid-template-columns: repeat(5, 1fr);
  }
  .gallery--portrait .gallery-row .gallery-thumbnail-wrap:nth-child(n + 5) {
    display: block;
  }
}
.gallery-thumbnail {
  display: block;
  background-color: var(--color-border);
  max-width: 100%;

  &.no-crop {
    background-color: transparent;
    background-size: contain;
  }

  picture {
    display: block;
    width: 100%;
    height: 100%;
  }

  .gallery-thumbnail__frame {
    display: block;
    aspect-ratio: 100 / 75;
    overflow: hidden;
  }

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  &:hover {
    outline: 2px solid var(--color-border-dark);
    outline-offset: 2px;
  }
}
.gallery--portrait .gallery-thumbnail .gallery-thumbnail__frame {
  aspect-ratio: 12 / 16;
}
.gallery-thumbnail-wrap {
  .caption {
    padding: 0.25em 0.1em;
    color: var(--color-text);
    font-size: 0.8rem;
    display: block;
  }
}
.frame--black {
  border: 2px solid var(--color-border-dark);
}
.item,
.gallery-thumbnail {
  position: relative;

  &:hover {
    text-decoration: none;
  }

  .caption {
    padding: 0.25em 0.1em;
    color: var(--color-text);
    font-size: 0.8rem;
    display: block;
  }
}
.masonry {
  margin: 1em auto;
  column-gap: 1em;
}
.item {
  display: inline-block;
  margin-bottom: 1em;

  picture {
    display: block;
    width: 100%;
    height: 100%;
  }

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }
}
@media (min-width: 1024px) {
  .masonry {
    column-count: 4;
  }
}
@media (max-width: 1023px) and (min-width: 768px) {
  .masonry {
    column-count: 3;
  }
}
@media (max-width: 767px) and (min-width: 540px) {
  .masonry {
    column-count: 2;
  }
}
.modal__backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
}
.modal__contents {
  z-index: 2000;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  position: fixed;
  display: grid;
  place-items: center;
  height: 100vh;
  width: 100vw;
  padding: 1rem;
}
.modal__image-wrapper {
  position: relative;
  pointer-events: visible;
  img {
    max-width: calc(100vw - 4em);
    max-height: calc(100vh - 4em);
  }
}
.modal__image-caption {
  position: absolute;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  left: 0;
  right: 0;
  padding: 1rem;
  color: var(--color-white);
}
.modal__contents__preorder {
  background-color: var(--color-white);
  padding: 3rem;
  border-radius: 1rem;
  max-width: 600px;
  text-align: center;

  h3 {
    margin-bottom: 1rem;
  }

  p {
    margin-bottom: 2rem;
  }

  form > div {
    display: flex;
    gap: 1rem;
    flex-direction: column;

    > div {
      display: flex;
      gap: 1rem;
      flex-direction: row;
      justify-content: flex-end;
    }
  }

  input[type='email'] {
    border: 1px solid var(--color-border);
    padding: 0.25rem 0.5rem;
    width: 100%;
    font-size: 1.2rem;
  }

  button[type='submit'] {
    background-color: var(--color-primary);
    border: 1px solid var(--color-primary);
    padding: 0.25rem 0.5rem;
  }

  button[type='button'] {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    padding: 0.25rem 0.5rem;
  }
}
.footer {
  font-size: 0.875rem;
  padding: 1rem 0;
  background-color: var(--color-background-light);

  .footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;

    @media (max-width: 767px) {
      flex-direction: column;
      gap: 1rem;
      align-items: flex-start;

      .subscribe_form {
        order: -1;
        width: 100%;
      }

      > span:first-of-type {
        order: 1;
      }

      > span:last-of-type {
        order: 2;
      }
    }
  }

  .footer__mary {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background-image: url('/assets/images/footer.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: top center;
    width: 115px;
    height: 195px;
    display: none;
  }
}
.subscribe_form {
  input[type='email'] {
    border: 1px solid var(--color-border);
    padding: 0.25rem 0.5rem;
  }

  button[type='submit'] {
    background-color: var(--color-primary);
    border: 1px solid var(--color-primary);
    padding: 0.25rem 0.5rem;
    color: var(--color-white);
    font-weight: 300;
    text-transform: uppercase;

    &:hover {
      background-color: var(--color-primary-offset);
    }
  }
}
.primary-header {
  --text-color: var(--color-text);

  height: 20vw;
  max-height: 250px;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  .header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  h1 {
    font-size: var(--step-2);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-family: var(--font-serif);

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

  p {
    font-size: var(--step--1);
    font-weight: 400;
    color: var(--text-color);
    font-family: var(--font-serif);
    text-transform: uppercase;
    letter-spacing: 0.4em;
  }

  .divider {
    width: 100%;
    height: 0.5px;
    background: var(--text-color);
    margin: 0.25rem 0;
  }
}
.home .primary-header {
  --text-color: var(--color-white);
  background-color: #c9656a;
  background-image: url('/assets/header.jpg');
  background-size: cover;
}
@media (min-width: 768px) {
  .primary-header h1 {
    font-size: var(--step-3);
  }

  .primary-header p {
    font-size: var(--step-0);
  }
}
@media (min-width: 1024px) {
  .primary-header h1 {
    font-size: var(--step-5);
  }

  .primary-header p {
    font-size: var(--step-2);
  }
}
nav {
  --background: var(--color-primary);
  --background-hover: var(--color-primary-offset);

  width: 100%;
  margin: 0 auto;
  padding: 1rem 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 1rem;

  a {
    color: var(--color-white);
    flex: 1;
    text-decoration: none;
    font-size: var(--step--1);
    font-weight: 500;
    padding: 0.4rem 1rem;
    background: var(--background);
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;

    &:hover {
      background: var(--background-hover);
      text-decoration: none;
    }

    &.active {
      background: var(--color-primary);

      &:hover {
        background: var(--color-primary-offset);
      }
    }
  }
}
nav.primary {
  --background: var(--color-text);
  --background-hover: var(--color-border-dark);

  a.active {
    background: var(--color-primary);
    color: var(--color-white);

    &:hover {
      background: var(--color-primary-offset);
    }
  }
}
/* Mobile first: menu button visible and styled, links in toggleable panel */
.nav-toggle {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  font: inherit;
  font-size: var(--step--1);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--color-white);
  background: var(--color-text);
  border: none;
  cursor: pointer;
  text-align: center;
}
.nav-toggle:hover {
  background: var(--color-border-dark);
}
nav.primary .nav-links {
  display: none;
  flex-direction: column;
  gap: 0;
}
nav.primary .nav-links.nav-links--open {
  display: flex;
}
nav.primary .nav-links a {
  flex: none;
}
@media (max-width: 767px) {
  nav.primary {
    position: relative;
    flex-direction: column;
    align-items: stretch;
    z-index: 100;
  }

  nav.primary .nav-links.nav-links--open {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--background);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0;
    gap: 0;
  }

  nav.primary .nav-links.nav-links--open a {
    padding: 0.75rem 1rem;
  }
}
/* Desktop: hide menu button, show horizontal link bar */
@media (min-width: 768px) {
  nav.primary {
    flex-direction: row;
    align-items: center;
  }

  nav.primary .nav-toggle {
    display: none;
  }

  nav.primary .nav-links {
    display: flex;
    flex: 1;
    flex-direction: row;
    gap: 1rem;
  }

  nav.primary .nav-links a {
    flex: 1;
  }
}
.container.about {
  font-size: var(--step-0);
  line-height: 1.3;
  max-width: 700px;
  display: grid;
  grid-template-columns: 30% 1fr;
  gap: 1rem;

  p {
    margin-bottom: 1.5rem;
  }

  strong {
    font-weight: 500;
  }

  a {
    color: var(--color-white);
    flex: 1;
    text-decoration: none;
    font-size: var(--step--1);
    font-weight: 500;
    padding: 0.4rem 3rem;
    background: var(--color-primary);
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;

    &:hover {
      background: var(--color-primary-offset);
      text-decoration: none;
    }
  }

  picture {
    display: block;
    width: 100%;
  }
}
@media (max-width: 767px) {
  .container.about {
    grid-template-columns: 1fr;
  }
}
.contact-form {
  display: flex;
  flex-direction: column;
  max-width: 40rem;
  margin: 0 auto;

  fieldset {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    border: 0;

    &:last-of-type {
      margin-top: 1rem;
    }
  }

  label {
    font-weight: 300;
    font-size: 1.1rem;
    text-transform: uppercase;
  }

  input[type='text'],
  input[type='email'],
  textarea {
    border: 1px solid var(--color-border);
    padding: 0.5rem;
  }

  button[type='submit'] {
    background-color: var(--color-primary);
    border: 0;
    padding: 1rem;
    color: var(--color-white);
    font-weight: 300;
    font-size: 1.1rem;
    text-transform: uppercase;

    &:hover {
      background-color: var(--color-primary-offset);
    }
  }
}
.hero {
  width: 100vw;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: -1;
}
.hero img {
  width: 100vw;
  height: calc(100vw * (1423 / 1302));
}
.home {
  background-image: url('/assets/images/gradient.png');
  background-size: cover;
  background-position: top;
  background-repeat: no-repeat;
}
.intro {
  font-size: var(--step-0);
  font-weight: 500;
  color: var(--color-text);
  width: clamp(200px, 90%, 900px);
  margin: 0 auto;
  line-height: 1.3;
}
blockquote {
  margin: 0;
  padding: 0;
  width: clamp(200px, 90%, 900px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  color: var(--color-primary);

  p.quote {
    font-size: var(--step-1);
    font-weight: 600;
  }

  p.attribution {
    font-size: var(--step-0);
    font-weight: 500;
  }
}
.artwork {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 0 3rem;
}
.artwork__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: start;
  margin-bottom: 2.5rem;
}
.artwork-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.artwork-card__frame img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
.artwork-card__chapter {
  margin: 1rem 0 0.25rem;
  font-size: var(--step--2);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
}
.artwork-card__title {
  font-size: var(--step-0);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 0.25rem;
  line-height: 1.3;
}
.artwork-card__medium {
  font-size: var(--step--1);
  color: var(--color-text-muted);
  margin: 0;
}
.artwork-cta {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.9rem 2.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-align: center;
  margin: 0 auto;
  transition: background 0.2s ease;
}
.artwork-cta:hover {
  background: var(--color-primary-offset);
  text-decoration: none;
  color: var(--color-white);
}
.artwork > .artwork-cta {
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 767px) {
  .artwork__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .artwork-card {
    align-items: center;
    text-align: center;
  }

  .artwork-card__chapter,
  .artwork-card__title,
  .artwork-card__medium {
    text-align: center;
    align-self: center;
  }
}
.home-cta a {
  max-width: 220px;
}
.container.events {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto 3rem;

  .event {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;

    &:not(:last-of-type) {
      border-bottom: 1px solid var(--color-text-muted);
      padding-bottom: 2rem;
    }

    > div {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }
  }

  h1 {
    font-size: var(--step-4);
    color: var(--color-text-muted);
    font-weight: 300;
    text-align: center;
    text-transform: uppercase;
    font-family: var(--font-sans);
  }

  h2 {
    font-size: var(--step-0);
    font-weight: 400;
    text-transform: uppercase;
    color: var(--color-text-muted);
    font-family: var(--font-sans);
  }

  p {
    font-size: var(--step-1);
  }

  a {
    color: var(--color-primary);
    text-decoration: none;
  }

  a.details {
    background-color: var(--color-primary);
    border: 0;
    padding: 0.5rem;
    color: var(--color-white);
    font-weight: 300;
    font-size: var(--step--1);
    text-transform: uppercase;
    display: inline-block;
    width: fit-content;

    &:hover {
      background-color: var(--color-primary-offset);
    }
  }
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100vw;
}
main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.container {
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  max-width: 1200px;
}
nav a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
@media (max-width: 1023px) {
  .hidden-md {
    display: none;
  }
}
