/* =========================================================
   HOW I BUILD THIS PORTFOLIO
   Editorial holding page
   ========================================================= */
@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@500;600;700&display=swap");

:root {
  --build-paper: #f3e3ce;
  --build-ink: #2f2a25;
  --build-muted: #665c53;
  --build-purple: #4b2c7a;
  --build-red: #b64a3f;
  --build-note: #fff0a7;
  --build-tape: rgba(226, 207, 166, 0.82);

  --build-heading:
    "Canela",
    "Times New Roman",
    Georgia,
    serif;

  --build-body:
    "Avenir Next",
    Avenir,
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;

  --build-hand:
    "Caveat",
    "Bradley Hand",
    "Segoe Print",
    cursive;
}

/* =========================================================
   PAGE FOUNDATION
   ========================================================= */

html {
  overflow-x: hidden;
}

body.build-note-page {
  margin: 0;
  overflow-x: hidden;
  color: var(--build-ink);
  font-family: var(--build-body);
  background:
    radial-gradient(
      circle at 18% 12%,
      rgba(255, 255, 255, 0.28),
      transparent 28%
    ),
    linear-gradient(
      rgba(247, 239, 226, 0.84),
      rgba(247, 239, 226, 0.84)
    ),
    url("../images/textures/watercolor-paper.jpg");
  background-size: auto, auto, 430px auto;
}

.build-note-page *,
.build-note-page *::before,
.build-note-page *::after {
  box-sizing: border-box;
}

.build-note-page img {
  display: block;
  max-width: 100%;
}

.build-note-main {
  width: min(1560px, calc(100vw - 56px));
  margin-inline: auto;
}

.build-note-canvas {
  padding: 1.4rem 0 4.5rem;
}

/* =========================================================
   HERO COMPOSITION
   ========================================================= */

.build-note-hero {
  display: grid;
  grid-template-columns:
    minmax(0, 0.82fr)
    minmax(0, 1.18fr);
  gap: clamp(2.75rem, 6vw, 7rem);
  align-items: center;
  min-height: calc(100vh - 210px);
}

.build-note-copy {
  min-width: 0;
  max-width: 650px;
  padding: 1.2rem 0 1.8rem;
}

.build-note-kicker {
  margin: 0 0 0.65rem;
  color: var(--build-red);
  font-family: var(--build-body);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.build-note-copy h1 {
  max-width: 8.2ch;
  margin: 0;
  color: var(--build-ink);
  font-family: var(--build-heading);
  font-size: clamp(4.6rem, 7vw, 7.8rem);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.build-note-lede {
  max-width: 34rem;
  margin: 1.35rem 0 0;
  color: var(--build-purple);
  font-family: var(--build-heading);
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 600;
  line-height: 1.16;
}

.build-note-body {
  max-width: 37rem;
  margin-top: 1rem;
  color: var(--build-muted);
  font-family: var(--build-body);
  font-size: 1rem;
  line-height: 1.68;
}

.build-note-body p {
  margin: 0 0 0.95rem;
}

/* =========================================================
   HANDWRITTEN PROGRESS NOTE
   ========================================================= */

.build-note-scrap {
  position: relative;
  width: min(23rem, 86%);
  margin: 1.8rem 0 0 auto;
  padding: 1rem 1.15rem;
  background: var(--build-note);
  box-shadow: 0 14px 26px rgba(72, 49, 30, 0.14);
  transform: rotate(-2deg);
}

.build-note-scrap::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 42%;
  width: 58px;
  height: 18px;
  background: var(--build-tape);
  transform: rotate(2deg);
}

.build-note-scrap p {
  margin: 0;
  color: var(--build-purple);
  font-family: var(--build-hand);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.05;
}

/* =========================================================
   HANDWRITTEN ACTION LINKS
   ========================================================= */

.build-note-page .build-note-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.9rem 2rem;
  margin-top: 1.8rem;
}

.build-note-page nav.build-note-actions a {
  display: inline-block;
  color: #4b2c7a;
  font-family: "Caveat", cursive !important;
  font-size: 2rem !important;
  font-weight: 700 !important;
  line-height: 1.05;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: none;
}

.build-note-page nav.build-note-actions a:hover,
.build-note-page nav.build-note-actions a:focus-visible {
  color: #b64a3f;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

/* =========================================================
   HERO ILLUSTRATION
   ========================================================= */

.build-note-art {
  align-self: center;
  min-width: 0;
  margin: 0;
}

.build-note-art img {
  width: 100%;
  max-height: 720px;
  object-fit: contain;
  object-position: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(
    0 22px 28px rgba(64, 45, 28, 0.11)
  );
}

.build-note-art figcaption {
  margin: 0.45rem 1rem 0 0;
  color: var(--build-purple);
  font-family: var(--build-hand);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.05;
  text-align: right;
  transform: rotate(-1deg);
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 980px) {
  .build-note-main {
    width: min(100% - 36px, 980px);
  }

  .build-note-hero {
    grid-template-columns:
      minmax(0, 0.92fr)
      minmax(0, 1.08fr);
    gap: 2.5rem;
    min-height: auto;
  }

  .build-note-copy h1 {
    font-size: clamp(4rem, 8vw, 6rem);
  }

  .build-note-page .build-note-actions a {
    font-size: 1.85rem !important;
  }
}

/* =========================================================
   SMALL TABLET
   ========================================================= */

@media (max-width: 760px) {
  .build-note-main {
    width: min(100% - 28px, 720px);
  }

  .build-note-canvas {
    padding-top: 0.65rem;
  }

  .build-note-hero {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: stretch;
  }

  .build-note-copy {
    max-width: none;
    padding-bottom: 0;
  }

  .build-note-copy h1 {
    max-width: 8ch;
    font-size: clamp(3.7rem, 14vw, 5.2rem);
  }

  .build-note-art {
    order: -1;
    width: min(100%, 620px);
    margin-inline: auto;
  }

  .build-note-art img {
    max-height: 520px;
  }

  .build-note-page .build-note-actions {
    gap: 0.75rem 1.5rem;
  }

  .build-note-page .build-note-actions a {
    font-size: 1.75rem !important;
  }
}

/* =========================================================
   PHONE
   ========================================================= */

@media (max-width: 520px) {
  .build-note-main {
    width: min(100% - 22px, 500px);
  }

  .build-note-copy h1 {
    font-size: clamp(3.2rem, 15vw, 4.2rem);
  }

  .build-note-lede {
    font-size: 1.35rem;
  }

  .build-note-scrap {
    width: 92%;
  }

  .build-note-page .build-note-actions {
    display: grid;
    gap: 0.65rem;
  }

  .build-note-page .build-note-actions a {
    width: fit-content;
    font-size: 1.65rem !important;
  }
}
