@font-face {
  font-family: "Young Serif";
  src: url("/assets/young-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Karla";
  src: url("/assets/karla-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Karla";
  src: url("/assets/karla-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* The two golds are the two ring colors in the mark. */
  --black: #000000;
  --gold: #d9a21b;
  --gold-light: #edbe3a;
  --gold-deep: #a67a10;
  --ivory: #efe6d2;
  --dust: #a89b80;
  --rose: #f0a08a;

  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Karla", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  background: var(--black);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vh, 40px) 20px;
  background: var(--black);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.page {
  width: 100%;
  max-width: 44rem;
  text-align: center;
}

/* The mark */

.mark {
  height: min(40vh, 21rem);
  min-height: 9.5rem;
  aspect-ratio: 727 / 1057;
  margin: 0 auto;
}

.mark img {
  display: block;
  width: 100%;
  height: 100%;
}

/* The name */

.name {
  margin: clamp(1.25rem, 4vh, 2.25rem) 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 8vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: 0.005em;
  color: var(--gold);
  text-wrap: balance;
}

/* What we do */

.about {
  max-width: 31rem;
  margin: clamp(0.875rem, 2.5vh, 1.25rem) auto 0;
  font-size: 1.125rem;
  line-height: 1.5;
  text-wrap: balance;
}

/* The workshop */

.has-workshop .mark {
  height: min(26vh, 14rem);
  min-height: 8rem;
}

.workshop {
  max-width: 31rem;
  margin: clamp(1.75rem, 5vh, 2.5rem) auto 0;
  padding: clamp(1.5rem, 4vw, 2rem) clamp(1.25rem, 4vw, 2rem);
  border: 1px solid rgba(217, 162, 27, 0.4);
  border-radius: 3px;
}

.workshop-kicker {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--dust);
}

.workshop-title {
  margin: 0.25rem 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 6vw, 2rem);
  line-height: 1.15;
  color: var(--ivory);
  text-wrap: balance;
}

.workshop-about {
  margin: 0.75rem auto 0;
  max-width: 26rem;
  text-wrap: pretty;
}

.workshop-facts {
  margin: 1.125rem 0 0;
  padding: 0;
  list-style: none;
}

.workshop-facts li + li {
  margin-top: 0.125rem;
}

.workshop-when {
  font-weight: 600;
  color: var(--gold-light);
}

.nowrap {
  white-space: nowrap;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  margin-top: 1.375rem;
  padding: 0 1.75rem;
  border-radius: 3px;
  background: var(--gold);
  color: var(--black);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 120ms ease;
}

.cta:hover {
  background: var(--gold-light);
  color: var(--black);
}

/* With a workshop on the page, the workshop button leads and the sign-up button steps back. */

.has-workshop .signup button {
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
}

.has-workshop .signup button:hover {
  background: rgba(217, 162, 27, 0.14);
}

.has-workshop .signup button[disabled] {
  border-color: var(--gold-deep);
  color: var(--gold-deep);
}

/* The sign-up */

.signup {
  margin-top: clamp(1.75rem, 5vh, 2.75rem);
}

.lede {
  margin: 0 auto 1.125rem;
  max-width: 30rem;
  color: var(--ivory);
  text-wrap: balance;
}

.fields {
  display: flex;
  gap: 0.5rem;
  max-width: 27rem;
  margin: 0 auto;
}

.fields label {
  flex: 1 1 auto;
  min-width: 0;
}

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

input[type="email"] {
  width: 100%;
  height: 3rem;
  padding: 0 0.9375rem;
  border: 1px solid rgba(217, 162, 27, 0.55);
  border-radius: 3px;
  background: rgba(217, 162, 27, 0.06);
  color: var(--ivory);
  font: inherit;
}

input[type="email"]::placeholder {
  color: var(--dust);
  opacity: 1;
}

input[type="email"]:hover {
  border-color: var(--gold);
}

input[type="email"][aria-invalid="true"] {
  border-color: var(--rose);
  background: rgba(240, 160, 138, 0.08);
}

button {
  flex: 0 0 auto;
  height: 3rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 3px;
  background: var(--gold);
  color: var(--black);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 120ms ease;
}

button:hover {
  background: var(--gold-light);
}

button[disabled] {
  background: var(--gold-deep);
  cursor: progress;
}

input[type="email"]:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

.note {
  margin: 0.875rem 0 0;
  font-size: 0.9375rem;
  color: var(--dust);
}

.status {
  margin: 0 auto;
  max-width: 26rem;
}

.status:focus {
  outline: none;
}

.status.is-error {
  margin-top: 0.875rem;
  color: var(--rose);
}

.status.is-done {
  font-family: var(--serif);
  font-size: 1.375rem;
  line-height: 1.3;
  color: var(--gold-light);
}

.status.is-done span {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ivory);
}

a {
  color: var(--gold);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--gold-light);
}

[hidden] {
  display: none !important;
}

@media (max-width: 26rem) {
  .fields {
    flex-direction: column;
  }
  .cta {
    display: flex;
  }
}

/* One slow breath in the mark. Off when the visitor asks for reduced motion. */

@media (prefers-reduced-motion: no-preference) {
  .mark {
    animation: arrive 1400ms ease-out both;
  }
  .mark img {
    animation: breathe 11s ease-in-out 1400ms infinite;
  }
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.025);
  }
}
