/* ============================================================
   GUINTE — shared styles
   Black paper, white ink. Everything floats in the dark.
   ============================================================ */

:root {
  --ink:        #060608;   /* the black of the paper            */
  --ink-soft:   #0c0c10;   /* a hair lighter, for panels        */
  --line:       #f3f2ee;   /* the white ink                     */
  --line-dim:   rgba(243,242,238,0.55);
  --line-faint: rgba(243,242,238,0.14);
  --glow:       rgba(243,242,238,0.85);
}

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

html, body {
  height: 100%;
  background: var(--ink);
  color: var(--line);
  font-family: "Jost", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* A faint, intentional starfield so the black areas around the
   art never look empty on wide screens. Very subtle on purpose. */
.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 28% 71%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 44% 14%, rgba(255,255,255,0.4),  transparent),
    radial-gradient(1px 1px at 67% 83%, rgba(255,255,255,0.3),  transparent),
    radial-gradient(1px 1px at 82% 38%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1px 1px at 91% 64%, rgba(255,255,255,0.3),  transparent),
    radial-gradient(1px 1px at  6% 52%, rgba(255,255,255,0.3),  transparent),
    radial-gradient(1px 1px at 55% 47%, rgba(255,255,255,0.25), transparent);
  opacity: 0.6;
}

/* ============================================================
   LANDING PAGE
   ============================================================ */

.stage {
  position: relative;
  z-index: 1;
  height: 100svh;
  display: grid;
  place-items: center;
  padding: 0;
}

/* Frame hugs the image so the Enter button can sit relative to the
   ARTWORK's edge (inside the glow) rather than the window corner. */
.hero-frame {
  position: relative;
  display: inline-block;
  line-height: 0;
  max-height: 100svh;
}

/* The artwork: shown whole, never cropped. Because the page is the
   same black as the paper, the empty sides simply disappear. */
.hero {
  max-width: 100%;
  max-height: 100svh;
  width: auto;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 0;
  animation: rise 1.8s cubic-bezier(.16,1,.3,1) 0.15s forwards;
}

@keyframes rise {
  from { opacity: 0; transform: scale(1.015); filter: brightness(0.7); }
  to   { opacity: 1; transform: scale(1);     filter: brightness(1);   }
}

/* The single Enter button — sits in the bright glow, top-right.
   Glass + hairline + a slow sheen so it reads shiny and stays
   legible over both the lit area and the dark. */
.enter {
  position: absolute;
  top: clamp(1.1rem, 10%, 7rem);
  right: clamp(1.1rem, 5%, 3rem);
  z-index: 3;

  display: inline-flex;
  align-items: center;
  gap: 0.7em;

  padding: 0.85em 1.9em;
  font-family: "Jost", sans-serif;
  font-weight: 300;
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  text-indent: 0.42em;            /* balances the tracking */
  line-height: 1;
  color: var(--line);

  background: rgba(8,8,10,0.28);
  border: 1px solid rgba(243,242,238,0.7);
  border-radius: 0;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);

  box-shadow:
    0 0 0 1px rgba(0,0,0,0.25),
    0 0 22px rgba(243,242,238,0.18),
    inset 0 0 14px rgba(243,242,238,0.06);

  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  animation: fade-in 1.2s ease 1.1s forwards;
  transition: box-shadow .5s ease, border-color .5s ease,
              letter-spacing .5s ease, background .5s ease;
}

/* moving sheen */
.enter::before {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(
    100deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-18deg);
  animation: sheen 4.5s ease-in-out infinite;
}

.enter .arrow {
  display: inline-block;
  transform: translateX(0);
  transition: transform .5s cubic-bezier(.16,1,.3,1);
  opacity: 0.85;
}

.enter:hover {
  border-color: #fff;
  letter-spacing: 0.5em;
  background: rgba(8,8,10,0.15);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.25),
    0 0 40px rgba(243,242,238,0.4),
    inset 0 0 18px rgba(243,242,238,0.12);
}
.enter:hover .arrow { transform: translateX(4px); }
.enter:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

@keyframes sheen {
  0%   { left: -60%; }
  55%  { left: 130%; }
  100% { left: 130%; }
}
@keyframes fade-in { to { opacity: 1; } }

/* ============================================================
   GALLERY PAGE
   ============================================================ */

.gallery-wrap {
  position: relative;
  z-index: 1;
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1.2rem, 4vw, 3.5rem) 6rem;
}

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line-faint);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.wordmark {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(2.2rem, 6vw, 4rem);
  letter-spacing: 0.14em;
  line-height: 1;
}

.masthead .back {
  font-weight: 300;
  font-size: 0.85rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--line-dim);
  transition: color .4s ease;
}
.masthead .back:hover { color: var(--line); }

/* Masonry-feeling grid that keeps each piece's true proportions. */
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.55rem, 1.3vw, 1rem);
}

.tile {
  position: relative;
  display: block;
  margin: 0;
  cursor: zoom-in;
  background: var(--ink-soft);
  border: 1px solid var(--line-faint);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  animation: tile-in .8s cubic-bezier(.16,1,.3,1) forwards;
  /* width & height are set automatically by the layout script */
}

.tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;   /* tile is sized to the image's true shape, so nothing is cropped */
  transition: transform .9s cubic-bezier(.16,1,.3,1), filter .6s ease;
}
.tile:hover img { transform: scale(1.04); filter: brightness(1.08); }

.tile .cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.4rem 1rem 0.9rem;
  background: linear-gradient(to top, rgba(0,0,0,0.78), transparent);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .45s ease, transform .45s ease;
}
.tile:hover .cap { opacity: 1; transform: translateY(0); }
.tile .cap .meta {
  color: var(--line-dim);
  font-style: italic;
  font-family: "Cormorant Garamond", serif;
  font-size: 0.95rem;
}

@keyframes tile-in {
  to { opacity: 1; transform: translateY(0); }
}

.empty-note {
  color: var(--line-dim);
  font-style: italic;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  padding: 3rem 0;
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 4vmin;
  background: rgba(3,3,5,0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: zoom-out;
}
.lightbox.open { display: grid; animation: fade-in .35s ease; }
.lightbox img {
  max-width: 100%;
  max-height: 84vh;
  box-shadow: 0 0 60px rgba(243,242,238,0.12);
}
.lightbox .lb-cap {
  position: absolute;
  bottom: 3.5vmin;
  left: 0; right: 0;
  text-align: center;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: var(--line-dim);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}
.lightbox .lb-close {
  position: absolute;
  top: 3vmin; right: 3.5vmin;
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--line);
  opacity: 0.7;
  line-height: 1;
}

@media (max-width: 520px) {
  .enter { letter-spacing: 0.3em; padding: 0.75em 1.5em; }
  
}
