/* ===========================
   Base / Reset
   =========================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  margin: 0;
  background: #ffffff;
  color: #000000;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  display: grid;
  place-items: center;      /* centers <main> area on desktop */
  overflow: hidden;         /* contain background on desktop */
}

.nothing-you-could-do-regular {
  font-family: "Nothing You Could Do", cursive;
  font-weight: 400;
  font-style: normal;
}


/* ===========================
   Main content container
   =========================== */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}


/* ===========================
   Top-left header
   =========================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  padding: 5px;
  margin: 5px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.2;
}
.site-header .hdr-line { margin: 0; }

/* Keep your original “look” but make it responsive so it won’t collide */
.hdr-line-1 { font-weight: 600; font-size: clamp(2rem, 8vw, 5rem); }
.hdr-line-2 { font-weight: 400; font-size: clamp(1.25rem, 5.5vw, 3rem); max-width: 30rem; }
.hdr-line-3 { font-weight: 350; font-size: clamp(1rem, 4.5vw, 2rem); opacity: 0.9; max-width: 30rem; }
.hdr-line-4 { font-weight: 400; font-size: clamp(0.95rem, 3.8vw, 1.5rem); max-width: 30rem; }

/* Fade-in */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.site-header .hdr-line { opacity: 0; animation: fadeUp 600ms ease-out forwards; }
.hdr-line-1 { animation-delay: 120ms; }
.hdr-line-2 { animation-delay: 360ms; }
.hdr-line-3 { animation-delay: 600ms; }

@media (prefers-reduced-motion: reduce) {
  .site-header .hdr-line { animation: none; opacity: 1; transform: none; }
}

/* ===========================
   Center image — no box, no crop
   =========================== */
#mainImage[hidden] { display: none; }

#mainImage {
  position: fixed;
  top: 50%;
  left: 65%;
  transform: translate(-50%, -50%) scale(var(--img-scale, 1));
  transform-origin: 50% 50%;
  z-index: 1;
  background: transparent;
  border: none;
  display: block;

  max-width: 60vw;
  max-height: 60vh;
  width: auto;
  height: auto;
  object-fit: contain;

  transition: opacity 150ms ease-in-out, transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}

/* ===========================
   Canvas pulse background
   =========================== */
#bg-canvas{
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: #ffffff;
}

/* ===========================
   Bottom-left menu (desktop)
   =========================== */
.site-menu {
  position: fixed;
  bottom: 16px;
  left: 5px;
  z-index: 12;
  font-family: inherit;
  padding-left: 5px;
}
.menu-list {
  list-style: none;
  margin: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.menu-item { opacity: 0; animation: fadeUp 600ms ease-out forwards; }
.menu-item:nth-child(1) { animation-delay: 200ms; }
.menu-item:nth-child(2) { animation-delay: 340ms; }
.menu-item:nth-child(3) { animation-delay: 480ms; }
.menu-item:nth-child(4) { animation-delay: 620ms; }
.menu-item:nth-child(5) { animation-delay: 760ms; }

/* Fluid so it doesn’t crowd the header on mid sizes */
.menu-link {
  display: inline-block;
  text-decoration: none;
  color: inherit;
  font-size: clamp(1.1rem, 3.2vw, 3rem);
  font-weight: 200;
  opacity: 0.92;
  transform-origin: left center;
  transition: transform 180ms ease, font-weight 120ms ease, opacity 150ms ease;
}
.menu-link:hover,
.menu-link:focus-visible {
  transform: translateX(8px) scale(1.08);
  font-weight: 700;
  opacity: 1;
  outline: none;
}
.menu-link:focus-visible {
  box-shadow: 0 0 0 10px rgba(0,0,0,0.15);
  border-radius: 10px;
  padding-inline: 10px;
}

/* ===========================
   Mobile AND short-height layout
   - allow page scroll
   - sticky header
   - bottom bar menu
   - center/scale image below header
   =========================== */
@media (max-width: 950px), (max-height: 780px){
  html, body { height: auto; }
  body { overflow-y: auto !important; padding-bottom: 96px; }

  .site-header{
    position: sticky;
    top: 0;
    left: 0;
    padding: 12px 16px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.95), rgba(255,255,255,0));
    z-index: 12;
  }

  #mainImage{
    position: absolute !important;
    left: 50% !important;
    transform: translate(-50%, 0) scale(1) !important;
    max-width: min(88vw, 520px) !important;
    max-height: 48vh !important;
    opacity: 1;
    z-index: 1;
  }

  .site-menu {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 13 !important;
    background: rgba(255,255,255,0.92);
    backdrop-filter: saturate(140%) blur(6px);
    padding: 10px 12px calc(env(safe-area-inset-bottom, 0) + 10px);
    border-top: 1px solid rgba(0,0,0,0.08);
  }
  .menu-list{
    margin: 0; padding: 0;
    display: flex; flex-direction: row; flex-wrap: wrap;
    gap: 12px 16px; justify-content: center;
  }
  .menu-link{
    font-size: 1.05rem; font-weight: 500;
    padding: 8px 10px; border-radius: 12px;
    transform: none;
  }
  .menu-link:hover, .menu-link:focus-visible {
    transform: scale(1.02);
    box-shadow: 0 0 0 8px rgba(0,0,0,0.08);
    outline: none;
  }
}

/* Pause CSS animations (if you also use CSS pulses somewhere) when tab hidden */
.anim-paused .pulse,
.anim-paused .pulse-container * {
  animation-play-state: paused !important;
}
@media (prefers-reduced-motion: reduce) {
  .pulse, .pulse-container * { animation: none !important; }
}
/* Beacon Border: swap font on hover/focus */
.menu-link[href="#beacon-borders"]:hover,
.menu-link[href="#beacon-borders"]:focus-visible {
  font-family: "Nothing You Could Do", cursive;
  font-weight: 400; /* override the 700 weight on hover for this one item */
  font-style: normal;
  margin-top: -5px;
}


