:root {
  --ink: #313131;
  --ink-soft: #5b6b78;
  --parchment: #fffef2;
  --parchment-dark: #f3f1e0;
  --navy: #17486b;
  --navy-deep: #0f3250;
  --navy-ink: #ffffff;
  --blue: #2c82ff;
  --blue-soft: #0693e3;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #0f3250;
  color: var(--ink);
  font-family: 'Quicksand', Arial, sans-serif;
  height: 100%;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 15%, var(--navy) 0%, var(--navy-deep) 75%);
}

header.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
  color: var(--navy-ink);
  z-index: 20;
  pointer-events: none;
}

header.site-head img.bhh-logo {
  height: 34px;
  width: 34px;
  border-radius: 8px;
  background: #fff;
  padding: 3px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

header.site-head .head-text .title {
  font-size: 17px;
  font-weight: 700;
}

header.site-head .head-text .sub {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-soft);
  opacity: 0.95;
}

#book-wrap {
  position: relative;
}

#book {
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 10px 30px rgba(0,0,0,0.35);
  border-radius: 4px;
}

.page {
  background: var(--parchment);
  overflow: hidden;
  position: relative;
}

.page .page-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 7% 7% 10%;
}

.page.cover {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--navy-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page.cover .cover-inner {
  text-align: center;
  padding: 6% 8%;
  max-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page.cover .cover-logo {
  width: clamp(40px, 10vw, 56px);
  height: clamp(40px, 10vw, 56px);
  border-radius: 12px;
  background: #fff;
  padding: 6px;
  margin: 0 auto clamp(8px, 2vw, 12px);
  display: block;
  box-shadow: 0 8px 22px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.page.cover .eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: clamp(9px, 1.6vw, 11px);
  font-weight: 700;
  color: var(--blue-soft);
  margin-bottom: clamp(6px, 1.5vw, 10px);
}

.page.cover h1 {
  font-size: clamp(18px, 4vw, 34px);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 clamp(6px, 1.5vw, 10px);
}

.page.cover .rule {
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: var(--blue);
  margin: clamp(8px, 1.5vw, 12px) auto;
  flex-shrink: 0;
}

.page.cover .cover-sub {
  font-size: clamp(11px, 2vw, 14px);
  font-weight: 500;
  color: var(--navy-ink);
  opacity: 0.9;
}

.page.cover .cover-cause {
  margin-top: clamp(10px, 2.5vw, 18px);
  font-size: clamp(9px, 1.6vw, 11px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-soft);
  opacity: 0.95;
}

.page.cover .cover-charity-name {
  margin-top: 4px;
  font-size: clamp(12px, 2.2vw, 15px);
  font-weight: 700;
  color: var(--navy-ink);
}

.page.back {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--navy-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.page.back .back-inner { padding: 10%; }
.page.back img.back-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #fff;
  padding: 6px;
  margin: 0 auto 18px;
  display: block;
}
.page.back h2 {
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 700;
  margin-bottom: 12px;
}
.page.back p {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
  max-width: 320px;
  margin: 0 auto 6px;
}
.page.back a.donate-link {
  display: inline-block;
  margin-top: 14px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 10px 20px;
  border-radius: 24px;
}

.photo-frame {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  cursor: zoom-in;
}

.photo-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 10px 24px rgba(0,0,0,0.2);
  background: #11212e;
  border-radius: 2px;
}

.enlarge-hint {
  position: absolute;
  bottom: 10%;
  right: 8%;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-soft);
  opacity: 0.75;
  pointer-events: none;
}

.caption {
  margin-top: 4%;
  text-align: center;
}

.caption .date {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.caption .num {
  font-weight: 700;
  font-size: 12px;
  color: var(--blue-soft);
  margin-top: 2px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  color: var(--navy-ink);
}

.controls button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.35);
  color: var(--navy-ink);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.controls button:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--blue);
}

.controls .hint {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-soft);
  opacity: 0.85;
}

.map-toggle {
  position: fixed;
  top: 16px;
  right: 28px;
  pointer-events: auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy-ink);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 8px 14px;
  border-radius: 20px;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Lightbox */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 22, 34, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
#lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
#lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  border-radius: 2px;
}
#lightbox .lightbox-caption {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.85;
}
#lightbox .lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
#lightbox .lightbox-close:hover {
  background: rgba(255,255,255,0.18);
  border-color: var(--blue);
}

@media (max-width: 640px) {
  header.site-head { padding: 12px 16px; }
  header.site-head img.bhh-logo { height: 28px; width: 28px; }
  header.site-head .head-text .title { font-size: 14px; }
}
