/**
 * ====================================================================================================
 *   NIGAMA CONNECT — CINEMATIC HERO & 3D SMARTPHONE FLIPPING ENGINE
 *   File: css/hero.css
 *   Architecture: 3D Titanium Mockup, Stage Transitions & Interactive Lineage Tree Preview
 * ====================================================================================================
 */

/* ----------------------------------------------------------------------------------------------------
 * 1. HERO WRAPPER & ATMOSPHERIC STAGING
 * ---------------------------------------------------------------------------------------------------- */
.nc-hero-section {
  position: relative;
  padding: 3rem 0 6rem 0;
  overflow: hidden;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.nc-hero-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 20%, rgba(15, 163, 217, 0.15) 0%, transparent 65%),
              radial-gradient(circle at 80% 60%, rgba(16, 185, 129, 0.1) 0%, transparent 55%),
              radial-gradient(circle at 20% 70%, rgba(245, 158, 11, 0.08) 0%, transparent 50%);
  z-index: 0;
}

.nc-hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.4;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

.nc-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2.5rem, 4vw, 5rem);
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (min-width: 1400px) {
  .nc-phone-mockup {
    width: 340px;
    height: 680px;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   HERO ACTIONS & PROPORTIONAL BUTTONS
   ────────────────────────────────────────────────────────────────────────── */
.nc-hero-actions-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
  width: 100%;
}

.nc-hero-cta-btn {
  min-width: 220px;
  height: 52px;
  justify-content: center;
  flex-shrink: 0;
  width: auto;
}

.nc-hero-video-btn {
  min-width: 200px;
  height: 52px;
  justify-content: center;
  flex-shrink: 0;
  width: auto;
}

/* Unique Kinship Credentials Trust Bar */
.nc-hero-trust-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.25rem;
  width: 100%;
}

.nc-hero-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--nc-text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--nc-dur-fast) ease;
}

.nc-hero-trust-pill:hover {
  border-color: rgba(15, 163, 217, 0.35);
  color: var(--nc-text-primary);
  transform: translateY(-1px);
}

[data-theme="light"] .nc-hero-trust-pill {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(15, 163, 217, 0.2);
  color: #334155;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

/* ----------------------------------------------------------------------------------------------------
 * 2. 3D TITANIUM SMARTPHONE MOCKUP (`.nc-phone-3d`)
 * ---------------------------------------------------------------------------------------------------- */
.nc-phone-stage {
  perspective: 1400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.nc-phone-mockup {
  position: relative;
  width: 320px;
  height: 650px;
  background: #000000;
  border-radius: 48px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8),
              0 0 40px -5px var(--nc-brand-primary-glow),
              inset 0 0 3px 2px rgba(255, 255, 255, 0.2);
  border: 4px solid #2B3444; /* Titanium Bezel */
  transform-style: preserve-3d;
  transform: rotateY(-14deg) rotateX(8deg);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
  overflow: hidden;
  will-change: transform;
}

[data-theme="light"] .nc-phone-mockup {
  border-color: #CBD5E1;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.35),
              0 0 40px -5px var(--nc-brand-primary-glow);
}

/* Specular Glare Layer */
.nc-phone-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.05) 100%);
  pointer-events: none;
  z-index: 20;
  mix-blend-mode: overlay;
}

/* Dynamic Island & Camera */
.nc-phone-island {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 26px;
  background: #000000;
  border-radius: 20px;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.nc-phone-island-camera {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0A1120;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.nc-phone-island-sensor {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #111E36;
}

/* Status Bar Inside Phone */
.nc-phone-status-bar {
  position: absolute;
  top: 14px;
  left: 24px;
  right: 24px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #FFFFFF;
  font-family: var(--nc-font-display);
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 22;
  pointer-events: none;
}

/* Home Indicator Bar */
.nc-phone-home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--nc-radius-full);
  z-index: 25;
}

/* ----------------------------------------------------------------------------------------------------
 * 3. SMARTPHONE SCREEN STAGES (SPLASH -> GET STARTED -> DASHBOARD)
 * ---------------------------------------------------------------------------------------------------- */
.nc-phone-screen-container {
  position: absolute;
  inset: 0;
  border-radius: 44px;
  overflow: hidden;
  background: #020617;
}

.nc-phone-stage-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95);
  transition: opacity 0.5s ease, transform 0.5s var(--nc-ease-spring), visibility 0.5s ease;
  padding: 50px 16px 24px 16px;
  overflow-y: auto;
  scrollbar-width: none;
}

.nc-phone-stage-view::-webkit-scrollbar {
  display: none;
}

.nc-phone-stage-view.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 10;
}

/* Stage 0: Animated Splash View */
.nc-stage-splash {
  background: radial-gradient(circle at 50% 40%, #0B1933 0%, #020617 85%);
  align-items: center;
  justify-content: center;
  text-align: center;
}

.nc-splash-circle-pulse {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(15, 163, 217, 0.1);
  border: 2px solid var(--nc-brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 30px var(--nc-brand-primary-glow);
  animation: nc-pulse-halo 2.5s infinite;
}

.nc-splash-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.nc-splash-title {
  font-family: var(--nc-font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 0.25rem;
}

.nc-splash-motto {
  font-size: 0.75rem;
  color: var(--nc-brand-secondary-light);
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
}

.nc-splash-loader-bar {
  width: 140px;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.nc-splash-loader-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  background: var(--nc-brand-primary);
  border-radius: 4px;
  animation: nc-loading-slide 1.8s infinite ease-in-out;
}

@keyframes nc-loading-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

/* Stage 1: Get Started Onboarding View */
.nc-stage-onboarding {
  background: #060E1E;
  justify-content: space-between;
}

.nc-onboarding-hero {
  text-align: center;
  margin-top: 1.5rem;
}

.nc-onboarding-img {
  width: 100%;
  max-height: 150px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.nc-onboarding-lang-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--nc-radius-full);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--nc-brand-gold);
  color: var(--nc-brand-gold);
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* Stage 2: Live Family Dashboard View */
.nc-stage-dashboard {
  background: radial-gradient(circle at 50% 10%, #0F2042 0%, #030816 85%);
  padding: 50px 14px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  scrollbar-width: none;
}

.nc-stage-dashboard::-webkit-scrollbar {
  display: none;
}

.nc-dash-mini-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.nc-dash-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nc-dash-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0FA3D9, #10B981);
  border: 1.5px solid #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  color: #FFFFFF;
  box-shadow: 0 0 10px rgba(15, 163, 217, 0.5);
}

.nc-dash-user-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
}

.nc-dash-user-gotram {
  font-size: 0.62rem;
  color: #38BDF8;
  font-weight: 600;
}

/* Prominently Highlighted Connection Counts */
.nc-dash-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.nc-dash-stat-pill {
  background: linear-gradient(180deg, rgba(15, 29, 56, 0.9) 0%, rgba(8, 15, 30, 0.95) 100%);
  border: 1.5px solid rgba(15, 163, 217, 0.35);
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.nc-dash-stat-pill.stat-family {
  border-color: rgba(15, 163, 217, 0.6);
  box-shadow: 0 0 15px rgba(15, 163, 217, 0.25);
}

.nc-dash-stat-pill.stat-relatives {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
}

.nc-dash-stat-pill.stat-friends {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
}

.nc-dash-stat-num {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
  font-family: var(--nc-font-display);
}

.nc-dash-stat-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* Reminder and Notification Cards inside phone */
.nc-reminder-widget {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nc-reminder-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.nc-rem-festival {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.nc-rem-matrimony {
  border-color: rgba(236, 72, 153, 0.5);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.nc-rem-messages {
  border-color: rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.nc-rem-event {
  border-color: rgba(15, 163, 217, 0.5);
  background: linear-gradient(135deg, rgba(15, 163, 217, 0.15) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.nc-rem-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nc-rem-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
}

.nc-rem-tag {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nc-rem-festival .nc-rem-tag { color: #F59E0B; }
.nc-rem-matrimony .nc-rem-tag { color: #EC4899; }
.nc-rem-messages .nc-rem-tag { color: #10B981; }
.nc-rem-event .nc-rem-tag { color: #38BDF8; }

.nc-rem-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nc-rem-sub {
  font-size: 0.64rem;
  color: #CBD5E1;
  line-height: 1.2;
  margin-top: 1px;
}

/* In-App Bottom Navigation Bar */
.nc-phone-inapp-bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 4px 4px 4px;
  background: rgba(11, 20, 38, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: auto;
  border-radius: 12px 12px 0 0;
}

.nc-inapp-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #64748B;
  font-size: 0.55rem;
  font-weight: 600;
  position: relative;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nc-inapp-nav-item.is-active {
  color: #0FA3D9;
}

.nc-inapp-nav-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.nc-inapp-nav-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  background: #EF4444;
  color: #FFFFFF;
  font-size: 0.5rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 6px;
  line-height: 1;
}

/* Phone Stage Switcher Controls */
.nc-phone-stage-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  background: var(--nc-surface-glass);
  border: 1px solid var(--nc-border-glass);
  padding: 0.35rem;
  border-radius: var(--nc-radius-full);
  backdrop-filter: var(--nc-blur-dock);
  -webkit-backdrop-filter: var(--nc-blur-dock);
}

.nc-phone-stage-pill {
  padding: 0.375rem 0.875rem;
  border-radius: var(--nc-radius-full);
  font-family: var(--nc-font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--nc-text-secondary);
  cursor: pointer;
  transition: all var(--nc-dur-fast) ease;
}

.nc-phone-stage-pill.is-active {
  background: var(--nc-brand-primary);
  color: #FFFFFF;
  box-shadow: 0 0 12px var(--nc-brand-primary-glow);
}

/* ----------------------------------------------------------------------------------------------------
 * 4. INTERACTIVE 3D FAMILY TREE CANVAS & EXPLORER
 * ---------------------------------------------------------------------------------------------------- */
.nc-tree-preview-section {
  padding: 5rem 0;
  overflow: hidden;
  position: relative;
}

/* Tree Control Toolbar */
.nc-tree-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
  background: var(--nc-surface-card);
  border: 1px solid var(--nc-border-subtle);
  border-radius: var(--nc-radius-md);
  font-size: 0.85rem;
}

.nc-tree-tools-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--nc-text-secondary);
}

.nc-tree-tools-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nc-tree-tool-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--nc-surface-elevated);
  border: 1px solid var(--nc-border-subtle);
  color: var(--nc-text-primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--nc-transition-fast);
}

.nc-tree-tool-btn:hover {
  border-color: var(--nc-brand-primary);
  color: var(--nc-brand-primary);
}

/* Outer Scrollable/Pannable Viewport */
.nc-tree-viewport-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: var(--nc-radius-xl);
  border: 1px solid var(--nc-border-glass);
  box-shadow: var(--nc-shadow-lg), inset 0 0 40px rgba(0, 0, 0, 0.6);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.nc-tree-canvas-container {
  position: relative;
  min-width: 1060px;
  width: 100%;
  height: 580px;
  background: radial-gradient(circle at 50% 50%, #0B1933 0%, #020617 90%);
  overflow: hidden;
  touch-action: pan-x pan-y pinch-zoom;
  cursor: grab;
}

.nc-tree-canvas-inner {
  position: relative;
  width: 1060px;
  height: 580px;
  margin: 0 auto;
  transition: transform 0.15s ease-out;
  transform-origin: center center;
}

/* Light Theme High-Contrast Overrides for Tree Canvas */
[data-theme="light"] .nc-tree-viewport-wrapper {
  border: 1.5px solid #CBD5E1 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .nc-tree-canvas-container {
  background: radial-gradient(circle at 50% 50%, #F8FAFC 0%, #E2E8F0 100%) !important;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .nc-tree-toolbar {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
}

[data-theme="light"] .nc-tree-tools-left {
  color: #334155 !important;
}

[data-theme="light"] .nc-tree-tool-btn {
  background: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
}

[data-theme="light"] .nc-tree-tool-btn:hover {
  background: #0284C7 !important;
  color: #FFFFFF !important;
  border-color: #0284C7 !important;
}

[data-theme="light"] .nc-tree-node {
  background: #FFFFFF !important;
  border: 1.5px solid #CBD5E1 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .nc-tree-node:hover {
  border-color: #0284C7 !important;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.25) !important;
}

[data-theme="light"] .nc-node-avatar {
  background: #F0F9FF !important;
  border-color: #0284C7 !important;
  color: #0284C7 !important;
}

[data-theme="light"] .nc-node-name {
  color: #0F172A !important;
}

[data-theme="light"] .nc-node-rel {
  color: #475569 !important;
}

[data-theme="light"] .nc-node-gotra-tag {
  color: #0284C7 !important;
}

[data-theme="light"] .nc-tree-node.is-self {
  background: linear-gradient(135deg, #FEF3C7 0%, #FFFFFF 100%) !important;
  border-color: #D97706 !important;
  box-shadow: 0 4px 20px rgba(217, 119, 6, 0.35) !important;
}

[data-theme="light"] .nc-tree-node.is-self .nc-node-avatar {
  background: #FFFBEB !important;
  border-color: #D97706 !important;
  color: #D97706 !important;
}

[data-theme="light"] .nc-branch-line {
  stroke: #0284C7 !important;
  opacity: 0.95 !important;
  stroke-width: 2.8px !important;
}

[data-theme="light"] #nc-node-detail-card {
  background: #FFFFFF !important;
  border-color: #0284C7 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
  color: #0F172A !important;
}

[data-theme="light"] .nc-mobile-gen-card {
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1.5px solid #CBD5E1 !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
  color: #0F172A !important;
}

[data-theme="light"] .nc-mobile-gen-card h4 {
  color: #0284C7 !important;
}

[data-theme="light"] .nc-mobile-gen-card p {
  color: #334155 !important;
}

[data-theme="light"] .nc-gen-tab-btn {
  background: rgba(255, 255, 255, 0.85) !important;
  border: 1px solid #CBD5E1 !important;
  color: #334155 !important;
}

[data-theme="light"] .nc-gen-tab-btn:hover {
  background: #E0F2FE !important;
  border-color: #0284C7 !important;
  color: #0284C7 !important;
}

[data-theme="light"] .nc-gen-tab-btn.is-active {
  background: #0284C7 !important;
  color: #FFFFFF !important;
  border-color: #0284C7 !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35) !important;
  font-weight: 700 !important;
}

.nc-gen-tab-btn.is-active {
  background: var(--nc-brand-primary) !important;
  color: #FFFFFF !important;
  border-color: var(--nc-brand-primary) !important;
  box-shadow: 0 4px 14px var(--nc-brand-primary-glow) !important;
  font-weight: 700 !important;
}

/* SVG Lineage Connections */
.nc-tree-svg-branches {
  position: absolute;
  inset: 0;
  width: 1060px;
  height: 580px;
  pointer-events: none;
}

.nc-branch-line {
  stroke-dasharray: 6;
  animation: nc-pulse-branch 16s linear infinite;
  opacity: 0.75;
}

@keyframes nc-pulse-branch {
  to {
    stroke-dashoffset: -120;
  }
}

/* Node Elements */
.nc-tree-node {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 0.75rem 1.125rem;
  background: var(--nc-surface-elevated);
  border: 1px solid var(--nc-border-glass-strong);
  border-radius: var(--nc-radius-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: transform var(--nc-dur-fast) var(--nc-ease-spring),
              border-color var(--nc-dur-fast) ease,
              box-shadow var(--nc-dur-fast) ease;
  user-select: none;
  -webkit-user-select: none;
  z-index: 2;
}

.nc-tree-node:hover {
  transform: translate(-50%, -50%) scale(1.08);
  border-color: var(--nc-brand-primary);
  box-shadow: 0 8px 24px var(--nc-brand-primary-glow);
  z-index: 5;
}

/* Self Node with Golden Aura */
.nc-tree-node.is-self {
  border-color: var(--nc-brand-gold);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(17, 32, 59, 0.95) 100%);
  box-shadow: 0 0 35px var(--nc-brand-gold-glow);
  animation: nc-pulse-gold 3s infinite ease-in-out;
}

@keyframes nc-pulse-gold {
  0%, 100% { box-shadow: 0 0 25px var(--nc-brand-gold-glow); }
  50% { box-shadow: 0 0 45px rgba(245, 158, 11, 0.6); }
}

.nc-node-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--nc-surface-glass);
  border: 1.5px solid var(--nc-brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--nc-font-display);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--nc-brand-primary);
}

.nc-tree-node.is-self .nc-node-avatar {
  border-color: var(--nc-brand-gold);
  color: var(--nc-brand-gold);
}

.nc-node-info {
  display: flex;
  flex-direction: column;
}

.nc-node-name {
  font-family: var(--nc-font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--nc-text-primary);
  line-height: 1.2;
}

.nc-node-rel {
  font-size: 0.7rem;
  color: var(--nc-text-muted);
}

.nc-node-gotra-tag {
  font-size: 0.65rem;
  color: var(--nc-brand-accent);
  font-weight: 600;
}

/* Floating Kinship Detail Sheet (`#nc-node-detail-card`) */
#nc-node-detail-card {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 320px;
  background: var(--nc-surface-elevated);
  border: 1px solid var(--nc-border-glow-primary);
  border-radius: var(--nc-radius-xl);
  padding: 1.5rem;
  box-shadow: var(--nc-shadow-lg), 0 0 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: var(--nc-blur-modal);
  -webkit-backdrop-filter: var(--nc-blur-modal);
  transform: translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--nc-dur-base) var(--nc-ease-spring);
  z-index: 20;
}

#nc-node-detail-card.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

/* Mobile Generational Card Explorer */
.nc-mobile-gen-explorer {
  display: none;
  margin-top: 1.5rem;
}

@media (max-width: 768px) {
  .nc-hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .nc-phone-mockup {
    width: 280px;
    height: 560px;
    transform: none !important;
  }

  .nc-mobile-gen-explorer {
    display: block;
  }

  .nc-tree-canvas-container {
    height: 580px;
  }

  #nc-node-detail-card {
    inset: auto 1rem 1rem 1rem;
    width: auto;
  }
}
