/* ════════════════════════════════════════════════════════
   Finbase pizarra · Navbar
   Hoja arrancada de cuaderno con cinta washi diagonal en la
   esquina superior-izquierda. Wordmark "Finbase" subrayado
   con trazo coral hand-drawn. CTA = post-it amarillo con
   cinta coral.
   ════════════════════════════════════════════════════════ */

.nav-b {
  /* No sticky — el papel scrollea con todo el wall (coherencia metáfora) */
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 22px 30px 12px;
  pointer-events: none;
}
/* Wrapper que contiene papel + cinta. La cinta es hermana del
   papel para que NO le afecte el clip-path y pueda sobresalir
   libremente al wall. */
.nav-b-frame {
  position: relative;
  width: 100%;
  max-width: 960px;
  pointer-events: auto;
}
.nav-b-paper {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  padding: 16px 28px 16px 32px;
  background:
    /* Líneas horizontales azules — cuaderno rayado clásico, paso 24px */
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 23px,
      rgba(70, 120, 180, 0.28) 23px,
      rgba(70, 120, 180, 0.28) 24px
    ),
    #FFFFFF;
  box-shadow:
    0 1px 0 rgba(8, 48, 76, 0.04),
    0 14px 28px -12px rgba(8, 48, 76, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  /* Bordes superior e inferior desgarrados; izquierdo y derecho rectos. */
  clip-path: polygon(
    0% 4%,
    3% 1%, 6% 3%, 9% 0%, 13% 2%, 17% 0%, 21% 3%, 25% 1%, 29% 4%, 33% 0%,
    37% 2%, 41% 0%, 45% 3%, 49% 1%, 53% 4%, 57% 0%, 61% 2%, 65% 1%,
    69% 4%, 73% 0%, 77% 3%, 81% 1%, 85% 4%, 89% 0%, 93% 2%, 96% 0%, 99% 3%,
    100% 0%, 100% 100%,
    97% 96%, 93% 100%, 89% 96%, 85% 99%, 81% 95%, 77% 100%, 73% 96%, 69% 99%,
    65% 95%, 61% 100%, 57% 96%, 53% 99%, 49% 95%, 45% 100%, 41% 96%, 37% 99%,
    33% 95%, 29% 100%, 25% 96%, 21% 99%, 17% 95%, 13% 100%, 9% 96%, 5% 99%, 2% 95%,
    0% 96%
  );
  transform: rotate(-1deg);
}

/* Cinta washi diagonal sobre la esquina superior-izquierda */
.nav-b-tape {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  border-radius: 1px;
  box-shadow: 0 2px 4px rgba(8, 48, 76, 0.10);
  width: 88px;
  height: 18px;
}
.nav-b-tape-l {
  top: -2px;
  left: -22px;
  background: rgba(99, 102, 241, 0.42);
  border-left: 1px solid rgba(99, 102, 241, 0.50);
  border-right: 1px solid rgba(99, 102, 241, 0.50);
  transform: rotate(-32deg);
  transform-origin: 50% 50%;
}

/* Textura de grano de papel — turbulencia SVG sutil */
.nav-b-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.40;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='5'/><feColorMatrix values='0 0 0 0 0.4 0 0 0 0 0.3 0 0 0 0 0.18 0 0 0 0.06 0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}

/* Brand — wordmark "Finbase" en Caveat azul boli + subrayado coral */
.nav-b-brand {
  display: inline-block;
  text-decoration: none;
  color: var(--ink-pen);
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 32px;
  line-height: 1;
  padding-bottom: 8px;
}
.nav-b-wordmark {
  position: relative;
  display: inline-block;
  letter-spacing: 0.005em;
  color: var(--ink-pen);
}
.nav-b-underline {
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: -10px;
  width: calc(100% + 4px);
  height: 10px;
  overflow: visible;
}
.nav-b-underline path {
  transition: stroke-width 0.25s ease, opacity 0.25s ease;
}
.nav-b-brand:hover .nav-b-underline path {
  stroke-width: 5.5;
  opacity: 1;
}

/* Links — Caveat con subrayado coral en hover */
.nav-b-links {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}
.nav-b-links a {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 22px;
  color: var(--ink-soft);
  text-decoration: none;
  position: relative;
  line-height: 1;
  transition: color 0.2s ease;
}
.nav-b-links a:hover { color: var(--ink); }
.nav-b-links a:hover::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--mk-coral, #FF6B47);
  border-radius: 1px;
  filter: url(#nav-b-rough);
}

/* CTA = post-it amarillo con cinta coral en la esquina sup-derecha */
.nav-b-cta {
  position: relative;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 22px;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(180deg, #FFF59D 0%, #FFE873 100%);
  padding: 9px 22px 10px;
  border-radius: 3px;
  line-height: 1;
  display: inline-block;
  transform: rotate(-3deg);
  transform-origin: 50% 50%;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 1px 1px rgba(8, 48, 76, 0.08),
    0 6px 12px -4px rgba(8, 48, 76, 0.18);
}
.nav-b-cta-tape {
  position: absolute;
  top: -7px;
  right: 8px;
  width: 38px;
  height: 14px;
  background: rgba(255, 107, 71, 0.50);
  border-left: 1px solid rgba(255, 107, 71, 0.55);
  border-right: 1px solid rgba(255, 107, 71, 0.55);
  transform: rotate(22deg);
  border-radius: 1px;
  box-shadow: 0 1px 2px rgba(8, 48, 76, 0.10);
  pointer-events: none;
}
.nav-b-cta:hover {
  transform: rotate(0deg) translateY(-2px);
}

@media (max-width: 820px) {
  .nav-b-links { display: none; }
  .nav-b-paper { gap: 14px; padding: 14px 18px 14px 24px; }
  .nav-b-brand { font-size: 26px; }
}
@media (max-width: 480px) {
  .nav-b-brand { font-size: 22px; }
}
