* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  font-family: Georgia, "Times New Roman", serif;
  background: #000 !important;
  background-image: none !important;
  background-repeat: no-repeat !important;
  color: #e8ffe2;
}

html { overflow: hidden; }
body { overflow: hidden; }

.hidden { display: none !important; }

/* -------------------------------------------------
   OPENING FADE
------------------------------------------------- */
#blackOverlay {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 1;
  z-index: 500;
  transition: opacity 4s ease;
  pointer-events: none;
}
#blackOverlay.fade-out { opacity: 0; }

/* -------------------------------------------------
   MAIN HOMEPAGE
------------------------------------------------- */
.page {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000 !important;
  background-image: none !important;
  background-repeat: no-repeat !important;
}
.homepage-image-container {
  position: relative;
  display: block;
  height: min(100vh, calc(100vw * 1120 / 1405));
  height: min(100dvh, calc(100vw * 1120 / 1405));
  width: auto;
  max-width: 100vw;
  aspect-ratio: 1405 / 1120;
  margin: 0 auto;
  flex: 0 0 auto;
  overflow: hidden;
  background: #000;
  isolation: isolate;
}
.homepage-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
  object-position: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
.page > .homepage-image:not(.homepage-image-container .homepage-image),
.page > img:not(.homepage-image-container img) {
  display: none !important;
}

/* -------------------------------------------------
   INVISIBLE CLICKABLE BUTTONS OVER THE IMAGE
------------------------------------------------- */
.image-hotspot {
  position: absolute;
  top: 88.1%;
  height: 5.15%;
  margin: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  z-index: 20;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease, transform 0.2s ease;
}
.about-hotspot { left: 14.7%; width: 11.3%; }
.trial-hotspot { left: 27%; width: 13.4%; }
.subscribe-hotspot { left: 41.45%; width: 13.4%; }
.manage-hotspot { left: 55.75%; width: 13.8%; }
.wayfinder-hotspot { left: 70.5%; width: 13.7%; }

.image-hotspot:hover {
  background: rgba(255, 213, 101, 0.12);
  border-color: rgba(255, 224, 140, 0.75);
  box-shadow: 0 0 12px rgba(255, 216, 112, 0.55),
    inset 0 0 10px rgba(255, 220, 125, 0.12);
  transform: translateY(-1px);
}
.image-hotspot:active { transform: translateY(1px); }
.image-hotspot:focus-visible {
  outline: 3px solid #fff4c7;
  outline-offset: 3px;
  background: rgba(255, 213, 101, 0.15);
}

/* -------------------------------------------------
   FOOTER LINKS OVER THE IMAGE
------------------------------------------------- */
.footer-hotspot {
  position: absolute;
  top: 95.8%;
  height: 2.1%;
  z-index: 20;
  border-radius: 6px;
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.terms-hotspot { left: 36.55%; width: 4.25%; }
.privacy-hotspot { left: 41.75%; width: 4.7%; }
.disclaimer-hotspot { left: 48.3%; width: 6.4%; }
.support-hotspot { left: 56.3%; width: 5.25%; }
.footer-hotspot:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 235, 184, 0.55);
}
.footer-hotspot:focus-visible {
  outline: 2px solid #fff4c7;
  outline-offset: 2px;
}
.screen-reader-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* -------------------------------------------------
   ABOUT SCREEN
------------------------------------------------- */
.about-screen {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  overflow-y: auto;
  background: linear-gradient(rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.76)),
    url("/static/wayfinder-homepage.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-color: #000;
}
.about-panel {
  position: relative;
  width: min(900px, 94vw);
  max-height: 86vh;
  overflow-y: auto;
  padding: 30px;
  background: rgba(0, 21, 13, 0.93);
  color: #f5f1df;
  border: 1px solid rgba(232, 190, 88, 0.7);
  border-radius: 22px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.9),
    inset 0 0 24px rgba(16, 75, 50, 0.24);
  line-height: 1.6;
  font-size: 1.07rem;
}
.about-panel h1 {
  margin: 0 70px 8px;
  color: #f2c76f;
  text-align: center;
  font-size: clamp(2rem, 5vw, 3.4rem);
}
.about-panel h2 {
  margin: 0 40px 28px;
  color: #f5e6ba;
  text-align: center;
  font-size: clamp(1.15rem, 3vw, 1.65rem);
  font-weight: normal;
}
.about-panel p { margin: 0 0 1rem; }
.close-about {
  position: sticky;
  top: 0;
  float: right;
  z-index: 5;
  padding: 10px 18px;
  border: 1px solid rgba(242, 199, 111, 0.8);
  border-radius: 999px;
  background: rgba(3, 55, 35, 0.96);
  color: #fff3cf;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.close-about:hover {
  background: rgba(12, 88, 57, 0.98);
  transform: translateY(-1px);
}
.close-about:focus-visible {
  outline: 3px solid #fff4c7;
  outline-offset: 2px;
}

/* -------------------------------------------------
   WAYFINDER ACCESS CHOICE
------------------------------------------------- */
.access-choice-screen {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
}
.access-choice-panel {
  width: min(520px, 92vw);
  padding: 30px;
  text-align: center;
  background: rgba(0, 21, 13, 0.97);
  color: #f5f1df;
  border: 1px solid rgba(232, 190, 88, 0.75);
  border-radius: 22px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.9),
    inset 0 0 24px rgba(16, 75, 50, 0.22);
}
.access-choice-panel h2 {
  margin: 0 0 16px;
  color: #f2c76f;
  font-size: 2rem;
}
.access-choice-panel p {
  margin: 0 0 26px;
  line-height: 1.5;
  font-size: 1.05rem;
}
.access-choice-buttons {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.access-choice-button {
  min-width: 170px;
  padding: 12px 22px;
  border: 1px solid rgba(242, 199, 111, 0.85);
  border-radius: 999px;
  background: rgba(3, 55, 35, 0.96);
  color: #fff3cf;
  font-family: inherit;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
}
.access-choice-button:hover {
  background: rgba(12, 88, 57, 0.98);
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(255, 216, 112, 0.35);
}
.access-choice-button:active { transform: translateY(1px); }
.access-choice-button:focus-visible {
  outline: 3px solid #fff4c7;
  outline-offset: 3px;
}

/* -------------------------------------------------
   LEGAL PAGES
------------------------------------------------- */
.legal-page {
  min-height: 100vh;
  width: 100%;
  overflow-y: auto;
  padding: 34px 18px;
  background: linear-gradient(rgba(0, 0, 0, 0.79), rgba(0, 0, 0, 0.79)),
    url("/static/wayfinder-homepage.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  background-color: #000;
  color: #f5f1df;
}
.legal-panel {
  width: min(980px, 94vw);
  margin: 0 auto;
  padding: 30px;
  background: rgba(0, 21, 13, 0.94);
  border: 1px solid rgba(232, 190, 88, 0.62);
  border-radius: 22px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.9),
    inset 0 0 24px rgba(16, 75, 50, 0.2);
  line-height: 1.65;
}
.legal-panel h1 {
  margin-top: 0;
  color: #f2c76f;
  text-align: center;
  font-size: clamp(2rem, 5vw, 3.3rem);
}
.legal-panel h2 {
  margin-top: 1.7rem;
  color: #f2c76f;
}
.legal-panel p,
.legal-panel li { font-size: 1.02rem; }
.legal-panel ul { padding-left: 1.4rem; }
.legal-nav {
  margin-bottom: 22px;
  text-align: center;
}
.legal-nav a {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid rgba(242, 199, 111, 0.75);
  border-radius: 999px;
  background: rgba(3, 55, 35, 0.9);
  color: #fff3cf;
  text-decoration: none;
  font-weight: bold;
}
.legal-nav a:hover { background: rgba(12, 88, 57, 0.98); }
.legal-effective {
  margin-bottom: 2rem;
  text-align: center;
  opacity: 0.82;
}
.legal-footer-note {
  margin-top: 2.2rem;
  text-align: center;
  opacity: 0.75;
  font-size: 0.92rem;
}

/* -------------------------------------------------
   SMALLER SCREENS
------------------------------------------------- */
@media (max-width: 760px) {
  html, body { overflow: auto; }

  .page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    align-items: flex-start;
  }

  .homepage-image-container {
    width: 100vw;
    height: auto;
    max-width: 100vw;
    aspect-ratio: 1405 / 1120;
    margin: 0;
  }

  .image-hotspot {
    top: 87.8%;
    height: 5.8%;
  }

  .footer-hotspot {
    top: 95.5%;
    height: 2.5%;
  }

  .about-screen {
    padding: 14px;
    align-items: flex-start;
  }

  .about-panel {
    width: 96vw;
    max-height: none;
    margin: 12px 0;
    padding: 22px;
    font-size: 1rem;
  }

  .about-panel h1 { margin: 42px 0 8px; }
  .about-panel h2 { margin: 0 0 24px; }

  .close-about {
    position: absolute;
    top: 14px;
    right: 14px;
  }

  .legal-page { padding: 22px 12px; }

  .legal-panel {
    width: 96vw;
    padding: 22px;
  }

  .access-choice-panel {
    width: 94vw;
    padding: 24px 18px;
  }

  .access-choice-button {
    width: 100%;
  }
}

/* -------------------------------------------------
   REDUCED MOTION ACCESSIBILITY
------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  #blackOverlay,
  .image-hotspot,
  .footer-hotspot,
  .close-about,
  .access-choice-button {
    transition: none;
  }
}
