/* Things to Do — load ../styles.css first for shared reset and .nav structure. */

body.page-things {
  background: #fbf7ef;
  min-height: 100vh;
  /* Scroll reveals: ../script.js + [data-home-reveal] */
  --things-reveal-delay: 0.38s;
  --things-reveal-duration: 1.4s;
}

body.page-things .nav {
  background: #414f39;
}

.things-main {
  --things-pad: clamp(1.75rem, 5vw, 3.5rem);
  max-width: 82rem;
  margin: 0 auto;
  padding-top: calc(clamp(11rem, 20vh, 20rem));
  padding-bottom: max(8rem, env(safe-area-inset-bottom, 0px));
  padding-left: max(var(--things-pad), env(safe-area-inset-left, 0px));
  padding-right: max(var(--things-pad), env(safe-area-inset-right, 0px));
  box-sizing: border-box;
}

/* Intro block — same ornament band as Where to Stay (.stay-v3-ornament + .stay-v3-rule) */
.things-intro-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2rem);
  width: 100%;
  margin: 0 auto;
  text-align: center;
  margin-bottom: clamp(3.75rem, 12vh, 6.5rem);
  padding-bottom: clamp(1rem, 3vh, 2rem);
}

.things-intro-icon {
  color: rgba(26, 26, 26, 0.42);
}

.things-intro-icon svg {
  display: block;
  width: clamp(2.5rem, 6vw, 3.25rem);
  height: auto;
}

.things-intro-rule {
  width: 30%;
  min-width: 6.5rem;
  margin: 0;
  border: 0;
  border-top: 1px solid rgba(26, 26, 26, 0.28);
}

/* Luxurious Script — third font in the stack */
.things-intro-heading {
  font-family: "Instrument Serif", serif;
  text-transform: uppercase;
  font-size: clamp(3rem, 6.5vw, 5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.02em;
  margin: 0;
  padding: 0;
  color: #1a1a1a;
  text-align: center;
}

/* Top intro — aligned with .stay-lede */
.things-intro {
  font-family: "Aboreto", serif;
  font-size: clamp(0.95rem, 2vw, 1.08rem);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.015em;
  text-transform: none;
  text-align: center;
  max-width: 38rem;
  padding: 0;
  margin: 0;
  color: rgba(26, 26, 26, 0.78);
}

/* Pause before the first split section */
.things-split {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3rem) clamp(5rem, 13vw, 11.5rem);
  align-items: start;
  margin-top: clamp(5rem, 18vh, 11rem);
}

.things-split + .things-split {
  margin-top: clamp(8rem, 11vh, 12rem);
  padding-top: clamp(8rem, 11vh, 12rem);
  border-top: 1px solid rgba(26, 26, 26, 0.28);
}

.things-section-title {
  font-family: "Luxurious Script", cursive;
  font-size: clamp(3rem, 9vw, 5rem);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: 0.02em;
  margin: 0;
  padding: 0 0.35rem 0 0;
  color: #1a1a1a;
  text-align: left;
}

/* Name + description cards in a loose grid */
.things-places {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 3.5rem);
  align-items: start;
}

.things-place {
  margin: 0;
}

/* Same typeface as .nav-links a */
.things-place-name {
  font-family: "Aboreto", serif;
  font-size: clamp(1.05rem, 2.1vw, 1.28rem);
  font-weight: 1000;
  line-height: 1.35;
  letter-spacing: 0.015em;
  margin: 0;
  padding: 0;
  color: #1a1a1a;
  text-align: left;
}

/*
 * things-links.js wraps titles in .things-place-link__text, ties the last word + .things-place-link__icon
 * in .things-place-link__hang (nowrap) so the icon never sits alone on the next line. Per-line underline:
 * background + box-decoration-break: clone on __text.
 */
.things-place-link {
  position: relative;
  z-index: 1;
  display: inline-block;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.25s ease;
  cursor: pointer;
}

.things-place-link__text {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding-bottom: 3px;
  transition: background-size 0.55s cubic-bezier(0.33, 1, 0.68, 1);
}

.things-place-link:hover .things-place-link__text,
.things-place-link:focus-visible .things-place-link__text {
  background-size: 100% 1px;
}

.things-place-link__hang {
  white-space: nowrap;
}

/* External-link cue (in DOM after last word; things-links.js) */
.things-place-link__icon {
  display: inline-block;
  width: 0.58em;
  height: 0.58em;
  margin-left: 0.4em;
  vertical-align: 0.06em;
  flex-shrink: 0;
  background-color: currentColor;
  opacity: 0.4;
  transition: opacity 0.25s ease;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.things-place-link:hover .things-place-link__icon,
.things-place-link:focus-visible .things-place-link__icon {
  opacity: 0.58;
}

.things-place-link:hover {
  opacity: 0.85;
}

.things-place-link:focus {
  outline: none;
}

.things-place-link:focus-visible {
  outline: 2px solid #1a1a1a;
  outline-offset: 4px;
}

/* Food & drink — cuisine chips under the venue name */
.things-place-tags {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
}

.things-place-tag {
  font-family: "Aboreto", serif;
  font-size: clamp(0.58rem, 1.1vw, 0.68rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(65, 79, 57, 0.32);
  border-radius: 999px;
  color: rgba(65, 79, 57, 0.92);
  background: rgba(65, 79, 57, 0.07);
}

.things-place-tags + .things-place-desc {
  margin-top: 0.55rem;
}

.things-place-desc {
  font-family: "Instrument Serif", serif;
  font-size: clamp(1.0rem, 1.5vw, 1.1rem);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.02em;
  margin: 0.65rem 0 0;
  padding: 0;
  color: rgba(26, 26, 26, 0.72);
  text-align: left;
}

.things-place-desc a,
.things-place-desc a:visited {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.12em;
  text-decoration-thickness: 1px;
}

.things-place-desc a:hover {
  opacity: 0.88;
}

.things-place-desc a:focus-visible {
  outline: 2px solid rgba(26, 26, 26, 0.45);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (max-width: 52rem) {
  .things-split {
    grid-template-columns: 1fr;
    gap: clamp(2rem, 5vw, 3rem);
    margin-top: clamp(4rem, 14vh, 8.5rem);
  }

  .things-section-title {
    text-align: center;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }

  .things-places {
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 3rem) clamp(2.25rem, 6vw, 4rem);
  }
}

/* Match Where to Stay main padding on narrow viewports */
@media (max-width: 40rem) {
  .things-main {
    padding-top: calc(clamp(11rem, 20vh, 20rem));
    padding-left: max(clamp(1.25rem, 4vw, 2.5rem), env(safe-area-inset-left, 0px));
    padding-right: max(clamp(1.25rem, 4vw, 2.5rem), env(safe-area-inset-right, 0px));
  }

  .things-intro-wrap + .things-split {
    margin-top: 0;
  }
}

@media (max-width: 36rem) {
  .things-split {
    margin-top: clamp(3rem, 10vh, 5rem);
  }

  .things-split + .things-split {
    margin-top: clamp(3.5rem, 9vh, 6rem);
    padding-top: clamp(3.5rem, 9vh, 6rem);
  }

  .things-places {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* ----- Scroll-in (script.js IntersectionObserver + .is-visible) ----- */
body.page-things [data-home-reveal] {
  opacity: 0;
  transform: translateY(1.25rem);
  transition:
    opacity var(--things-reveal-duration) cubic-bezier(0.22, 1, 0.36, 1),
    transform var(--things-reveal-duration) cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

body.page-things [data-home-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
  transition-delay: var(--things-reveal-delay);
}

@media (prefers-reduced-motion: reduce) {
  body.page-things [data-home-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }

  body.page-things [data-home-reveal].is-visible {
    transition-delay: 0s;
  }

  .things-place-link__text {
    transition: none;
  }

  .things-place-link:hover .things-place-link__text,
  .things-place-link:focus-visible .things-place-link__text {
    background-size: 100% 1px;
  }

  .things-place-link__icon {
    transition: none;
  }
}
