@import url('theme.css');

/* ── Hero neural network ── */

.fp-hero-neural {
  position: relative;
  width: min(480px, 92vw);
  height: min(480px, 92vw);
  margin: 0 auto 1.75rem;
  overflow: visible;
}

.fp-neural-svg {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.fp-hero-neural-logo {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  pointer-events: none;
}

.fp-hero-neural-logo .fp-hero-icon {
  width: min(280px, 58vw);
  max-width: 100%;
  height: auto;
  margin: 0;
  border-radius: 1.35rem;
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.45));
  animation: fp-neural-logo-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.fp-neural-link {
  stroke: rgba(255, 248, 232, 0.72);
  stroke-width: 1.35;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: fp-trace-breathe 2.8s ease-in-out infinite;
}

.fp-neural-signal {
  stroke: #fffef8;
  stroke-width: 3.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  filter: url(#fp-signal-glow);
}

.fp-neural-signal--core {
  stroke: #ffffff;
  stroke-width: 1.6;
  filter: none;
}

.fp-neural-pad {
  fill: rgba(255, 250, 240, 0.92);
  stroke: rgba(245, 237, 216, 0.7);
  stroke-width: 0.7;
  opacity: 0;
  animation:
    fp-neural-node-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    fp-pad-glow 2.2s ease-in-out infinite;
  animation-delay: var(--delay), calc(var(--delay) + 1.1s);
}

.fp-neural-pad--pin {
  fill: rgba(255, 252, 245, 0.88);
  stroke: rgba(255, 255, 255, 0.75);
}

.fp-neural-pad--via {
  fill: none;
  stroke: rgba(255, 248, 232, 0.9);
  stroke-width: 1.6;
}

.fp-neural-pad--via-core {
  fill: rgba(255, 252, 245, 0.98);
  stroke: none;
}

.fp-neural-node {
  fill: url(#fp-neural-node-grad);
  opacity: 0;
  filter: url(#fp-neural-glow);
  animation: fp-neural-node-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--delay);
}

.fp-neural-node--hub {
  fill: rgba(245, 237, 216, 0.35);
  animation: fp-neural-hub-pulse 3s ease-in-out infinite;
  animation-delay: 0.4s;
}

@keyframes fp-neural-node-in {
  from { opacity: 0; }
  to { opacity: 0.92; }
}

@keyframes fp-trace-breathe {
  0%, 100% { stroke: rgba(255, 248, 232, 0.55); }
  50% { stroke: rgba(255, 252, 245, 0.92); }
}

@keyframes fp-pad-glow {
  0%, 100% {
    fill: rgba(255, 250, 240, 0.75);
    filter: drop-shadow(0 0 0 rgba(255, 252, 245, 0));
  }
  50% {
    fill: rgba(255, 255, 255, 1);
    filter: drop-shadow(0 0 6px rgba(255, 248, 232, 0.95));
  }
}

@keyframes fp-neural-hub-pulse {
  0%, 100% { opacity: 0.22; }
  50% { opacity: 0.5; }
}

@keyframes fp-neural-logo-in {
  from {
    opacity: 0;
    transform: scale(0.88);
    filter: blur(6px) drop-shadow(0 16px 36px rgba(0, 0, 0, 0.45));
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.45));
  }
}

/* ── Hero title: shimmer + glow + reveal ── */

.fp-hero h1.fp-hero-title {
  margin: 0 0 0.75rem;
  font-size: clamp(2.4rem, 6vw, 3.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-align: center;
  color: inherit;
}

.fp-hero-brand {
  position: relative;
  display: inline-block;
  background: linear-gradient(
    105deg,
    #1a1814 0%,
    #3d3428 18%,
    #c9b896 38%,
    #f5edd8 50%,
    #c9b896 62%,
    #3d3428 82%,
    #1a1814 100%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 12px rgba(26, 24, 20, 0.35));
  animation: fp-brand-shimmer 5.5s ease-in-out infinite;
}

/* Soft luminous halo behind brand (clipped text can't glow itself) */
.fp-hero-brand::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, #8a7a5c, #e8d9b8, #8a7a5c);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: blur(14px);
  opacity: 0.55;
  animation: fp-brand-shimmer 5.5s ease-in-out infinite, fp-brand-pulse 3.2s ease-in-out infinite;
  pointer-events: none;
}

.fp-hero-line {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.52em;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow:
    0 0 24px rgba(255, 255, 255, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.25);
  animation: fp-line-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

/* Sweep underline under Persian line */
.fp-hero-line::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 0.45rem;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 15%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(255, 255, 255, 0.15) 85%,
    transparent 100%
  );
  transform: scaleX(0);
  transform-origin: center;
  animation: fp-line-underline 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}

@keyframes fp-brand-shimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

@keyframes fp-brand-pulse {
  0%, 100% { opacity: 0.35; filter: blur(12px); }
  50% { opacity: 0.7; filter: blur(18px); }
}

@keyframes fp-line-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes fp-line-underline {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .fp-neural-link,
  .fp-neural-signal,
  .fp-neural-signal--core,
  .fp-neural-node,
  .fp-neural-node--hub,
  .fp-neural-pad,
  .fp-hero-neural-logo .fp-hero-icon {
    animation: none !important;
    opacity: 1;
    stroke-dashoffset: 0;
    transform: none;
    filter: none;
  }

  .fp-hero-brand,
  .fp-hero-brand::before,
  .fp-hero-line,
  .fp-hero-line::after {
    animation: none !important;
  }

  .fp-hero-brand {
    background-position: 40% center;
  }

  .fp-hero-brand::before {
    opacity: 0.4;
    filter: blur(12px);
  }

  .fp-hero-line::after {
    transform: scaleX(1);
  }
}
