/* Farmhouse materials: wooden trail signs for the wayfinding labels, woven bamboo (sawali) for edges and
   dividers, and string lights for the evening. Textures in assets/materials/ (the wood and bamboo made from
   generated material textures, the lights drawn). Everything here is decoration only: delete this file's <link> in index.html to
   remove all of it. */

/* Wooden trail signs: the wayfinding labels, the numbered chapter markers ("01 / STAY WITH US") and the two
   side panels' titles. Small boards in the bamboo's golden tan, lettered dark as if burned in, with a nail at
   each end and the faintest tilt, like signposts along the farmhouse paths. */
.trail-sign,
dialog.side-panel .panel-head .eyebrow {
  position: relative;
  display: inline-flex;
  width: fit-content;
  padding: 9px 22px 8px;
  border-radius: 3px;
  background: #c9924e url(assets/materials/pine-sign.webp) center / cover;
  color: #2a1604;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 232, 186, 0.5);
  box-shadow:
    inset 0 0 0 1px rgba(80, 48, 14, 0.32),
    inset 0 2px 0 rgba(255, 232, 186, 0.35),
    inset 0 -2px 0 rgba(80, 48, 14, 0.22),
    0 2px 4px rgba(40, 24, 8, 0.16);
  transform: rotate(-0.6deg);
}
/* The nails. */
.trail-sign::before,
.trail-sign::after,
dialog.side-panel .panel-head .eyebrow::before,
dialog.side-panel .panel-head .eyebrow::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #8a8a86, #3a3a36 70%);
  box-shadow: 0 1px 0 rgba(255, 232, 186, 0.35);
}
.trail-sign::before,
dialog.side-panel .panel-head .eyebrow::before {
  left: 8px;
}
.trail-sign::after,
dialog.side-panel .panel-head .eyebrow::after {
  right: 8px;
}
/* Alternate tilts, so a page of signs looks hand-mounted rather than stamped. */
#tours .trail-sign,
#dining .trail-sign {
  transform: rotate(0.5deg);
}

/* Woven bamboo: a thin divider in the space above three chapters of the page. */
#stay,
#dining,
#visit {
  position: relative;
}
#stay::before,
#dining::before,
#visit::before {
  content: "";
  position: absolute;
  top: -52px;
  left: 6%;
  right: 6%;
  height: 12px;
  border-radius: 6px;
  background: url(assets/materials/sawali-band.webp) repeat-x 0 0 / auto 100%;
  box-shadow:
    inset 0 0 0 1px rgba(110, 70, 20, 0.25),
    0 1px 2px rgba(60, 40, 10, 0.15);
  pointer-events: none;
}

/* The footer: a woven edge like the gazebo roof's eaves, with string lights hanging from it, as at the
   garden bar at night. The lights breathe gently (off with reduced motion or the motion toggle). */
footer {
  position: relative;
  padding-top: 118px;
}
footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 16px;
  background: url(assets/materials/sawali-band.webp) repeat-x 0 0 / auto 100%;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}
footer::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  height: 70px;
  background: url(assets/materials/string-lights.webp) repeat-x center top / 600px 70px;
  pointer-events: none;
  animation: lights-breathe 5s ease-in-out infinite;
}
@keyframes lights-breathe {
  50% {
    opacity: 0.8;
  }
}
html.motion-paused footer::after {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  footer::after {
    animation: none;
  }
}
@media (max-width: 600px) {
  footer {
    padding-top: 100px;
  }
  footer::after {
    background-size: 420px 49px;
    height: 49px;
  }
}

/* The main page's scrollbar is a kayak on a river: the kayak (assets/materials/kayak.svg) is the handle and
   paddles down the water (river.svg) as the page scrolls. Menus, forms and the photo viewer keep the green
   scrollbar (motion.css). Chrome, Edge and Safari; Firefox gets the kayak's colours. Chrome styles the page's
   own scrollbar through body, not html, hence the selectors. Phones keep their own scrollbars. */
@supports selector(::-webkit-scrollbar) {
  body::-webkit-scrollbar {
    width: 16px;
  }
  body::-webkit-scrollbar-track {
    background: #d6ebe8 url(assets/materials/river.svg) repeat-y center top / 16px 28px;
  }
  /* The general "darker on hover" rule for the green scrollbars must not turn the kayak into a solid block. */
  body::-webkit-scrollbar-thumb,
  body::-webkit-scrollbar-thumb:hover {
    background: url(assets/materials/kayak.svg) center / 100% 100% no-repeat;
    border: 0;
    border-radius: 0;
  }
  /* Hidden while the hero is on screen (it can still be dragged), and while the kayak travels on the river. */
  body.kayak-away::-webkit-scrollbar-thumb,
  body.kayak-away::-webkit-scrollbar-thumb:hover,
  body.kayak-travelling::-webkit-scrollbar-thumb,
  body.kayak-travelling::-webkit-scrollbar-thumb:hover {
    background: none;
  }
  /* Beside the hero photo at the top of the page the river is deep pond water, so no bright strip runs down
     the edge of the dark photo. nav.js sets body.river-dark as the page scrolls. */
  body.river-dark::-webkit-scrollbar-track {
    background: #1b302a url(assets/materials/river-deep.svg) repeat-y center top / 16px 28px;
  }
  /* Arriving and leaving, the kayak is drawn on the river itself, which runs the full height of the window,
     so it paddles in from above the top edge down to the handle's spot (and back up and out when leaving).
     nav.js sets --kayak-y and --kayak-h each frame; the handle takes over once it arrives. */
  body.kayak-travelling::-webkit-scrollbar-track {
    background:
      url(assets/materials/kayak.svg) 0 var(--kayak-y, -100px) / 16px var(--kayak-h, 64px) no-repeat,
      #d6ebe8 url(assets/materials/river.svg) repeat-y center top / 16px 28px;
  }
  body.kayak-travelling.river-dark::-webkit-scrollbar-track {
    background:
      url(assets/materials/kayak.svg) 0 var(--kayak-y, -100px) / 16px var(--kayak-h, 64px) no-repeat,
      #1b302a url(assets/materials/river-deep.svg) repeat-y center top / 16px 28px;
  }
}
@supports not selector(::-webkit-scrollbar) {
  html {
    scrollbar-color: #2f6b4e #d6ebe8;
  }
  html:has(> body.river-dark) {
    scrollbar-color: #4f9a74 #1b302a;
  }
  /* Everything inside the page keeps the green scrollbar. */
  body * {
    scrollbar-color: #233e32 #ebe6d8;
  }
}
