* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root{--yhTileScale:1;--yhTop8Size:clamp(40px,6vw,70px);}


body {
  font-family: Arial, Helvetica, sans-serif;
  background: #fff;
  overflow-x: hidden;
}

/* TOP AREA should scroll away (NOT pinned) */
.nav{
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10000;
  font-size: 16px;
  line-height: 1.2;
  background: transparent;
  border: none;
  padding: 0;
}

.top8{
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  grid-template-columns: repeat(4, var(--yhTop8Size));
  gap: 6px;
  z-index: 10000;
}

.top8 img{
  width: var(--yhTop8Size);
  height: var(--yhTop8Size);
  object-fit: cover;
  display: block;
}

.mobile-menu-toggle,
.mobile-menu{
  display: none;
}

.mobile-menu-toggle{
  font: inherit;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #000;
  background: #fff;
  color: #000;
  padding: 0 12px;
  line-height: 1;
  align-items: center;
  justify-content: center;
  text-transform: lowercase;
}

/* HERO (logo banner) */
.hero{
  position: relative !important;
  z-index: 9999;
  text-align: center;
  pointer-events: none;
  margin: 0;
  padding: 0;
  height: 220px; /* controls how much space exists above the cover */
}

.site-logo{
  pointer-events: auto;
  width: min(720px, 90vw); /* match cover width */
  height: auto;
  display: block;

  /* absolute so it doesn't push the cover down */
  position: absolute;
  left: 48.2%;
  transform: translateX(-50%);
  top: 0px;  /* move logo up/down */
  z-index: 10000;
}

/* CANVAS */
#canvas{
  position: relative;
  overflow: visible;
  height: auto;
  min-height: 1200px;
}

/* HOMEPAGE WALLPAPER (background-only) */
body.yh-home #canvas{
  min-height: 7335px;
  background-image: url('assets/wallpaper/nyc-subway-map.png');
  background-repeat: repeat-y;
  background-position: center top;
  background-size: 120% auto;
}

.yh-homeMapBottomTarget{
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: min(180px, 22vw);
  min-width: 96px;
  transform: translateX(-50%);
  z-index: 12;
  display: block;
  user-select: none;
  text-decoration: none;
  outline: none;
}
.yh-homeMapBottomTarget__icon{
  display: block;
  width: 100%;
  height: auto;
  filter: brightness(0) invert(1) drop-shadow(0 1px 3px rgba(0,0,0,0.28));
  opacity: 0.82;
  transition: opacity .2s ease, transform .2s ease, filter .2s ease;
}
.yh-homeMapBottomTarget:hover .yh-homeMapBottomTarget__icon,
.yh-homeMapBottomTarget:focus-visible .yh-homeMapBottomTarget__icon{
  opacity: 1;
  transform: translateY(-2px);
  filter: brightness(0) invert(1) drop-shadow(0 4px 10px rgba(0,0,0,0.34));
}
.yh-homeMapBottomTarget:focus-visible{
  border-radius: 10px;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.85);
}

@media (max-width: 760px){
  .yh-homeMapBottomTarget{
    bottom: 20px;
    width: min(152px, 30vw);
  }
}
@media (max-width: 520px){
  .yh-homeMapBottomTarget{
    bottom: 14px;
    width: min(112px, 34vw);
  }
}


/* COVER */
.cover{
  width: min(600px, 85vw);
  margin: 0 auto 34px;       /* keeps it centered, not pushed down */
  border: 1px solid #ccc;
  background: #f6f6f6;
  position: relative;
  z-index: 2;
}

.cover img{
  width: 100%;
  height: auto;
  display: block;
}

/* FLOATING TILES */
.float{
  position: absolute;
  z-index: 10;
  display: block;
}

/* tile card grows slowly on hover */
.float.article{
  transition: transform 2s ease;
  transform: scale(1);
  transform-origin: center;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
  will-change: left, top, transform;
}

.float.article:hover{
  transform: scale(1.06);
}

.float.article.dragging{
  transition: none;
  transform: scale(1.035);
  box-shadow: 0 12px 28px rgba(0,0,0,0.22);
  opacity: 0.96;
  cursor: grabbing;
}

body.tile-drag-active{
  user-select: none;
}

/* “popup ad” feel + slow hover grow/shrink */
.article{
  width: calc(var(--w, 210) * 1.10 * var(--yhTileScale, 1) * 1px);
  display: flex;
  flex-direction: column;
  border: 1px solid #000;
  background: #fff;
  overflow: hidden;
}

.article[data-post-status="placeholder"]::after{
  content: "demo";
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 3px 6px;
  border: 1px solid #000;
  background: #fff;
  color: #000;
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.article img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

/* lock the “image zone” */
.article .thumb{
  height: calc(var(--h, 170) * 1.15 * var(--yhTileScale, 1) * 1px);
  overflow: hidden;
}

.article .thumb img,
.article .thumb video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  display: block;
}

/* lock the “text zone” so tile height never changes from wrapping */
.article .meta{
  height: calc(58px * var(--yhTileScale, 1));
  border-top: 1px solid #000;
  padding: calc(6px * var(--yhTileScale, 1)) calc(8px * var(--yhTileScale, 1));
  overflow: hidden;
}

.article .title{
  font-weight: 700;
  font-size: calc(13px * var(--yhTileScale, 1));
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article .sub{
  margin-top: 3px;
  font-size: calc(11px * var(--yhTileScale, 1));
  line-height: 1.1;
  height: 26px;
  overflow: hidden;
}

.article:hover{
  transform: scale(1.09);
}

/* TOOLTIP */
#tooltip{
  position: fixed;
  display: none;
  pointer-events: none;
  z-index: 1000000;
  background: #fff;
  border: 1px solid #000;
  padding: 4px 6px;
  font-size: 12px;
}

/* =========================
   VIDEO MODAL
   ========================= */
.modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 2000000;
}

.modal.is-open{
  display: block;
}

.modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px);
}

.modal-panel{
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(900px, 92vw);
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
  background: #000;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 25px 80px rgba(0,0,0,0.6);
}

.modal-panel iframe{
  width: 100%;
  height: 100%;
  display: block;
}

.modal-close{
  position: absolute;
  top: -14px;
  right: -14px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.85);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 40px;
}

.modal-close:hover{
  transform: scale(1.03);
}

.nav, .top8 { position: absolute !important; }
.hero { position: relative !important; }

@media (max-width: 760px){
  body{
    min-width: 0;
    overflow-x: hidden;
  }

  .nav,
  .top8{
    display: none !important;
  }

  .mobile-menu-toggle{
    display: inline-flex;
    position: absolute;
    top: calc(10px + env(safe-area-inset-top, 0px));
    right: calc(10px + env(safe-area-inset-right, 0px));
    z-index: 10030;
  }

  .mobile-menu-toggle[aria-expanded="true"]{
    background: #000;
    color: #fff;
  }

  .mobile-menu{
    position: absolute;
    top: calc(64px + env(safe-area-inset-top, 0px));
    left: calc(10px + env(safe-area-inset-left, 0px));
    right: calc(10px + env(safe-area-inset-right, 0px));
    z-index: 10025;
    display: block;
    padding: 12px;
    border: 1px solid #000;
    background: #fff;
    color: #000;
    box-shadow: 0 18px 40px rgba(0,0,0,0.2);
  }

  .mobile-menu[hidden]{
    display: none !important;
  }

  .mobile-menu__nav{
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .mobile-menu a{
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 8px 4px;
    color: #00f;
    line-height: 1.15;
  }

  .mobile-menu__heading{
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #000;
    font-size: 12px;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .mobile-menu__videoLinks{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 2px;
  }

  .hero{
    height: 150px;
    padding-top: env(safe-area-inset-top, 0px);
    pointer-events: auto;
  }

  .site-logo{
    width: min(250px, calc(100vw - 92px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
    left: calc(10px + env(safe-area-inset-left, 0px));
    top: calc(10px + env(safe-area-inset-top, 0px));
    transform: none;
  }

  .cover{
    width: min(600px, calc(100vw - 36px));
  }

  body.mobile-menu-open .float.article{
    pointer-events: none;
  }
}

/* ============================
   WORDS: Footer Cover Reveal
   (article pages only)
   ============================ */

.yh-article .yh-footerRevealZone{
  height: 140vh; /* gives room for the “extra scroll” reveal */
}

.yh-article .yh-footerCover{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;

  height: 82vh;               /* big “new page” feel */
  transform: translateY(100%); /* hidden until revealed */
  transition: transform 420ms ease;

  z-index: 99990;

  background: #000;
  color: #fff;
  border-top: 1px solid rgba(255,255,255,0.25);
}

.yh-article.yh-footer-open .yh-footerCover{
  transform: translateY(0);
}

/* background image layer */
.yh-article .yh-footerCover::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: var(--yh-footer-bg, none);
  background-size: cover;
  background-position: center;
  opacity: 0.85;
}

/* dark overlay for readability */
.yh-article .yh-footerCover::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0.2));
}

.yh-article .yh-footerInner{
  position: relative;
  z-index: 2;
  height: 100%;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding: 42px 18px 58px;
}

/* mimic the “magnifying glass + line” vibe, but email */
.yh-article .yh-mailBar{
  width: min(760px, calc(100vw - 32px));
  display:flex;
  align-items:center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.55);
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(6px);
}

.yh-article .yh-mailIcon{
  width: 18px;
  height: 18px;
  opacity: 0.9;
  flex: 0 0 auto;
}

.yh-article .yh-mailInput{
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 16px;
  padding: 6px 4px;
}

.yh-article .yh-mailInput::placeholder{
  color: rgba(255,255,255,0.75);
}

.yh-article .yh-mailBtn{
  border: 1px solid rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.10);
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  cursor:pointer;
  font-size: 13px;
  letter-spacing: .2px;
}

.yh-article .yh-mailBtn:hover{
  background: rgba(255,255,255,0.18);
}

/* small hint text */
.yh-article .yh-footerHint{
  position:absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 18px;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  z-index: 3;
}
