/* ==========================================================================
   RDTHub - Single Hanging Card Hero (Suspended from Top Ceiling)
   Design: Minimalist Dark Mode / Glassmorphism Premium
   Physics: Full-Length Pendulum Swing & Dynamic Spring Hover
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  --bg-main: #0a0a0a;
  --bg-surface: rgba(18, 18, 22, 0.75);
  --bg-surface-hover: rgba(24, 24, 30, 0.88);

  --border-glass: rgba(255, 255, 255, 0.10);
  --border-glass-hover: rgba(255, 255, 255, 0.25);
  --border-highlight: rgba(255, 255, 255, 0.18);

  /* Paleta Verde Oficial extraída da Logo */
  --accent-green: #00c05a;
  --accent-green-light: #25e07a;
  --accent-glow-green: rgba(0, 192, 90, 0.35);
  --accent-green-subtle: rgba(0, 192, 90, 0.12);
  --border-green: rgba(0, 192, 90, 0.30);

  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --wire-color: rgba(255, 255, 255, 0.35);
  --wire-glow: rgba(255, 255, 255, 0.15);

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100vh;
  max-height: 100vh;
  width: 100%;
  overflow: hidden;
  position: fixed;
  inset: 0;
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  flex-direction: column;
}

/* Ambient Background Lighting & Grid (Tons Verdes da Logo) */
.bg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.28;
}

.ambient-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #059669 0%, transparent 70%);
  top: -180px;
  left: 25%;
  animation: orb-drift 15s ease-in-out infinite alternate;
}

.ambient-orb-2 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #00c05a 0%, transparent 70%);
  bottom: -120px;
  right: 20%;
  animation: orb-drift 18s ease-in-out infinite alternate-reverse;
}

.ambient-orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #047857 0%, transparent 70%);
  top: 40%;
  left: 10%;
  animation: orb-drift 14s ease-in-out infinite alternate;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 40%, transparent 85%);
}

@keyframes orb-drift {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(45px) scale(1.15); }
}

/* --- Top Navigation (Corner Minimalist, Non-Intrusive) --- */
.top-nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2.5rem;
  pointer-events: none; /* Allows click-through in the center */
}

.brand-logo,
.nav-status {
  pointer-events: auto; /* Re-enable pointer events for corners */
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand-logo-img {
  height: 32px;
  width: auto;
  max-width: 38px;
  object-fit: contain;
  border-radius: 6px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.4rem 0.95rem;
  border-radius: 9999px;
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(8px);
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.6; }
}

/* ==========================================================================
   Hero Stage & Hanging Rig (Coming directly from the top ceiling)
   ========================================================================== */
.hero-stage {
  position: relative;
  z-index: 10;
  height: 100vh;
  max-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 0; /* Anchored flush at the very top */
  overflow: hidden;
}

/* Rig container starting at top 0 */
.hanging-rig {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 0;
}

/* Top Ceiling Bracket / Mount at viewport top edge */
.ceiling-bracket {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 15;
}

.bracket-plate {
  width: 68px;
  height: 8px;
  background: #000000;
  border-bottom: 2px solid #ffffff;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.9), 0 0 8px rgba(255, 255, 255, 0.3);
}

.anchor-pin {
  width: 38px;
  height: 12px;
  background: #0c0c10;
  border: 2px solid #ffffff;
  border-radius: 4px;
  margin-top: -2px;
  box-shadow: 
    0 0 14px rgba(255, 255, 255, 0.6),
    0 3px 6px rgba(0, 0, 0, 0.9);
}

/* ==========================================================================
   Hanging Card Assembly & Pendulum Physics
   ========================================================================== */
.hanging-card-assembly {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 326px; /* Proporção 9:16 otimizada */
  
  /* CRITICAL: transform origin at 50% 0px (very top anchor point of the ceiling) */
  transform-origin: 50% 0px;
  
  /* Continuous natural pendulum swing */
  animation: pendulum-swing 6s cubic-bezier(0.445, 0.05, 0.55, 0.95) infinite alternate;
  will-change: transform;
}

/* Estado ativo durante o arrasto manual */
.hanging-card-assembly.is-dragging {
  animation: none !important;
  cursor: grabbing !important;
  user-select: none;
}

.hanging-card-assembly.is-physics-active {
  animation: none !important;
}

/* The Hanging Strap / Ribbon: Corda preta com borda branca, largura 30px */
.wire-cable {
  width: 30px; /* Largura solicitada: 30px */
  height: clamp(140px, 20vh, 230px);
  background: #070709;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.95),
    0 0 12px rgba(255, 255, 255, 0.25),
    inset 0 0 10px rgba(0, 0, 0, 0.8);
  border-radius: 3px;
  margin-top: 0px;
  position: relative;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
  will-change: height;
}

/* Costura sutil central no tecido preto */
.wire-cable::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.35) 0px,
    rgba(255, 255, 255, 0.35) 6px,
    transparent 6px,
    transparent 12px
  );
  opacity: 0.6;
}

/* Fastener clamp connecting 30px strap to the card */
.wire-clip {
  width: 48px;
  height: 12px;
  background: #0c0c10;
  border-radius: 4px;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 255, 255, 0.35);
  margin-bottom: -5px;
  position: relative;
  z-index: 2;
  transition: var(--transition-smooth);
}

/* ==========================================================================
   Glassmorphism Card Body (Formato 9:16)
   ========================================================================== */
.card-body {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: clamp(480px, 64vh, 580px);
  background: var(--bg-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: 26px;
  padding: 1.85rem 1.6rem;
  box-shadow: 
    0 25px 60px -15px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: var(--transition-smooth);
}

/* Top highlight pseudo */
.card-body::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* Card Header Row */
.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.category-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  color: var(--accent-green);
  background: var(--accent-green-subtle);
  border: 1px solid var(--border-green);
}

.card-badge-live {
  font-size: 0.75rem;
  font-weight: 600;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 9999px;
  padding: 0.25rem 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.card-badge-live::before {
  content: '';
  width: 7px;
  height: 7px;
  background-color: #00c05a;
  border-radius: 50%;
  box-shadow: 0 0 10px #00c05a;
}

/* Card Center Block: Logo, Título e Descrição */
.card-center-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: auto 0;
}

/* Logo acima do título (sem container neon, apenas a logo pura) */
.card-hero-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.6));
  transition: transform 0.35s ease;
}

/* Typography */
.card-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.card-desc {
  font-size: 0.885rem;
  color: var(--text-secondary);
  line-height: 1.65;
  text-align: center;
}

/* Micro-pills inferiores do card */
.card-pills-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.card-mini-pill {
  font-size: 0.725rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Interaction & Physics: Hover Effects (Amplified Swing & Spring Reaction)
   ========================================================================== */

/* Hover state & WebMobile periodic trigger */
.hanging-card-assembly:hover,
.hanging-card-assembly.active-hover-impulse {
  /* Dynamic spring swing trigger on hover */
  animation: dynamic-spring-boost 1s cubic-bezier(0.25, 1.25, 0.5, 1) forwards;
  z-index: 10;
}

.hanging-card-assembly:hover .card-body,
.hanging-card-assembly.active-hover-impulse .card-body {
  background: var(--bg-surface-hover);
  border-color: var(--border-glass-hover);
  box-shadow: 
    0 32px 65px -15px rgba(0, 0, 0, 0.9),
    0 0 35px -5px var(--accent-glow-green),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(2px);
}

.hanging-card-assembly:hover .card-body::after,
.hanging-card-assembly.active-hover-impulse .card-body::after {
  opacity: 1;
}

.hanging-card-assembly:hover .card-hero-logo,
.hanging-card-assembly.active-hover-impulse .card-hero-logo {
  transform: scale(1.06);
}

/* ==========================================================================
   Keyframes: Pendulum Physics & Spring Dynamic
   ========================================================================== */

/* Continuous gentle pendulum swing (desktop) */
@keyframes pendulum-swing {
  0% {
    transform: rotate(-3.5deg);
  }
  50% {
    transform: rotate(3.5deg);
  }
  100% {
    transform: rotate(-3.5deg);
  }
}

/* Dynamic Spring reaction (executa 1x de forma limpa e fluida) */
@keyframes dynamic-spring-boost {
  0% {
    transform: rotate(0deg) scale(1);
  }
  28% {
    transform: rotate(-5.5deg) scale(1.02);
  }
  62% {
    transform: rotate(3.8deg) scale(1.025);
  }
  82% {
    transform: rotate(-1.2deg) scale(1.01);
  }
  100% {
    transform: rotate(0deg) scale(1);
  }
}

/* ==========================================================================
   Bottom Status Bar (Fica sobreposto ao card com z-index 30)
   ========================================================================== */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.25rem 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  color: var(--text-muted);
  font-size: 0.825rem;
  z-index: 30; /* Fica à frente do card, que passa por trás dele */
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.98) 0%,
    rgba(10, 10, 10, 0.85) 60%,
    transparent 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
}

.bar-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 500;
  color: #cbd5e1;
}

.bar-icon {
  font-size: 0.95rem;
  color: var(--accent-green-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, color 0.25s ease;
}

.bar-separator {
  color: rgba(255, 255, 255, 0.2);
  font-weight: bold;
}

/* ==========================================================================
   Responsive Adaptations & WebMobile
   ========================================================================== */
@media (max-width: 768px), (hover: none) {
  .top-nav-bar {
    padding: 1.25rem 1.25rem;
  }

  .hanging-card-assembly {
    max-width: 90vw;
  }

  .card-body {
    padding: 1.75rem 1.4rem;
  }

  .wire-cable {
    height: clamp(90px, 14vh, 140px); /* Otimizado para telas menores */
  }

  .bottom-bar {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding-bottom: 1.5rem;
  }

  .bar-separator {
    display: none;
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .hanging-card-assembly,
  .ambient-orb,
  .status-dot,
  .card-body,
  .wire-cable,
  .card-cta-btn,
  .btn-arrow {
    animation: none !important;
  }

  .hanging-card-assembly:hover,
  .hanging-card-assembly.active-hover-impulse {
    animation: none !important;
    transform: translateY(-4px) !important;
  }
}


