/* Faithful recreation of the northstar.vc hero (the site Parallel Play built),
   embedded as a live showcase on the case-study page. Bridge SVG + animation
   ported verbatim from the production Northstar source (CSS/SVG, no WebGL). */

.ns-show {
  --ns-ink: #ffffff;
  --ns-paper: #1a1a1a;
  --ns-paper-dim: #5a5a5a;
  --ns-paper-soft: #8a8a8a;
  --ns-accent: #25aae1;
  --color-accent: #25aae1;
  --color-paper: #1a1a1a;
  position: relative;
  background: transparent;
  color: var(--ns-paper);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: visible;
}

.ns-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem);
}

.ns-eyebrow {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ns-paper-soft);
  margin: 0 0 1.4rem;
}

.ns-title {
  font-weight: 300;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ns-paper);
  text-wrap: balance;
}
.ns-title .ns-italic {
  font-family: "Instrument Serif", "Times New Roman", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--ns-accent);
}

.ns-body { margin: 1.8rem 0 0; max-width: 32rem; }
.ns-body p { margin: 0 0 1rem; font-size: clamp(14px, 1.1vw, 16px); line-height: 1.65; color: var(--ns-paper-dim); }

.ns-ctas { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.8rem; }
.ns-ctas a {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  padding: 0.75rem 1.2rem; transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.ns-ctas a .ns-arrow { width: 1.2rem; height: 1px; background: currentColor; display: inline-block; }
.ns-ctas .ns-primary { background: var(--ns-paper); border: 1px solid var(--ns-paper); color: var(--ns-ink); }
.ns-ctas .ns-primary:hover { background: var(--ns-accent); border-color: var(--ns-accent); }
.ns-ctas .ns-secondary { border: 1px solid var(--ns-paper-dim); color: var(--ns-paper); }
.ns-ctas .ns-secondary:hover { border-color: var(--ns-paper); background: #f5f7fa; }

/* ---- bridge stage ---- */
.ns-bridge { position: relative; width: 100%; aspect-ratio: 600 / 320; pointer-events: none; }
.ns-halo {
  position: absolute; inset: -2% -8% -6%; border-radius: 50%;
  background: radial-gradient(60% 45% at 50% 55%, rgba(37, 170, 225, 0.12), transparent 70%);
}
.ns-bridge svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ns-bridge .bridge-ghost { color: var(--ns-accent); opacity: 0.22; animation: bridgeSway 14s ease-in-out infinite; }
.ns-bridge .bridge-animate { color: var(--ns-paper); opacity: 0.9; animation: bridgeDrift 18s ease-in-out infinite; }
.ns-twinkle {
  position: absolute; left: 50%; top: 18%; width: 5px; height: 5px; border-radius: 50%;
  background: var(--ns-accent); animation: heroStarTwinkle 4s ease-in-out infinite;
}

@media (max-width: 760px) {
  .ns-grid { grid-template-columns: 1fr; }
  .ns-bridge { max-width: 460px; margin: 0 auto; order: -1; }
}

/* ====== bridge animation — ported verbatim from northstar.vc globals.css ====== */
@keyframes bridgeSway { 0%, 100% { transform: translate3d(0,0,0); opacity: 0.2; } 50% { transform: translate3d(0.6%, -0.4%, 0); opacity: 0.28; } }
@keyframes bridgeDrift { 0%, 100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(0, -0.3%, 0); } }
@keyframes heroStarTwinkle { 0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.6); } }

.bridge-animate .bridge-stroke { stroke-dasharray: 1; stroke-dashoffset: 1; animation: bridgeStroke 1.6s cubic-bezier(0.2, 0.7, 0.1, 1) forwards; }
.bridge-animate .bridge-stroke--hairline { animation-delay: 0s; animation-duration: 1.4s; }
.bridge-animate .bridge-stroke--deck { animation-delay: 0.1s; animation-duration: 1.2s; }
.bridge-animate .bridge-stroke--pier { animation-delay: 0.35s; animation-duration: 0.8s; }
.bridge-animate .bridge-stroke--tower { animation-delay: 0.55s; animation-duration: 1.1s; }
.bridge-animate .bridge-stroke--cable { animation-delay: 1.2s; animation-duration: 1.7s; }

.bridge-animate .bridge-suspenders > line { opacity: 0; animation: bridgeSuspender 0.9s ease-out forwards; }
.bridge-animate .bridge-suspenders > line:nth-child(1) { animation-delay: 2.20s; }
.bridge-animate .bridge-suspenders > line:nth-child(2) { animation-delay: 2.26s; }
.bridge-animate .bridge-suspenders > line:nth-child(3) { animation-delay: 2.32s; }
.bridge-animate .bridge-suspenders > line:nth-child(4) { animation-delay: 2.38s; }
.bridge-animate .bridge-suspenders > line:nth-child(5) { animation-delay: 2.44s; }
.bridge-animate .bridge-suspenders > line:nth-child(6) { animation-delay: 2.50s; }
.bridge-animate .bridge-suspenders > line:nth-child(7) { animation-delay: 2.56s; }
.bridge-animate .bridge-suspenders > line:nth-child(8) { animation-delay: 2.62s; }
.bridge-animate .bridge-suspenders > line:nth-child(9) { animation-delay: 2.68s; }
.bridge-animate .bridge-suspenders > line:nth-child(10) { animation-delay: 2.74s; }
.bridge-animate .bridge-suspenders > line:nth-child(11) { animation-delay: 2.80s; }
.bridge-animate .bridge-suspenders > line:nth-child(12) { animation-delay: 2.86s; }
.bridge-animate .bridge-suspenders > line:nth-child(13) { animation-delay: 2.92s; }
.bridge-animate .bridge-suspenders > line:nth-child(14) { animation-delay: 2.98s; }
.bridge-animate .bridge-suspenders > line:nth-child(15) { animation-delay: 3.04s; }
.bridge-animate .bridge-suspenders > line:nth-child(16) { animation-delay: 3.10s; }
.bridge-animate .bridge-suspenders > line:nth-child(17) { animation-delay: 3.16s; }
.bridge-animate .bridge-suspenders > line:nth-child(18) { animation-delay: 3.22s; }
.bridge-animate .bridge-suspenders > line:nth-child(19) { animation-delay: 3.28s; }
.bridge-animate .bridge-suspenders > line:nth-child(20) { animation-delay: 3.34s; }
.bridge-animate .bridge-suspenders > line:nth-child(21) { animation-delay: 3.40s; }

.bridge-animate .bridge-ripples > path { animation: bridgeRippleDrift 7s ease-in-out infinite; transform-origin: center; }
.bridge-animate .bridge-ripples > path:nth-child(2) { animation-delay: -2s; }
.bridge-animate .bridge-ripples > path:nth-child(3) { animation-delay: -4s; }

.bridge-animate .bridge-scan { offset-rotate: 0deg; opacity: 0; animation: bridgeScanRun 9s cubic-bezier(0.55, 0, 0.45, 1) infinite; animation-delay: 3.6s; color: var(--ns-accent); fill: var(--ns-accent); }
.bridge-animate .bridge-scan--halo { filter: blur(3px); opacity: 0; animation: bridgeScanHalo 9s cubic-bezier(0.55, 0, 0.45, 1) infinite; animation-delay: 3.6s; }

@keyframes bridgeStroke { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes bridgeSuspender { from { opacity: 0; transform: translateY(-2px); } to { opacity: 0.85; transform: translateY(0); } }
@keyframes bridgeRippleDrift { 0%, 100% { transform: translateX(-3px); opacity: 0.3; } 50% { transform: translateX(3px); opacity: 0.5; } }
@keyframes bridgeScanRun { 0% { offset-distance: 0%; opacity: 0; } 6% { opacity: 0.95; } 94% { opacity: 0.95; } 100% { offset-distance: 100%; opacity: 0; } }
@keyframes bridgeScanHalo { 0% { offset-distance: 0%; opacity: 0; } 6% { opacity: 0.5; } 94% { opacity: 0.5; } 100% { offset-distance: 100%; opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .ns-bridge .bridge-ghost, .ns-bridge .bridge-animate, .ns-twinkle,
  .bridge-animate .bridge-stroke, .bridge-animate .bridge-suspenders > line,
  .bridge-animate .bridge-ripples > path, .bridge-animate .bridge-scan {
    animation: none !important; stroke-dashoffset: 0 !important; opacity: 1 !important;
  }
  .bridge-animate .bridge-suspenders > line { opacity: 0.85 !important; }
  .bridge-animate .bridge-scan { opacity: 0 !important; }
}

/* showcase section wrapper on the case page */
.pshowcase { padding: 0 var(--pad) clamp(2.5rem, 7vh, 4.5rem); }
.pshowcase > .label { margin-bottom: 0.9rem; }
.pshowcase .ns-show { max-width: 68rem; }

/* ====== isolated element exhibits ====== */
.ns-exhibit { margin: 0 0 clamp(1.2rem, 3vh, 2rem); }

/* two-column FINAL ASSETS row — marks (wordmark + north-star) | bridge */
.ns-build-row { display: grid; grid-template-columns: 0.62fr 1fr; gap: clamp(1.2rem, 3vw, 2.4rem); align-items: center; margin: 0 0 clamp(1.2rem, 3vh, 2rem); max-width: 68rem; }
.ns-build-row .ns-exhibit { margin: 0; }
.ns-mark-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 1.4rem; padding: clamp(1rem, 3vw, 2rem) 0; min-height: 0; }
.ns-mark-stack .ns-wordmark { height: clamp(28px, 3.4vw, 40px); width: auto; }
.ns-compass-mini { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; }
.ns-compass-mini .ns-compass-glow { width: 90px; height: 90px; }
.ns-compass-mini .ns-compass { width: 40px; height: 40px; }
.ns-build-row .ns-bridge-col .ns-stage { padding: clamp(0.8rem, 2.5vw, 1.8rem); }
@media (max-width: 760px) {
  .ns-build-row { grid-template-columns: 1fr; gap: 1rem; }
  .ns-mark-stack { flex-direction: row; align-items: center; gap: 1.6rem; padding: 0.5rem 0; }
}
.ns-cap { margin: 0.9rem 0 0; font-family: var(--mono); color: var(--blue-dim); font-size: 0.72rem; letter-spacing: 0.03em; line-height: 1.55; max-width: 62rem; }
.ns-stage { display: flex; align-items: center; justify-content: center; padding: clamp(2rem, 5vw, 4rem); }
.ns-stage .ns-bridge { max-width: 620px; }

/* portfolio marquee */
.ns-marquee-wrap { position: relative; overflow: hidden; }
.ns-marquee-wrap::before, .ns-marquee-wrap::after { content: ""; position: absolute; top: 0; bottom: 0; width: 84px; z-index: 2; pointer-events: none; }
.ns-marquee-wrap::before { left: 0; background: linear-gradient(to right, #fff, transparent); }
.ns-marquee-wrap::after { right: 0; background: linear-gradient(to left, #fff, transparent); }
.ns-marquee { display: flex; width: max-content; animation: logoMarquee 64s linear infinite; }
.ns-card { width: 200px; aspect-ratio: 4 / 5; flex-shrink: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 0.8rem; padding: 1.3rem; border-right: 1px solid rgba(26,26,26,0.1); }
.ns-card .ns-sector { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ns-paper-soft); }
.ns-card .ns-logo { flex: 1; display: flex; align-items: center; justify-content: center; }
.ns-card .ns-logo img { max-height: 36px; max-width: 132px; width: auto; height: auto; }
.ns-card .ns-name { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; color: var(--ns-paper-dim); }
@keyframes logoMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* north-star compass */
.ns-compass-stage { position: relative; height: clamp(220px, 32vh, 300px); }
.ns-compass-glow { position: absolute; left: 50%; top: 50%; width: 280px; height: 280px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(37,170,225,0.2), transparent 62%); animation: heroStarGlow 6s ease-in-out infinite; }
.ns-compass { position: relative; width: 108px; height: 108px; color: var(--ns-paper); animation: heroStarSpin 26s linear infinite; }
@keyframes heroStarSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes heroStarGlow { 0%, 100% { opacity: 0.9; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } }

@media (max-width: 760px) { .ns-card { width: 160px; } }
@media (prefers-reduced-motion: reduce) { .ns-marquee, .ns-compass, .ns-compass-glow { animation: none !important; } }

/* ====== brand-kit panel ====== */
.ns-kit { display: block; }
.ns-kit-row { display: flex; flex-wrap: wrap; gap: 1rem 1.8rem; align-items: center; padding: 1.3rem clamp(1.4rem, 4vw, 2.6rem); border-top: 1px solid rgba(26,26,26,0.1); }
.ns-kit-row:first-child { border-top: 0; justify-content: space-between; }
.ns-wordmark { height: 24px; width: auto; }
.ns-kit-tag { font-family: ui-monospace, Menlo, monospace; font-size: 10px; letter-spacing: 0.18em; color: var(--ns-paper-soft); }
.ns-sw { display: flex; flex-direction: column; gap: 0.4rem; font-family: ui-monospace, Menlo, monospace; font-size: 10px; }
.ns-sw .ns-chip { width: 44px; height: 30px; border-radius: 2px; }
.ns-sw .ns-chip-b { box-shadow: inset 0 0 0 1px rgba(26,26,26,0.14); }
.ns-sw b { color: var(--ns-paper); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.ns-sw span { color: var(--ns-paper-dim); }
.ns-spec { display: flex; align-items: center; gap: 0.9rem; }
.ns-aa { font-family: "Inter", system-ui, sans-serif; font-size: 32px; font-weight: 300; line-height: 1; color: var(--ns-paper); }
.ns-aa-serif { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; color: var(--ns-accent); }
.ns-spec-meta { display: flex; flex-direction: column; gap: 2px; font-family: ui-monospace, Menlo, monospace; font-size: 10px; }
.ns-spec-meta b { color: var(--ns-paper); font-weight: 500; }
.ns-spec-meta i { font-style: normal; color: var(--ns-paper-dim); }
.ns-mark-cell { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.ns-star-sm { width: 26px; height: 26px; color: var(--ns-accent); }
.ns-dotgrid-chip { width: 42px; height: 26px; background-image: radial-gradient(rgba(26,26,26,0.4) 1px, transparent 1px); background-size: 7px 7px; }
.ns-bracket-chip { font-family: ui-monospace, Menlo, monospace; color: var(--ns-accent); font-size: 1rem; letter-spacing: 0.1em; }
.ns-kit-mini { font-family: ui-monospace, Menlo, monospace; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ns-paper-soft); }

/* sectioned brand-kit layout (Logo / Colour / Type / Elements) */
.ns-kit-sec { display: grid; grid-template-columns: 70px 1fr; gap: 0.9rem; align-items: start; padding: 0.8rem 0; border-top: 1px solid rgba(26,26,26,0.1); }
.ns-kit-sec:first-child { border-top: 0; }
.ns-kit-seclabel { font-family: ui-monospace, Menlo, monospace; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ns-paper-soft); padding-top: 0.4rem; }
.ns-kit-body { display: flex; flex-wrap: wrap; gap: 0.7rem 1.3rem; align-items: center; }
.ns-kit-logo .ns-wordmark { height: 30px; }
.ns-kit-note { font-family: ui-monospace, Menlo, monospace; font-size: 10px; line-height: 1.5; color: var(--ns-paper-dim); max-width: 30rem; }
@media (max-width: 640px) { .ns-kit-sec { grid-template-columns: 1fr; gap: 0.6rem; } }
