/* ============================================================
   HyperNext corporate brochure — view-only page-turn reader
   Landscape single-page flipbook. Matches the site brand system.
   ============================================================ */

/* StPageFlip base (self-hosted, inlined so there is no extra request) */
.stf__parent { position: relative; display: block; box-sizing: border-box; transform: translateZ(0); -ms-touch-action: pan-y; touch-action: pan-y; }
.stf__wrapper { position: relative; width: 100%; box-sizing: border-box; }
.stf__parent canvas { position: absolute; width: 100%; height: 100%; left: 0; top: 0; }
.stf__block { position: absolute; width: 100%; height: 100%; box-sizing: border-box; perspective: 2000px; }
.stf__item { display: none; position: absolute; transform-style: preserve-3d; }
.stf__outerShadow, .stf__innerShadow, .stf__hardShadow, .stf__hardInnerShadow { position: absolute; left: 0; top: 0; }

/* Neutralise the forced min-width the library sets when we push it into
   single-page (portrait) mode. We keep the setting high so it always shows
   one landscape page, but we never want that value bleeding into layout. */
.stf__wrapper, .sft__wrapper { min-width: 0 !important; min-height: 0 !important; max-width: none !important; }

/* ---------- Reader shell ---------- */
.brochure-page { background:
    radial-gradient(1200px 600px at 50% -10%, rgba(1,233,10,0.05), transparent 60%),
    var(--midnight-darker);
  min-height: 100vh; }

.reader-hero { padding: 128px 0 8px; text-align: center; }
.reader-hero .eyebrow { color: var(--lazer-green); font-family: 'Silka Mono','IBM Plex Mono',monospace; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 18px; }
.reader-hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
.reader-hero .reader-lead { color: var(--iceberg-blue); max-width: 640px; margin: 16px auto 0; font-size: 1.02rem; line-height: 1.6; }

/* ---------- Stage ---------- */
.reader-wrap { padding: 26px 0 8px; }
.reader-stage {
  position: relative;
  width: min(1160px, 94vw);
  margin: 0 auto;
  /* frame */
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01));
  border: 1px solid rgba(183,192,210,0.10);
  box-shadow: 0 40px 120px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* the flip mount — width drives everything, aspect locks the landscape page */
#flipbook {
  width: 100%;
  aspect-ratio: 2200 / 1569;
  margin: 0 auto;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: pointer;
}
#flipbook:active { cursor: grabbing; }
#flipbook canvas { border-radius: 4px; }

/* loading + fallback states */
.reader-status {
  position: absolute; inset: 14px; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 14px; color: var(--iceberg-blue); text-align: center;
  font-family: 'Silka Mono','IBM Plex Mono',monospace; font-size: .82rem; letter-spacing: .06em;
}
.reader-status .prong { width: 46px; height: 46px; opacity: .9; animation: readerspin 1.4s linear infinite; }
.reader-status .prong svg { width: 100%; height: 100%; }
.reader-status .prong path { fill: none; stroke: var(--lazer-green); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
@keyframes readerspin { to { transform: rotate(360deg); } }
.reader-status.is-hidden { display: none; }

/* ---------- Controls ---------- */
.reader-controls {
  width: min(1160px, 94vw); margin: 20px auto 0;
  display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap;
}
.reader-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(183,192,210,0.18);
  color: var(--soft-white); border-radius: 30px; padding: 11px 20px;
  font-size: .9rem; font-weight: 600; transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.reader-btn svg { width: 15px; height: 15px; }
.reader-btn:hover:not(:disabled) { border-color: var(--lazer-green); background: rgba(1,233,10,0.06); transform: translateY(-1px); }
.reader-btn:disabled { opacity: .35; cursor: not-allowed; }
.reader-btn.is-primary { background: var(--lazer-green); color: var(--midnight-blue); border-color: var(--lazer-green); }
.reader-btn.is-primary:hover:not(:disabled) { opacity: .92; }

.reader-counter {
  font-family: 'Silka Mono','IBM Plex Mono',monospace; font-size: .82rem; letter-spacing: .1em;
  color: var(--iceberg-blue); min-width: 116px; text-align: center;
}
.reader-counter .cur { color: var(--soft-white); }

/* jump-to-page range */
.reader-scrub { width: min(1160px, 94vw); margin: 16px auto 0; display: flex; align-items: center; gap: 14px; }
.reader-scrub input[type="range"] { flex: 1; accent-color: var(--lazer-green); height: 3px; cursor: pointer; }
.reader-scrub .scrub-end { font-family: 'Silka Mono','IBM Plex Mono',monospace; font-size: .72rem; color: var(--stone-blue); letter-spacing: .08em; }

/* view-only note */
.reader-note {
  width: min(1160px, 94vw); margin: 22px auto 0; padding: 14px 18px;
  border-left: 2px solid var(--lazer-green); background: rgba(1,233,10,0.04);
  color: var(--iceberg-blue); font-size: .84rem; line-height: 1.55; border-radius: 0 8px 8px 0;
}
.reader-note strong { color: var(--soft-white); font-weight: 600; }
.reader-hint { text-align: center; color: var(--stone-blue); font-size: .78rem; letter-spacing: .04em; margin: 14px auto 0; }

/* ---------- Fullscreen ---------- */
.reader-stage:fullscreen,
.reader-stage:-webkit-full-screen {
  width: 100vw; height: 100vh; margin: 0; border-radius: 0; padding: 3vh 3vw;
  display: flex; align-items: center; justify-content: center; background: var(--midnight-darkest);
}
.reader-stage:fullscreen #flipbook,
.reader-stage:-webkit-full-screen #flipbook { width: min(96vw, calc((100vh - 6vh) * 1.4022)); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .reader-hero { padding: 104px 0 4px; }
  .reader-controls { gap: 10px; }
  .reader-btn { padding: 10px 15px; font-size: .82rem; }
  .reader-btn .btn-label { display: none; }
  .reader-btn.is-primary .btn-label { display: inline; }
  .reader-counter { order: -1; width: 100%; }
}

/* ---------- Download hardening ---------- */
#flipbook img, #flipbook canvas { -webkit-user-drag: none; user-drag: none; pointer-events: auto; }
@media print { body { display: none !important; } }

/* ------------------------------------------------------------------ *
 * Dependency-free single landscape page-turn (replaces StPageFlip).
 * ------------------------------------------------------------------ */
#flipbook { position: relative; overflow: hidden; background: #0b1120; }
.fb-static { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: fill; display: block; z-index: 1; }
.fb-leaf { position: absolute; inset: 0; display: none; z-index: 2;
  transform-origin: left center; transform-style: preserve-3d;
  transition: transform .8s cubic-bezier(.22,.61,.24,1); will-change: transform; }
.fb-face { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: fill; display: block;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.fb-back { transform: rotateY(180deg); }
.fb-leaf.is-flipping .fb-face { box-shadow: 0 18px 46px rgba(0,0,0,.5); }
#flipbook img { -webkit-user-drag: none; user-drag: none; }
