/* ============ Bingo Destinations Portfolio ============ */

:root {
  --navy-950: #060f18;
  --navy-900: #0a1a27;
  --navy-800: #0f2534;
  --navy-700: #16374a;
  --gold: #c9a35b;
  --gold-soft: #d8bd85;
  --cream: #f4efe4;
  --text-dim: rgba(244, 239, 228, 0.65);
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--navy-950);
  color: var(--cream);
  font-family: var(--sans);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

/* ---------------- Home ---------------- */

.home {
  height: 100vh;
  height: 100svh; /* actual visible viewport on iPad Safari, no address-bar surprises */
  overflow: hidden;
  padding: 1.6vh 2.2vw;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(22, 55, 74, 0.55), transparent 55%),
    radial-gradient(ellipse at 85% 100%, rgba(22, 55, 74, 0.4), transparent 55%),
    var(--navy-950);
}

.home-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1vh;
}

.logo {
  display: flex;
  align-items: center;
}
.logo-img {
  height: clamp(30px, 5vh, 48px);
  width: auto;
  display: block;
}

.header-badges {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.hero-copy {
  flex: 0 0 auto;
  text-align: center;
  margin: 0.5vh auto 1.4vh;
  max-width: 900px;
}
.eyebrow {
  letter-spacing: 0.3em;
  font-size: clamp(0.6rem, 1.4vh, 0.72rem);
  color: var(--gold-soft);
  margin: 0 0 0.4vh;
  text-transform: uppercase;
}
.hero-copy h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 5vh, 3.2rem);
  margin: 0;
  line-height: 1.05;
  color: #fff;
}
.rule {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 0.8vh auto;
}
.subnav {
  letter-spacing: 0.28em;
  font-size: clamp(0.62rem, 1.3vh, 0.75rem);
  color: var(--text-dim);
  margin: 0;
  text-transform: uppercase;
}

.grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 1.4vh 1.2vw;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
}

.card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: none;
  padding: 0;
  cursor: pointer;
  background: var(--navy-800);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  color: inherit;
  font: inherit;
  text-align: left;
}
.card:hover, .card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.5);
}
.card:active { transform: translateY(-2px) scale(0.98); }

.card-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}
.card:hover .card-photo { transform: scale(1.06); }

.card-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,15,24,0) 40%, rgba(6,15,24,0.92) 100%);
}

.card-body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.9rem 1rem 1rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
}
.card-name {
  display: block;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: #fff;
  line-height: 1.15;
}
.card-tag {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 0.25rem;
}
.card-arrow {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.card--soon { cursor: default; }
.card--soon:hover { transform: none; box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.card--soon .card-photo { filter: grayscale(0.5) brightness(0.55); }
.card--soon .card-arrow { opacity: 0.35; border-color: var(--text-dim); color: var(--text-dim); }
.card--soon .soon-badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  background: rgba(6,15,24,0.75);
  border: 1px solid var(--gold);
  color: var(--gold-soft);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
}

.home-footer {
  flex: 0 0 auto;
  margin-top: 1vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  text-align: center;
  font-size: clamp(0.58rem, 1.1vh, 0.72rem);
  letter-spacing: 0.22em;
  color: var(--text-dim);
  text-transform: uppercase;
  line-height: 1.5;
}
.rule-short {
  width: 60px;
  height: 1px;
  background: rgba(244,239,228,0.3);
  display: inline-block;
}

/* The 3x3 grid is the point — it stays 3 columns at every width the site is
   actually shown at (iPad landscape and up). Only the header badges and
   card text scale down on narrower screens so nothing overlaps. */
@media (max-width: 900px) {
  .header-badges { gap: 1rem; font-size: 0.62rem; }
  .card-name { font-size: 1.05rem; }
  .card-tag { font-size: 0.6rem; }
}
@media (max-width: 640px) {
  .header-badges span:nth-child(n+3) { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(5, 1fr); }
}

/* ---------------- Brochure stage ---------------- */

.brochure-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: var(--navy-950);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: 0 0;
  will-change: transform;
  overflow: hidden;
}
.brochure-stage[hidden] { display: none; }

.flipbook { position: relative; }
.flipbook img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 20;
  height: 46px;
  min-width: 46px;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(244,239,228,0.4);
  background: rgba(6,15,24,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.close-btn:hover { background: rgba(6,15,24,0.85); }
.close-btn .close-icon { font-size: 1.1rem; line-height: 1; }

.page-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  background: rgba(6,15,24,0.55);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  pointer-events: none;
}

.edge-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12%;
  z-index: 15;
  cursor: pointer;
  background: transparent;
}
.edge-zone--prev { left: 0; }
.edge-zone--next { right: 0; }

/* ---------------- Screensaver (phase 2) ---------------- */

.screensaver {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 2000;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.screensaver.is-visible { opacity: 1; }
.screensaver[hidden] { display: none; }

.screensaver-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screensaver-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(244,239,228,0.85);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: rgba(6,15,24,0.45);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  pointer-events: none;
  animation: hint-pulse 2.4s ease-in-out infinite;
}
@keyframes hint-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
