/* nAlyze Business Profile flipbook styles */
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/poppins-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/poppins-medium.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/poppins-semibold.woff2") format("woff2");
}

:root {
  --navy: #0B203A;
  --navy-2: #13325a;
  --amber: #B76108;
  --gold: #FDCD3D;
  --white: #ffffff;
  --bar-h: 64px;
  --room: calc(100dvh - var(--bar-h) - 36px); /* height available for the book */
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: radial-gradient(120% 90% at 50% 0%, var(--navy-2) 0%, var(--navy) 60%);
  color: var(--white);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* Book area keeps the A4 shape: one page on phones, two-page spreads on wider screens. */
.stage {
  position: relative;
  margin-top: 12px;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
body.single .stage { width: min(92vw, calc(var(--room) * 595 / 842)); aspect-ratio: 595 / 842; }
body.spread .stage { width: min(94vw, calc(var(--room) * 1190 / 842)); aspect-ratio: 1190 / 842; }
/* A closed book sits centred: shift it when only the front or back cover is showing. */
body.spread .stage.at-front { transform: translateX(-25%); }
body.spread .stage.at-back  { transform: translateX(25%); }

.book { width: 100%; height: 100%; }
/* The flip library sets the book's min-width from its settings; keep it inside the stage. */
.stage .book { min-width: 0 !important; max-width: 100% !important; }
.book .page { background: #fff; overflow: hidden; }
.page-inner { position: relative; width: 100%; height: 100%; }
.page-inner img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  user-select: none; -webkit-user-drag: none; pointer-events: none;
}
/* Clickable areas, matching the links in the PDF. */
.hot { position: absolute; display: block; border-radius: 4px; transition: background .2s; z-index: 2; }
.hot:hover { background: rgba(253, 205, 61, .25); }

.hint {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  background: rgba(11, 32, 58, .9); color: var(--white);
  font-size: 13px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(253, 205, 61, .5);
  white-space: nowrap; pointer-events: none; z-index: 5;
  transition: opacity .6s;
}
body.spread .stage.at-front .hint { left: 75%; }
.hint.hide { opacity: 0; }

/* "Open the profile" invitation shown on the closed cover */
.cue {
  position: absolute; top: 64%; left: 50%; z-index: 6;
  transform: translate(-50%, 0);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px 11px 14px; border-radius: 999px;
  background: var(--gold); color: var(--navy);
  border: 0; cursor: pointer;
  font: 600 15px/1 "Poppins", system-ui, sans-serif; letter-spacing: .2px; white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 0 0 0 rgba(253, 205, 61, .55);
  animation: cue-bob 2.4s ease-in-out infinite, cue-glow 2.4s ease-out infinite;
  transition: opacity .35s;
}
body.spread .cue { left: 75%; }
.cue[hidden] { display: none; }
.cue svg { width: 22px; height: 22px; flex: none; animation: cue-swipe 2.4s ease-in-out infinite; }
.cue:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@keyframes cue-bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -6px); } }
@keyframes cue-glow { 0% { box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 0 0 rgba(253,205,61,.55); } 70%, 100% { box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 0 16px rgba(253,205,61,0); } }
@keyframes cue-swipe { 0%, 30% { transform: translateX(6px) rotate(0); } 55% { transform: translateX(-6px) rotate(-12deg); } 80%, 100% { transform: translateX(6px) rotate(0); } }
#next.pulse { animation: next-pulse 1.6s ease-out infinite; border-color: var(--gold); color: var(--gold); }
@keyframes next-pulse { 0% { box-shadow: 0 0 0 0 rgba(253,205,61,.6); } 80%, 100% { box-shadow: 0 0 0 12px rgba(253,205,61,0); } }
@media (prefers-reduced-motion: reduce) {
  .cue, .cue svg, #next.pulse { animation: none; }
}

.bar { height: var(--bar-h); display: flex; align-items: center; gap: 8px; padding: 0 8px; }
.bar button, .bar a {
  appearance: none; border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06); color: var(--white);
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-grid; place-items: center; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
  text-decoration: none;
}
.bar button:hover, .bar a:hover { background: var(--amber); border-color: var(--amber); }
.bar button:focus-visible, .bar a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.bar button:disabled { opacity: .35; cursor: default; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); }
.bar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bar .count { min-width: 76px; text-align: center; font-size: 14px; font-weight: 500; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.bar .sep { width: 1px; height: 24px; background: rgba(255, 255, 255, .18); margin: 0 4px; }
#sound.on { color: var(--gold); border-color: rgba(253, 205, 61, .6); }
#sound .off-icon { display: none; }
#sound:not(.on) .on-icon { display: none; }
#sound:not(.on) .off-icon { display: block; }

@media (max-width: 420px) {
  .bar { gap: 5px; }
  .bar button, .bar a { width: 38px; height: 38px; }
  .bar .count { min-width: 56px; font-size: 13px; }
}
