/* Vacation in New Hampshire — fade-only portal slideshow */

:root {
  --green: #2D6A4F;
  --green-dark: #1B4332;
  --green-light: #40916C;
  --blue: #74C0FC;
  --ink: #1a1a1a;
  --white: #ffffff;
  --cream: #f8faf9;
  --shadow: 0 16px 48px rgba(27, 67, 50, 0.12);
  --font-body: "Montserrat", system-ui, sans-serif;
  --font-display: "Source Serif 4", Georgia, serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-dream: cubic-bezier(0.45, 0.05, 0.15, 1);
  --ease-portal: cubic-bezier(0.4, 0, 0.2, 1);
  --member-max: min(520px, 88vw);
  --radius-media: clamp(0.85rem, 2vw, 1.15rem);
  --fade-ms: 900ms;
  /* Docked hero logo footprint — keep member video clear of it (logo is square) */
  --brand-dock-top: clamp(0.4rem, 1vw, 0.65rem);
  --brand-dock-width: clamp(128px, 24vw, 192px);
  --brand-dock-clearance: calc(var(--brand-dock-top) + var(--brand-dock-width) + 0.85rem);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 70% at 50% 38%, rgba(208, 235, 255, 0.4), transparent 65%),
    radial-gradient(ellipse 70% 50% at 18% 82%, rgba(45, 106, 79, 0.14), transparent 55%),
    linear-gradient(165deg, #eef5f1 0%, var(--cream) 45%, #e8f0ec 100%);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--green-light);
}

/* Slide timing progress removed */
.dream-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.9s var(--ease-dream) 0.35s;
}

body.is-ready .dream-overlay {
  opacity: 0;
}

.dream-aurora {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 60% 50% at 30% 40%, rgba(116, 192, 252, 0.45), transparent 70%),
    radial-gradient(ellipse 50% 40% at 70% 60%, rgba(45, 106, 79, 0.35), transparent 70%),
    radial-gradient(ellipse 80% 60% at 50% 80%, rgba(208, 235, 255, 0.5), transparent 60%);
  animation: aurora-drift 8s ease-in-out infinite alternate;
}

.dream-mist {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(248, 250, 249, 0.12) 0%, rgba(248, 250, 249, 0.4) 100%);
  animation: mist-breathe 4s ease-in-out infinite;
}

.dream-sparkles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1px 1px at 60% 20%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 80% 50%, rgba(116, 192, 252, 0.7), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 10% 80%, rgba(255, 255, 255, 0.6), transparent);
  animation: sparkle-twinkle 3s ease-in-out infinite alternate;
}

@keyframes aurora-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-3%, -2%) scale(1.05); }
}

@keyframes mist-breathe {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes sparkle-twinkle {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.portal {
  position: relative;
  height: 100svh;
  width: 100%;
  overflow: hidden;
}

.portal-stage {
  position: absolute;
  inset: 0;
}

/* Pure dissolve — no slide/scale motion */
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--fade-ms) var(--ease-portal),
    visibility 0s linear var(--fade-ms);
  z-index: 1;
}

.slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity var(--fade-ms) var(--ease-portal),
    visibility 0s linear 0s;
  z-index: 2;
}

.slide.is-leaving {
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  z-index: 3;
  transition:
    opacity var(--fade-ms) var(--ease-portal),
    visibility 0s linear var(--fade-ms);
}

.slide--hero {
  padding: 1.5rem;
}

/* Lives above slides so it can dock instead of fading away with the hero */
.portal-brand {
  position: absolute;
  z-index: 20;
  top: 50%;
  left: 50%;
  width: min(420px, 78vw);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  filter: blur(6px);
  animation: brand-emerge 1.5s var(--ease-out) 0.45s forwards;
  transition:
    top 1.4s var(--ease-out),
    left 1.4s var(--ease-out),
    width 1.4s var(--ease-out),
    transform 1.4s var(--ease-out);
}

.portal-brand.is-docked {
  top: var(--brand-dock-top);
  left: 50%;
  width: var(--brand-dock-width);
  transform: translate(-50%, 0);
  opacity: 1;
  filter: none;
}

.portal-brand__logo {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 16px 40px rgba(27, 67, 50, 0.18));
  transition: filter 1.4s var(--ease-out);
}

.portal-brand.is-docked .portal-brand__logo {
  filter: drop-shadow(0 6px 18px rgba(27, 67, 50, 0.14));
}

@keyframes brand-emerge {
  from {
    opacity: 0;
    filter: blur(6px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

.slide--member {
  /* Top padding matches docked logo so the video never sits underneath;
     bottom clears the scroll cue */
  padding: var(--brand-dock-clearance) clamp(1rem, 4vw, 2rem) 4.75rem;
}

.member-card-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 2.5vh, 1.5rem);
  width: var(--member-max);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.member-card-link:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 6px;
  border-radius: 0.75rem;
}

.member-media-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-media);
  overflow: hidden;
  background: var(--green-dark);
  box-shadow: var(--shadow);
  position: relative;
}

.member-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.member-media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
}

.member-video-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-color: var(--green-dark);
  background-size: cover;
  background-position: center;
}

.member-video-frame .yt-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}

.member-video-frame.is-playing .yt-embed {
  opacity: 1;
}

.member-video-frame__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: var(--green-dark);
  background-size: cover;
  background-position: center;
  transition: opacity 0.45s var(--ease-out);
  pointer-events: none;
}

.member-video-frame.is-playing .member-video-frame__veil {
  opacity: 0;
}

.member-poster {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--white);
}

.member-brand {
  display: block;
  width: min(480px, 88vw);
  max-height: 9.5rem;
  line-height: 0;
  background: transparent;
}

.member-brand__logo {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 9.5rem;
  height: auto;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
  background: transparent;
}

@media (max-height: 720px) {
  .member-brand,
  .member-brand__logo {
    max-height: 8rem;
  }
}

/* Kill leftover white mats / halos on light page */
.member-brand--matte .member-brand__logo {
  mix-blend-mode: multiply;
}

/* Knock out solid black mats behind logos like Conway */
.member-brand--darkmat .member-brand__logo {
  mix-blend-mode: screen;
}

.member-brand.is-fallback {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--green-dark);
  text-align: center;
  line-height: 1.3;
  width: auto;
}

.member-brand.is-fallback::after {
  content: attr(data-name);
}

.members-error {
  padding: 2rem;
  text-align: center;
  color: var(--green-dark);
  font-weight: 600;
}

/* Destination directory — all partners, logos only */
.directory {
  position: relative;
  z-index: 5;
  padding: clamp(2.75rem, 7vw, 4.5rem) clamp(1.25rem, 5vw, 2.5rem) clamp(1.5rem, 4vw, 2.5rem);
}

.directory-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

.directory-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--green-dark);
}

.directory-lede {
  margin: 0.75rem auto 0;
  max-width: 32rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--green);
}

.directory-grid {
  list-style: none;
  margin: clamp(2rem, 5vw, 2.75rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
  gap: clamp(1.35rem, 3.25vw, 2.15rem) clamp(1.1rem, 2.75vw, 1.9rem);
  align-items: center;
  justify-items: center;
}

.directory-item {
  width: 100%;
  max-width: 230px;
}

.directory-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 6.75rem;
  padding: 0.55rem;
  color: inherit;
  text-decoration: none;
  transition: transform 0.35s var(--ease-out), opacity 0.35s var(--ease-out);
}

.directory-link:hover,
.directory-link:focus-visible {
  transform: translateY(-3px);
  opacity: 0.88;
}

.directory-link:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 6px;
  border-radius: 0.5rem;
}

.directory-brand {
  width: 100%;
  max-width: 210px;
  max-height: 6.25rem;
}

.directory-logo {
  max-height: 6.25rem;
}

@media (max-width: 640px) {
  .directory-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.35rem 1rem;
  }

  .directory-brand,
  .directory-logo {
    max-height: 5.25rem;
  }

  .directory-link {
    min-height: 6rem;
  }

  .directory-lede {
    font-size: 0.9375rem;
  }
}

/* Scroll cue — sits under the hero collage, easy to tap on phones */
.scroll-cue {
  position: absolute;
  z-index: 25;
  left: 50%;
  bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 11.5rem;
  padding: 0.65rem 1.1rem 0.55rem;
  color: var(--green-dark);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  animation: scroll-cue-in 0.7s var(--ease-out) 1.6s forwards;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.scroll-cue.is-hidden {
  opacity: 0 !important;
  pointer-events: none;
  transform: translateX(-50%) translateY(0.4rem);
}

.scroll-cue__label {
  white-space: nowrap;
}

.scroll-cue__arrow {
  display: block;
  color: var(--green);
  animation: scroll-cue-bounce 1.6s var(--ease-out) infinite;
}

.scroll-cue:hover,
.scroll-cue:focus-visible {
  color: var(--green);
}

.scroll-cue:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
  border-radius: 0.5rem;
}

@keyframes scroll-cue-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes scroll-cue-bounce {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(5px); }
}

@media (max-width: 640px) {
  .scroll-cue {
    min-width: min(16rem, 88vw);
    padding: 0.8rem 1.15rem 0.7rem;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  }

  .scroll-cue__arrow {
    width: 26px;
    height: 26px;
  }

  .slide--member {
    padding-bottom: 5.5rem;
  }
}

/* Tap Pass — below the fold; only visible on scroll */
.site-footer {
  position: relative;
  z-index: 5;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 5vw, 2.5rem);
  background: transparent;
  color: var(--blue);
}

.footer-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.15rem;
}

.footer-logo {
  width: min(120px, 28vw);
  height: auto;
}

.footer-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.footer-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

.footer-text {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--blue);
  max-width: 36rem;
}

.footer-credit {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--blue);
}

.footer-credit a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-credit a:hover {
  color: var(--green-dark);
}

@media (max-width: 640px) {
  .footer-text {
    font-size: 0.9375rem;
  }

  .footer-credit {
    font-size: 0.8125rem;
  }
}

.file-protocol-warning {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  padding: 0.85rem 1.25rem;
  background: #b42318;
  color: #fff;
  font-size: 0.875rem;
  text-align: center;
  line-height: 1.5;
}

.file-protocol-warning code {
  background: rgba(0, 0, 0, 0.2);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .dream-overlay,
  .portal-brand,
  .slide,
  .slide.is-active,
  .slide.is-leaving,
  .scroll-cue,
  .scroll-cue__arrow {
    animation: none !important;
    transition: none !important;
    filter: none !important;
  }

  .portal-brand {
    top: var(--brand-dock-top);
    left: 50%;
    width: var(--brand-dock-width);
    transform: translate(-50%, 0);
    opacity: 1;
  }

  .scroll-cue {
    opacity: 1;
  }

  .slide {
    opacity: 0;
  }

  .slide.is-active {
    opacity: 1;
  }

  :root {
    --fade-ms: 1ms;
  }
}
