:root {
  --night: #000;
  --wax: #f1e8d9;
  --smoke: #b8ad9b;
  --flame: #f2c27f;
  --error: #ffb39e;
  --gutter: clamp(1.5rem, 6vw, 5.5rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--night);
  color: var(--wax);
  font-family: 'Spectral', Georgia, 'Times New Roman', serif;
  font-size: 1.3125rem;
  line-height: 1.6;
}

a { color: var(--flame); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--wax); }
:focus-visible { outline: 2px solid var(--flame); outline-offset: 3px; }

/* Shared by both pages: words in the dark on the left, a photo on the right
   that dissolves into the same dark. */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
}

.stage-words {
  align-self: center;
  max-width: 34rem;
  padding: 4rem 0 4rem var(--gutter);
}

.stage-photo {
  position: relative;
  min-height: 100%;
  overflow: hidden;
}

.stage-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 26%);
  mask-image: linear-gradient(to right, transparent 0, #000 26%);
  animation: kindle 2.4s ease-out both;
}

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

h1 { font-weight: 200; line-height: 1; letter-spacing: -0.015em; }

.logo {
  display: block;
  width: clamp(15rem, 27vw, 24rem);
  height: auto;
  margin: 0 0 2.25rem -0.5rem;
}

.lede { font-size: 1.5rem; line-height: 1.5; margin-bottom: 1.25rem; }
.quiet { color: var(--smoke); }

/* Landing page */
.remember { padding: clamp(5rem, 12vw, 9rem) var(--gutter) clamp(3rem, 7vw, 5rem); }

.remember p {
  max-width: 19em;
  font-size: clamp(1.875rem, 3.6vw, 3rem);
  font-weight: 200;
  line-height: 1.25;
}

.wall {
  display: block;
  width: 100%;
  height: min(78vh, 58vw);
  object-fit: cover;
  object-position: center 40%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 80%, transparent 100%);
}

footer { padding: 3.5rem var(--gutter) 4.5rem; color: var(--smoke); }

/* Contact page */
.contact h1 { font-size: clamp(3rem, 5.4vw, 5rem); margin-bottom: 1.25rem; }
.home { display: block; width: 10rem; margin: 0 0 1.5rem -0.2rem; }
.home img { display: block; width: 100%; height: auto; }
.back { margin-top: 2rem; font-size: 1.125rem; }
.contact .stage-words { width: 100%; padding-right: 1.5rem; }
.contact .stage-photo img { object-position: 52% center; }

form { margin-top: 2rem; }
.field { margin-bottom: 1.375rem; }
.field label { display: block; margin-bottom: 0.3rem; font-size: 1.125rem; }

input, textarea {
  display: block;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--smoke);
  border-radius: 2px;
  background: #16120d;
  color: var(--wax);
  font: inherit;
  font-size: 1.1875rem;
}

textarea { min-height: 9rem; line-height: 1.5; resize: vertical; }

/* Spam trap: bots fill this in, people never see it. */
.trap { position: absolute; left: -9999px; }

button {
  padding: 0.7rem 2rem;
  border: 0;
  border-radius: 2px;
  background: var(--flame);
  color: #000;
  font: inherit;
  font-size: 1.1875rem;
  font-weight: 500;
  cursor: pointer;
}

button:hover { background: var(--wax); }
button:disabled { opacity: 0.6; cursor: wait; }

.status { margin-top: 1.25rem; font-size: 1.1875rem; }
.status.failed { color: var(--error); }
.status:empty { display: none; }

@media (max-width: 820px) {
  body { font-size: 1.25rem; }
  .stage { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .stage-words { align-self: start; max-width: none; padding: 3.5rem var(--gutter) 1.5rem; }
  .stage-photo { aspect-ratio: 2 / 3; min-height: 0; }
  .stage-photo img {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 18%);
  }
  .wall { height: 72vw; }

  .contact .stage-photo { order: -1; aspect-ratio: 16 / 9; }
  .contact .stage-photo img {
    object-position: center 45%;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  }
  .contact .stage-words { padding-top: 1rem; padding-right: var(--gutter); padding-bottom: 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .stage-photo img { animation: none; }
}
