.watercolor-home {
  background: var(--paper) url("assets/cotton-paper.svg");
}

.watercolor-home main {
  position: relative;
  isolation: isolate;
}

.watercolor-home main::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: max(260px, 34vw);
  z-index: -1;
  pointer-events: none;
  background: url("assets/home-watercolor-sky.png.webp") center top / max(100%, 780px) auto no-repeat;
  opacity: .55;
}

.watercolor-home .welcome {
  padding-top: clamp(26px, 3.5vw, 54px);
}

.home-chapters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 26px);
  margin-block: 36px 0;
}

.home-chapter {
  --tape: #e3a696;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 12px 24px;
  text-align: center;
  line-height: 1.4;
  background: url("assets/home-chapter-paper.png.webp") center / 100% 100% no-repeat;
}

.home-chapter:nth-child(2) { --tape: #a3c8d5; }
.home-chapter:nth-child(3) { --tape: #bdcc95; }
.home-chapter:nth-child(4) { --tape: #cab3d8; }

.home-chapter::before {
  content: "";
  position: absolute;
  top: -8px;
  width: 48px;
  height: 16px;
  background: var(--tape) url("assets/cotton-paper.svg");
  opacity: .82;
  transform: rotate(-6deg);
  clip-path: polygon(0 0, 100% 2%, 95% 42%, 100% 95%, 0 100%, 5% 55%);
}

.home-chapter::after {
  content: "→";
  position: absolute;
  right: 9px;
  bottom: 4px;
  color: var(--blue);
}

.home-chapter img {
  width: 100%;
  height: clamp(72px, 9.5vw, 130px);
  object-fit: contain;
  margin-bottom: 5px;
}

.home-chapter-family img {
  width: min(80%, 135px);
  object-fit: cover;
  object-position: right center;
  padding: 4px;
  background: #fffdf7;
  transform: rotate(-3deg);
  box-shadow: 1px 2px 5px #674b2530;
}

.home-chapter strong {
  font: 700 clamp(20px, 2.4vw, 29px)/1.05 var(--hand);
}

.home-chapter span { margin-top: 6px; }
.home-chapter:hover strong, .home-chapter:focus-visible strong { color: var(--blue); }
.watercolor-home .journal { padding-top: clamp(46px, 5.8vw, 74px); }

@media (max-width: 680px) {
  .home-chapters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 20px;
  }
  .home-chapter span { font-size: 12px; }
}

@media (min-width: 761px) and (max-width: 1000px) {
  .welcome-portrait {
    display: block;
    right: 7%;
    width: clamp(116px, 16vw, 158px);
  }
}

.watercolor-home .hello-note p {
  max-width: 100%;
  font-size: 1rem;
  line-height: 1.7;
}

@media (min-width: 621px) {
  .watercolor-home .wander-down {
    position: absolute;
    z-index: 4;
    inset: auto auto 13px clamp(16px, 3vw, 44px);
    margin: 0;
  }

  .watercolor-home .hello-note {
    bottom: 50px;
    width: clamp(356px, 40vw, 388px);
    isolation: isolate;
    background: none;
  }

  .watercolor-home .hello-note::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -50px -85px -40px -65px;
    pointer-events: none;
    background: radial-gradient(ellipse closest-side at 47% 50%, var(--paper) 0 60%, color-mix(in srgb, var(--paper) 90%, transparent) 76%, transparent 100%);
    border-radius: 0;
    filter: blur(12px);
    mask-image: none;
  }
}

.watercolor-home .family-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
}

.watercolor-home .photo-three img {
  object-position: 70% center;
}

.watercolor-home .journal {
  padding-bottom: clamp(36px, 5vw, 62px);
}

.journal-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px clamp(18px, 3vw, 40px);
  margin-top: clamp(28px, 3.6vw, 42px);
}

.journal-end .scrapbook,
.journal-end .journal-footnote {
  margin: 0;
}

.journal-end .journal-footnote {
  text-align: center;
}

.watercolor-home .guide-neighborhood {
  margin-top: 0;
}

.watercolor-home .guide-neighborhood::before,
.watercolor-home .guide-neighborhood::after {
  height: clamp(18px, 3vw, 44px);
  background: var(--paper) url("assets/cotton-paper.svg");
  clip-path: polygon(
    0 0, 100% 0, 100% 55%, 95% 49%, 91% 63%, 86% 78%,
    82% 69%, 77% 52%, 73% 47%, 69% 58%, 64% 84%, 61% 90%,
    57% 73%, 53% 63%, 49% 68%, 45% 58%, 41% 40%, 37% 45%,
    33% 64%, 29% 78%, 25% 67%, 21% 50%, 17% 56%, 12% 75%,
    8% 82%, 4% 70%, 0 66%
  );
  mask-image: linear-gradient(#000 28%, #000b 60%, transparent 100%);
  filter: blur(3px);
}

.watercolor-home .photo-two img {
  height: auto;
  aspect-ratio: 19 / 20;
  object-position: center 25%;
}

.watercolor-home .our-home {
  padding-block: clamp(44px, 6vw, 72px) clamp(32px, 4vw, 46px);
}

.watercolor-home .bunny-postscript {
  padding-block: clamp(29px, 3.4vw, 38px);
}

.watercolor-home .bunny-postscript figure {
  width: clamp(225px, 34vw, 320px);
}

.watercolor-home .bunny-postscript figure img {
  height: auto;
}

.watercolor-home .footer {
  padding-top: 30px;
}

@media (min-width: 621px) {
  .watercolor-home .our-home {
    grid-template-columns: 1.2fr .85fr;
    column-gap: clamp(20px, 5vw, 64px);
    row-gap: clamp(20px, 2.7vw, 32px);
    max-width: 1080px;
  }
}

@media (max-width: 620px) {
  .watercolor-home .bunny-postscript {
    flex-direction: column;
    text-align: center;
  }

  .watercolor-home .bunny-postscript figure {
    width: min(85%, 300px);
  }

  .journal-end {
    flex-direction: column;
  }

  .watercolor-home .table-corner {
    margin-top: 26px;
  }
}

.watercolor-home .journal .section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 3vw, 40px);
}

.journal-heading-art {
  width: clamp(160px, 33%, 390px);
  height: auto;
  flex: none;
}

@media (max-width: 620px) {
  .watercolor-home .journal .section-heading {
    flex-wrap: wrap;
  }

  .journal-heading-art {
    width: min(58%, 220px);
    margin-inline-start: auto;
  }
}

/* The former top-bar lines now belong to the welcome and closing notes. */
.watercolor-home .home-intro-line {max-width:calc(100% - 24px);margin-inline:auto;}
.watercolor-home .footer-window {margin:0 0 8px;font:400 24px/1.25 var(--hand);color:var(--blue);}

/* Equal space above and below the little footer doorway. */
.watercolor-home .footer .footer-small {margin-bottom:0;}
.watercolor-home .footer .front-door-replay {display:grid;margin:14px auto;}
.watercolor-home .footer .copyright {margin-top:0;}

/* Keep the soft copy wash behind the photographic print. */
.watercolor-home .welcome-photo {z-index:4;}

.watercolor-home .world-preview {
  display: grid;
  grid-template-columns: 1fr .85fr;
  align-items: center;
  gap: clamp(24px, 5vw, 60px);
  max-width: 960px;
  padding-block: clamp(36px, 5vw, 62px);
  border-bottom: 1px dashed #d9c7a4;
}

.world-preview h2 {
  margin-block: 8px 10px;
  font: 700 clamp(32px, 4vw, 43px)/1.1 var(--hand);
}

.world-preview p {
  max-width: 38ch;
  margin-block: 0;
}

.world-postcard {
  position: relative;
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 9px 9px 12px;
  background: #fffcf2 url("assets/cotton-paper.svg");
  border: 1px solid #e6d4af;
  box-shadow: 1px 3px 9px #674b2526;
  text-align: center;
  transform: rotate(1deg);
}

.world-postcard .photo-tape {
  background-color: #a3c8d5a8;
}

.world-postcard img {
  display: block;
  width: 100%;
  height: auto;
}

.world-postcard-label {
  color: var(--blue);
  font: 700 clamp(20px, 2.3vw, 25px)/1.2 var(--hand);
  text-decoration: underline;
  text-underline-offset: .18em;
}

.world-postcard:hover .world-postcard-label,
.world-postcard:focus-visible .world-postcard-label {
  color: var(--coral);
}

@media (max-width: 620px) {
  .watercolor-home .wander-down {
    position: relative;
    z-index: 4;
    order: 2;
    margin-top: 12px;
  }

  .watercolor-home .coast-illustration {
    order: 3;
    margin-top: -10px;
  }

  .watercolor-home .hello-note {
    margin-top: 38px;
  }

  .watercolor-home .world-preview {
    grid-template-columns: 1fr;
  }
}

.watercolor-home .home-projects {
  max-width: 960px;
  padding-block: 8px clamp(26px, 4vw, 44px);
}

.watercolor-home .home-projects .table-corner {
  margin-top: 0;
}

.home-projects .table-corner > img {
  max-width: 350px;
}

.home-projects h2 {
  font: 700 clamp(30px, 3.6vw, 39px)/1.12 var(--hand);
}

.home-projects .table-notes > p {
  max-width: 40ch;
  margin-block: 10px 14px;
  font: inherit;
  transform: none;
}

.home-projects .project-site-link {
  display: flex;
  width: min(100%, 34rem);
  margin: 8px auto 0;
  text-align: left;
}

.home-projects .project-site-link::after { content: none; }

.project-site-link .project-site-arrow {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
}

@media (max-width: 620px) {
  .home-projects .table-corner > img {
    max-width: 245px;
  }

  .home-projects .table-notes > p {
    margin-inline: auto;
  }
}
