/* Contact: the page is a letter. Pick a reason, write on the ruled sheet, seal it, and the sheet turns over
   into an addressed envelope that opens in the visitor's own mail app. No form service is needed. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.chero {
  padding-top: calc(var(--nav) + clamp(2.2rem, 5vw, 4.4rem));
  padding-bottom: clamp(4rem, 8vw, 7rem);
}
.chero__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
}
.chero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.3rem;
  min-width: 0;
}
.chero .h1 {
  font-size: clamp(2.6rem, 5.6vw, 5.2rem);
  line-height: 1;
}
.direct {
  align-self: stretch;
  margin-top: 0.8rem;
  border-top: 1.5px solid var(--ink);
}
.direct li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.3rem 1rem;
  padding: 1.1rem 0;
  border-bottom: 1.5px solid var(--line);
}
.direct__ic {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--lime);
  border: 1.5px solid var(--ink);
}
.direct b {
  display: block;
  font-weight: 600;
}
.direct small {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
}
.addr {
  font: 500 0.92rem var(--mono);
  -webkit-user-select: all;
  user-select: all;
  overflow-wrap: anywhere;
}
.copy {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  min-height: 40px;
  padding: 0.3em 0.85em;
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  background: var(--card);
  font: 500 0.85rem var(--sans);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.25s,
    transform 0.28s var(--ease);
}
.copy:hover {
  background: var(--lime);
  transform: translateY(-2px);
}

/* the letter */
.desk {
  position: sticky;
  top: calc(var(--nav) + 20px);
  min-width: 0;
  perspective: 1900px;
}
.letter {
  position: relative;
  display: grid;
  transform-style: preserve-3d;
  transition: transform 1s var(--ease);
}
.letter.is-sealed {
  transform: rotateY(180deg);
}
.lt {
  grid-area: 1/1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: clamp(1.1rem, 2.4vw, 2rem);
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 22px;
  box-shadow: 6px 6px 0 var(--ink);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
/* Same reason as the book's pages: each side of the letter carries its own transform, so the hidden
   side is never painted over the visible one in Safari and Firefox. */
.lt--front {
  transform: rotateY(0deg);
}
.lt--back {
  transform: rotateY(180deg);
  align-items: flex-start;
  justify-content: center;
  gap: 1.1rem;
}
.lt__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.lt__to {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
}
.lt__to b {
  font: 480 clamp(1.4rem, 2.3vw, 1.9rem)/1.1 var(--serif);
  letter-spacing: -0.02em;
}
.swap {
  animation: swapIn 0.5s var(--ease);
}
.stamp {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 62px;
  aspect-ratio: 4/5;
  border: 1.5px solid var(--ink);
  border-radius: 5px;
  background: var(--lime);
  outline: 1.5px dashed var(--ink);
  outline-offset: -6px;
  rotate: 5deg;
}
.stamp img {
  width: 46%;
  height: auto;
}
.stamp.wob {
  animation: wob 0.7s var(--spring);
}
.reasons {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.reasons legend {
  padding: 0;
  margin-bottom: 0.7rem;
}
.reasons__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.reason {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 42px;
  padding: 0.35em 0.95em;
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  background: var(--card);
  font: 500 0.9rem var(--sans);
  cursor: pointer;
  transition:
    background 0.25s,
    color 0.25s,
    transform 0.28s var(--ease);
}
.reason:hover {
  transform: translateY(-2px);
}
.reason[aria-pressed='true'] {
  background: var(--ink);
  color: var(--on-ink);
}
.paper {
  --lh: 2.05rem;
  display: flex;
  flex-direction: column;
  padding: 0.2rem 0 0;
  font: 400 1.12rem/var(--lh) var(--serif);
}
.paper__hi {
  min-height: var(--lh);
  font-style: italic;
  border-bottom: 1.5px solid var(--line);
}
.paper textarea {
  display: block;
  width: 100%;
  min-height: calc(var(--lh) * 5);
  padding: 0;
  border: 0;
  outline: 0;
  resize: none;
  overflow: hidden;
  color: var(--ink);
  font: inherit;
  background: repeating-linear-gradient(
      180deg,
      rgba(14, 14, 12, 0) 0 calc(var(--lh) - 1.5px),
      var(--line) calc(var(--lh) - 1.5px) var(--lh)
    )
    local;
}
.paper textarea::placeholder {
  color: var(--muted);
}
.paper__sign {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  min-height: var(--lh);
  border-bottom: 1.5px solid var(--line);
  font-style: italic;
}
.paper__sign input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-style: normal;
}
.paper__sign input::placeholder {
  color: var(--muted);
}
.paper textarea:focus-visible,
.paper__sign input:focus-visible {
  background-color: color-mix(in srgb, var(--lime) 22%, transparent);
}
.lt__err {
  font-size: 0.9rem;
  color: var(--err);
}
.lt__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
}

/* the envelope side */
.env {
  position: relative;
  align-self: stretch;
  aspect-ratio: 16/9;
  max-width: 100%;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  overflow: hidden;
}
.env svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.env svg path {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.env .stamp {
  position: absolute;
  right: 6%;
  top: 10%;
  width: clamp(44px, 13%, 62px);
}
.env__to {
  position: absolute;
  left: 8%;
  bottom: 12%;
  right: 8%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}
.env__to b {
  font: 480 clamp(1.1rem, 2.2vw, 1.6rem)/1.1 var(--serif);
  letter-spacing: -0.015em;
}
.env__from {
  margin-top: 0.5rem;
  font: 500 0.7rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.mark {
  position: absolute;
  right: 21%;
  top: 16%;
  display: grid;
  place-items: center;
  width: clamp(58px, 17%, 84px);
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font: 500 clamp(0.46rem, 1.05vw, 0.6rem)/1.25 var(--mono);
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
  rotate: -14deg;
  opacity: 0;
}
.is-sealed .mark {
  animation: thud 0.55s var(--spring) 0.85s forwards;
}
.lt--back h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}
.lt--back h2:focus {
  outline: 0;
}
.lt--back p {
  color: var(--ink-2);
  max-width: 32em;
}
.lt__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}
.fine {
  font-size: 0.9rem;
}
/* The webmail row on the sealed side: a label and two pill links. */
.lt__alt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.7rem;
}
.lt__alt .mono {
  margin-right: 0.2rem;
}
a.copy {
  text-decoration: none;
}
.plain {
  display: block;
  width: 100%;
  min-height: 8rem;
  padding: 0.8rem;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: 400 0.85rem/1.5 var(--mono);
}

/* good to know, then socials */
.know {
  background: var(--paper-2);
  border-block: 1.5px solid var(--ink);
}
.know .who:hover .who__ic {
  transform: rotate(-12deg) scale(1.1);
}
.know .who__t {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
}
.social {
  background: var(--ink);
  color: var(--on-ink);
  padding-block: clamp(3.5rem, 7vw, 6rem);
}
.social .kick {
  color: var(--on-ink-muted);
}
.social__in {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.6rem 3rem;
}
.social__in > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
}
.social h2 {
  font-size: clamp(2rem, 4.4vw, 3.8rem);
}
.social h2 .hl {
  color: var(--ink);
}
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.soc {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  min-height: 48px;
  padding: 0.4em 1.1em 0.4em 0.9em;
  border: 1.5px solid var(--on-ink);
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition:
    background 0.25s,
    color 0.25s,
    border-color 0.25s,
    transform 0.3s var(--spring);
}
.soc:hover {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
  transform: translateY(-3px) rotate(-2deg);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 1.2rem);
  z-index: 70;
  max-width: calc(100vw - 32px);
  padding: 0.7em 1.15em;
  border-radius: 99px;
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: 0 0 0 1.5px var(--on-ink);
  font: 500 0.9rem var(--sans);
  opacity: 0;
  transform: translate(-50%, 14px);
  transition:
    opacity 0.3s,
    transform 0.4s var(--ease);
  pointer-events: none;
}
.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}
@keyframes swapIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@keyframes wob {
  0% {
    rotate: 5deg;
  }
  35% {
    rotate: -9deg;
  }
  70% {
    rotate: 9deg;
  }
  100% {
    rotate: 5deg;
  }
}
@keyframes thud {
  0% {
    opacity: 0;
    scale: 2.3;
  }
  60% {
    opacity: 0.9;
  }
  100% {
    opacity: 0.85;
    scale: 1;
  }
}
@media (max-width: 899px) {
  .chero__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .desk {
    position: static;
  }
  .lt {
    box-shadow: 4px 4px 0 var(--ink);
  }
}
@media (max-width: 560px) {
  .direct li {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .direct .copy {
    grid-column: 2;
    justify-self: start;
  }
  .paper {
    --lh: 1.95rem;
    font-size: 1.05rem;
  }
  .lt__alt .mono {
    flex-basis: 100%;
    margin-right: 0;
  }
}
