:root {
  --bg: #FDFDFC;
  --ink: #17150F;
  --ink-soft: rgba(23, 21, 15, 0.55);
  --ink-faint: rgba(23, 21, 15, 0.42);
  --rule: rgba(23, 21, 15, 0.18);

  /* One knob for how present the background wash is. 1 is the full pastel
     mix; 0 leaves the page plain off-white. */
  --wash-strength: 0.85;

  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.22, 0.68, 0.24, 1);
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* Fixed and inert so it never joins the body's flex layout and can never
   intercept a click meant for the button or the footer link. Sizing is set in
   device pixels by background.js; these are the CSS-pixel bounds. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: var(--wash-strength);
  pointer-events: none;
}

.stage,
.colophon {
  position: relative;
  z-index: 1;
}

/* The main block takes all remaining height so the footer sits on the
   bottom edge of the viewport rather than trailing the content. */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem 2rem;
  text-align: center;
}

.display {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(3rem, 12vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.note {
  margin: 2.5rem 0 0;
  /* Wide enough that the authored <br> controls the break on desktop
     instead of the second line wrapping again. */
  max-width: 64ch;
  color: var(--ink-soft);
  font-size: clamp(0.875rem, 2.4vw, 1rem);
  line-height: 1.85;
  letter-spacing: 0.02em;
}

/* On narrow screens the authored break would leave the second line hugging
   both edges, so drop it and let the text find a comfortable measure. */
@media (max-width: 40rem) {
  .note {
    max-width: 30ch;
  }

  .note br {
    display: none;
  }
}

.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 3rem;
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: border-color 0.45s var(--ease);
}

/* A second copy of the label, light-on-ink, revealed by a rising clip edge.
   Cross-fading one label between two colors would leave it washed out over
   whichever half it did not match; layering keeps the text at full contrast
   in every frame of the sweep. clip-path rather than a scale transform so the
   letterforms are never squashed. */
.cta__fill {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
  clip-path: inset(100% 0 0 0);
  transition: clip-path 0.45s var(--ease);
}

.cta:focus-visible .cta__fill {
  clip-path: inset(0 0 0 0);
}

.cta:focus-visible {
  border-color: var(--ink);
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

/* Hover-capable pointers only, so a tap on a touch screen doesn't leave the
   button stuck in its filled state after the new tab opens. */
@media (hover: hover) {
  .cta:hover .cta__fill {
    clip-path: inset(0 0 0 0);
  }

  .cta:hover {
    border-color: var(--ink);
  }
}

.colophon {
  padding: 0 1.5rem 2.25rem;
  text-align: center;
}

.colophon p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.6875rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

/* Deliberately indistinguishable from the text around it — found by
   trying, not by being advertised. */
.colophon a {
  color: inherit;
  text-decoration: none;
  cursor: inherit;
}

/* Reveal is an enhancement. Elements are hidden only once the inline
   head script has proven JavaScript is running. */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
}

.js.is-ready .reveal {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .js.is-ready .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .cta,
  .cta__fill {
    transition: none;
  }

}
