/* ================================================================
   GRID HERO — style.css
   Do not edit unless you want to change the visual design.
   All content/behaviour settings are in config.js.
   ================================================================ */

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

html, body {
  width: 100%;
  height: 100%;
  background: #000;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  overflow: hidden;
  touch-action: none;
}

/* ── Hero wrapper ──────────────────────────────────────────── */
.hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh; /* dynamic viewport height — safe area on mobile */
  background: #000;
  overflow: hidden;
}

/* ── Grid container ────────────────────────────────────────── */
/*
  Centered in hero. Width/height and grid-template-* are set
  by JS so cells are always perfectly square. The grid is
  intentionally oversized to bleed past the shorter viewport
  edge — no partial cells ever visible.
*/
#grid {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  /* gap, grid-template-columns/rows → set by grid.js */
}

/* ── Cell (the fixed square container) ─────────────────────── */
/*
  .cell  never changes size or shape — it is the fixed grid slot.
  .inner scales inside it and can grow past the cell boundary,
  creating the lens / pop-out effect. The scale origin is
  pre-computed per-cell in grid.js so edge cells always expand
  inward and nothing escapes the hero frame.
*/
.cell {
  position: relative;
  aspect-ratio: 1 / 1;
  z-index: 0;
}

/* ── Inner (the scaling image/video wrapper) ────────────────── */
.inner {
  width: 100%;
  height: 100%;
  border-radius: 2px;
  overflow: hidden;
  opacity: 0.2;                        /* base state — grid.js animates to 1.0 on hover */
  will-change: transform, opacity;     /* both properties animated by grid.js */
}

.inner img,
.inner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}

/* Dark placeholder for empty cells */
.inner .ph {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Hero overlay text ──────────────────────────────────────── */


/* ── iOS gyroscope permission button ────────────────────────── */
/*
  Injected by grid.js only on touch devices.
  Tapping it fires the iOS DeviceOrientation permission dialog.
  Disappears automatically once permission is granted.
*/
#gyro-btn {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: none; /* grid.js sets display:block on touch devices */
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  padding: 10px 28px;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.25s ease, color 0.25s ease;
}

#gyro-btn:hover {
  background: #fff;
  color: #000;
}
