/* ============================================
   RABBIT HOLES — corkboard with pinned scraps
   Drop images/rabbit-holes/corkboard.png to replace the board only.
   ============================================ */

.rabbit-holes {
  max-width: 880px;
}

.wall-scribble {
  font-family: var(--font-hand);
  font-size: clamp(2.2rem, 5vw, 3.1rem);
  font-weight: 400;
  font-synthesis: none;
  text-align: center;
  color: var(--ink);
  margin: 0 0 1.2rem;
}

.cork-board {
  position: relative;
  aspect-ratio: 4 / 3;
  padding: 15px 17px 19px;
  background:
    linear-gradient(180deg, rgba(255, 248, 230, 0.28), transparent 38%, rgba(80, 48, 12, 0.16)),
    repeating-linear-gradient(
      90deg,
      #e6c27a 0 4px,
      #d4a85a 4px 8px,
      #c89646 8px 9px,
      #dbb266 9px 15px
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -2px 0 rgba(90, 52, 12, 0.28),
    0 18px 30px rgba(58, 46, 34, 0.22);
}

.cork-photo {
  display: none;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.cork-made {
  position: absolute;
  inset: 15px 17px 19px;
  background-color: #c4a06a;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(92, 58, 28, 0.22) 1.1px, transparent 1.4px),
    radial-gradient(circle at 38% 62%, rgba(168, 118, 62, 0.28) 1px, transparent 1.35px),
    radial-gradient(circle at 71% 28%, rgba(74, 46, 20, 0.2) 1.2px, transparent 1.5px),
    radial-gradient(circle at 86% 74%, rgba(150, 104, 56, 0.24) 0.9px, transparent 1.2px),
    radial-gradient(circle at 54% 44%, rgba(110, 70, 34, 0.16) 1.4px, transparent 1.7px),
    radial-gradient(circle at 22% 82%, rgba(80, 50, 22, 0.18) 1px, transparent 1.3px),
    linear-gradient(180deg, #cdae78 0%, #c09a62 48%, #b58c54 100%);
  background-size: 28px 28px, 34px 34px, 22px 22px, 40px 40px, 18px 18px, 26px 26px, 100% 100%;
  box-shadow:
    inset 0 0 0 2px rgba(78, 48, 18, 0.28),
    inset 0 10px 22px rgba(40, 22, 8, 0.16);
}

.cork-board.has-photo {
  aspect-ratio: auto;
  padding: 0;
  background: none;
  box-shadow: 0 18px 30px rgba(58, 46, 34, 0.22);
}

.cork-board.has-photo .cork-photo {
  display: block;
}

.cork-board.has-photo .cork-made {
  display: none;
}

.cork-pins {
  position: absolute;
  inset: 6.5% 5.5% 6.5% 5.5%;
}

/* ---------- shared scrap ---------- */

.scrap {
  --tilt: 0deg;
  position: absolute;
  display: block;
  margin: 0;
  padding: 0.85rem 0.75rem 0.75rem;
  text-align: left;
  font-family: var(--font-hand);
  font-size: 1.12rem;
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.25;
  color: var(--ink);
  transform: rotate(var(--tilt));
  box-shadow: 0 5px 10px rgba(40, 24, 10, 0.16);
  z-index: 1;
}

button.scrap {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button.scrap:hover,
button.scrap:focus-visible {
  z-index: 6;
  transform: rotate(var(--tilt)) translateY(-5px);
  box-shadow: 0 12px 18px rgba(40, 24, 10, 0.22);
}

button.scrap.is-open {
  outline: 2px dashed rgba(139, 74, 60, 0.5);
  outline-offset: 4px;
}

/* ---------- fasteners ---------- */

.pinhead {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  box-shadow:
    0 3px 0 rgba(40, 22, 8, 0.28),
    inset 0 2px 0 rgba(255, 255, 255, 0.42);
  z-index: 3;
  pointer-events: none;
}

.pinhead.tl { left: 18%; }
.pinhead.tr { left: auto; right: 14%; margin-left: 0; }

.pinhead.blue { background: radial-gradient(circle at 34% 30%, #8ec0ee, #2f6fae 68%); }
.pinhead.red { background: radial-gradient(circle at 34% 30%, #ef7a72, #b43333 68%); }

.tape {
  position: absolute;
  width: 34px;
  height: 13px;
  pointer-events: none;
  z-index: 3;
}

.tape.ice { background: rgba(156, 202, 220, 0.58); }
.tape.mint { background: rgba(132, 188, 168, 0.55); }
.tape.rose { background: rgba(214, 126, 138, 0.52); }
.tape.grey { background: rgba(78, 78, 78, 0.32); }
.tape.clear { background: rgba(255, 255, 255, 0.48); }
.tape.tan { background: rgba(204, 172, 118, 0.62); }

.tape.tl { top: -6px; left: 8px; transform: rotate(-8deg); }
.tape.tr { top: -6px; right: 8px; transform: rotate(9deg); }
.tape.bl { bottom: -5px; left: 8px; transform: rotate(7deg); }
.tape.br { bottom: -5px; right: 8px; transform: rotate(-6deg); }
.tape.ml { top: 42%; left: -10px; transform: rotate(-82deg); }
.tape.mr { top: 42%; right: -10px; transform: rotate(84deg); }

/* ---------- paper pieces ---------- */

.scrap-spiral {
  top: 6%;
  left: 11%;
  width: 19%;
  min-height: 26%;
  background: #f7f3ea;
  clip-path: polygon(
    0 7%, 6% 5%, 12% 8%, 18% 5%, 24% 8%, 30% 5%, 36% 8%, 42% 5%,
    48% 8%, 54% 5%, 60% 8%, 66% 5%, 72% 8%, 78% 5%, 84% 8%, 90% 5%,
    100% 7%, 100% 97%, 92% 100%, 78% 97%, 61% 100%, 44% 97%, 28% 100%, 12% 97%, 0 99%
  );
}

.scrap-spiral::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 6%;
  right: 6%;
  height: 10px;
  background: radial-gradient(circle, #c4a06a 3px, transparent 3.4px);
  background-size: 11px 10px;
  opacity: 0.9;
}

.scrap-banner {
  top: 8%;
  left: 32%;
  width: 27%;
  padding: 0.55rem 0.7rem;
  background: #f3ead6;
  clip-path: polygon(
    1% 8%, 8% 0, 22% 6%, 40% 1%, 58% 7%, 76% 0, 92% 6%, 100% 2%,
    98% 92%, 86% 100%, 68% 94%, 50% 100%, 32% 93%, 14% 100%, 0 90%
  );
  text-align: center;
  color: var(--sage);
  font-size: 1.05rem;
}

.scrap-kraft {
  top: 6%;
  left: 58%;
  width: 22%;
  min-height: 22%;
  background: #d8b48a;
  clip-path: polygon(0 0, 100% 0, 100% 88%, 86% 100%, 64% 91%, 42% 100%, 18% 90%, 0 98%);
}

.scrap-cream {
  top: 9%;
  left: 79%;
  width: 13.5%;
  height: 16%;
  background: #efe6d0;
  clip-path: polygon(0 0, 100% 0, 100% 82%, 78% 100%, 48% 88%, 22% 100%, 0 84%);
}

.scrap-sticky {
  width: 10.5%;
  aspect-ratio: 1;
  background: #f3de6a;
  box-shadow: 0 4px 8px rgba(40, 24, 10, 0.14);
}

.scrap-sticky.s1 { top: 34%; left: 14%; }
.scrap-sticky.s2 { top: 30%; left: 26%; }

.scrap-strip {
  top: 40%;
  left: 40%;
  width: 26%;
  height: 9%;
  padding: 0;
  background: #e6d2ae;
  clip-path: polygon(
    0 18%, 8% 0, 28% 14%, 48% 2%, 70% 16%, 88% 0, 100% 20%,
    98% 84%, 80% 100%, 58% 86%, 36% 100%, 16% 84%, 0 96%
  );
}

.scrap-tiny {
  top: 31%;
  left: 70%;
  width: 11%;
  height: 12%;
  background: #f7f3ea;
}

.scrap-tab {
  top: 45%;
  left: 78%;
  width: 8%;
  height: 7%;
  padding: 0;
  background: #f4eee0;
  border-radius: 0 40% 20% 8px / 0 50% 30% 8px;
}

.scrap-tab .tape {
  top: -5px;
  left: 18%;
  transform: rotate(-6deg);
}

.scrap-polaroid {
  width: 12%;
  padding: 5px 5px 16px;
  background: #f4efe4;
}

.scrap-polaroid::after {
  content: '';
  display: block;
  aspect-ratio: 1;
  background: #1c1713;
}

.scrap-polaroid .tape {
  top: -6px;
  left: 28%;
}

.scrap-polaroid.p1 { top: 56%; left: 10%; }
.scrap-polaroid.p2 { top: 71%; left: 16%; }

.scrap-lined {
  top: 54%;
  left: 29%;
  width: 21%;
  min-height: 28%;
  padding: 1rem 0.7rem 0.7rem 1.05rem;
  background-color: #f8f4ea;
  background-image:
    linear-gradient(90deg, transparent 14px, rgba(176, 62, 62, 0.42) 14px 15px, transparent 15px),
    repeating-linear-gradient(
      180deg,
      transparent 0 21px,
      rgba(78, 108, 158, 0.22) 21px 22px
    );
  clip-path: polygon(0 0, 100% 0, 100% 86%, 82% 100%, 58% 90%, 34% 100%, 12% 88%, 0 98%);
}

.scrap-legal {
  top: 52%;
  left: 51%;
  width: 24%;
  min-height: 32%;
  padding: 0.95rem 0.7rem 0.7rem 1.35rem;
  background-color: #f6e27a;
  background-image:
    radial-gradient(circle at 10px 22%, #c9a876 4px, transparent 4.4px),
    radial-gradient(circle at 10px 50%, #c9a876 4px, transparent 4.4px),
    radial-gradient(circle at 10px 78%, #c9a876 4px, transparent 4.4px),
    repeating-linear-gradient(
      180deg,
      transparent 0 20px,
      rgba(70, 92, 150, 0.22) 20px 21px
    );
}

.scrap-blue {
  top: 60%;
  left: 76%;
  width: 14%;
  height: 18%;
  background: #c5d8e8;
  clip-path: polygon(
    2% 10%, 14% 0, 40% 8%, 70% 0, 100% 12%,
    96% 90%, 74% 100%, 48% 88%, 22% 100%, 0 86%
  );
}

@media (max-width: 720px) {
  .rabbit-holes {
    padding-top: var(--space-lg);
  }

  .wall-scribble {
    font-size: clamp(1.7rem, 7vw, 2.2rem);
    margin-bottom: 0.85rem;
  }

  .cork-board {
    aspect-ratio: 4 / 3;
  }

  .cork-board.has-photo {
    aspect-ratio: auto;
  }

  .cork-pins {
    position: absolute;
    inset: 7% 6% 8% 6%;
  }

  .scrap[aria-hidden="true"] {
    display: none;
  }

  button.scrap {
    font-size: 0.98rem;
    padding: 0.7rem 0.55rem 0.6rem;
    min-height: 2.6rem;
  }
}

/* ---------- opened pin sheet ---------- */

.pin-sheet {
  margin-top: 1.4rem;
  padding: 1.7rem 1.8rem 2rem;
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0 31px,
      rgba(91, 110, 82, 0.14) 31px 32px
    ),
    #f6efe1;
  transform: rotate(-0.6deg);
  box-shadow: 0 16px 26px rgba(58, 46, 34, 0.14);
}

.pin-close {
  font-family: var(--font-hand);
  font-size: 1.25rem;
  font-synthesis: none;
  color: var(--rust);
  margin-bottom: 0.7rem;
  padding: 0;
}

.pin-kicker {
  font-family: var(--font-hand);
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin: 0 0 0.35rem;
}

.pin-sheet h3 {
  font-family: var(--font-hand);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 400;
  font-synthesis: none;
  color: var(--rust);
  margin-bottom: 0.85rem;
}

.pin-copy {
  max-width: 62ch;
}

.pin-copy p {
  margin: 0 0 0.95rem;
  font-size: 1.05rem;
  line-height: 1.58;
}

.pin-copy p:last-child {
  margin-bottom: 0;
}

.pin-copy h4 {
  font-family: var(--font-hand);
  font-size: 1.45rem;
  font-weight: 400;
  font-synthesis: none;
  color: var(--ink);
  margin: 1.35rem 0 0.55rem;
  transform: rotate(-0.8deg);
}

.pin-aside {
  font-family: var(--font-hand);
  font-size: 1.28rem;
  line-height: 1.4;
  color: var(--ink-soft);
  transform: rotate(-0.6deg);
  margin: 1.1rem 0 0;
}

@media (prefers-reduced-motion: reduce) {
  button.scrap {
    transition: none;
  }
}
