/* Again Again — the public homepage.
 *
 * Colours are the app's A / Light roles (paper surfaces, plum actions) from
 * the identity guide; paprika appears only in the artwork itself. Type is the
 * app's pairing: Iowan Old Style for headings, the system font for text. No
 * font files are shipped; each falls back to what the device has. */

:root {
  --paper: #F3EAD8;
  --sheet: #FBF6EA;
  --shell: #E8DCC3;
  --far-page: #D6C8AA;
  --boundary: #857863;
  --ink: #2A2521;
  --ink-secondary: #6A5F52;
  --plum: #663C50;
  --on-plum: #FFFFFF;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Pixel floors, so enlarged text keeps the width it needs. */
  --gutter: clamp(16px, 5vw, 48px);
  --card-padding: clamp(16px, 5vw, 1.5rem);
  --radius: 1rem;

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
  -webkit-hyphens: auto;
  hyphens: auto;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--plum);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a[href^="mailto:"] {
  overflow-wrap: anywhere;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

a:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow {
  max-width: 44rem;
}

/* Header: the wordmark alone, above the guide's 160 px floor at every width. */

.masthead {
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
}

.wordmark {
  width: clamp(10rem, 24vw, 13.5rem);
}

/* Introduction */

.hero {
  padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5.5rem);
}

/* One column on narrow screens. minmax(0, …) lets long words such as the
 * email address wrap instead of widening the column past the screen. */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.125rem, 1.4rem + 3.2vw, 3.5rem);
  letter-spacing: -0.01em;
  max-width: 16ch;
}

.lede {
  margin-top: 1.25rem;
  max-width: 34rem;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
}

/* The creature on a small stack of pages: the pages are layout, the creature
 * is the unchanged master. */

.hero-art {
  display: flex;
  justify-content: center;
}

.pages {
  position: relative;
  width: min(100%, 22rem);
  aspect-ratio: 1;
  margin: 0.75rem;
}

.pages::before,
.pages::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: calc(var(--radius) * 1.5);
}

.pages::before {
  background: var(--far-page);
  transform: rotate(-6deg) translate(-3%, 2%);
}

.pages::after {
  background: var(--shell);
  transform: rotate(3deg) translate(2%, 1%);
}

.pages img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--radius) * 1.5);
  background: var(--sheet);
  box-shadow: 0 1px 0 rgba(42, 37, 33, 0.06), 0 12px 32px -18px rgba(42, 37, 33, 0.45);
}

/* How it works */

.steps {
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.steps h2,
.name h2 {
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
}

.step-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.step {
  padding: var(--card-padding);
  border-radius: var(--radius);
  background: var(--sheet);
}

.step-number {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--plum);
  color: var(--on-plum);
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1;
}

.step h3 {
  font-size: 1.375rem;
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--ink-secondary);
}

/* The name */

.name {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  background: var(--shell);
  text-align: center;
}

.name p {
  margin-top: 0.75rem;
  text-wrap: balance;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  line-height: 1.45;
}

/* The Contact card, when an address is added (website/README.md) */

.details {
  padding: clamp(3rem, 7vw, 5rem) 0;
}

/* Two cards side by side where they fit; one card takes the whole row. */
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1rem;
}

.card {
  padding: var(--card-padding);
  border: 1px solid var(--shell);
  border-radius: var(--radius);
  background: var(--sheet);
}

.card h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Footer */

.footer {
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--shell);
  color: var(--ink-secondary);
  font-size: 0.9375rem;
}

.footer-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-symbol {
  width: 2.5rem;
  margin: -0.5rem -0.25rem;
}

/* The small "not found" page */

.missing {
  padding: clamp(3rem, 10vw, 7rem) 0;
}

.missing h1 {
  font-size: clamp(2rem, 1.5rem + 2.4vw, 3rem);
}

.missing p {
  margin-top: 1rem;
  font-size: 1.125rem;
}

.masthead a {
  display: inline-block;
}

.masthead a:focus-visible {
  outline-offset: 6px;
}

@media (min-width: 48rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  }

  .step-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 47.99rem) {
  .pages {
    width: min(70%, 16rem);
  }
}
