:root {
  color-scheme: dark;
  --color-background: #132714;
  --color-text: #f4f0e3;
  --color-muted: #c1c9b8;
  --color-accent: #a8be72;
  --color-rule: rgb(244 240 227 / 16%);
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-heading: "Iowan Old Style", "Baskerville", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --page-gutter: clamp(1.5rem, 6.67vw, 8rem);
}

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

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

body {
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--color-accent);
  color: var(--color-background);
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background-color: var(--color-background);
  background-image:
    linear-gradient(90deg, rgb(6 18 10 / 36%), rgb(6 18 10 / 10%)),
    url("../images/mind-body-ocean.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(6 18 10 / 12%), transparent 35%, rgb(6 18 10 / 18%));
}

.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding:
    max(clamp(2rem, 4.5vh, 3.5rem), env(safe-area-inset-top))
    max(var(--page-gutter), env(safe-area-inset-right))
    max(1.5rem, env(safe-area-inset-bottom))
    max(var(--page-gutter), env(safe-area-inset-left));
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  animation: appear 1s ease-out both;
}

.wordmark {
  display: block;
  width: clamp(10.5rem, 15.3vw, 14.5rem);
  max-width: 100%;
  height: auto;
}

.main {
  display: flex;
  flex: 1;
  align-items: center;
  padding-block: clamp(4rem, 9vh, 7rem);
}

.hero {
  width: min(100%, 70rem);
  animation: arrive 1.25s 120ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2.625rem, 6.6vw, 7.125rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.08;
  text-wrap: balance;
}

h1 > span {
  display: block;
}

.signup {
  margin: clamp(1.75rem, 3.1vw, 2.75rem) 0 0;
  max-width: 35rem;
}

.signup__title { margin: 0 0 1.25rem; font-size: clamp(1.0625rem, 1.35vw, 1.25rem); font-weight: 500; letter-spacing: -.01em; }
.signup__form { display: grid; gap: .75rem; }
.signup__row { display: flex; align-items: stretch; gap: .75rem; }
.signup__row input { flex: 1; min-width: 0; width: 100%; min-height: 3rem; border: 1px solid rgb(244 240 227 / 40%); border-radius: .25rem; background: rgb(6 18 10 / 40%); color: var(--color-text); padding: .75rem 1rem; font: inherit; font-size: 1rem; }
.signup__row input::placeholder { color: var(--color-muted); opacity: 1; }
.signup__button { min-height: 3rem; border: 1px solid var(--color-accent); border-radius: .25rem; background: var(--color-accent); color: var(--color-background); padding: .75rem 1rem; font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; }
.signup__button:hover { background: #bdcf96; }
.signup__button:disabled { opacity: .65; cursor: wait; }
.signup__challenge { min-height: 0; }
.signup__verification-message { margin: 0; font-size: .75rem; color: var(--color-muted); }
.signup__privacy { display: block; color: var(--color-muted); font-size: .75rem; line-height: 1.6; }
.signup__message { margin: .5rem 0 0; padding: .75rem 1rem; border-left: 2px solid var(--color-accent); background: rgb(6 18 10 / 40%); font-size: .875rem; }
.signup :is(input, button):focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; }
.signup__trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.availability {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: clamp(2rem, 4vw, 3.5rem) 0 0;
  color: var(--color-accent);
  font-size: 0.875rem;
  letter-spacing: 0.025em;
}

.availability__line {
  flex: 0 0 2rem;
  height: 1px;
  background: currentColor;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-rule);
  color: var(--color-muted);
  font-size: 0.8125rem;
  animation: appear 1s 240ms ease-out both;
}

.footer small {
  font-size: inherit;
}


.contact__trigger {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  list-style: none;
  overflow-wrap: anywhere;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgb(193 201 184 / 35%);
  text-underline-offset: 0.35em;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.contact__trigger::-webkit-details-marker {
  display: none;
}

.contact__fallback {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.875rem;
}

.contact__trigger:hover {
  color: var(--color-text);
  text-decoration-color: currentColor;
}

.contact__trigger:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 6px;
  border-radius: 1px;
}

@keyframes appear {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 120rem) {
  .page {
    padding-inline: max(var(--page-gutter), calc((100vw - 104rem) / 2));
  }
}

@media (max-width: 40rem) {
  .page {
    padding-top: max(2rem, env(safe-area-inset-top));
  }

  .header {
    justify-content: center;
  }

  .main {
    padding-block: clamp(3.5rem, 10svh, 5rem);
  }

  .hero {
    width: 100%;
  }

  h1 {
    font-size: clamp(2.25rem, 11vw, 4.25rem);
    letter-spacing: -0.04em;
    line-height: 1.1;
  }

  .signup {
    margin-top: 1.75rem;
  }

  .availability {
    margin-top: 2rem;
  }

  .footer {
    gap: 0.5rem 1rem;
    padding-top: 1rem;
  }

  .footer > .contact,
  .footer > .contact__trigger {
    margin-left: auto;
    text-align: right;
  }

}

@media (max-width: 32rem) {
  .signup__row { flex-direction: column; }
  .signup__button { width: 100%; }
  .main { padding-block: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
