/* =====================================================================
   HOME (index.html) · page-scoped layout
   Tokens and components come from site.css; this file only arranges them.
   ===================================================================== */

/* 1 · Hero: text left, Plate I right. Sized so the header, hero and the
   top of the doors share the first desktop screen. */
.home-hero { padding-top: 14px; }
.home-hero__grid { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 44px; }
.home-hero__text h1 { max-width: 11ch; }
.home-hero__text .dek { margin-top: 20px; max-width: 36ch; }
.home-hero__plate { justify-self: end; width: 100%; max-width: 560px; }

/* Desktop: Plate I lays its key beside the art (not under it), so the
   hero stays short and both doors reach the first 1280x800 screen. */
@media (min-width: 981px) {
  .home-hero__plate .plate {
    display: grid; grid-template-columns: 290px minmax(0, 1fr); column-gap: 22px; align-items: center;
    padding: 12px 18px 14px;
  }
  .home-hero__plate .plate__top { grid-column: 1 / -1; }
  .home-hero__plate .plate__art { margin: 4px 0 0; }
  .home-hero__plate .plate__caption { border-top: 0; border-left: 1px solid var(--hair); padding: 4px 0 4px 20px; }
  .home-hero__plate .key { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

/* 2 · Doors sit close under the hero (the fork links them) */
.home-doors { padding-top: 8px; }
.home-doors .door__actions { padding-top: 18px; }
.home-doors .trail-fork-wrap { margin-bottom: 4px; }

/* 4 · Drafts footer row: footnote left, section link right */
.home-drafts__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px;
  margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--hair);
}

/* 5 · Closing CTA: a quiet ruled block, heading left, actions right,
   with a short paw trail running into the finish flag. */
.home-close__card {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px 56px;
  border-top: 4px double var(--rule); padding-top: 44px;
}
.home-close__card h2 { font-size: clamp(2.4rem, 1.6rem + 3vw, 3.9rem); line-height: 1; letter-spacing: -.015em; }
.home-close__actions { display: grid; gap: 18px; justify-items: start; }
.home-close__actions .action-note { margin-top: 10px; }
.home-close__alt { font-size: 1.0625rem; color: var(--ink-2); }
.home-close__alt .link-arrow { padding-block: 6px; }
.home-close__trail {
  position: absolute; top: -21px; right: 0; display: flex; align-items: flex-end; gap: 6px;
  padding-left: 12px; background: var(--bg); background-image: var(--texture); background-size: var(--texture-size);
}
.home-close__prints {
  display: block; width: 180px; height: 26px; background: var(--paw);
  -webkit-mask: var(--mask-trail-x) 0 50% / 52px 26px round no-repeat;
          mask: var(--mask-trail-x) 0 50% / 52px 26px round no-repeat;
}
.home-close__flag {
  display: block; width: 28px; height: 34px; margin-bottom: 4px; background: var(--leader);
  -webkit-mask: var(--mask-flag) 0 0 / 28px 34px no-repeat;
          mask: var(--mask-flag) 0 0 / 28px 34px no-repeat;
}
@supports not ((-webkit-mask-image: url("")) or (mask-image: url(""))) { .home-close__trail { display: none; } }

@media (max-width: 980px) {
  .home-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .home-hero__text h1 { max-width: 13ch; }
  .home-hero__plate { justify-self: start; max-width: 520px; }
}
@media (max-width: 720px) {
  .home-hero { padding-top: 28px; }
  .home-doors { padding-top: 40px; }
  /* Phones: a smaller Plate I and a lighter key, so Trail A starts
     within about 1.2 screens. */
  .home-hero__grid { gap: 24px; }
  .home-hero__plate { max-width: 340px; }
  .home-hero__plate .plate { padding: 10px 12px 12px; }
  .home-hero__plate .fig-title { display: none; }
  .home-hero__plate .plate__caption { padding-top: 10px; }
  .home-hero__plate .key { margin-top: 0; gap: 6px 16px; }
  .home-close__card { grid-template-columns: minmax(0, 1fr); padding-top: 36px; }
  .home-close__prints { width: 110px; }
}
@media (forced-colors: active) { .home-close__trail { display: none; } }
.home-close__alt + .home-close__alt { margin-top: -12px; }
