/* ============================================================
   40-construction-banner.css — hi-vis "work in progress" banner

   For pages or sections that aren't quite finished yet, drop in:

   <div class="construction-banner">
     <span class="cb-cone" aria-hidden="true">🚧</span>
     <div class="cb-body">
       <strong>This page is still in framing.</strong>
       <p>Nathan's on the tools — we'll have it finished soon.</p>
     </div>
   </div>

   Variants by adding a modifier class:
   - .construction-banner--photos  →  photo gallery coming
   - .construction-banner--soon    →  page not started yet
   - .construction-banner--tools   →  feature on the workbench
   - .construction-banner--small   →  thin strip variant, less padding

   The banner is wrapped in animated yellow + black hazard tape
   (repeating-linear-gradient that scrolls). Looks like a
   real worksite sign. Dark text on hi-vis yellow body for
   contrast. Hover lift, optional shake on first paint.
   ============================================================ */

.construction-banner {
  position: relative;
  margin: var(--s-5) 0;
  padding: var(--s-4) var(--s-4) var(--s-4) 80px;
  background: linear-gradient(135deg, var(--c-yellow) 0%, var(--c-yellow-dark) 100%);
  color: var(--c-ink);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 4px 12px color-mix(in srgb, var(--c-yellow-dark) 35%, transparent),
    0 2px 4px rgba(0, 0, 0, 0.08),
    inset 0 0 0 2px rgba(0, 0, 0, 0.08);
  font-family: var(--f-display);
}

/* ---- Hazard tape stripe on the top edge ---- */
.construction-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 14px;
  background: repeating-linear-gradient(
    -45deg,
    #1a1a1a 0 14px,
    #ffd54f 14px 28px
  );
  background-size: 40px 40px;
  animation: cb-tape-scroll 4s linear infinite;
}

/* ---- Hazard tape stripe on the bottom edge ---- */
.construction-banner::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 14px;
  background: repeating-linear-gradient(
    45deg,
    #1a1a1a 0 14px,
    #ffd54f 14px 28px
  );
  background-size: 40px 40px;
  animation: cb-tape-scroll-reverse 4s linear infinite;
}

@keyframes cb-tape-scroll {
  from { background-position: 0 0; }
  to   { background-position: 40px 0; }
}
@keyframes cb-tape-scroll-reverse {
  from { background-position: 0 0; }
  to   { background-position: -40px 0; }
}

/* ---- The 🚧 cone (or whatever icon variant) ---- */
.construction-banner .cb-cone {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.6rem;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
  /* Wiggle once on entry, then stay still */
  animation: cb-cone-wiggle 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) 0.2s 1;
}

@keyframes cb-cone-wiggle {
  0%, 100% { transform: translateY(-50%) rotate(0); }
  20%      { transform: translateY(-50%) rotate(-8deg); }
  40%      { transform: translateY(-50%) rotate(6deg); }
  60%      { transform: translateY(-50%) rotate(-4deg); }
  80%      { transform: translateY(-50%) rotate(2deg); }
}

/* ---- Body text ---- */
.construction-banner .cb-body {
  z-index: 1;
}
.construction-banner .cb-body strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.construction-banner .cb-body p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--c-ink);
}

/* ---- Hover lift (desktop only) ---- */
@media (hover: hover) {
  .construction-banner {
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.3s ease;
  }
  .construction-banner:hover {
    transform: translateY(-2px);
    box-shadow:
      0 10px 24px rgba(255, 179, 0, 0.35),
      0 4px 8px rgba(0, 0, 0, 0.1),
      inset 0 0 0 2px rgba(0, 0, 0, 0.08);
  }
}

/* ---- Small variant: thinner strip for header placement ---- */
.construction-banner--small {
  padding: 18px 24px 18px 72px;
}
.construction-banner--small::before,
.construction-banner--small::after {
  height: 10px;
}
.construction-banner--small .cb-cone {
  font-size: 1.8rem;
  left: 20px;
}
.construction-banner--small .cb-body strong { font-size: 1rem; }
.construction-banner--small .cb-body p      { font-size: 0.85rem; }

/* ---- Mobile ---- */
@media (max-width: 600px) {
  .construction-banner {
    padding: 24px 20px 24px 76px;
  }
  .construction-banner .cb-cone {
    left: 18px;
    font-size: 2.2rem;
  }
  .construction-banner .cb-body strong { font-size: 1.05rem; }
  .construction-banner .cb-body p      { font-size: 0.88rem; }
}

/* ---- Accessibility: respect reduce-motion ---- */
@media (prefers-reduced-motion: reduce) {
  .construction-banner::before,
  .construction-banner::after,
  .construction-banner .cb-cone {
    animation: none;
  }
}
