/* myimages.pw — single stylesheet. Tiles, modal, page shells. */
:root {
  --bg: #000;
  --fg: #e8e8e8;
  --muted: #9a9a9a;
  --gap: 1px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 "Amatic SC", Arial, Helvetica, sans-serif;
}
a { color: inherit; }
img { display: block; }

/* ---------- page shell ---------- */
/* full-bleed canvas: no max-width, no side padding (grids run edge to edge) */
.page { max-width: none; margin: 0; padding: 24px 0 64px; }
h1, h2 { font-weight: 400; letter-spacing: .04em; }
h2.section { margin: 200px 0 24px; color: var(--muted); text-transform: uppercase; font-size: 48px; text-align: center; }
h2.section span { display: block; font-size: 32px; }
.homeH1 { font-family: "Amatic SC", Arial, Helvetica, sans-serif; font-weight: 700; text-align: center; text-transform: uppercase; font-size: 3.2em; margin: 48px 0 0; color: var(--fg); }
.homeH2 { font-family: "Amatic SC", Arial, Helvetica, sans-serif; font-weight: 700; text-align: center; text-transform: uppercase; font-size: 2.4em; margin: 8px 0 16px; color: var(--fg); }
h1.gallery { font-size: 48px; text-align: center; margin-top: 30px;}
h2.gallery { font-size: 32px; text-align: center; margin-bottom: 20px;}
.section-link { display: block; text-align: center; margin: 80px 0 40px 0; }
.section-link a { color: var(--muted); font-size: 28px; text-decoration: none; border: 1px solid #333; padding: 10px 22px; border-radius: 2px; }
.section-link a:hover { color: var(--fg); border-color: var(--muted); }

/* ---------- hero landing (home only) ----------
   Full-bleed image behind the fixed header, 75vh on desktop / 50vh on phones.
   A black gradient (pure #000) covers the bottom 35% of the hero; the intro
   text sits on it and the faves grid follows immediately underneath. */
.hero {
  position: relative;
  height: 75vh;
  min-height: 300px;
  background: #000 center center / cover no-repeat;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 50%;
  background: linear-gradient(to top, #000 15%, transparent 100%);
  pointer-events: none;
}
.heroText {
  position: relative; z-index: 2;
  width: 100%;
  padding: 0 20px 26px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,.85), 0 2px 22px rgba(0,0,0,.75);
}
.hero .homeH1 { margin: 0; }
.hero .homeH2 { margin: 2px 0 0; }

/* no hero on this page load (empty pool): keep the plain page shell */
.page.homePage { padding-top: 0; }

@media (max-width: 767px) {
  .hero { height: 50vh; }
  .hero .homeH1 { font-size: 2.3em; }
  .hero .homeH2 { font-size: 1.5em; }
  .heroText { padding-bottom: 18px; }
}

/* header rides over the hero until the hero is scrolled past */
body.hasHero #siteHead:not(.scrolled) { background: transparent; }

/* ---------- tiles / masonry ---------- */
/* Masonry packing (gallery.js). Widths are percentages so the grid is fluid;
   .gutter-sizer carries the 1px gap. Exact halves/thirds/quarters via calc so
   the gutters always add up to the container width. */
.mgrid { position: relative; width: 100%; }
.mgrid .grid-sizer,
.mgrid .grid-item { width: calc((100% - var(--gap)) / 2); }   /* phones: 2 up */
.mgrid .gutter-sizer { width: var(--gap); }

@media (min-width: 800px) {
  .mgrid .grid-sizer,
  .mgrid .grid-item { width: calc((100% - 2 * var(--gap)) / 3); }
  .mgrid .grid-item.width-2 { width: calc(2 * ((100% - 2 * var(--gap)) / 3) + var(--gap)); }
}
@media (min-width: 1100px) {
  .mgrid .grid-sizer,
  .mgrid .grid-item { width: calc((100% - 3 * var(--gap)) / 4); }
  .mgrid .grid-item.width-2 { width: calc(2 * ((100% - 3 * var(--gap)) / 4) + var(--gap)); }
}

.grid-item { display: block; margin: 0 0 var(--gap); background: #000; overflow: hidden; }
.grid-item img { display: block; width: 100%; height: auto; transition: opacity .2s; }
.grid-item:hover img { opacity: .85; }

/* ---------- lightbox ---------- */
.lbox {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.92);
  cursor: pointer;
}
.lbox.open { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.limg { flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; overflow: hidden; }
.limg img { max-width: 96vw; max-height: 86vh; box-shadow: 0 0 60px rgba(0,0,0,.8); }
.lcap {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;              /* large screens */
  color: var(--muted);
  text-align: center;
  padding: 10px 20px 18px;
  max-width: 80vw;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lclose {
  position: fixed; top: 10px; right: 16px; z-index: 1001;
  background: none; border: 0; color: var(--muted);
  font-size: 30px; cursor: pointer; line-height: 1;
}
.lclose:hover { color: var(--fg); }
.lnav {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 1001;
  background: none; border: 0; color: var(--muted);
  font-size: 44px; cursor: pointer; padding: 30px 18px;
}
.lnav:hover { color: var(--fg); }
.lprev { left: 6px; }
.lnext { right: 6px; }
@media (max-width: 500px) {
  .lnav { font-size: 34px; padding: 40px 8px; }
  .lcap { font-size: 14px; }   /* one step up on phones */
}

/* ---------- header ---------- */
#siteHead {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; padding: 10px 20px; background: rgba(0,0,0,.85);
}
#siteHead.scrolled, #siteHead.intHead {
  position: fixed; top: 0; background: rgba(0,0,0,.85);
}
#logo {
  width: 48px; height: 48px; display: block;
  background: url(../images/pw-logo.png) no-repeat; background-size: contain;
}
#siteHead nav a {
  font-family: "Amatic SC", Arial, Helvetica, sans-serif;
  font-weight: 700; font-size: 2em; text-transform: uppercase;
  color: #fff; text-decoration: none; text-shadow: 2px 2px 0 #000;
  margin-left: .8em;
}
#siteHead nav a:hover { color: var(--muted); }
.page { padding-top: 68px; }
body.hasHero .page.homePage { padding-top: 0; }

/* ---------- footer (index + gallery) ---------- */
#pFoot { position: relative; z-index: 15; background: #000; }
#pFoot .footC {
  display: block; text-align: center; color: var(--muted);
  font-size: 1.25em; letter-spacing: .04em; padding: 0 16px 40px;
}