/* ============================================
   PotiguarSoft — Modern Enhancements
   ============================================ */

.site-modern {
  cursor: default;
}

/* Mesh + noise overlays */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(34, 211, 238, 0.14), transparent 50%),
    radial-gradient(ellipse 50% 40% at 80% 10%, rgba(139, 92, 246, 0.12), transparent 45%),
    radial-gradient(ellipse 40% 50% at 60% 80%, rgba(59, 130, 246, 0.08), transparent 50%);
  animation: meshShift 18s ease-in-out infinite alternate;
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes meshShift {
  0% { opacity: 0.85; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05) translate(2%, -1%); }
}

/* Page load */
.site-modern main,
.site-modern .page-hero {
  animation: pageIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cursor glow — desktop only */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  opacity: 0;
}

body.has-cursor .cursor-glow {
  opacity: 1;
}

@media (hover: none), (max-width: 1024px) {
  .cursor-glow { display: none !important; }
}

/* Animated gradient text */
.gradient-text {
  background-size: 200% auto;
  animation: gradientFlow 4s linear infinite;
}

@keyframes gradientFlow {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* Shimmer on primary buttons */
.btn--primary {
  position: relative;
  overflow: hidden;
}

.btn--primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: left 0.5s;
}

.btn--primary:hover::after {
  left: 120%;
}

/* Glass — gradient border glow */
.glass--glow {
  position: relative;
  isolation: isolate;
}

.glass--glow::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.4), transparent 40%, transparent 60%, rgba(139, 92, 246, 0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
  z-index: -1;
  pointer-events: none;
}

.glass--glow:hover::before {
  opacity: 1;
}

.glass.glass--glow:not([data-tilt]):hover,
.glass.glass--glow[data-tilt]:not(:hover) {
  transform: translateY(-4px);
}

/* Header upgrade */
.header.scrolled {
  background: rgba(3, 7, 18, 0.75);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav__link {
  position: relative;
}

.nav__link::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 18px;
  right: 18px;
  height: 2px;
  background: var(--gradient-hero);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav__link:hover::after,
.nav__link.active::after {
  transform: scaleX(1);
}

/* Hero upgrades */
.hero {
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 20%;
  left: 50%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.06) 0%, transparent 65%);
  transform: translateX(-50%);
  pointer-events: none;
}

.hero__badge {
  animation: badgeGlow 3s ease-in-out infinite;
}

@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(34, 211, 238, 0); }
  50% { box-shadow: 0 0 24px rgba(34, 211, 238, 0.15); }
}

.hero__title {
  letter-spacing: -0.02em;
}

.hero__visual {
  perspective: 1000px;
}

.hero__card {
  transform-style: preserve-3d;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 24px 80px rgba(0, 0, 0, 0.45),
    0 0 60px rgba(34, 211, 238, 0.08);
}

.hero__orbit {
  position: absolute;
  inset: -20px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero__orbit-ring {
  position: absolute;
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 50%;
  animation: orbitSpin 20s linear infinite;
}

.hero__orbit-ring:nth-child(1) {
  width: 100%;
  height: 100%;
}

.hero__orbit-ring:nth-child(2) {
  width: 115%;
  height: 115%;
  border-color: rgba(139, 92, 246, 0.12);
  animation-duration: 28s;
  animation-direction: reverse;
}

.hero__orbit-dot {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-cyan);
}

@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}

.hero__stat strong {
  font-variant-numeric: tabular-nums;
}

/* Marquee */
.marquee-section {
  position: relative;
  z-index: 1;
  padding: 28px 0;
  border-block: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.marquee-section::before,
.marquee-section::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}

.marquee-section::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-deep), transparent);
}

.marquee-section::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg-deep), transparent);
}

.marquee {
  display: flex;
  overflow: hidden;
}

.marquee__track {
  display: flex;
  gap: 48px;
  animation: marqueeScroll 35s linear infinite;
  flex-shrink: 0;
}

.marquee__track span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.marquee__track span i {
  color: var(--accent-cyan);
  font-size: 1.1rem;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Bento-style process strip */
.process-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.process-step {
  padding: 24px 20px;
  text-align: center;
  position: relative;
}

.process-step__num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.5;
  line-height: 1;
  margin-bottom: 8px;
}

.process-step h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.process-step p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* CTA banner animated border */
.cta-banner {
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg, transparent, rgba(34, 211, 238, 0.15), transparent, rgba(139, 92, 246, 0.15), transparent);
  animation: ctaRotate 8s linear infinite;
  opacity: 0.6;
}

.cta-banner > * {
  position: relative;
  z-index: 1;
}

@keyframes ctaRotate {
  to { transform: rotate(360deg); }
}

/* Portfolio shine */
.portfolio-card.glass--glow .portfolio-card__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.12) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.7s ease;
}

.portfolio-card.glass--glow:hover .portfolio-card__image::after {
  transform: translateX(100%);
}

/* Feature icon pulse */
.feature-card__icon,
.service-card__icon {
  transition: transform 0.4s ease, box-shadow 0.4s;
}

.glass--glow:hover .feature-card__icon,
.glass--glow:hover .service-card__icon {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.25);
}

/* Page hero inner pages */
.page-hero {
  position: relative;
}

.page-hero .section-title {
  letter-spacing: -0.02em;
}

.page-hero__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(34, 211, 238, 0.12), transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-hero);
  z-index: 10001;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.1s linear;
}

/* Reveal stagger upgrade */
.reveal {
  transform: translateY(40px) scale(0.98);
}

.reveal.visible {
  transform: translateY(0) scale(1);
}

/* Tilt ready */
[data-tilt] {
  transform-style: preserve-3d;
  will-change: transform;
}

/* Footer glow line */
.footer {
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-violet), transparent);
  opacity: 0.5;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .gradient-text,
  .marquee__track,
  .hero__orbit-ring,
  .bg-mesh,
  .cta-banner::before {
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1024px) {
  .process-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .process-strip {
    grid-template-columns: 1fr;
  }

  .hero__orbit {
    display: none;
  }
}

/* Chatbot polish */
.chatbot__panel {
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 80px rgba(34, 211, 238, 0.08);
}

.chatbot__toggle {
  box-shadow: 0 8px 40px rgba(34, 211, 238, 0.45);
}
