/* ══════════════════════════════════════
   RoyaltyScope — Blueprint Edition
   ══════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #0d2318;
  color: #fff;
  overflow-x: hidden;
}

::selection { background: #1B4332; color: #fff; }

/* ══════════════════════════════════════
   Navbar — slides in on scroll
   ══════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 3rem;
  background: rgba(244, 241, 236, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.visible { transform: translateY(0); }

.nav-logo {
  height: 22px;
  width: auto;
}

.nav-cta {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1B4332;
  text-decoration: none;
  border: 1px solid rgba(27, 67, 50, 0.25);
  padding: 0.32rem 0.75rem;
  transition: background 0.25s ease, color 0.25s ease;
}

.nav-cta:hover {
  background: #1B4332;
  color: #fff;
  border-color: #1B4332;
}

/* ══════════════════════════════════════
   SECTION 1 — Hero (cream/light)
   ══════════════════════════════════════ */
.hero {
  min-height: 100vh;
  background: #f4f1ec;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 4rem 2rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

.hero-logo {
  height: clamp(36px, 7vh, 80px);
  width: auto;
  opacity: 0;
  animation: fadeUp 1.1s cubic-bezier(0.16,1,0.3,1) 0.2s forwards;
}

.hero-headline {
  text-align: center;
  line-height: 1.15;
}

.hero-headline span {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2.8rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: #222;
  opacity: 0;
  transform: translateY(24px);
  animation: slideUp 1s cubic-bezier(0.16,1,0.3,1) forwards;
}

.hero-headline span:nth-child(1) { animation-delay: 0.5s; }
.hero-headline span:nth-child(2) { animation-delay: 0.65s; }

.hero-headline .accent {
  font-style: normal;
  color: #1B4332;
  font-weight: 300;
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeIn 1s ease 1.4s forwards;
}

.scroll-line {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.25), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}

/* ══════════════════════════════════════
   SECTION 2 — Blueprint
   ══════════════════════════════════════ */
.blueprint-section {
  background: #0d2318;
  padding: 8rem 0 6rem;
  position: relative;
  overflow: hidden;
}

/* Subtle horizontal scan line */
.blueprint-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 39px,
    rgba(255,255,255,0.018) 39px,
    rgba(255,255,255,0.018) 40px
  );
  pointer-events: none;
}

/* ── Manifesto ── */
.manifesto {
  text-align: center;
  padding: 0 2rem;
  margin-bottom: 5rem;
}

.manifesto-line {
  font-size: clamp(1.6rem, 3.5vw, 3.2rem);
  font-weight: 200;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: rgba(255,255,255,0.8);
}

.manifesto-accent {
  color: #4ade9a;
  font-weight: 200;
}

/* ── Schematic SVG ── */
.schematic-wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto 5rem;
  padding: 0 2rem;
}

.schematic {
  width: 100%;
  height: auto;
  display: block;
}

/* Draw-on animation — all stroked paths start invisible */
.draw {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  fill: none;
}

.draw-1 { animation: drawLine 1.4s cubic-bezier(0.4,0,0.2,1) 0.3s forwards; }
.draw-2 { animation: drawLine 1s cubic-bezier(0.4,0,0.2,1) 1.2s forwards; }
.draw-3 { animation: drawLine 0.8s cubic-bezier(0.4,0,0.2,1) 1.8s forwards; }
.draw-4 { animation: drawLine 1s cubic-bezier(0.4,0,0.2,1) 2.2s forwards; }
.draw-5 { animation: drawLine 1s cubic-bezier(0.4,0,0.2,1) 2.8s forwards; }
.draw-6 { animation: drawLine 0.9s cubic-bezier(0.4,0,0.2,1) 3.4s forwards; }
.draw-7 { animation: drawLine 0.9s cubic-bezier(0.4,0,0.2,1) 3.9s forwards; }

/* Labels fade in after their element draws */
.label { opacity: 0; }
.label-1 { animation: fadeIn 0.6s ease 1.4s forwards; }
.label-2 { animation: fadeIn 0.6s ease 1.6s forwards; }
.label-3 { animation: fadeIn 0.6s ease 2.2s forwards; }
.label-4 { animation: fadeIn 0.6s ease 2.8s forwards; }
.label-5 { animation: fadeIn 0.6s ease 3.2s forwards; }
.label-6 { animation: fadeIn 0.6s ease 3.8s forwards; }
.label-7 { animation: fadeIn 0.6s ease 4.3s forwards; }

/* Flow particles along pipeline */
.particle {
  opacity: 0;
  animation: flowParticle 0s linear infinite;
}

.p1 { animation: flowParticle 3s linear 3s infinite; }
.p2 { animation: flowParticle 3s linear 4.2s infinite; }
.p3 { animation: flowParticle 3s linear 5s infinite; }

/* ── Video inset ── */
.video-inset {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
}

.video-frame {
  position: relative;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #0a1a0f;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
}

/* Animated scan line over video */
.video-scan {
  position: absolute;
  top: -4px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, transparent, rgba(74,222,154,0.6), transparent);
  animation: scanDown 4s linear infinite;
}

/* Blueprint corner brackets on video */
.video-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  z-index: 2;
}
.video-corner.tl { top: 6px; left: 6px; border-top: 1px solid rgba(74,222,154,0.6); border-left: 1px solid rgba(74,222,154,0.6); }
.video-corner.tr { top: 6px; right: 6px; border-top: 1px solid rgba(74,222,154,0.6); border-right: 1px solid rgba(74,222,154,0.6); }
.video-corner.bl { bottom: 6px; left: 6px; border-bottom: 1px solid rgba(74,222,154,0.6); border-left: 1px solid rgba(74,222,154,0.6); }
.video-corner.br { bottom: 6px; right: 6px; border-bottom: 1px solid rgba(74,222,154,0.6); border-right: 1px solid rgba(74,222,154,0.6); }

.video-meta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
  min-width: 180px;
}

.video-label-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: #4ade9a;
  font-weight: 400;
}

.video-caption {
  font-size: clamp(0.9rem, 1.4vw, 1.15rem);
  font-weight: 300;
  line-height: 1.5;
  color: rgba(255,255,255,0.7);
  letter-spacing: -0.01em;
}

/* ══════════════════════════════════════
   SECTION 3 — CTA
   ══════════════════════════════════════ */
.cta-section {
  background: #f4f1ec;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding: 8rem 2rem 7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-inner {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.cta-headline {
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #222;
  margin-bottom: 2rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 1.6rem;
  border: 1px solid rgba(27,67,50,0.35);
  color: #1B4332;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s ease, color 0.4s ease;
}

.cta-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #1B4332;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.16,1,0.3,1);
  z-index: 0;
}

.cta-button span, .cta-arrow {
  position: relative;
  z-index: 1;
}

.cta-button:hover::before { transform: scaleX(1); }
.cta-button:hover { border-color: #1B4332; color: #fff; }
.cta-button:hover .cta-arrow { transform: translateX(4px); }

.cta-arrow { transition: transform 0.4s cubic-bezier(0.16,1,0.3,1); }

/* ══════════════════════════════════════
   Footer
   ══════════════════════════════════════ */
.site-footer {
  background: #0d2318;
  padding: 1.8rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  height: 20px;
  width: auto;
  opacity: 0.55;
  filter: brightness(0) invert(1);
}

.footer-email {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.25);
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer-email:hover { color: rgba(255,255,255,0.7); }

/* ══════════════════════════════════════
   Reveal on scroll
   ══════════════════════════════════════ */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}

[data-reveal].revealed { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════════════
   Keyframes
   ══════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
  50%       { opacity: 1;   transform: scaleY(1); }
}

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

@keyframes flowParticle {
  0%   { transform: translateX(162px); opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { transform: translateX(512px); opacity: 0; }
}

@keyframes scanDown {
  0%   { top: -4px; opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 0.5; }
  100% { top: 100%; opacity: 0; }
}

/* ══════════════════════════════════════
   Responsive
   ══════════════════════════════════════ */
@media (max-width: 700px) {
  .navbar { padding: 0.9rem 1.5rem; }

  .video-inset { grid-template-columns: 1fr; }
  .video-meta { min-width: unset; }

  .manifesto-line { font-size: clamp(1.4rem, 6vw, 2.2rem); }

  .site-footer {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    text-align: center;
  }
}
