/* ============================================================
   PipsPrice, Hero PREVIEW: "Site Board" in blueprint blue
   Full-bleed background that rotates through the dashboard's Hero
   Mosaic (photos and videos, original colours), drawing-sheet frame,
   ruler, one-line headline,
   stats on the photo. Blueprint blue only behind the text.
   Scoped to .hero-bp / .page-bp only. Used by index-hero-blueprint.html
   with js/hero-slides.js.

   Contrast (WCAG 2.2 AA), worst case = a pure-white patch of photo:
   text zone (overlay 86%+ deep blue): white 9.1:1, body #DCE3EA 7.0:1
   "LAST." on open photo: crimson fill + white edge · outline button on the blue
   nav: site dark header, see-through at the top over a dark fade
   phones: centred; blue fades left to right like desktop (measured over every slide)
   ============================================================ */

.page-bp {
  --bp: #123E66;          /* blueprint blue */
  --bp-deep: #0C2E4E;
  --bp-label: #C9D3DD;
  --bp-body: #DCE3EA;
}

/* Nav: the site's own dark header, see-through while the hero is at the top.
   The hero's top fade (below) keeps the links readable over the photo. */
.page-bp .nav:not(.scrolled) { background: transparent; }
.page-bp .nav:not(.scrolled) .nav-link { color: #fff; }

.hero-bp {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bp-deep);
  color: #fff;
}

/* ── Background slideshow (js/hero-slides.js fills .bp-slides) ──
   The fallback photo sits underneath, so the hero is never blank while the
   first item loads (and it is what shows without JavaScript). */
.hero-bp .bp-slides {
  position: absolute;
  inset: 0;
  z-index: 0; /* own layer, so the slides' stacking stays under the tint, fades and grid */
  background: url('/Assets/Imgs/Hero/hero-4.jpeg') center 40% / cover no-repeat var(--bp-deep);
}
.hero-bp .bp-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-position: center 40%;
  background-size: cover;
  background-repeat: no-repeat;
  /* Change effect only: the incoming picture fades in while settling from a slight
     zoom, then stays still for the rest of its time on screen */
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.2s ease, transform 1.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hero-bp .bp-slide.is-active { opacity: 1; transform: scale(1); z-index: 2; }
.hero-bp .bp-slide.is-prev { opacity: 1; transform: scale(1); z-index: 1; transition: none; }

/* Blue only behind the text on the left; the rest of the photo shows in full colour.
   86%+ under the description and overline, gone by 64% of the width. */
.hero-bp .bp-tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(12, 46, 78, 0.92) 0%,
    rgba(12, 46, 78, 0.86) 36%,
    rgba(12, 46, 78, 0.55) 46%,
    rgba(12, 46, 78, 0.2) 56%,
    rgba(12, 46, 78, 0) 64%);
}

/* Soft fade in the header's colour behind the see-through nav */
.hero-bp::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 180px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(13, 13, 13, 0.7) 0, rgba(13, 13, 13, 0.5) 72px, rgba(13, 13, 13, 0) 180px);
}

/* Drawing grid: fine 24px cells, major line every 5 */
.hero-bp .bp-grid {
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(255,255,255,0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.09) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  pointer-events: none;
}

/* Sheet border with crimson corner marks. It sits inside .bp-main, so it frames the
   text area and ends just above the stats row instead of running through it. */
.hero-bp .bp-sheet {
  position: absolute;
  inset: calc(var(--nav-height) + 18px) 24px 16px;
  z-index: -1; /* behind the text, within .bp-main */
  border: 1px solid rgba(255, 255, 255, 0.22);
  pointer-events: none;
}
.hero-bp .bp-sheet i { position: absolute; width: 14px; height: 14px; border: 0 solid var(--crimson-light); }
.hero-bp .bp-sheet i:nth-child(1) { top: -1px;    left: -1px;  border-top-width: 3px;    border-left-width: 3px; }
.hero-bp .bp-sheet i:nth-child(2) { top: -1px;    right: -1px; border-top-width: 3px;    border-right-width: 3px; }
.hero-bp .bp-sheet i:nth-child(3) { bottom: -1px; left: -1px;  border-bottom-width: 3px; border-left-width: 3px; }
.hero-bp .bp-sheet i:nth-child(4) { bottom: -1px; right: -1px; border-bottom-width: 3px; border-right-width: 3px; }

/* Ruler along the top edge of the sheet */
.hero-bp .bp-ticks {
  position: absolute;
  top: calc(var(--nav-height) + 18px);
  left: 24px;
  right: 24px;
  height: 10px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.35) 0 1px, transparent 1px 24px);
  opacity: 0.6;
  pointer-events: none;
}

/* ── Main block ─────────────────────────────────────────────── */
.hero-bp .bp-main {
  position: relative;
  z-index: 3; /* above the stats row, whose fade reaches up behind the buttons */
  flex: 1;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-height) + 70px) 0 48px;
}
.hero-bp .bp-main .container { width: 100%; padding-left: 72px; padding-right: 72px; }


.hero-bp .bp-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(5rem, 13vw, 13rem);
  line-height: 0.85;
  letter-spacing: 0.005em;
  text-shadow: 0 2px 28px rgba(12, 46, 78, 0.6);
}
/* "LAST." sits on the open photo: crimson fill with a white edge, so it reads on light and dark parts */
.hero-bp .bp-last {
  position: relative;
  display: inline-block;
  color: transparent;
  -webkit-text-stroke: 3px #fff;
  text-shadow: none; /* no blue glow around "LAST." */
}
.hero-bp .bp-last::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  color: var(--crimson-light);
  -webkit-text-stroke: 1px #fff;
  clip-path: inset(0 100% 0 0);
  animation: bpFill 1.1s 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@keyframes bpFill { to { clip-path: inset(0 0 0 0); } }

/* Hard hat resting on the top-left corner of the "B", tilted 30 degrees.
   Sized in em so it follows the headline at every screen size. */
.hero-bp .bp-b { position: relative; display: inline-block; }
.hero-bp .bp-helmet {
  position: absolute;
  left: -0.15em;   /* 40% bigger than before (it showed at 0.4em, the width of the "B"), */
  top: calc(-0.36em + 5px); /* brim rests on the top-left corner of the "B" (+5px lower) */
  width: 0.576em;  /* exactly 1.4x the 77px it showed at before */
  max-width: none; /* the site's img { max-width: 100% } would squeeze it to the letter's width */
  height: auto;
  transform: rotate(-30deg);
  transform-origin: 60% 80%;
  filter: drop-shadow(0 0.04em 0.06em rgba(13, 13, 13, 0.45));
  pointer-events: none;
  animation: bpHelmet 0.7s 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes bpHelmet {
  from { opacity: 0; transform: translateY(-0.5em) rotate(-60deg); }
  to   { opacity: 1; transform: rotate(-30deg); }
}

/* Description, then both buttons underneath it, all on the blue side */
.hero-bp .bp-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
  margin-top: 30px;
}
.hero-bp .bp-desc { color: var(--bp-body); font-size: 1.1rem; line-height: 1.7; max-width: 420px; }
.hero-bp .bp-actions { display: flex; gap: 14px; flex-wrap: wrap; }
/* Outline button: see-through, white edge and label */
.hero-bp .btn-outline { border-color: #fff; color: #fff; text-shadow: 0 1px 8px rgba(13, 13, 13, 0.6); }
.hero-bp .btn-outline:hover { background: rgba(255, 255, 255, 0.1); }
.hero-bp a:focus-visible,
.hero-bp button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px rgba(13, 13, 13, 0.8); }

/* ── Stats row: straight on the photo, over a soft fade in the header's colour ── */
.hero-bp .bp-band { position: relative; z-index: 2; border-top: 1px solid rgba(255, 255, 255, 0.22); }
.hero-bp .bp-band::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(100% + 110px);
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(13, 13, 13, 0) 0, rgba(13, 13, 13, 0.62) 110px, rgba(13, 13, 13, 0.72) 100%);
}
.hero-bp .bp-band .container { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; }
.hero-bp .bp-band .stat-item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 26px 28px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}
.hero-bp .bp-band .stat-item:first-child { border-left: 0; padding-left: 0; }
.hero-bp .bp-band .stat-num { font-family: var(--font-display); font-size: 3rem; line-height: 1; color: #fff; }
.hero-bp .bp-band .stat-label {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.3;
  color: #E6E1DC;
}

/* ── Pause / play for the background slideshow (WCAG 2.2.2) ── */
.hero-bp .bp-pause {
  position: absolute;
  top: calc(var(--nav-height) + 34px);   /* just inside the drawing-sheet frame's top-right corner */
  right: 40px;
  z-index: 5;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(13,13,13,0.55);
  color: #fff;
  transition: background 0.2s ease;
}
.hero-bp .bp-pause:hover { background: rgba(13,13,13,0.8); }

/* ── Load-in ────────────────────────────────────────────────── */
.hero-bp .bp-rise { animation: bpRise 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) both; }
@keyframes bpRise { from { opacity: 0; transform: translateY(24px); } }

@media (prefers-reduced-motion: reduce) {
  .hero-bp .bp-rise { animation: none; }
  .hero-bp .bp-last::after { animation: none; clip-path: none; }
  .hero-bp .bp-helmet { animation: none; }
  .hero-bp .bp-slide { transition: none; transform: none; }
}

/* ── Tablets and phones: text starts under the nav (no empty band), everything
   centred, and the blue works like on desktop: strongest on the left, fading
   towards the right so more of the photo shows (stats included) ── */
@media (max-width: 960px) {
  /* Fill the screen on first open, as on desktop: svh is the height visible with the
     browser bars showing, so nothing is cut off and the hero doesn't jump as they hide */
  .hero-bp { min-height: 100vh; min-height: 100svh; }
  .hero-bp .bp-tint {
    background: linear-gradient(90deg,
      rgba(12, 46, 78, 0.9) 0%,
      rgba(12, 46, 78, 0.84) 45%,
      rgba(12, 46, 78, 0.62) 80%,
      rgba(12, 46, 78, 0.5) 100%);
  }
  .hero-bp .bp-main { align-items: center; padding-top: calc(var(--nav-height) + 48px); padding-bottom: 36px; }
  .hero-bp .bp-main .container { padding-left: 28px; padding-right: 28px; text-align: center; }
  .hero-bp .bp-row { align-items: center; }
  .hero-bp .bp-desc { margin: 0 auto; }
  .hero-bp .bp-actions { justify-content: center; }

  /* Stats: one compact centred row of four, on the same blue as the rest of the hero */
  .hero-bp .bp-band::before { display: none; }
  .hero-bp .bp-band .container { padding-left: 14px; padding-right: 14px; }
  .hero-bp .bp-band .stat-item { flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 16px 10px; }
  .hero-bp .bp-band .stat-item:first-child { padding-left: 10px; }
  .hero-bp .bp-band .stat-num { font-size: 2.2rem; }
  .hero-bp .bp-band .stat-label { color: #fff; } /* the right-hand stats sit on the lightest part of the blue */
}

@media (max-width: 560px) {
  .hero-bp .bp-ticks { left: 10px; right: 10px; }
  .hero-bp .bp-sheet { inset: calc(var(--nav-height) + 10px) 10px 12px; }

  .hero-bp .bp-main { padding-top: calc(var(--nav-height) + 44px); padding-bottom: 32px; }
  .hero-bp .bp-main .container { padding-left: 22px; padding-right: 22px; }

  /* Headline on two big lines: BUILT TO / LAST. (the hard hat grows with it) */
  .hero-bp .bp-title { font-size: clamp(3.6rem, 21vw, 6rem); line-height: 0.9; }
  .hero-bp .bp-last { display: table; margin: 0 auto; }

  .hero-bp .bp-row { gap: 20px; margin-top: 18px; }
  .hero-bp .bp-desc { font-size: 1rem; line-height: 1.6; }

  /* Buttons side by side */
  .hero-bp .bp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
  .hero-bp .bp-actions .btn { justify-content: center; padding: 14px 10px; letter-spacing: 0.1em; }

  .hero-bp .bp-band .container { padding-left: 6px; padding-right: 6px; }
  .hero-bp .bp-band .stat-item { padding: 14px 6px; gap: 4px; }
  .hero-bp .bp-band .stat-item:first-child { padding-left: 6px; }
  .hero-bp .bp-band .stat-num { font-size: 1.7rem; }
  .hero-bp .bp-band .stat-label { font-size: 0.66rem; letter-spacing: 0.08em; }
}
