/* /mid-month-meditation/ — the reading layer on top of /style.css, which
   supplies the fonts, the mesh, the ring, the grain and the footer. */

:root {
  /* The main page runs a lightened --base (2.52:1 against white where the
     gradients fade out). That is tolerable under three large link titles and
     not under a page of body-size prose, so this page uses the darker base
     that restores the full 4.87:1 floor. See CLAUDE.md, "Contrast". */
  --base: 106 104 84;
}

/* ----------------------------------------------------------------- back */

/* A 44px hit target around a 28px arrow, pulled left by the difference so
   the arrow itself, not its padding, lines up with the gutter. */
.back {
  position: absolute;
  z-index: 1;
  top: 0.75rem;
  left: calc(var(--gutter) - 0.5rem);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  transition: transform 0.22s ease;
}

.back svg {
  width: 1.75rem;
  height: 1.75rem;
}

.back:hover {
  transform: translateX(-3px);
}

.back:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Stays in the corner alongside the fixed wordmark. */
@media (min-width: 62rem) {
  .back {
    position: fixed;
    top: 1.5rem;
  }
}

/* ------------------------------------------------------------- wordmark */

.wordmark-text {
  color: inherit;
  text-decoration: none;
  border-radius: 0.4rem;
}

.wordmark-text:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 8px;
}

/* Stacked: a masthead, not half a screen. */
@media (max-width: 61.99rem) {
  .wordmark {
    min-height: 13rem;
  }

  .wordmark-text {
    font-size: 2.6rem;
  }
}

/* Two columns: the wordmark holds its main-page position while the prose
   scrolls past it. The ring and the type are each fixed on their own, and
   .wordmark is left as a plain column placeholder, because the obvious
   version — `position: sticky` on .wordmark — opens a stacking context, and
   the ring can only multiply against a backdrop in its own context. Inside a
   sticky parent it has none and renders as raw rainbow. */
@media (min-width: 62rem) {
  .stage {
    align-items: start;
    padding-block: 0;
  }

  .ring,
  .wordmark-text {
    position: fixed;
    top: 50%;
  }

  .wordmark-text {
    left: var(--gutter);
    translate: 0 -50%;
  }
}

/* ---------------------------------------------------------------- prose */

.prose {
  min-width: 0;
  max-width: 40rem;
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  font-weight: 500;
  line-height: 1.6;
}

@media (min-width: 62rem) {
  .prose {
    padding-block: clamp(3rem, 12vh, 7rem) clamp(2rem, 6vh, 4rem);
  }
}

.prose h1 {
  margin: 0 0 0.6em;
  font-weight: 700;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.prose h2 {
  margin: 2em 0 0.5em;
  font-weight: 700;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.prose p,
.prose ul {
  margin: 0 0 1em;
}

.prose ul {
  padding-left: 1.2em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose li ul {
  margin-top: 0.4em;
}

.prose strong {
  font-weight: 700;
}

.prose .dates {
  list-style: none;
  padding-left: 0;
  font-weight: 700;
}

.prose a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

.prose a:hover {
  text-decoration-thickness: 0.16em;
}

.prose a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 0.2rem;
}

/* --------------------------------------------------------------- signup */

/* The panel is tinted with black, never white: a white tint would lift the
   backdrop above the luminance bound the white type depends on. */
.signup {
  margin: 2.25rem 0;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border-radius: 0.9rem;
  background-color: rgba(0, 0, 0, 0.2);
}

.signup h2 {
  margin-top: 0;
}

.form-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

.signup input[type="email"],
.signup button {
  font: inherit;
  font-size: 1rem;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
}

.signup input[type="email"] {
  flex: 1;
  min-width: 0;
  border: 2px solid #fff;
  background-color: #fff;
  color: #26251d;
}

.signup input[type="email"]::placeholder {
  color: #6a6854;
  opacity: 1;
}

.signup button {
  border: 2px solid #fff;
  background-color: transparent;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.22s ease, color 0.22s ease;
}

.signup button:hover:not(:disabled) {
  background-color: #fff;
  color: #26251d;
}

.signup input[type="email"]:focus-visible,
.signup button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.signup button:disabled {
  cursor: not-allowed;
  border-style: dashed;
}

/* Success and error are told apart by their wording, not by colour: both
   stay pure white to keep the contrast floor. */
#form-message {
  margin-top: 0.75rem;
  min-height: 1.6em;
  font-weight: 700;
}

@media (max-width: 30rem) {
  .form-row {
    flex-direction: column;
  }
}
