/* Ninth chapter: a pressed trail map and two keepsakes from the first hike. */

.scene--hiking {
  color: #233c2c;
  background: #1f392c;
}

.hiking__ambient {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: #c9c6a4;
  filter: saturate(0.88) contrast(0.96);
}

.hiking-landscape {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.hiking-landscape__contours {
  opacity: 0.22;
  stroke-dasharray: 3 12;
}

.hiking-landscape__forest {
  opacity: 0.78;
}

.hiking-landscape__birds {
  animation: hiking-birds-drift 14s ease-in-out infinite alternate;
  transform-origin: 1040px 300px;
}

@keyframes hiking-birds-drift {
  from {
    transform: translate3d(-8px, 2px, 0);
  }
  to {
    transform: translate3d(15px, -7px, 0);
  }
}

.hiking__veil {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 78% 16%, rgba(255, 247, 214, 0.28), transparent 26rem),
    linear-gradient(90deg, rgba(246, 238, 213, 0.42) 0 29%, rgba(240, 232, 204, 0.12) 50%, transparent 72%),
    linear-gradient(180deg, rgba(25, 47, 32, 0.04), transparent 46%, rgba(16, 39, 27, 0.18));
}

.hiking__veil::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image:
    radial-gradient(circle, rgba(54, 70, 48, 0.42) 0 1px, transparent 1.4px),
    repeating-linear-gradient(118deg, transparent 0 37px, rgba(62, 76, 49, 0.24) 38px, transparent 39px 74px);
  background-size: 19px 19px, auto;
  mask-image: linear-gradient(90deg, #000, rgba(0, 0, 0, 0.36) 56%, transparent 88%);
}

.hiking__veil::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 32%;
  background: linear-gradient(180deg, transparent, rgba(16, 39, 27, 0.28));
  pointer-events: none;
}

.scene--hiking .scene__top {
  padding: 7px 10px;
  color: rgba(36, 59, 43, 0.8);
  background: rgba(255, 249, 231, 0.44);
  backdrop-filter: blur(7px);
}

.scene--hiking .scene__top b {
  color: #8a5b2e;
}

.hiking__layout {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(330px, 0.74fr) minmax(560px, 1.26fr);
  align-items: center;
  gap: clamp(42px, 6.4vw, 102px);
  width: min(1280px, calc(100vw - 10vw));
  height: 100%;
  padding: 82px 0 70px;
  margin: 0 auto;
}

.hiking__copy {
  position: relative;
  z-index: 6;
  padding: clamp(28px, 3.2vw, 45px);
  background:
    linear-gradient(90deg, transparent 0 17px, rgba(74, 107, 67, 0.06) 18px, transparent 19px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), transparent 42%),
    rgba(255, 250, 233, 0.95);
  border: 1px solid rgba(65, 91, 58, 0.22);
  box-shadow:
    0 32px 68px rgba(24, 49, 32, 0.19),
    8px 9px 0 rgba(255, 250, 232, 0.24);
  transform: rotate(-0.7deg);
}

.hiking__copy::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 14%;
  width: 106px;
  height: 27px;
  background: rgba(238, 219, 157, 0.78);
  box-shadow: 0 2px 5px rgba(70, 83, 54, 0.08);
  transform: rotate(-3deg);
}

.hiking__copy::after {
  content: "FIRST HIKE";
  position: absolute;
  right: -30px;
  bottom: 30px;
  display: grid;
  place-items: center;
  width: 88px;
  height: 55px;
  color: rgba(70, 96, 59, 0.56);
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: Baskerville, "Times New Roman", serif;
  font-size: 8px;
  letter-spacing: 0.12em;
  transform: rotate(-11deg);
}

.hiking__copy .scene__kicker {
  margin-bottom: 14px;
  color: #4b7756;
}

.hiking__copy h2 {
  margin: 0;
  color: #27432f;
  font-family: var(--story-display);
  font-size: clamp(52px, 4.8vw, 70px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.hiking__copy h2 span {
  position: relative;
  display: inline-block;
  color: #a05b35;
}

.hiking__copy h2 span::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 1px;
  height: 6px;
  background: linear-gradient(174deg, transparent 28%, rgba(211, 157, 67, 0.6) 31% 65%, transparent 68%);
}

.hiking__lead {
  margin: 22px 0 0;
  color: #596550;
  font-family: var(--story-hand);
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.72;
  letter-spacing: 0.035em;
}

.hiking__route-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 24px 0 0;
  padding: 13px 0 12px;
  border-top: 1px solid rgba(59, 84, 53, 0.16);
  border-bottom: 1px solid rgba(59, 84, 53, 0.16);
}

.hiking__route-stats div {
  min-width: 0;
  padding: 0 10px;
  text-align: center;
}

.hiking__route-stats div + div {
  border-left: 1px solid rgba(59, 84, 53, 0.14);
}

.hiking__route-stats dt {
  color: #2d4b34;
  font-family: Baskerville, "Times New Roman", serif;
  font-size: clamp(14px, 1.2vw, 17px);
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.hiking__route-stats dd {
  margin: 1px 0 0;
  color: #7b7764;
  font-family: var(--story-hand);
  font-size: 11px;
}

.hiking__copy .scene-actions {
  margin-top: 24px;
}

.back-button--hiking {
  color: #3c6748;
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(61, 103, 72, 0.34);
}

.back-button--hiking:hover {
  color: #234a32;
  background: rgba(255, 255, 255, 0.66);
  border-color: rgba(61, 103, 72, 0.58);
}

.next-button--hiking {
  color: #fff9e8;
  background: #3f6d4d;
  border-color: #54805c;
}

.next-button--hiking:hover {
  color: #fff9e8;
  background: #284c35;
  border-color: #284c35;
}

.hiking__scrapbook {
  position: relative;
  width: min(100%, 690px);
  height: min(76svh, 700px);
  min-height: 470px;
  margin: 0 auto;
}

.hiking__scrapbook::before {
  content: "06 · 06";
  position: absolute;
  top: -5%;
  right: 2%;
  z-index: 5;
  color: rgba(255, 247, 216, 0.82);
  font-family: Baskerville, "Times New Roman", serif;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-shadow: 0 2px 12px rgba(17, 40, 24, 0.46);
  transform: rotate(3deg);
}

.hiking-photo {
  position: absolute;
  padding: 8px;
  margin: 0;
  background: #fffaf0;
  box-shadow:
    0 28px 58px rgba(19, 43, 27, 0.3),
    7px 8px 0 rgba(255, 250, 237, 0.22);
}

.hiking-photo img {
  display: block;
  width: 100%;
  height: 100%;
  background: #e5e4d7;
  object-fit: contain;
  object-position: center;
}

.hiking-photo figcaption {
  position: absolute;
  right: 10px;
  bottom: 8px;
  left: 10px;
  color: #6b715c;
  font-family: var(--story-hand);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-align: center;
}

.hiking-photo--route {
  top: 4%;
  left: 0;
  z-index: 3;
  width: 43%;
  height: 87%;
  padding-bottom: 28px;
  transform: rotate(-2.2deg);
}

.hiking-photo--cave {
  top: 0;
  right: 1%;
  z-index: 4;
  width: 43%;
  height: 55%;
  padding-bottom: 27px;
  transform: rotate(2.5deg);
}

.hiking-photo--forest {
  right: 9%;
  bottom: 0;
  z-index: 5;
  width: 47%;
  height: 55%;
  padding-bottom: 27px;
  transform: rotate(-1.4deg);
}

.hiking-photo__tape {
  position: absolute;
  top: -13px;
  left: 41%;
  z-index: 6;
  width: 78px;
  height: 24px;
  background: rgba(229, 210, 146, 0.82);
  box-shadow: 0 2px 5px rgba(38, 58, 35, 0.1);
  transform: rotate(2deg);
}

.hiking-photo__tape--soft {
  left: 35%;
  background: rgba(201, 220, 181, 0.82);
  transform: rotate(-3deg);
}

.doodle--hiking-trail {
  right: -1%;
  bottom: -1%;
  width: 40%;
  color: rgba(248, 232, 176, 0.38);
}

.scene--hiking .stage__footer {
  color: rgba(39, 64, 44, 0.66);
}

.scene--hiking .scene-number b {
  color: #9a613a;
}

.scene--hiking .scene-number i {
  background: rgba(39, 64, 44, 0.24);
}

.question-card h2 {
  text-wrap: balance;
}

@media (max-width: 900px) {
  .hiking__veil {
    background:
      radial-gradient(circle at 82% 13%, rgba(255, 241, 184, 0.28), transparent 18rem),
      linear-gradient(180deg, rgba(27, 54, 36, 0.08) 0 29%, rgba(241, 233, 205, 0.2) 52%, rgba(20, 44, 29, 0.28));
  }

  .hiking__veil::before {
    opacity: 0.14;
    mask-image: linear-gradient(180deg, transparent 0 20%, #000 62%, transparent);
  }

  .hiking__layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, auto) minmax(0, auto);
    align-content: center;
    justify-items: center;
    gap: clamp(18px, 2.8vh, 28px);
    width: min(690px, calc(100vw - 42px));
    padding: 68px 0 58px;
  }

  .hiking__scrapbook {
    order: 0;
    width: min(100%, 600px);
    height: min(43svh, 390px);
    min-height: 260px;
  }

  .hiking__copy {
    order: 1;
    width: 100%;
    padding: 20px 27px 23px;
  }

  .hiking__copy::before {
    top: -9px;
    height: 18px;
  }

  .hiking__copy::after {
    right: 20px;
    bottom: 17px;
    width: 76px;
    height: 45px;
  }

  .hiking__copy h2 {
    font-size: clamp(43px, 8vw, 59px);
  }

  .hiking__lead {
    margin-top: 15px;
    font-size: clamp(17px, 2.8vw, 20px);
  }

  .hiking__route-stats {
    margin-top: 15px;
    padding-block: 9px;
  }

  .hiking__copy .scene-actions {
    margin-top: 16px;
  }
}

@media (max-width: 680px) {
  .hiking__layout {
    gap: clamp(12px, 2.1vh, 19px);
    width: calc(100vw - 38px);
    padding: 57px 0 48px;
  }

  .hiking__scrapbook {
    height: min(38svh, 315px);
    min-height: 207px;
  }

  .hiking__scrapbook::before {
    top: -8%;
    right: 3%;
    font-size: 10px;
  }

  .hiking-photo {
    padding: 5px;
  }

  .hiking-photo--route {
    top: 4%;
    left: 0;
    width: 46%;
    height: 86%;
    padding-bottom: 21px;
  }

  .hiking-photo--cave {
    right: 0;
    width: 48%;
    height: 54%;
    padding-bottom: 20px;
  }

  .hiking-photo--forest {
    right: 8%;
    width: 52%;
    height: 55%;
    padding-bottom: 20px;
  }

  .hiking-photo figcaption {
    right: 5px;
    bottom: 5px;
    left: 5px;
    font-size: 7px;
  }

  .hiking-photo__tape {
    top: -7px;
    width: 48px;
    height: 16px;
  }

  .doodle--hiking-trail {
    display: none;
  }

  .hiking__copy {
    padding: 16px 18px 17px;
  }

  .hiking__copy::before {
    top: -7px;
    height: 14px;
  }

  .hiking__copy::after {
    display: none;
  }

  .hiking__copy .scene__kicker {
    margin-bottom: 5px;
    font-size: 11px;
  }

  .hiking__copy h2 {
    font-size: clamp(36px, 10.6vw, 47px);
  }

  .hiking__lead {
    margin-top: 9px;
    font-size: clamp(14px, 4.2vw, 17px);
    line-height: 1.5;
  }

  .hiking__route-stats {
    margin-top: 9px;
    padding-block: 6px;
  }

  .hiking__route-stats div {
    padding-inline: 5px;
  }

  .hiking__route-stats dt {
    font-size: 12px;
  }

  .hiking__route-stats dd {
    font-size: 9px;
  }

  .hiking__copy .scene-actions {
    margin-top: 10px;
  }

  .hiking__copy .back-button {
    min-height: 37px;
    padding: 7px 11px;
    font-size: 10px;
  }
}

@media (max-height: 650px) and (max-width: 900px) {
  .hiking__layout {
    gap: 9px;
    padding: 50px 0 37px;
  }

  .hiking__scrapbook {
    height: 188px;
    min-height: 188px;
  }

  .hiking__copy {
    padding: 11px 15px 12px;
  }

  .hiking__copy h2 {
    font-size: clamp(30px, 8.4vw, 37px);
  }

  .hiking__lead {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.35;
  }

  .hiking__route-stats {
    margin-top: 5px;
    padding-block: 3px;
  }

  .hiking__route-stats dt {
    font-size: 10px;
  }

  .hiking__route-stats dd {
    display: none;
  }

  .hiking__copy .scene-actions {
    margin-top: 5px;
  }

  .hiking__copy .back-button {
    min-height: 33px;
    padding: 5px 9px;
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hiking-landscape__birds {
    animation: none;
  }
}
